Merge tag android-5.1.0_r1 into AOSP_5.1_MERGE
Change-Id: I280e6645156b4fdda8c0d8ebe344f23ddc6ba650
diff --git a/BUILD.gn b/BUILD.gn
index a86c8a7..a361fc2 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6,6 +6,8 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
+# TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330.
+
import("//build/config/arm.gni")
import("//build/config/crypto.gni")
import("//build/config/linux/pkg_config.gni")
@@ -21,7 +23,6 @@
if (build_with_chromium) {
defines = [
"WEBRTC_CHROMIUM_BUILD",
- "LOGGING_INSIDE_WEBRTC",
]
include_dirs = [
# overrides must be included first as that is the mechanism for
@@ -55,22 +56,26 @@
"WEBRTC_LINUX",
"WEBRTC_ANDROID",
]
- if (enable_android_opensl) {
+ if (rtc_enable_android_opensl) {
defines += [ "WEBRTC_ANDROID_OPENSLES" ]
}
}
}
-pkg_config("dbus-glib") {
- packages = [ "dbus-glib-1" ]
+if (rtc_have_dbus_glib) {
+ pkg_config("dbus-glib") {
+ packages = [ "dbus-glib-1" ]
+ }
}
config("common_config") {
- if (restrict_webrtc_logging) {
+ cflags = []
+ cflags_cc = []
+ if (rtc_restrict_logging) {
defines = [ "WEBRTC_RESTRICT_LOGGING" ]
}
- if (have_dbus_glib) {
+ if (rtc_have_dbus_glib) {
defines += [ "HAVE_DBUS_GLIB" ]
# TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h>
# is still not found even if the execution of
@@ -79,11 +84,13 @@
all_dependent_configs = [ "dbus-glib" ]
}
- if (enable_video) {
+ if (rtc_enable_video) {
defines += [ "WEBRTC_MODULE_UTILITY_VIDEO" ]
}
- if (!build_with_chromium) {
+ if (build_with_chromium) {
+ defines += [ "LOGGING_INSIDE_WEBRTC" ]
+ } else {
if (is_posix) {
# -Wextra is currently disabled in Chromium"s common.gypi. Enable
# for targets that can handle it. For Android/arm64 right now
@@ -168,7 +175,52 @@
}
static_library("webrtc") {
- deps = [
- "base:webrtc_base",
+ sources = [
+ "call.h",
+ "config.h",
+ "experiments.h",
+ "frame_callback.h",
+ "transport.h",
]
+
+ direct_dependent_configs = [ ":common_inherited_config"]
+
+ deps = [
+ ":webrtc_common",
+ "base:webrtc_base",
+ "common_audio",
+ "common_video",
+ "modules/audio_coding",
+ "modules/audio_conference_mixer",
+ "modules/audio_device",
+ "modules/audio_processing",
+ "modules/bitrate_controller",
+ "modules/desktop_capture",
+ "modules/media_file",
+ "modules/rtp_rtcp",
+ "modules/utility",
+ "modules/video_capture",
+ "modules/video_coding",
+ "modules/video_processing",
+ "modules/video_render",
+ "system_wrappers",
+ "video",
+ "video_engine",
+ "voice_engine",
+ ]
+}
+
+source_set("webrtc_common") {
+ sources = [
+ "config.h",
+ "config.cc",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ configs += [ ":common_inherited_config"]
}
diff --git a/OWNERS b/OWNERS
index bbffda7..b806e21 100644
--- a/OWNERS
+++ b/OWNERS
@@ -4,3 +4,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 4118090..c2a3f99 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -7,6 +7,7 @@
# be found in the AUTHORS file in the root of the source tree.
import("//build/config/crypto.gni")
+import("//build/config/ui.gni")
import("../build/webrtc.gni")
config("webrtc_base_config") {
@@ -17,7 +18,8 @@
defines = [
"FEATURE_ENABLE_SSL",
- "GTEST_RELATIVE_PATH",
+ "LOGGING=1",
+ "USE_WEBRTC_DEV_BRANCH",
]
# TODO(henrike): issue 3307, make webrtc_base build without disabling
@@ -28,7 +30,6 @@
config("webrtc_base_chromium_config") {
defines = [
"NO_MAIN_THREAD_WRAPPING",
- "SSL_USE_NSS",
]
}
@@ -47,17 +48,6 @@
]
}
-config("android_config") {
- defines = [ "HAVE_OPENSSL_SSL_H" ]
-}
-
-config("no_android_config") {
- defines = [
- "HAVE_NSS_SSL_H",
- "SSL_USE_NSS_RNG",
- ]
-}
-
config("ios_config") {
ldflags = [
#"Foundation.framework", # Already included in //build/config:default_libs.
@@ -83,49 +73,65 @@
]
}
-config("linux_system_ssl_config") {
- visibility = ":*" # Only targets in this file can depend on this.
+if (is_linux && !build_with_chromium) {
+ # Provides the same functionality as the //crypto:platform target, which
+ # WebRTC cannot use as we don't sync src/crypto from Chromium.
+ group("linux_system_ssl") {
+ if (use_openssl) {
+ deps = [ "//third_party/boringssl" ]
+ } else {
+ deps = [ "//net/third_party/nss/ssl:libssl" ]
- # TODO(kjellander): Find out how to convert GYP include_dirs+ (i.e. insert
- # first in the include path?).
- include_dirs = [ "//net/third_party/nss/ssl" ]
-
- configs = [ "//third_party/nss:system_nss_no_ssl_config" ]
-}
-
-# Provides the same functionality as the build/linux/system.gyp:ssl GYP target.
-# This cannot be in build/linux/BUILD.gn since targets in build/ are not allowed
-# to depend on targets outside of it. This could be replaced by the Chromium
-# //crypto:platform target, but as WebRTC currently don't sync src/crypto from
-# Chromium, it is not possible today.
-config("linux_system_ssl") {
- if (use_openssl) {
- deps = [ "//third_party/openssl" ]
- } else {
- deps = [ "//net/third_party/nss/ssl:libssl" ]
-
- direct_dependent_configs = [
- ":linux_system_ssl_config",
- ]
-
- if (is_clang) {
- cflags = [
- # There is a broken header guard in /usr/include/nss/secmod.h:
- # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
- "-Wno-header-guard",
+ direct_dependent_configs = [
+ "//net/third_party/nss/ssl:ssl_config",
+ "//third_party/nss:system_nss_no_ssl_config",
]
}
}
}
+if (rtc_build_ssl == 0) {
+ config("external_ssl_library") {
+ assert(rtc_ssl_root != "",
+ "You must specify rtc_ssl_root when rtc_build_ssl==0.")
+ include_dirs = [ rtc_ssl_root ]
+ }
+}
+
+# The subset of rtc_base approved for use outside of libjingle.
+static_library("rtc_base_approved") {
+ configs += [ "..:common_config" ]
+ direct_dependent_configs = [ "..:common_inherited_config" ]
+
+ sources = [
+ "checks.cc",
+ "checks.h",
+ "exp_filter.cc",
+ "exp_filter.h",
+ "md5.cc",
+ "md5.h",
+ "md5digest.h",
+ "platform_file.cc",
+ "platform_file.h",
+ "stringencode.cc",
+ "stringencode.h",
+ "stringutils.cc",
+ "stringutils.h",
+ "thread_annotations.h",
+ "timeutils.cc",
+ "timeutils.h",
+ ]
+}
+
static_library("webrtc_base") {
cflags = []
cflags_cc = []
+ libs = []
+ deps = [
+ ":rtc_base_approved",
+ ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
configs += [
- "..:common_inherited_config",
"..:common_config",
":webrtc_base_config",
]
@@ -145,62 +151,39 @@
"asyncfile.h",
"asynchttprequest.cc",
"asynchttprequest.h",
- "asyncinvoker.cc",
- "asyncinvoker.h",
- "asyncinvoker-inl.h",
"asyncpacketsocket.h",
- "asyncresolverinterface.h",
"asyncsocket.cc",
"asyncsocket.h",
"asynctcpsocket.cc",
"asynctcpsocket.h",
"asyncudpsocket.cc",
"asyncudpsocket.h",
- "atomicops.h",
"autodetectproxy.cc",
"autodetectproxy.h",
- "bandwidthsmoother.cc",
- "bandwidthsmoother.h",
"base64.cc",
"base64.h",
"basicdefs.h",
- "basictypes.h",
- "bind.h",
- "bind.h.pump",
- "buffer.h",
"bytebuffer.cc",
"bytebuffer.h",
"byteorder.h",
- "callback.h",
- "callback.h.pump",
- "checks.cc",
- "checks.h",
"common.cc",
"common.h",
- "constructormagic.h",
"cpumonitor.cc",
"cpumonitor.h",
"crc32.cc",
"crc32.h",
"criticalsection.h",
"cryptstring.h",
- "dbus.cc",
- "dbus.h",
"diskcache.cc",
"diskcache.h",
"event.cc",
"event.h",
- "filelock.cc",
- "filelock.h",
"fileutils.cc",
"fileutils.h",
- "fileutils_mock.h",
"firewallsocketserver.cc",
"firewallsocketserver.h",
"flags.cc",
"flags.h",
- "genericslot.h",
- "genericslot.h.pump",
"gunit_prod.h",
"helpers.cc",
"helpers.h",
@@ -213,116 +196,42 @@
"httpcommon.h",
"httprequest.cc",
"httprequest.h",
- "httpserver.cc",
- "httpserver.h",
- "ifaddrs-android.cc",
- "ifaddrs-android.h",
"iosfilesystem.mm",
"ipaddress.cc",
"ipaddress.h",
- "json.cc",
- "json.h",
- "latebindingsymboltable.cc",
- "latebindingsymboltable.cc.def",
- "latebindingsymboltable.h",
- "latebindingsymboltable.h.def",
- "libdbusglibsymboltable.cc",
- "libdbusglibsymboltable.h",
- "linux.cc",
- "linux.h",
- "linuxfdwalk.c",
- "linuxfdwalk.h",
- "linuxwindowpicker.cc",
- "linuxwindowpicker.h",
"linked_ptr.h",
- "logging.cc",
- "logging.h",
- "macasyncsocket.cc",
- "macasyncsocket.h",
- "maccocoasocketserver.h",
- "maccocoasocketserver.mm",
- "maccocoathreadhelper.h",
- "maccocoathreadhelper.mm",
- "macconversion.cc",
- "macconversion.h",
- "macsocketserver.cc",
- "macsocketserver.h",
- "macutils.cc",
- "macutils.h",
- "macwindowpicker.cc",
- "macwindowpicker.h",
"mathutils.h",
- "md5.cc",
- "md5.h",
- "md5digest.h",
"messagedigest.cc",
"messagedigest.h",
"messagehandler.cc",
"messagehandler.h",
"messagequeue.cc",
"messagequeue.h",
- "multipart.cc",
- "multipart.h",
- "natserver.cc",
- "natserver.h",
- "natsocketfactory.cc",
- "natsocketfactory.h",
- "nattypes.cc",
- "nattypes.h",
"nethelpers.cc",
"nethelpers.h",
"network.cc",
"network.h",
- "nssidentity.cc",
- "nssidentity.h",
- "nssstreamadapter.cc",
- "nssstreamadapter.h",
"nullsocketserver.h",
- "openssl.h",
- "openssladapter.cc",
- "openssladapter.h",
- "openssldigest.cc",
- "openssldigest.h",
- "opensslidentity.cc",
- "opensslidentity.h",
- "opensslstreamadapter.cc",
- "opensslstreamadapter.h",
- "optionsfile.cc",
- "optionsfile.h",
"pathutils.cc",
"pathutils.h",
"physicalsocketserver.cc",
"physicalsocketserver.h",
- "posix.cc",
- "posix.h",
- "profiler.cc",
- "profiler.h",
"proxydetect.cc",
"proxydetect.h",
"proxyinfo.cc",
"proxyinfo.h",
- "proxyserver.cc",
- "proxyserver.h",
"ratelimiter.cc",
"ratelimiter.h",
"ratetracker.cc",
"ratetracker.h",
- "refcount.h",
- "referencecountedsingletonfactory.h",
- "rollingaccumulator.h",
- "schanneladapter.cc",
- "schanneladapter.h",
+ "safe_conversions.h",
+ "safe_conversions_impl.h",
"scoped_autorelease_pool.h",
"scoped_autorelease_pool.mm",
"scoped_ptr.h",
- "scoped_ref_ptr.h",
- "scopedptrcollection.h",
- "sec_buffer.h",
"sha1.cc",
"sha1.h",
"sha1digest.h",
- "sharedexclusivelock.cc",
- "sharedexclusivelock.h",
"signalthread.cc",
"signalthread.h",
"sigslot.h",
@@ -342,12 +251,10 @@
"socketstream.h",
"ssladapter.cc",
"ssladapter.h",
- "sslconfig.h",
"sslfingerprint.cc",
"sslfingerprint.h",
"sslidentity.cc",
"sslidentity.h",
- "sslroots.h",
"sslsocketfactory.cc",
"sslsocketfactory.h",
"sslstreamadapter.cc",
@@ -356,11 +263,6 @@
"sslstreamadapterhelper.h",
"stream.cc",
"stream.h",
- "stringdigest.h",
- "stringencode.cc",
- "stringencode.h",
- "stringutils.cc",
- "stringutils.h",
"systeminfo.cc",
"systeminfo.h",
"task.cc",
@@ -369,50 +271,26 @@
"taskparent.h",
"taskrunner.cc",
"taskrunner.h",
- "testclient.cc",
- "testclient.h",
"thread.cc",
"thread.h",
- "timeutils.cc",
- "timeutils.h",
+ "thread_checker.h",
+ "thread_checker_impl.cc",
+ "thread_checker_impl.h",
"timing.cc",
"timing.h",
- "transformadapter.cc",
- "transformadapter.h",
- "unixfilesystem.cc",
- "unixfilesystem.h",
"urlencode.cc",
"urlencode.h",
- "versionparsing.cc",
- "versionparsing.h",
- "virtualsocketserver.cc",
- "virtualsocketserver.h",
- "win32.cc",
- "win32.h",
- "win32filesystem.cc",
- "win32filesystem.h",
- "win32regkey.cc",
- "win32regkey.h",
- "win32securityerrors.cc",
- "win32socketinit.cc",
- "win32socketinit.h",
- "win32socketserver.cc",
- "win32socketserver.h",
- "win32window.cc",
- "win32window.h",
- "win32windowpicker.cc",
- "win32windowpicker.h",
- "window.h",
- "windowpicker.h",
- "windowpickerfactory.h",
- "winfirewall.cc",
- "winfirewall.h",
- "winping.cc",
- "winping.h",
"worker.cc",
"worker.h",
]
+ if (is_posix) {
+ sources += [
+ "unixfilesystem.cc",
+ "unixfilesystem.h",
+ ]
+ }
+
if (build_with_chromium) {
sources += [
"../overrides/webrtc/base/basictypes.h",
@@ -420,10 +298,19 @@
"../overrides/webrtc/base/logging.cc",
"../overrides/webrtc/base/logging.h",
]
+
if (is_win) {
sources += [ "../overrides/webrtc/base/win32socketinit.cc" ]
}
- sources -= [
+
+ include_dirs = [
+ "../overrides",
+ "../../boringssl/src/include",
+ ]
+
+ direct_dependent_configs += [ ":webrtc_base_chromium_config" ]
+ } else {
+ sources += [
"asyncinvoker.cc",
"asyncinvoker.h",
"asyncinvoker-inl.h",
@@ -438,8 +325,6 @@
"callback.h",
"callback.h.pump",
"constructormagic.h",
- "dbus.cc",
- "dbus.h",
"filelock.cc",
"filelock.h",
"fileutils_mock.h",
@@ -449,26 +334,8 @@
"httpserver.h",
"json.cc",
"json.h",
- "latebindingsymboltable.cc",
- "latebindingsymboltable.cc.def",
- "latebindingsymboltable.h",
- "latebindingsymboltable.h.def",
- "libdbusglibsymboltable.cc",
- "libdbusglibsymboltable.h",
- "linuxfdwalk.c",
- "linuxfdwalk.h",
- "linuxwindowpicker.cc",
- "linuxwindowpicker.h",
"logging.cc",
"logging.h",
- #"macasyncsocket.cc",
- #"macasyncsocket.h",
- #"maccocoasocketserver.h",
- #"maccocoasocketserver.mm",
- #"macsocketserver.cc",
- #"macsocketserver.h",
- #"macwindowpicker.cc",
- #"macwindowpicker.h",
"mathutils.h",
"multipart.cc",
"multipart.h",
@@ -478,11 +345,8 @@
"natsocketfactory.h",
"nattypes.cc",
"nattypes.h",
- "openssl.h",
"optionsfile.cc",
"optionsfile.h",
- "posix.cc",
- "posix.h",
"profiler.cc",
"profiler.h",
"proxyserver.cc",
@@ -490,8 +354,6 @@
"refcount.h",
"referencecountedsingletonfactory.h",
"rollingaccumulator.h",
- #"safe_conversions.h",
- #"safe_conversions_impl.h",
"scopedptrcollection.h",
"scoped_ref_ptr.h",
"sec_buffer.h",
@@ -500,86 +362,151 @@
"sslconfig.h",
"sslroots.h",
"stringdigest.h",
- #"testbase64.h",
"testclient.cc",
"testclient.h",
- #"testutils.h",
"transformadapter.cc",
"transformadapter.h",
"versionparsing.cc",
"versionparsing.h",
"virtualsocketserver.cc",
"virtualsocketserver.h",
- #"win32regkey.cc",
- #"win32regkey.h",
- #"win32socketinit.cc",
- #"win32socketinit.h",
- #"win32socketserver.cc",
- #"win32socketserver.h",
- #"win32toolhelp.h",
"window.h",
"windowpickerfactory.h",
"windowpicker.h",
]
- include_dirs = [
- "../overrides",
- "../../openssl/openssl/include",
- ]
+ if (is_posix) {
+ sources += [
+ "latebindingsymboltable.cc",
+ "latebindingsymboltable.cc.def",
+ "latebindingsymboltable.h",
+ "latebindingsymboltable.h.def",
+ "posix.cc",
+ "posix.h",
+ ]
+ }
- direct_dependent_configs += [ ":webrtc_base_chromium_config" ]
- } else {
+ if (is_linux) {
+ sources += [
+ "dbus.cc",
+ "dbus.h",
+ "libdbusglibsymboltable.cc",
+ "libdbusglibsymboltable.h",
+ "linuxfdwalk.c",
+ "linuxfdwalk.h",
+ ]
+ }
+
+ if (is_mac) {
+ sources += [
+ "macasyncsocket.cc",
+ "macasyncsocket.h",
+ "maccocoasocketserver.h",
+ "maccocoasocketserver.mm",
+ "macsocketserver.cc",
+ "macsocketserver.h",
+ "macwindowpicker.cc",
+ "macwindowpicker.h",
+ ]
+ }
+
if (is_win) {
sources += [
"diskcache_win32.cc",
"diskcache_win32.h",
+ "win32regkey.cc",
+ "win32regkey.h",
+ "win32socketinit.cc",
+ "win32socketinit.h",
+ "win32socketserver.cc",
+ "win32socketserver.h",
]
}
+ if (rtc_build_json) {
+ deps += [ "//third_party/jsoncpp" ]
+ } else {
+ include_dirs += [ rtc_jsoncpp_root ]
- deps = [ "//third_party/jsoncpp" ]
+ # When defined changes the include path for json.h to where it is
+ # expected to be when building json outside of the standalone build.
+ defines += [ "WEBRTC_EXTERNAL_JSON" ]
+ }
+ } # !build_with_chromium
+
+ if (is_clang) {
+ # Suppress warnings from the Chrome Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
}
- # TODO(henrike): issue 3307, make webrtc_base build without disabling
- # these flags.
- cflags += [
- "-Wno-extra",
- "-Wno-all",
- ]
+ # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
+ # compiler settings.
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ cflags += [ "-Wno-uninitialized" ]
cflags_cc += [ "-Wno-non-virtual-dtor" ]
if (use_openssl) {
direct_dependent_configs += [ ":openssl_config" ]
-
- deps = [ "//third_party/openssl" ]
+ if (rtc_build_ssl) {
+ deps += [ "//third_party/boringssl" ]
+ } else {
+ configs += [ "external_ssl_library" ]
+ }
+ sources += [
+ "openssl.h",
+ "openssladapter.cc",
+ "openssladapter.h",
+ "openssldigest.cc",
+ "openssldigest.h",
+ "opensslidentity.cc",
+ "opensslidentity.h",
+ "opensslstreamadapter.cc",
+ "opensslstreamadapter.h",
+ ]
} else {
direct_dependent_configs += [ ":no_openssl_config" ]
+ sources += [
+ "nssidentity.cc",
+ "nssidentity.h",
+ "nssstreamadapter.cc",
+ "nssstreamadapter.h",
+ ]
+ if (is_mac || is_ios || is_win) {
+ if (rtc_build_ssl) {
+ deps += [
+ "//net/third_party/nss/ssl:libssl",
+ "//third_party/nss:nspr",
+ "//third_party/nss:nss",
+ ]
+ } else {
+ configs += [ "external_ssl_library" ]
+ }
+ }
}
if (is_android) {
- direct_dependent_configs += [ ":android_config" ]
-
- libs = [
- "log",
- "GLESv2"
- ]
- } else {
- direct_dependent_configs += [ ":no_android_config" ]
-
- sources -= [
+ sources += [
"ifaddrs-android.cc",
"ifaddrs-android.h",
]
+
+ libs += [
+ "log",
+ "GLESv2"
+ ]
}
if (is_ios) {
all_dependent_configs += [ ":ios_config" ]
-
- deps = [ "//net/third_party/nss/ssl:libssl" ]
}
- if (is_linux) {
- libs = [
- "crypto",
+ if (use_x11) {
+ sources += [
+ "x11windowpicker.cc",
+ "x11windowpicker.h",
+ ]
+ libs += [
"dl",
"rt",
"Xext",
@@ -587,49 +514,56 @@
"Xcomposite",
"Xrender",
]
- configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
- } else {
- sources -= [
- "dbus.cc",
- "dbus.h",
- "libdbusglibsymboltable.cc",
- "libdbusglibsymboltable.h",
- "linuxfdwalk.c",
- "linuxfdwalk.h",
- "linuxwindowpicker.cc",
- "linuxwindowpicker.h",
+ }
+
+ if (is_linux) {
+ libs += [
+ "crypto",
+ "dl",
+ "rt",
]
+ if (rtc_build_ssl) {
+ configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
+ }
}
if (is_mac) {
+ sources += [
+ "maccocoathreadhelper.h",
+ "maccocoathreadhelper.mm",
+ "macconversion.cc",
+ "macconversion.h",
+ "macutils.cc",
+ "macutils.h",
+ ]
+
all_dependent_configs = [ ":mac_config" ]
- libs = [
- "crypto", # $(SDKROOT)/usr/lib/libcrypto.dylib
- "ssl", # $(SDKROOT)/usr/lib/libssl.dylib
- ]
if (cpu_arch == "x86") {
all_dependent_configs += [ ":mac_x86_config" ]
}
- } else {
- sources -= [
- "macasyncsocket.cc",
- "macasyncsocket.h",
- "maccocoasocketserver.h",
- #"maccocoasocketserver.mm", # Seems to be excluded by default with GN.
- "macconversion.cc",
- "macconversion.h",
- "macsocketserver.cc",
- "macsocketserver.h",
- "macutils.cc",
- "macutils.h",
- "macwindowpicker.cc",
- "macwindowpicker.h",
- ]
}
if (is_win) {
- libs = [
+ sources += [
+ "schanneladapter.cc",
+ "schanneladapter.h",
+ "win32.cc",
+ "win32.h",
+ "win32filesystem.cc",
+ "win32filesystem.h",
+ "win32securityerrors.cc",
+ "win32window.cc",
+ "win32window.h",
+ "win32windowpicker.cc",
+ "win32windowpicker.h",
+ "winfirewall.cc",
+ "winfirewall.h",
+ "winping.cc",
+ "winping.h",
+ ]
+
+ libs += [
"crypt32.lib",
"iphlpapi.lib",
"secur32.lib",
@@ -642,82 +576,35 @@
]
defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
- } else {
- sources -= [
- "schanneladapter.cc",
- "schanneladapter.h",
- "winping.cc",
- "winping.h",
- "winfirewall.cc",
- "winfirewall.h",
- # The files below were covered by a regex exclude in GYP.
- "win32.cc",
- "win32.h",
- "win32filesystem.cc",
- "win32filesystem.h",
- "win32regkey.cc",
- "win32regkey.h",
- "win32securityerrors.cc",
- "win32socketinit.cc",
- "win32socketinit.h",
- "win32socketserver.cc",
- "win32socketserver.h",
- "win32window.cc",
- "win32window.h",
- "win32windowpicker.cc",
- "win32windowpicker.h",
- ]
}
- if (is_posix) {
- if (is_debug) {
- defines += [ "_DEBUG" ]
- }
- } else {
- sources -= [
- "latebindingsymboltable.cc",
- "latebindingsymboltable.h",
- "posix.cc",
- "posix.h",
- "unixfilesystem.cc",
- "unixfilesystem.h",
- ]
+ if (is_posix && is_debug) {
+ # The Chromium build/common.gypi defines this for all posix
+ # _except_ for ios & mac. We want it there as well, e.g.
+ # because ASSERT and friends trigger off of it.
+ defines += [ "_DEBUG" ]
}
if (is_ios || (is_mac && cpu_arch != "x86")) {
defines += [ "CARBON_DEPRECATED=YES" ]
}
- if (is_ios || !is_posix) {
- sources -= [
- "openssl.h",
- "openssladapter.cc",
- "openssladapter.h",
- "openssldigest.cc",
- "openssldigest.h",
- "opensslidentity.cc",
- "opensslidentity.h",
- "opensslstreamadapter.cc",
- "opensslstreamadapter.h",
- ]
- }
-
- if (!is_linux && !is_android) {
- sources -= [
+ if (is_linux || is_android) {
+ sources += [
"linux.cc",
"linux.h",
]
}
- if (is_mac || is_ios || is_win) {
- deps += [
- "//net/third_party/nss/ssl:libssl",
- "//third_party/nss:nspr",
- "//third_party/nss:nss",
- ]
- }
-
if (is_posix && !is_mac && !is_ios && !is_android) {
- configs += [ ":linux_system_ssl" ]
+ if (build_with_chromium) {
+ deps += [ "//crypto:platform" ]
+ } else {
+ if (rtc_build_ssl) {
+ deps += [ ":linux_system_ssl" ]
+ } else {
+ configs += [ "external_ssl_library" ]
+ }
+ }
}
}
diff --git a/base/OWNERS b/base/OWNERS
index 4091a93..1a24a6a 100644
--- a/base/OWNERS
+++ b/base/OWNERS
@@ -1,7 +1,13 @@
-henrike@webrtc.org
-pwestin@webrtc.org
-perkj@webrtc.org
henrika@webrtc.org
+henrike@webrtc.org
henrikg@webrtc.org
+hta@webrtc.org
+jiayl@webrtc.org
+juberti@webrtc.org
mflodman@webrtc.org
-niklas.enbom@webrtc.org
\ No newline at end of file
+perkj@webrtc.org
+pthatcher@webrtc.org
+sergeyu@chromium.org
+tommi@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/base/asynchttprequest_unittest.cc b/base/asynchttprequest_unittest.cc
index 0bfd795..4748de7 100644
--- a/base/asynchttprequest_unittest.cc
+++ b/base/asynchttprequest_unittest.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/httpserver.h"
#include "webrtc/base/socketstream.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -126,7 +127,7 @@
TestHttpServer server_;
};
-TEST_F(AsyncHttpRequestTest, TestGetSuccess) {
+TEST_F(AsyncHttpRequestTest, DISABLED_ON_MAC(TestGetSuccess)) {
AsyncHttpRequest* req = CreateGetRequest(
kServerHostnameAddr.hostname(), server().address().port(),
kServerGetPath);
@@ -143,7 +144,7 @@
req->Release();
}
-TEST_F(AsyncHttpRequestTest, TestGetNotFound) {
+TEST_F(AsyncHttpRequestTest, DISABLED_ON_MAC(TestGetNotFound)) {
AsyncHttpRequest* req = CreateGetRequest(
kServerHostnameAddr.hostname(), server().address().port(),
"/bad");
@@ -157,7 +158,7 @@
req->Release();
}
-TEST_F(AsyncHttpRequestTest, TestGetToNonServer) {
+TEST_F(AsyncHttpRequestTest, DISABLED_ON_MAC(TestGetToNonServer)) {
AsyncHttpRequest* req = CreateGetRequest(
"127.0.0.1", server().address().port(),
kServerGetPath);
@@ -187,7 +188,7 @@
req->Release();
}
-TEST_F(AsyncHttpRequestTest, TestPostSuccess) {
+TEST_F(AsyncHttpRequestTest, DISABLED_ON_MAC(TestPostSuccess)) {
AsyncHttpRequest* req = CreatePostRequest(
kServerHostnameAddr.hostname(), server().address().port(),
kServerPostPath, "text/plain", new MemoryStream("abcd1234"));
@@ -203,7 +204,7 @@
}
// Ensure that we shut down properly even if work is outstanding.
-TEST_F(AsyncHttpRequestTest, TestCancel) {
+TEST_F(AsyncHttpRequestTest, DISABLED_ON_MAC(TestCancel)) {
AsyncHttpRequest* req = CreateGetRequest(
kServerHostnameAddr.hostname(), server().address().port(),
kServerGetPath);
@@ -211,7 +212,7 @@
req->Destroy(true);
}
-TEST_F(AsyncHttpRequestTest, TestGetSuccessDelay) {
+TEST_F(AsyncHttpRequestTest, DISABLED_ON_MAC(TestGetSuccessDelay)) {
AsyncHttpRequest* req = CreateGetRequest(
kServerHostnameAddr.hostname(), server().address().port(),
kServerGetPath);
diff --git a/base/autodetectproxy_unittest.cc b/base/autodetectproxy_unittest.cc
index 80f220f..782bc25 100644
--- a/base/autodetectproxy_unittest.cc
+++ b/base/autodetectproxy_unittest.cc
@@ -12,6 +12,7 @@
#include "webrtc/base/gunit.h"
#include "webrtc/base/httpcommon.h"
#include "webrtc/base/httpcommon-inl.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -99,26 +100,26 @@
bool done_;
};
-TEST_F(AutoDetectProxyTest, TestDetectUnresolvedProxy) {
+TEST_F(AutoDetectProxyTest, DISABLED_ON_MAC(TestDetectUnresolvedProxy)) {
TestCopesWithProxy(rtc::SocketAddress("localhost", 9999));
}
-TEST_F(AutoDetectProxyTest, TestDetectUnresolvableProxy) {
+TEST_F(AutoDetectProxyTest, DISABLED_ON_MAC(TestDetectUnresolvableProxy)) {
TestCopesWithProxy(rtc::SocketAddress("invalid", 9999));
}
-TEST_F(AutoDetectProxyTest, TestDetectIPv6Proxy) {
+TEST_F(AutoDetectProxyTest, DISABLED_ON_MAC(TestDetectIPv6Proxy)) {
TestCopesWithProxy(rtc::SocketAddress("::1", 9999));
}
-TEST_F(AutoDetectProxyTest, TestDetectIPv4Proxy) {
+TEST_F(AutoDetectProxyTest, DISABLED_ON_MAC(TestDetectIPv4Proxy)) {
TestCopesWithProxy(rtc::SocketAddress("127.0.0.1", 9999));
}
// Test that proxy detection completes successfully. (Does not actually verify
// the correct detection result since we don't know what proxy to expect on an
// arbitrary machine.)
-TEST_F(AutoDetectProxyTest, TestProxyDetection) {
+TEST_F(AutoDetectProxyTest, DISABLED_ON_MAC(TestProxyDetection)) {
ASSERT_TRUE(Create(kUserAgent,
kPath,
kHost,
diff --git a/base/base.gyp b/base/base.gyp
index 330ea82..569db74 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -25,11 +25,46 @@
],
'targets': [
{
+ # Temporary target until Chromium's
+ # src/third_party/libjingle/libjingle.gyp is updated to use rtc_base.
+ # TODO(kjellander): Remove when r7140 is rolled into Chromium's DEPS.
'target_name': 'webrtc_base',
+ 'type': 'none',
+ 'dependencies': [
+ 'rtc_base',
+ ],
+ },
+ {
+ # The subset of rtc_base approved for use outside of libjingle.
+ 'target_name': 'rtc_base_approved',
'type': 'static_library',
+ 'sources': [
+ 'checks.cc',
+ 'checks.h',
+ 'exp_filter.cc',
+ 'exp_filter.h',
+ 'md5.cc',
+ 'md5.h',
+ 'md5digest.h',
+ 'platform_file.cc',
+ 'platform_file.h',
+ 'stringencode.cc',
+ 'stringencode.h',
+ 'stringutils.cc',
+ 'stringutils.h',
+ 'thread_annotations.h',
+ 'timeutils.cc',
+ 'timeutils.h',
+ ],
+ },
+ {
+ 'target_name': 'rtc_base',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'rtc_base_approved',
+ ],
'defines': [
'FEATURE_ENABLE_SSL',
- 'GTEST_RELATIVE_PATH',
'LOGGING=1',
'USE_WEBRTC_DEV_BRANCH',
],
@@ -66,11 +101,9 @@
'byteorder.h',
'callback.h',
'callback.h.pump',
- 'checks.cc',
- 'checks.h',
+ 'constructormagic.h',
'common.cc',
'common.h',
- 'constructormagic.h',
'cpumonitor.cc',
'cpumonitor.h',
'crc32.cc',
@@ -125,8 +158,6 @@
'linux.h',
'linuxfdwalk.c',
'linuxfdwalk.h',
- 'linuxwindowpicker.cc',
- 'linuxwindowpicker.h',
'linked_ptr.h',
'logging.cc',
'logging.h',
@@ -145,9 +176,6 @@
'macwindowpicker.cc',
'macwindowpicker.h',
'mathutils.h',
- 'md5.cc',
- 'md5.h',
- 'md5digest.h',
'messagedigest.cc',
'messagedigest.h',
'messagehandler.cc',
@@ -166,20 +194,7 @@
'nethelpers.h',
'network.cc',
'network.h',
- 'nssidentity.cc',
- 'nssidentity.h',
- 'nssstreamadapter.cc',
- 'nssstreamadapter.h',
'nullsocketserver.h',
- 'openssl.h',
- 'openssladapter.cc',
- 'openssladapter.h',
- 'openssldigest.cc',
- 'openssldigest.h',
- 'opensslidentity.cc',
- 'opensslidentity.h',
- 'opensslstreamadapter.cc',
- 'opensslstreamadapter.h',
'optionsfile.cc',
'optionsfile.h',
'pathutils.cc',
@@ -252,10 +267,6 @@
'stream.cc',
'stream.h',
'stringdigest.h',
- 'stringencode.cc',
- 'stringencode.h',
- 'stringutils.cc',
- 'stringutils.h',
'systeminfo.cc',
'systeminfo.h',
'task.cc',
@@ -271,8 +282,6 @@
'thread_checker.h',
'thread_checker_impl.cc',
'thread_checker_impl.h',
- 'timeutils.cc',
- 'timeutils.h',
'timing.cc',
'timing.h',
'transformadapter.cc',
@@ -309,13 +318,15 @@
'winping.h',
'worker.cc',
'worker.h',
+ 'x11windowpicker.cc',
+ 'x11windowpicker.h',
'../overrides/webrtc/base/basictypes.h',
'../overrides/webrtc/base/constructormagic.h',
'../overrides/webrtc/base/logging.cc',
'../overrides/webrtc/base/logging.h',
'../overrides/webrtc/base/win32socketinit.cc',
],
- # TODO(henrike): issue 3307, make webrtc_base build without disabling
+ # TODO(henrike): issue 3307, make rtc_base build without disabling
# these flags.
'cflags!': [
'-Wextra',
@@ -330,7 +341,6 @@
],
'defines': [
'FEATURE_ENABLE_SSL',
- 'GTEST_RELATIVE_PATH',
],
},
'include_dirs': [
@@ -341,7 +351,7 @@
['build_with_chromium==1', {
'include_dirs': [
'../overrides',
- '../../openssl/openssl/include',
+ '../../boringssl/src/include',
],
'sources!': [
'asyncinvoker.cc',
@@ -379,8 +389,8 @@
'libdbusglibsymboltable.h',
'linuxfdwalk.c',
'linuxfdwalk.h',
- 'linuxwindowpicker.cc',
- 'linuxwindowpicker.h',
+ 'x11windowpicker.cc',
+ 'x11windowpicker.h',
'logging.cc',
'logging.h',
'macasyncsocket.cc',
@@ -400,7 +410,6 @@
'natsocketfactory.h',
'nattypes.cc',
'nattypes.h',
- 'openssl.h',
'optionsfile.cc',
'optionsfile.h',
'posix.cc',
@@ -443,12 +452,10 @@
],
'defines': [
'NO_MAIN_THREAD_WRAPPING',
- 'SSL_USE_NSS',
],
'direct_dependent_settings': {
'defines': [
'NO_MAIN_THREAD_WRAPPING',
- 'SSL_USE_NSS',
],
},
}, {
@@ -488,10 +495,21 @@
'HAVE_OPENSSL_SSL_H',
],
},
+ 'sources': [
+ 'openssl.h',
+ 'openssladapter.cc',
+ 'openssladapter.h',
+ 'openssldigest.cc',
+ 'openssldigest.h',
+ 'opensslidentity.cc',
+ 'opensslidentity.h',
+ 'opensslstreamadapter.cc',
+ 'opensslstreamadapter.h',
+ ],
'conditions': [
['build_ssl==1', {
'dependencies': [
- '<(DEPTH)/third_party/openssl/openssl.gyp:openssl',
+ '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
],
}, {
'include_dirs': [
@@ -500,18 +518,43 @@
}],
],
}, {
- 'defines': [
- 'SSL_USE_NSS',
- 'HAVE_NSS_SSL_H',
- 'SSL_USE_NSS_RNG',
+ 'sources': [
+ 'nssidentity.cc',
+ 'nssidentity.h',
+ 'nssstreamadapter.cc',
+ 'nssstreamadapter.h',
],
- 'direct_dependent_settings': {
- 'defines': [
- 'SSL_USE_NSS',
- 'HAVE_NSS_SSL_H',
- 'SSL_USE_NSS_RNG',
- ],
- },
+ 'conditions': [
+ ['use_legacy_ssl_defaults!=1', {
+ 'defines': [
+ 'SSL_USE_NSS',
+ 'HAVE_NSS_SSL_H',
+ 'SSL_USE_NSS_RNG',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'SSL_USE_NSS',
+ 'HAVE_NSS_SSL_H',
+ 'SSL_USE_NSS_RNG',
+ ],
+ },
+ }],
+ ['OS=="mac" or OS=="ios" or OS=="win"', {
+ 'conditions': [
+ ['build_ssl==1', {
+ 'dependencies': [
+ '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
+ '<(DEPTH)/third_party/nss/nss.gyp:nspr',
+ '<(DEPTH)/third_party/nss/nss.gyp:nss',
+ ],
+ }, {
+ 'include_dirs': [
+ '<(ssl_root)',
+ ],
+ }],
+ ],
+ }],
+ ],
}],
['OS == "android"', {
'defines': [
@@ -529,16 +572,20 @@
],
},
}, {
- 'defines': [
- 'HAVE_NSS_SSL_H'
- 'SSL_USE_NSS_RNG',
+ 'conditions': [
+ ['use_legacy_ssl_defaults!=1', {
+ 'defines': [
+ 'HAVE_NSS_SSL_H',
+ 'SSL_USE_NSS_RNG',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'HAVE_NSS_SSL_H',
+ 'SSL_USE_NSS_RNG',
+ ],
+ },
+ }],
],
- 'direct_dependent_settings': {
- 'defines': [
- 'HAVE_NSS_SSL_H'
- 'SSL_USE_NSS_RNG',
- ],
- },
'sources!': [
'ifaddrs-android.cc',
'ifaddrs-android.h',
@@ -555,36 +602,45 @@
],
},
},
- 'conditions': [
- ['build_ssl==1', {
- 'dependencies': [
- '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
- ]
- }, {
- 'include_dirs': [
- '<(ssl_root)',
- ],
- }],
- ],
}],
- ['OS=="linux"', {
+ ['use_x11 == 1', {
'link_settings': {
'libraries': [
- '-lcrypto',
'-ldl',
'-lrt',
'-lXext',
'-lX11',
'-lXcomposite',
'-lXrender',
- '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
],
},
- 'cflags': [
- '<!@(<(pkg-config) --cflags nss)',
+ }, {
+ 'sources!': [
+ 'x11windowpicker.cc',
+ 'x11windowpicker.h',
],
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
+ }],
+ ['OS=="linux"', {
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ '-lrt',
+ ],
+ },
+ 'conditions': [
+ ['build_ssl==1', {
+ 'link_settings': {
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
+ ],
+ },
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags nss)',
+ ],
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
+ ],
+ }],
],
}, {
'sources!': [
@@ -593,17 +649,9 @@
'libdbusglibsymboltable.cc',
'libdbusglibsymboltable.h',
'linuxfdwalk.c',
- 'linuxwindowpicker.cc',
- 'linuxwindowpicker.h',
],
}],
['OS=="mac"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/usr/lib/libcrypto.dylib',
- '$(SDKROOT)/usr/lib/libssl.dylib',
- ],
- },
'all_dependent_settings': {
'link_settings': {
'xcode_settings': {
@@ -703,40 +751,12 @@
'scoped_autorelease_pool.mm',
],
}],
- ['OS=="ios" or os_posix==0', {
- 'sources!': [
- 'openssl.h',
- 'openssladapter.cc',
- 'openssladapter.h',
- 'openssldigest.cc',
- 'openssldigest.h',
- 'opensslidentity.cc',
- 'opensslidentity.h',
- 'opensslstreamadapter.cc',
- 'opensslstreamadapter.h',
- ],
- }],
['OS!="linux" and OS!="android"', {
'sources!': [
'linux.cc',
'linux.h',
],
}],
- ['OS == "mac" or OS == "ios" or OS == "win"', {
- 'conditions': [
- ['build_ssl==1', {
- 'dependencies': [
- '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
- '<(DEPTH)/third_party/nss/nss.gyp:nspr',
- '<(DEPTH)/third_party/nss/nss.gyp:nss',
- ],
- }, {
- 'include_dirs': [
- '<(ssl_root)',
- ],
- }],
- ],
- }],
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
'conditions': [
['build_ssl==1', {
diff --git a/base/base_tests.gyp b/base/base_tests.gyp
index c5cc7b8..2d99e81 100644
--- a/base/base_tests.gyp
+++ b/base/base_tests.gyp
@@ -9,7 +9,7 @@
'includes': [ '../build/common.gypi', ],
'targets': [
{
- 'target_name': 'webrtc_base_tests_utils',
+ 'target_name': 'rtc_base_tests_utils',
'type': 'static_library',
'sources': [
'unittest_main.cc',
@@ -25,132 +25,142 @@
'testutils.h',
'win32toolhelp.h',
],
+ 'defines': [
+ 'GTEST_RELATIVE_PATH',
+ ],
'dependencies': [
- 'base.gyp:webrtc_base',
+ 'base.gyp:rtc_base',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'GTEST_RELATIVE_PATH',
+ ],
+ },
+ 'export_dependent_settings': [
'<(DEPTH)/testing/gtest.gyp:gtest',
],
},
{
- 'target_name': 'webrtc_base_tests',
- 'type': 'executable',
- 'dependencies': [
- '<(DEPTH)/testing/gtest.gyp:gtest',
- 'base.gyp:webrtc_base',
- 'webrtc_base_tests_utils',
- ],
- 'sources': [
- 'asynchttprequest_unittest.cc',
- 'atomicops_unittest.cc',
- 'autodetectproxy_unittest.cc',
- 'bandwidthsmoother_unittest.cc',
- 'base64_unittest.cc',
- 'basictypes_unittest.cc',
- 'bind_unittest.cc',
- 'buffer_unittest.cc',
- 'bytebuffer_unittest.cc',
- 'byteorder_unittest.cc',
- 'callback_unittest.cc',
- 'cpumonitor_unittest.cc',
- 'crc32_unittest.cc',
- 'criticalsection_unittest.cc',
- 'event_unittest.cc',
- 'filelock_unittest.cc',
- 'fileutils_unittest.cc',
- 'helpers_unittest.cc',
- 'httpbase_unittest.cc',
- 'httpcommon_unittest.cc',
- 'httpserver_unittest.cc',
- 'ipaddress_unittest.cc',
- 'logging_unittest.cc',
- 'md5digest_unittest.cc',
- 'messagedigest_unittest.cc',
- 'messagequeue_unittest.cc',
- 'multipart_unittest.cc',
- 'nat_unittest.cc',
- 'network_unittest.cc',
- 'nullsocketserver_unittest.cc',
- 'optionsfile_unittest.cc',
- 'pathutils_unittest.cc',
- 'physicalsocketserver_unittest.cc',
- 'profiler_unittest.cc',
- 'proxy_unittest.cc',
- 'proxydetect_unittest.cc',
- 'ratelimiter_unittest.cc',
- 'ratetracker_unittest.cc',
- 'referencecountedsingletonfactory_unittest.cc',
- 'rollingaccumulator_unittest.cc',
- 'scopedptrcollection_unittest.cc',
- 'sha1digest_unittest.cc',
- 'sharedexclusivelock_unittest.cc',
- 'signalthread_unittest.cc',
- 'sigslot_unittest.cc',
- 'sigslottester.h',
- 'sigslottester.h.pump',
- 'socket_unittest.cc',
- 'socket_unittest.h',
- 'socketaddress_unittest.cc',
- 'stream_unittest.cc',
- 'stringencode_unittest.cc',
- 'stringutils_unittest.cc',
- # TODO(ronghuawu): Reenable this test.
- # 'systeminfo_unittest.cc',
- 'task_unittest.cc',
- 'testclient_unittest.cc',
- 'thread_checker_unittest.cc',
- 'thread_unittest.cc',
- 'timeutils_unittest.cc',
- 'urlencode_unittest.cc',
- 'versionparsing_unittest.cc',
- 'virtualsocket_unittest.cc',
- # TODO(ronghuawu): Reenable this test.
- # 'windowpicker_unittest.cc',
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'sources': [
- 'latebindingsymboltable_unittest.cc',
- # TODO(ronghuawu): Reenable this test.
- # 'linux_unittest.cc',
- 'linuxfdwalk_unittest.cc',
- ],
- }],
- ['OS=="win"', {
- 'sources': [
- 'win32_unittest.cc',
- 'win32regkey_unittest.cc',
- 'win32socketserver_unittest.cc',
- 'win32toolhelp_unittest.cc',
- 'win32window_unittest.cc',
- 'win32windowpicker_unittest.cc',
- 'winfirewall_unittest.cc',
- ],
- 'sources!': [
- # TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot
- # then reenable these tests.
- 'physicalsocketserver_unittest.cc',
- 'socket_unittest.cc',
- 'win32socketserver_unittest.cc',
- 'win32windowpicker_unittest.cc',
- ],
- }],
- ['OS=="mac"', {
- 'sources': [
- 'macsocketserver_unittest.cc',
- 'macutils_unittest.cc',
- ],
- }],
- ['os_posix==1', {
- 'sources': [
- 'sslidentity_unittest.cc',
- 'sslstreamadapter_unittest.cc',
- ],
- }],
- ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
- 'defines': [
- 'CARBON_DEPRECATED=YES',
- ],
- }],
- ], # conditions
+ 'target_name': 'rtc_base_tests',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'sources': [
+ 'asynchttprequest_unittest.cc',
+ #'atomicops_unittest.cc',
+ #'autodetectproxy_unittest.cc',
+ #'bandwidthsmoother_unittest.cc',
+ #'base64_unittest.cc',
+ #'basictypes_unittest.cc',
+ #'bind_unittest.cc',
+ #'buffer_unittest.cc',
+ #'bytebuffer_unittest.cc',
+ #'byteorder_unittest.cc',
+ #'callback_unittest.cc',
+ #'cpumonitor_unittest.cc',
+ #'crc32_unittest.cc',
+ #'criticalsection_unittest.cc',
+ #'event_unittest.cc',
+ #'exp_filter_unittest.cc',
+ #'filelock_unittest.cc',
+ #'fileutils_unittest.cc',
+ #'helpers_unittest.cc',
+ #'httpbase_unittest.cc',
+ #'httpcommon_unittest.cc',
+ #'httpserver_unittest.cc',
+ #'ipaddress_unittest.cc',
+ #'logging_unittest.cc',
+ #'md5digest_unittest.cc',
+ #'messagedigest_unittest.cc',
+ #'messagequeue_unittest.cc',
+ #'multipart_unittest.cc',
+ #'nat_unittest.cc',
+ #'network_unittest.cc',
+ #'nullsocketserver_unittest.cc',
+ #'optionsfile_unittest.cc',
+ #'pathutils_unittest.cc',
+ #'physicalsocketserver_unittest.cc',
+ #'profiler_unittest.cc',
+ #'proxy_unittest.cc',
+ #'proxydetect_unittest.cc',
+ #'ratelimiter_unittest.cc',
+ #'ratetracker_unittest.cc',
+ #'referencecountedsingletonfactory_unittest.cc',
+ #'rollingaccumulator_unittest.cc',
+ #'scopedptrcollection_unittest.cc',
+ #'sha1digest_unittest.cc',
+ #'sharedexclusivelock_unittest.cc',
+ #'signalthread_unittest.cc',
+ #'sigslot_unittest.cc',
+ #'sigslottester.h',
+ #'sigslottester.h.pump',
+ #'socket_unittest.cc',
+ #'socket_unittest.h',
+ #'socketaddress_unittest.cc',
+ #'stream_unittest.cc',
+ #'stringencode_unittest.cc',
+ #'stringutils_unittest.cc',
+ # TODO(ronghuawu): Reenable this test.
+ # 'systeminfo_unittest.cc',
+ #'task_unittest.cc',
+ #'testclient_unittest.cc',
+ 'thread_checker_unittest.cc',
+ #'thread_unittest.cc',
+ #'timeutils_unittest.cc',
+ #'urlencode_unittest.cc',
+ #'versionparsing_unittest.cc',
+ #'virtualsocket_unittest.cc',
+ # TODO(ronghuawu): Reenable this test.
+ # 'windowpicker_unittest.cc',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'sources': [
+ #'latebindingsymboltable_unittest.cc',
+ # TODO(ronghuawu): Reenable this test.
+ # 'linux_unittest.cc',
+ #'linuxfdwalk_unittest.cc',
+ ],
+ }],
+ ['OS=="win"', {
+ 'sources': [
+ #'win32_unittest.cc',
+ #'win32regkey_unittest.cc',
+ #'win32socketserver_unittest.cc',
+ #'win32toolhelp_unittest.cc',
+ #'win32window_unittest.cc',
+ #'win32windowpicker_unittest.cc',
+ #'winfirewall_unittest.cc',
+ ],
+ 'sources!': [
+ # TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot
+ # then reenable these tests.
+ #'physicalsocketserver_unittest.cc',
+ #'socket_unittest.cc',
+ #'win32socketserver_unittest.cc',
+ #'win32windowpicker_unittest.cc',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'sources': [
+ #'macsocketserver_unittest.cc',
+ #'macutils_unittest.cc',
+ ],
+ }],
+ ['os_posix==1', {
+ 'sources': [
+ #'ssladapter_unittest.cc',
+ #'sslidentity_unittest.cc',
+ #'sslstreamadapter_unittest.cc',
+ ],
+ }],
+ ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
+ 'defines': [
+ 'CARBON_DEPRECATED=YES',
+ ],
+ }],
+ ], # conditions
+ },
},
],
}
diff --git a/base/checks.cc b/base/checks.cc
index 67f5003..b85af1e 100644
--- a/base/checks.cc
+++ b/base/checks.cc
@@ -8,27 +8,125 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
+// Most of this was borrowed (with minor modifications) from V8's and Chromium's
+// src/base/logging.cc.
+
+// Use the C++ version to provide __GLIBCXX__.
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+
+#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#include <cxxabi.h>
+#include <execinfo.h>
+#endif
+
+#if defined(WEBRTC_ANDROID)
+#define LOG_TAG "rtc"
+#include <android/log.h> // NOLINT
+#endif
#include "webrtc/base/checks.h"
-#include "webrtc/base/logging.h"
+
+#if defined(_MSC_VER)
+// Warning C4722: destructor never returns, potential memory leak.
+// FatalMessage's dtor very intentionally aborts.
+#pragma warning(disable:4722)
+#endif
namespace rtc {
-void Fatal(const char* file, int line, const char* format, ...) {
- char msg[256];
+void VPrintError(const char* format, va_list args) {
+#if defined(WEBRTC_ANDROID)
+ __android_log_vprint(ANDROID_LOG_ERROR, LOG_TAG, format, args);
+#else
+ vfprintf(stderr, format, args);
+#endif
+}
- va_list arguments;
- va_start(arguments, format);
- vsnprintf(msg, sizeof(msg), format, arguments);
- va_end(arguments);
+void PrintError(const char* format, ...) {
+ va_list args;
+ va_start(args, format);
+ VPrintError(format, args);
+ va_end(args);
+}
- LOG(LS_ERROR) << "\n\n#\n# Fatal error in " << file
- << ", line " << line << "\n#" << msg
- << "\n#\n";
+// TODO(ajm): This works on Mac (although the parsing fails) but I don't seem
+// to get usable symbols on Linux. This is copied from V8. Chromium has a more
+// advanced stace trace system; also more difficult to copy.
+void DumpBacktrace() {
+#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+ void* trace[100];
+ int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
+ char** symbols = backtrace_symbols(trace, size);
+ PrintError("\n==== C stack trace ===============================\n\n");
+ if (size == 0) {
+ PrintError("(empty)\n");
+ } else if (symbols == NULL) {
+ PrintError("(no symbols)\n");
+ } else {
+ for (int i = 1; i < size; ++i) {
+ char mangled[201];
+ if (sscanf(symbols[i], "%*[^(]%*[(]%200[^)+]", mangled) == 1) { // NOLINT
+ PrintError("%2d: ", i);
+ int status;
+ size_t length;
+ char* demangled = abi::__cxa_demangle(mangled, NULL, &length, &status);
+ PrintError("%s\n", demangled != NULL ? demangled : mangled);
+ free(demangled);
+ } else {
+ // If parsing failed, at least print the unparsed symbol.
+ PrintError("%s\n", symbols[i]);
+ }
+ }
+ }
+ free(symbols);
+#endif
+}
+
+FatalMessage::FatalMessage(const char* file, int line) {
+ Init(file, line);
+}
+
+FatalMessage::FatalMessage(const char* file, int line, std::string* result) {
+ Init(file, line);
+ stream_ << "Check failed: " << *result << std::endl << "# ";
+ delete result;
+}
+
+NO_RETURN FatalMessage::~FatalMessage() {
+ fflush(stdout);
+ fflush(stderr);
+ stream_ << std::endl << "#" << std::endl;
+ PrintError(stream_.str().c_str());
+ DumpBacktrace();
+ fflush(stderr);
abort();
}
+void FatalMessage::Init(const char* file, int line) {
+ stream_ << std::endl << std::endl << "#" << std::endl << "# Fatal error in "
+ << file << ", line " << line << std::endl << "# ";
+}
+
+// Refer to comments in checks.h.
+#ifndef WEBRTC_CHROMIUM_BUILD
+
+// MSVC doesn't like complex extern templates and DLLs.
+#if !defined(COMPILER_MSVC)
+// Explicit instantiations for commonly used comparisons.
+template std::string* MakeCheckOpString<int, int>(
+ const int&, const int&, const char* names);
+template std::string* MakeCheckOpString<unsigned long, unsigned long>(
+ const unsigned long&, const unsigned long&, const char* names);
+template std::string* MakeCheckOpString<unsigned long, unsigned int>(
+ const unsigned long&, const unsigned int&, const char* names);
+template std::string* MakeCheckOpString<unsigned int, unsigned long>(
+ const unsigned int&, const unsigned long&, const char* names);
+template std::string* MakeCheckOpString<std::string, std::string>(
+ const std::string&, const std::string&, const char* name);
+#endif
+
+#endif // WEBRTC_CHROMIUM_BUILD
+
} // namespace rtc
diff --git a/base/checks.h b/base/checks.h
index 5a2841a..821b75b 100644
--- a/base/checks.h
+++ b/base/checks.h
@@ -8,23 +8,202 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-// This module contains some basic debugging facilities.
-// Originally comes from shared/commandlineflags/checks.h
-
#ifndef WEBRTC_BASE_CHECKS_H_
#define WEBRTC_BASE_CHECKS_H_
-#include <string.h>
+#include <sstream>
+#include <string>
+
+#ifdef WEBRTC_CHROMIUM_BUILD
+// Include logging.h in a Chromium build to enable the overrides mechanism for
+// using Chromium's macros. Otherwise, don't depend on logging.h.
+// TODO(ajm): Ideally, checks.h would be combined with logging.h, but
+// consolidation with system_wrappers/logging.h should happen first.
+#include "webrtc/base/logging.h"
+#endif
+#include "webrtc/typedefs.h"
+
+// The macros here print a message to stderr and abort under various
+// conditions. All will accept additional stream messages. For example:
+// DCHECK_EQ(foo, bar) << "I'm printed when foo != bar.";
+//
+// - CHECK(x) is an assertion that x is always true, and that if it isn't, it's
+// better to terminate the process than to continue. During development, the
+// reason that it's better to terminate might simply be that the error
+// handling code isn't in place yet; in production, the reason might be that
+// the author of the code truly believes that x will always be true, but that
+// she recognizes that if she is wrong, abrupt and unpleasant process
+// termination is still better than carrying on with the assumption violated.
+//
+// - DCHECK(x) is the same as CHECK(x)---an assertion that x is always
+// true---except that x will only be evaluated in debug builds; in production
+// builds, x is simply assumed to be true. This is useful if evaluating x is
+// expensive and the expected cost of failing to detect the violated
+// assumption is acceptable. You should not handle cases where a production
+// build fails to spot a violated condition, even those that would result in
+// crashes. If the code needs to cope with the error, make it cope, but don't
+// call DCHECK; if the condition really can't occur, but you'd sleep better
+// at night knowing that the process will suicide instead of carrying on in
+// case you were wrong, use CHECK instead of DCHECK.
+//
+// - CHECK_EQ, _NE, _GT, ..., and DCHECK_EQ, _NE, _GT, ... are specialized
+// variants of CHECK and DCHECK that print prettier messages if the condition
+// doesn't hold. Prefer them to raw CHECK and DCHECK.
+//
+// - FATAL() aborts unconditionally.
namespace rtc {
-// Prints an error message to stderr and aborts execution.
-void Fatal(const char* file, int line, const char* format, ...);
+// The use of overrides/webrtc/base/logging.h in a Chromium build results in
+// redefined macro errors. Fortunately, Chromium's macros can be used as drop-in
+// replacements for the standalone versions.
+#ifndef WEBRTC_CHROMIUM_BUILD
+
+// Helper macro which avoids evaluating the arguments to a stream if
+// the condition doesn't hold.
+#define LAZY_STREAM(stream, condition) \
+ !(condition) ? static_cast<void>(0) : rtc::FatalMessageVoidify() & (stream)
+
+// The actual stream used isn't important.
+#define EAT_STREAM_PARAMETERS \
+ true ? static_cast<void>(0) \
+ : rtc::FatalMessageVoidify() & rtc::FatalMessage("", 0).stream()
+
+// CHECK dies with a fatal error if condition is not true. It is *not*
+// controlled by NDEBUG, so the check will be executed regardless of
+// compilation mode.
+//
+// We make sure CHECK et al. always evaluates their arguments, as
+// doing CHECK(FunctionWithSideEffect()) is a common idiom.
+#define CHECK(condition) \
+ LAZY_STREAM(rtc::FatalMessage(__FILE__, __LINE__).stream(), !(condition)) \
+ << "Check failed: " #condition << std::endl << "# "
+
+// Helper macro for binary operators.
+// Don't use this macro directly in your code, use CHECK_EQ et al below.
+//
+// TODO(akalin): Rewrite this so that constructs like if (...)
+// CHECK_EQ(...) else { ... } work properly.
+#define CHECK_OP(name, op, val1, val2) \
+ if (std::string* _result = \
+ rtc::Check##name##Impl((val1), (val2), \
+ #val1 " " #op " " #val2)) \
+ rtc::FatalMessage(__FILE__, __LINE__, _result).stream()
+
+// Build the error message string. This is separate from the "Impl"
+// function template because it is not performance critical and so can
+// be out of line, while the "Impl" code should be inline. Caller
+// takes ownership of the returned string.
+template<class t1, class t2>
+std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
+ std::ostringstream ss;
+ ss << names << " (" << v1 << " vs. " << v2 << ")";
+ std::string* msg = new std::string(ss.str());
+ return msg;
+}
+
+// MSVC doesn't like complex extern templates and DLLs.
+#if !defined(COMPILER_MSVC)
+// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated
+// in logging.cc.
+extern template std::string* MakeCheckOpString<int, int>(
+ const int&, const int&, const char* names);
+extern template
+std::string* MakeCheckOpString<unsigned long, unsigned long>(
+ const unsigned long&, const unsigned long&, const char* names);
+extern template
+std::string* MakeCheckOpString<unsigned long, unsigned int>(
+ const unsigned long&, const unsigned int&, const char* names);
+extern template
+std::string* MakeCheckOpString<unsigned int, unsigned long>(
+ const unsigned int&, const unsigned long&, const char* names);
+extern template
+std::string* MakeCheckOpString<std::string, std::string>(
+ const std::string&, const std::string&, const char* name);
+#endif
+
+// Helper functions for CHECK_OP macro.
+// The (int, int) specialization works around the issue that the compiler
+// will not instantiate the template version of the function on values of
+// unnamed enum type - see comment below.
+#define DEFINE_CHECK_OP_IMPL(name, op) \
+ template <class t1, class t2> \
+ inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \
+ const char* names) { \
+ if (v1 op v2) return NULL; \
+ else return rtc::MakeCheckOpString(v1, v2, names); \
+ } \
+ inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \
+ if (v1 op v2) return NULL; \
+ else return rtc::MakeCheckOpString(v1, v2, names); \
+ }
+DEFINE_CHECK_OP_IMPL(EQ, ==)
+DEFINE_CHECK_OP_IMPL(NE, !=)
+DEFINE_CHECK_OP_IMPL(LE, <=)
+DEFINE_CHECK_OP_IMPL(LT, < )
+DEFINE_CHECK_OP_IMPL(GE, >=)
+DEFINE_CHECK_OP_IMPL(GT, > )
+#undef DEFINE_CHECK_OP_IMPL
+
+#define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)
+#define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2)
+#define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2)
+#define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2)
+#define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)
+#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)
+
+// The DCHECK macro is equivalent to CHECK except that it only generates code in
+// debug builds.
+#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
+#define DCHECK(condition) CHECK(condition)
+#define DCHECK_EQ(v1, v2) CHECK_EQ(v1, v2)
+#define DCHECK_NE(v1, v2) CHECK_NE(v1, v2)
+#define DCHECK_LE(v1, v2) CHECK_LE(v1, v2)
+#define DCHECK_LT(v1, v2) CHECK_LT(v1, v2)
+#define DCHECK_GE(v1, v2) CHECK_GE(v1, v2)
+#define DCHECK_GT(v1, v2) CHECK_GT(v1, v2)
+#else
+#define DCHECK(condition) EAT_STREAM_PARAMETERS
+#define DCHECK_EQ(v1, v2) EAT_STREAM_PARAMETERS
+#define DCHECK_NE(v1, v2) EAT_STREAM_PARAMETERS
+#define DCHECK_LE(v1, v2) EAT_STREAM_PARAMETERS
+#define DCHECK_LT(v1, v2) EAT_STREAM_PARAMETERS
+#define DCHECK_GE(v1, v2) EAT_STREAM_PARAMETERS
+#define DCHECK_GT(v1, v2) EAT_STREAM_PARAMETERS
+#endif
+
+// This is identical to LogMessageVoidify but in name.
+class FatalMessageVoidify {
+ public:
+ FatalMessageVoidify() { }
+ // This has to be an operator with a precedence lower than << but
+ // higher than ?:
+ void operator&(std::ostream&) { }
+};
+
+#endif // WEBRTC_CHROMIUM_BUILD
+
+#define FATAL() rtc::FatalMessage(__FILE__, __LINE__).stream()
+// TODO(ajm): Consider adding NOTIMPLEMENTED and NOTREACHED macros when
+// base/logging.h and system_wrappers/logging.h are consolidated such that we
+// can match the Chromium behavior.
+
+// Like a stripped-down LogMessage from logging.h, except that it aborts.
+class FatalMessage {
+ public:
+ FatalMessage(const char* file, int line);
+ // Used for CHECK_EQ(), etc. Takes ownership of the given string.
+ FatalMessage(const char* file, int line, std::string* result);
+ NO_RETURN ~FatalMessage();
+
+ std::ostream& stream() { return stream_; }
+
+ private:
+ void Init(const char* file, int line);
+
+ std::ostringstream stream_;
+};
} // namespace rtc
-// The UNREACHABLE macro is very useful during development.
-#define UNREACHABLE() \
- rtc::Fatal(__FILE__, __LINE__, "unreachable code")
-
#endif // WEBRTC_BASE_CHECKS_H_
diff --git a/base/common.cc b/base/common.cc
index 8ea475b..c6f1b75 100644
--- a/base/common.cc
+++ b/base/common.cc
@@ -61,4 +61,12 @@
}
}
+bool IsOdd(int n) {
+ return (n & 0x1);
+}
+
+bool IsEven(int n) {
+ return !IsOdd(n);
+}
+
} // namespace rtc
diff --git a/base/common.h b/base/common.h
index 7f4a756..a8358df 100644
--- a/base/common.h
+++ b/base/common.h
@@ -98,6 +98,10 @@
// only by one component.
void SetCustomAssertLogger(AssertLogger logger);
+bool IsOdd(int n);
+
+bool IsEven(int n);
+
} // namespace rtc
#if ENABLE_DEBUG
@@ -109,9 +113,17 @@
if (!result) {
LogAssert(function, file, line, expression);
Break();
- return false;
}
- return true;
+ return result;
+}
+
+// Same as Assert above, but does not call Break(). Used in assert macros
+// that implement their own breaking.
+inline bool AssertNoBreak(bool result, const char* function, const char* file,
+ int line, const char* expression) {
+ if (!result)
+ LogAssert(function, file, line, expression);
+ return result;
}
} // namespace rtc
@@ -121,13 +133,28 @@
#endif
#ifndef ASSERT
+#if defined(WIN32)
+// Using debugbreak() inline on Windows directly in the ASSERT macro, has the
+// benefit of breaking exactly where the failing expression is and not two
+// calls up the stack.
+#define ASSERT(x) \
+ (rtc::AssertNoBreak((x), __FUNCTION__, __FILE__, __LINE__, #x) ? \
+ (void)(1) : __debugbreak())
+#else
#define ASSERT(x) \
(void)rtc::Assert((x), __FUNCTION__, __FILE__, __LINE__, #x)
#endif
+#endif
#ifndef VERIFY
+#if defined(WIN32)
+#define VERIFY(x) \
+ (rtc::AssertNoBreak((x), __FUNCTION__, __FILE__, __LINE__, #x) ? \
+ true : (__debugbreak(), false))
+#else
#define VERIFY(x) rtc::Assert((x), __FUNCTION__, __FILE__, __LINE__, #x)
#endif
+#endif
#else // !ENABLE_DEBUG
diff --git a/base/constructormagic.h b/base/constructormagic.h
index c20be2b..ceee37d 100644
--- a/base/constructormagic.h
+++ b/base/constructormagic.h
@@ -11,19 +11,22 @@
#ifndef WEBRTC_BASE_CONSTRUCTORMAGIC_H_
#define WEBRTC_BASE_CONSTRUCTORMAGIC_H_
+// Undefine macros first, just in case. Some third-party includes have their own
+// version.
+
+#undef DISALLOW_ASSIGN
#define DISALLOW_ASSIGN(TypeName) \
void operator=(const TypeName&)
// A macro to disallow the evil copy constructor and operator= functions
// This should be used in the private: declarations for a class.
-// Undefine this, just in case. Some third-party includes have their own
-// version.
#undef DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
DISALLOW_ASSIGN(TypeName)
// Alternative, less-accurate legacy name.
+#undef DISALLOW_EVIL_CONSTRUCTORS
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
DISALLOW_COPY_AND_ASSIGN(TypeName)
@@ -33,6 +36,7 @@
// This should be used in the private: declarations for a class
// that wants to prevent anyone from instantiating it. This is
// especially useful for classes containing only static methods.
+#undef DISALLOW_IMPLICIT_CONSTRUCTORS
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName(); \
DISALLOW_EVIL_CONSTRUCTORS(TypeName)
diff --git a/base/cpumonitor_unittest.cc b/base/cpumonitor_unittest.cc
index 6d9af5a..1546f55 100644
--- a/base/cpumonitor_unittest.cc
+++ b/base/cpumonitor_unittest.cc
@@ -23,6 +23,7 @@
#include "webrtc/base/thread.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/base/timing.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -337,7 +338,7 @@
#endif
// Tests both process and system functions in use at same time.
-TEST(CpuMonitorTest, TestGetBothLoad) {
+TEST(CpuMonitorTest, DISABLED_ON_MAC(TestGetBothLoad)) {
TestCpuSampler(true, true, false);
}
diff --git a/base/criticalsection.h b/base/criticalsection.h
index a950a47..a2d9bca 100644
--- a/base/criticalsection.h
+++ b/base/criticalsection.h
@@ -12,6 +12,7 @@
#define WEBRTC_BASE_CRITICALSECTION_H__
#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/thread_annotations.h"
#if defined(WEBRTC_WIN)
#include "webrtc/base/win32.h"
@@ -34,7 +35,7 @@
namespace rtc {
#if defined(WEBRTC_WIN)
-class CriticalSection {
+class LOCKABLE CriticalSection {
public:
CriticalSection() {
InitializeCriticalSection(&crit_);
@@ -44,18 +45,18 @@
~CriticalSection() {
DeleteCriticalSection(&crit_);
}
- void Enter() {
+ void Enter() EXCLUSIVE_LOCK_FUNCTION() {
EnterCriticalSection(&crit_);
TRACK_OWNER(thread_ = GetCurrentThreadId());
}
- bool TryEnter() {
+ bool TryEnter() EXCLUSIVE_TRYLOCK_FUNCTION(true) {
if (TryEnterCriticalSection(&crit_) != FALSE) {
TRACK_OWNER(thread_ = GetCurrentThreadId());
return true;
}
return false;
}
- void Leave() {
+ void Leave() UNLOCK_FUNCTION() {
TRACK_OWNER(thread_ = 0);
LeaveCriticalSection(&crit_);
}
@@ -71,7 +72,7 @@
#endif // WEBRTC_WIN
#if defined(WEBRTC_POSIX)
-class CriticalSection {
+class LOCKABLE CriticalSection {
public:
CriticalSection() {
pthread_mutexattr_t mutex_attribute;
@@ -84,18 +85,18 @@
~CriticalSection() {
pthread_mutex_destroy(&mutex_);
}
- void Enter() {
+ void Enter() EXCLUSIVE_LOCK_FUNCTION() {
pthread_mutex_lock(&mutex_);
TRACK_OWNER(thread_ = pthread_self());
}
- bool TryEnter() {
+ bool TryEnter() EXCLUSIVE_TRYLOCK_FUNCTION(true) {
if (pthread_mutex_trylock(&mutex_) == 0) {
TRACK_OWNER(thread_ = pthread_self());
return true;
}
return false;
}
- void Leave() {
+ void Leave() UNLOCK_FUNCTION() {
TRACK_OWNER(thread_ = 0);
pthread_mutex_unlock(&mutex_);
}
@@ -111,13 +112,13 @@
#endif // WEBRTC_POSIX
// CritScope, for serializing execution through a scope.
-class CritScope {
+class SCOPED_LOCKABLE CritScope {
public:
- explicit CritScope(CriticalSection *pcrit) {
+ explicit CritScope(CriticalSection *pcrit) EXCLUSIVE_LOCK_FUNCTION(pcrit) {
pcrit_ = pcrit;
pcrit_->Enter();
}
- ~CritScope() {
+ ~CritScope() UNLOCK_FUNCTION() {
pcrit_->Leave();
}
private:
diff --git a/base/criticalsection_unittest.cc b/base/criticalsection_unittest.cc
index e1b05cb..69f74fa 100644
--- a/base/criticalsection_unittest.cc
+++ b/base/criticalsection_unittest.cc
@@ -16,6 +16,7 @@
#include "webrtc/base/gunit.h"
#include "webrtc/base/scopedptrcollection.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -119,7 +120,7 @@
EXPECT_EQ(0, value);
}
-TEST(AtomicOpsTest, Increment) {
+TEST(AtomicOpsTest, DISABLED_ON_MAC(Increment)) {
// Create and start lots of threads.
AtomicOpRunner<IncrementOp> runner(0);
ScopedPtrCollection<Thread> threads;
@@ -131,7 +132,7 @@
EXPECT_EQ(kOperationsToRun * kNumThreads, runner.value());
}
-TEST(AtomicOpsTest, Decrement) {
+TEST(AtomicOpsTest, DISABLED_ON_MAC(Decrement)) {
// Create and start lots of threads.
AtomicOpRunner<DecrementOp> runner(kOperationsToRun * kNumThreads);
ScopedPtrCollection<Thread> threads;
diff --git a/base/exp_filter.cc b/base/exp_filter.cc
new file mode 100644
index 0000000..9529480
--- /dev/null
+++ b/base/exp_filter.cc
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/base/exp_filter.h"
+
+#include <math.h>
+
+namespace rtc {
+
+const float ExpFilter::kValueUndefined = -1.0f;
+
+void ExpFilter::Reset(float alpha) {
+ alpha_ = alpha;
+ filtered_ = kValueUndefined;
+}
+
+float ExpFilter::Apply(float exp, float sample) {
+ if (filtered_ == kValueUndefined) {
+ // Initialize filtered value.
+ filtered_ = sample;
+ } else if (exp == 1.0) {
+ filtered_ = alpha_ * filtered_ + (1 - alpha_) * sample;
+ } else {
+ float alpha = pow(alpha_, exp);
+ filtered_ = alpha * filtered_ + (1 - alpha) * sample;
+ }
+ if (max_ != kValueUndefined && filtered_ > max_) {
+ filtered_ = max_;
+ }
+ return filtered_;
+}
+
+void ExpFilter::UpdateBase(float alpha) {
+ alpha_ = alpha;
+}
+} // namespace rtc
diff --git a/base/exp_filter.h b/base/exp_filter.h
new file mode 100644
index 0000000..174159b
--- /dev/null
+++ b/base/exp_filter.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_BASE_EXP_FILTER_H_
+#define WEBRTC_BASE_EXP_FILTER_H_
+
+namespace rtc {
+
+// This class can be used, for example, for smoothing the result of bandwidth
+// estimation and packet loss estimation.
+
+class ExpFilter {
+ public:
+ static const float kValueUndefined;
+
+ explicit ExpFilter(float alpha, float max = kValueUndefined)
+ : max_(max) {
+ Reset(alpha);
+ }
+
+ // Resets the filter to its initial state, and resets filter factor base to
+ // the given value |alpha|.
+ void Reset(float alpha);
+
+ // Applies the filter with a given exponent on the provided sample:
+ // y(k) = min(alpha_^ exp * y(k-1) + (1 - alpha_^ exp) * sample, max_).
+ float Apply(float exp, float sample);
+
+ // Returns current filtered value.
+ float filtered() const { return filtered_; }
+
+ // Changes the filter factor base to the given value |alpha|.
+ void UpdateBase(float alpha);
+
+ private:
+ float alpha_; // Filter factor base.
+ float filtered_; // Current filter output.
+ const float max_;
+};
+} // namespace rtc
+
+#endif // WEBRTC_BASE_EXP_FILTER_H_
diff --git a/base/exp_filter_unittest.cc b/base/exp_filter_unittest.cc
new file mode 100644
index 0000000..f027808
--- /dev/null
+++ b/base/exp_filter_unittest.cc
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <math.h>
+
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/exp_filter.h"
+
+namespace rtc {
+
+TEST(ExpFilterTest, FirstTimeOutputEqualInput) {
+ // No max value defined.
+ ExpFilter filter = ExpFilter(0.9f);
+ filter.Apply(100.0f, 10.0f);
+
+ // First time, first argument no effect.
+ double value = 10.0f;
+ EXPECT_FLOAT_EQ(value, filter.filtered());
+}
+
+TEST(ExpFilterTest, SecondTime) {
+ double value;
+
+ ExpFilter filter = ExpFilter(0.9f);
+ filter.Apply(100.0f, 10.0f);
+
+ // First time, first argument no effect.
+ value = 10.0f;
+
+ filter.Apply(10.0f, 20.0f);
+ double alpha = pow(0.9f, 10.0f);
+ value = alpha * value + (1.0f - alpha) * 20.0f;
+ EXPECT_FLOAT_EQ(value, filter.filtered());
+}
+
+TEST(ExpFilterTest, Reset) {
+ ExpFilter filter = ExpFilter(0.9f);
+ filter.Apply(100.0f, 10.0f);
+
+ filter.Reset(0.8f);
+ filter.Apply(100.0f, 1.0f);
+
+ // Become first time after a reset.
+ double value = 1.0f;
+ EXPECT_FLOAT_EQ(value, filter.filtered());
+}
+
+TEST(ExpfilterTest, OutputLimitedByMax) {
+ double value;
+
+ // Max value defined.
+ ExpFilter filter = ExpFilter(0.9f, 1.0f);
+ filter.Apply(100.0f, 10.0f);
+
+ // Limited to max value.
+ value = 1.0f;
+ EXPECT_EQ(value, filter.filtered());
+
+ filter.Apply(1.0f, 0.0f);
+ value = 0.9f * value;
+ EXPECT_FLOAT_EQ(value, filter.filtered());
+}
+
+} // namespace rtc
diff --git a/base/fakesslidentity.h b/base/fakesslidentity.h
index 717cb6c..71a42d5 100644
--- a/base/fakesslidentity.h
+++ b/base/fakesslidentity.h
@@ -65,6 +65,7 @@
std::vector<SSLCertificate*> new_certs(certs_.size());
std::transform(certs_.begin(), certs_.end(), new_certs.begin(), DupCert);
*chain = new SSLCertChain(new_certs);
+ std::for_each(new_certs.begin(), new_certs.end(), DeleteCert);
return true;
}
@@ -72,6 +73,7 @@
static FakeSSLCertificate* DupCert(FakeSSLCertificate cert) {
return cert.GetReference();
}
+ static void DeleteCert(SSLCertificate* cert) { delete cert; }
std::string data_;
std::vector<FakeSSLCertificate> certs_;
std::string digest_algorithm_;
diff --git a/base/filelock_unittest.cc b/base/filelock_unittest.cc
index eecbf07..536204e 100644
--- a/base/filelock_unittest.cc
+++ b/base/filelock_unittest.cc
@@ -17,6 +17,7 @@
#include "webrtc/base/pathutils.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -76,7 +77,7 @@
EXPECT_TRUE(lock2.get() == NULL);
}
-TEST_F(FileLockTest, TestThreadedLock) {
+TEST_F(FileLockTest, DISABLED_ON_MAC(TestThreadedLock)) {
scoped_ptr<FileLock> lock(FileLock::TryLock(temp_file_.pathname()));
EXPECT_TRUE(lock.get() != NULL);
diff --git a/base/fileutils.cc b/base/fileutils.cc
index 60bd0f8..24375c9 100644
--- a/base/fileutils.cc
+++ b/base/fileutils.cc
@@ -10,13 +10,6 @@
#include <assert.h>
-#if defined(WEBRTC_WIN)
-// TODO(grunell): Remove io.h includes when Chromium has started
-// to use AEC in each source. http://crbug.com/264611.
-#include <io.h>
-#include "webrtc/base/win32.h"
-#endif
-
#include "webrtc/base/pathutils.h"
#include "webrtc/base/fileutils.h"
#include "webrtc/base/stringutils.h"
@@ -132,15 +125,14 @@
#endif
}
- // returns the last modified time of this file
-time_t DirectoryIterator::FileModifyTime() const {
+bool DirectoryIterator::OlderThan(int seconds) const {
+ time_t file_modify_time;
#if defined(WEBRTC_WIN)
- time_t val;
- FileTimeToUnixTime(data_.ftLastWriteTime, &val);
- return val;
+ FileTimeToUnixTime(data_.ftLastWriteTime, &file_modify_time);
#else
- return stat_.st_mtime;
+ file_modify_time = stat_.st_mtime;
#endif
+ return TimeDiff(time(NULL), file_modify_time) >= seconds;
}
FilesystemInterface* Filesystem::default_filesystem_ = NULL;
@@ -280,28 +272,4 @@
return true;
}
-// Taken from Chromium's base/platform_file_*.cc.
-// TODO(grunell): Remove when Chromium has started to use AEC in each source.
-// http://crbug.com/264611.
-FILE* FdopenPlatformFileForWriting(PlatformFile file) {
-#if defined(WEBRTC_WIN)
- if (file == kInvalidPlatformFileValue)
- return NULL;
- int fd = _open_osfhandle(reinterpret_cast<intptr_t>(file), 0);
- if (fd < 0)
- return NULL;
- return _fdopen(fd, "w");
-#else
- return fdopen(file, "w");
-#endif
-}
-
-bool ClosePlatformFile(PlatformFile file) {
-#if defined(WEBRTC_WIN)
- return CloseHandle(file) != 0;
-#else
- return close(file);
-#endif
-}
-
} // namespace rtc
diff --git a/base/fileutils.h b/base/fileutils.h
index c0a3f88..9112952 100644
--- a/base/fileutils.h
+++ b/base/fileutils.h
@@ -13,9 +13,7 @@
#include <string>
-#if defined(WEBRTC_WIN)
-#include "webrtc/base/win32.h"
-#else
+#if !defined(WEBRTC_WIN)
#include <dirent.h>
#include <stdio.h>
#include <sys/stat.h>
@@ -25,6 +23,7 @@
#include "webrtc/base/basictypes.h"
#include "webrtc/base/common.h"
+#include "webrtc/base/platform_file.h"
#include "webrtc/base/scoped_ptr.h"
namespace rtc {
@@ -67,8 +66,8 @@
// returns the size of the file currently pointed to
virtual size_t FileSize() const;
- // returns the last modified time of the file currently pointed to
- virtual time_t FileModifyTime() const;
+ // returns true if the file is older than seconds
+ virtual bool OlderThan(int seconds) const;
// checks whether current file is a special directory file "." or ".."
bool IsDots() const {
@@ -436,24 +435,6 @@
// process).
bool CreateUniqueFile(Pathname& path, bool create_empty);
-// Taken from Chromium's base/platform_file.h.
-// Don't use ClosePlatformFile to close a file opened with FdopenPlatformFile.
-// Use fclose instead.
-// TODO(grunell): Remove when Chromium has started to use AEC in each source.
-// http://crbug.com/264611.
-#if defined(WEBRTC_WIN)
-typedef HANDLE PlatformFile;
-const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE;
-#elif defined(WEBRTC_POSIX)
-typedef int PlatformFile;
-const PlatformFile kInvalidPlatformFileValue = -1;
-#else
-#error Unsupported platform
-#endif
-
-FILE* FdopenPlatformFileForWriting(PlatformFile file);
-bool ClosePlatformFile(PlatformFile file);
-
} // namespace rtc
#endif // WEBRTC_BASE_FILEUTILS_H_
diff --git a/base/flags.cc b/base/flags.cc
index fe7a334..a5e1c45 100644
--- a/base/flags.cc
+++ b/base/flags.cc
@@ -56,7 +56,7 @@
variable_->s = default_.s;
return;
}
- UNREACHABLE();
+ FATAL() << "unreachable code";
}
@@ -67,8 +67,7 @@
case Flag::FLOAT: return "float";
case Flag::STRING: return "string";
}
- UNREACHABLE();
- return NULL;
+ FATAL() << "unreachable code";
}
@@ -87,7 +86,7 @@
printf("%s", p->s);
return;
}
- UNREACHABLE();
+ FATAL() << "unreachable code";
}
@@ -164,8 +163,7 @@
if (*arg == '=') {
// make a copy so we can NUL-terminate flag name
int n = static_cast<int>(arg - *name);
- if (n >= buffer_size)
- Fatal(__FILE__, __LINE__, "CHECK(%s) failed", "n < buffer_size");
+ CHECK_LT(n, buffer_size);
memcpy(buffer, *name, n * sizeof(char));
buffer[n] = '\0';
*name = buffer;
@@ -259,8 +257,7 @@
void FlagList::Register(Flag* flag) {
assert(flag != NULL && strlen(flag->name()) > 0);
- if (Lookup(flag->name()) != NULL)
- Fatal(flag->file(), 0, "flag %s declared twice", flag->name());
+ CHECK(!Lookup(flag->name())) << "flag " << flag->name() << " declared twice";
flag->next_ = list_;
list_ = flag;
}
@@ -294,6 +291,6 @@
delete[] argv_;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
} // namespace rtc
diff --git a/base/gunit.h b/base/gunit.h
index 6d9c06f..7431fcf 100644
--- a/base/gunit.h
+++ b/base/gunit.h
@@ -14,7 +14,7 @@
#include "webrtc/base/logging.h"
#include "webrtc/base/thread.h"
#if defined(WEBRTC_ANDROID) || defined(GTEST_RELATIVE_PATH)
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#else
#include "testing/base/public/gunit.h"
#endif
diff --git a/base/httpclient.cc b/base/httpclient.cc
index 6256772..fe34f7c 100644
--- a/base/httpclient.cc
+++ b/base/httpclient.cc
@@ -18,6 +18,7 @@
#include "webrtc/base/httpclient.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/pathutils.h"
+#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/socketstream.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
@@ -91,7 +92,7 @@
time_t u_temp;
// Current time
- size_t now = time(0);
+ time_t now = time(0);
HttpAttributeList cache_control;
if (t.response.hasHeader(HH_CACHE_CONTROL, &s_temp)) {
@@ -113,7 +114,7 @@
apparent_age = response_time - date;
}
- size_t corrected_received_age = apparent_age;
+ time_t corrected_received_age = apparent_age;
size_t i_temp;
if (t.response.hasHeader(HH_AGE, &s_temp)
&& HttpStringToUInt(s_temp, (&i_temp))) {
@@ -121,13 +122,13 @@
corrected_received_age = stdmax(apparent_age, u_temp);
}
- size_t response_delay = response_time - request_time;
- size_t corrected_initial_age = corrected_received_age + response_delay;
- size_t resident_time = now - response_time;
- size_t current_age = corrected_initial_age + resident_time;
+ time_t response_delay = response_time - request_time;
+ time_t corrected_initial_age = corrected_received_age + response_delay;
+ time_t resident_time = now - response_time;
+ time_t current_age = corrected_initial_age + resident_time;
// Compute lifetime of document
- size_t lifetime;
+ time_t lifetime;
if (HttpHasAttribute(cache_control, "max-age", &s_temp)) {
lifetime = atoi(s_temp.c_str());
} else if (t.response.hasHeader(HH_EXPIRES, &s_temp)
@@ -596,8 +597,10 @@
if ((HE_NONE == error)
&& (HV_HEAD != request().verb)
&& response().document) {
- char buffer[1024 * 64];
- StreamResult result = Flow(stream.get(), buffer, ARRAY_SIZE(buffer),
+ // Allocate on heap to not explode the stack.
+ const int array_size = 1024 * 64;
+ scoped_ptr<char[]> buffer(new char[array_size]);
+ StreamResult result = Flow(stream.get(), buffer.get(), array_size,
response().document.get());
if (SR_SUCCESS != result) {
error = HE_STREAM;
diff --git a/base/httpcommon.cc b/base/httpcommon.cc
index 095cdaf..561d2f4 100644
--- a/base/httpcommon.cc
+++ b/base/httpcommon.cc
@@ -43,9 +43,9 @@
bool find_string(size_t& index, const std::string& needle,
const char* const haystack[], size_t max_index) {
for (index=0; index<max_index; ++index) {
- if (_stricmp(needle.c_str(), haystack[index]) == 0) {
- return true;
- }
+ if (_stricmp(needle.c_str(), haystack[index]) == 0) {
+ return true;
+ }
}
return false;
}
@@ -57,11 +57,11 @@
static inline const char* Name(E val) { return Names[val]; }
static inline bool Parse(E& val, const std::string& name) {
- size_t index;
- if (!find_string(index, name, Names, Size))
- return false;
- val = static_cast<E>(index);
- return true;
+ size_t index;
+ if (!find_string(index, name, Names, Size))
+ return false;
+ val = static_cast<E>(index);
+ return true;
}
E val;
@@ -364,7 +364,7 @@
case 'C': tval.tm_mon = 11; break;
}
tval.tm_year -= 1900;
- size_t gmt, non_gmt = mktime(&tval);
+ time_t gmt, non_gmt = mktime(&tval);
if ((zone[0] == '+') || (zone[0] == '-')) {
if (!isdigit(zone[1]) || !isdigit(zone[2])
|| !isdigit(zone[3]) || !isdigit(zone[4])) {
@@ -383,7 +383,7 @@
}
// TODO: Android should support timezone, see b/2441195
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(BSD)
- tm *tm_for_timezone = localtime((time_t *)&gmt);
+ tm *tm_for_timezone = localtime(&gmt);
*seconds = gmt + tm_for_timezone->tm_gmtoff;
#else
*seconds = gmt - timezone;
@@ -434,9 +434,9 @@
if (combine == HC_YES) {
it->second.append(",");
it->second.append(value);
- }
+ }
return;
- }
+ }
}
headers_.insert(HeaderMap::value_type(name, value));
}
@@ -731,7 +731,7 @@
FreeCredentialsHandle(&cred);
}
};
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
HttpAuthResult HttpAuthenticate(
const char * challenge, size_t len,
@@ -990,7 +990,9 @@
}
CredHandle cred;
- ret = AcquireCredentialsHandleA(0, want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A, SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
+ ret = AcquireCredentialsHandleA(
+ 0, const_cast<char*>(want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A),
+ SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
//LOG(INFO) << "$$$ AcquireCredentialsHandle @ " << TimeSince(now);
if (ret != SEC_E_OK) {
LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
@@ -1035,7 +1037,7 @@
return HAR_RESPONSE;
}
#endif
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
return HAR_IGNORE;
}
diff --git a/base/ifaddrs-android.cc b/base/ifaddrs-android.cc
index c8363d5..d8d28a5 100644
--- a/base/ifaddrs-android.cc
+++ b/base/ifaddrs-android.cc
@@ -218,6 +218,6 @@
delete last;
}
}
-#endif // defined(WEBRTC_ANDROID)
} // namespace rtc
+#endif // defined(WEBRTC_ANDROID)
diff --git a/base/ipaddress.cc b/base/ipaddress.cc
index 4441e16..4f311d5 100644
--- a/base/ipaddress.cc
+++ b/base/ipaddress.cc
@@ -186,6 +186,30 @@
strip_sensitive_ = enable;
}
+bool InterfaceAddress::operator==(const InterfaceAddress &other) const {
+ return ipv6_flags_ == other.ipv6_flags() &&
+ static_cast<const IPAddress&>(*this) == other;
+}
+
+bool InterfaceAddress::operator!=(const InterfaceAddress &other) const {
+ return !((*this) == other);
+}
+
+const InterfaceAddress& InterfaceAddress::operator=(
+ const InterfaceAddress& other) {
+ ipv6_flags_ = other.ipv6_flags_;
+ static_cast<IPAddress&>(*this) = other;
+ return *this;
+}
+
+std::ostream& operator<<(std::ostream& os, const InterfaceAddress& ip) {
+ os << static_cast<const IPAddress&>(ip);
+
+ if (ip.family() == AF_INET6)
+ os << "|flags:0x" << std::hex << ip.ipv6_flags();
+
+ return os;
+}
bool IsPrivateV4(uint32 ip_in_host_order) {
return ((ip_in_host_order >> 24) == 127) ||
@@ -235,6 +259,17 @@
return true;
}
+bool IPFromString(const std::string& str, int flags,
+ InterfaceAddress* out) {
+ IPAddress ip;
+ if (!IPFromString(str, &ip)) {
+ return false;
+ }
+
+ *out = InterfaceAddress(ip, flags);
+ return true;
+}
+
bool IPIsAny(const IPAddress& ip) {
switch (ip.family()) {
case AF_INET:
diff --git a/base/ipaddress.h b/base/ipaddress.h
index e7d649a..12db5c5 100644
--- a/base/ipaddress.h
+++ b/base/ipaddress.h
@@ -33,6 +33,19 @@
namespace rtc {
+enum IPv6AddressFlag {
+ IPV6_ADDRESS_FLAG_NONE = 0x00,
+
+ // Temporary address is dynamic by nature and will not carry MAC
+ // address.
+ IPV6_ADDRESS_FLAG_TEMPORARY = 1 << 0,
+
+ // Temporary address could become deprecated once the preferred
+ // lifetime is reached. It is still valid but just shouldn't be used
+ // to create new connection.
+ IPV6_ADDRESS_FLAG_DEPRECATED = 1 << 1,
+};
+
// Version-agnostic IP address class, wraps a union of in_addr and in6_addr.
class IPAddress {
public:
@@ -40,12 +53,12 @@
::memset(&u_, 0, sizeof(u_));
}
- explicit IPAddress(const in_addr &ip4) : family_(AF_INET) {
+ explicit IPAddress(const in_addr& ip4) : family_(AF_INET) {
memset(&u_, 0, sizeof(u_));
u_.ip4 = ip4;
}
- explicit IPAddress(const in6_addr &ip6) : family_(AF_INET6) {
+ explicit IPAddress(const in6_addr& ip6) : family_(AF_INET6) {
u_.ip6 = ip6;
}
@@ -54,22 +67,22 @@
u_.ip4.s_addr = HostToNetwork32(ip_in_host_byte_order);
}
- IPAddress(const IPAddress &other) : family_(other.family_) {
+ IPAddress(const IPAddress& other) : family_(other.family_) {
::memcpy(&u_, &other.u_, sizeof(u_));
}
- ~IPAddress() {}
+ virtual ~IPAddress() {}
- const IPAddress & operator=(const IPAddress &other) {
+ const IPAddress & operator=(const IPAddress& other) {
family_ = other.family_;
::memcpy(&u_, &other.u_, sizeof(u_));
return *this;
}
- bool operator==(const IPAddress &other) const;
- bool operator!=(const IPAddress &other) const;
- bool operator <(const IPAddress &other) const;
- bool operator >(const IPAddress &other) const;
+ bool operator==(const IPAddress& other) const;
+ bool operator!=(const IPAddress& other) const;
+ bool operator <(const IPAddress& other) const;
+ bool operator >(const IPAddress& other) const;
friend std::ostream& operator<<(std::ostream& os, const IPAddress& addr);
int family() const { return family_; }
@@ -108,8 +121,38 @@
static bool strip_sensitive_;
};
+// IP class which could represent IPv6 address flags which is only
+// meaningful in IPv6 case.
+class InterfaceAddress : public IPAddress {
+ public:
+ InterfaceAddress() : ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {}
+
+ InterfaceAddress(IPAddress ip)
+ : IPAddress(ip), ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {}
+
+ InterfaceAddress(IPAddress addr, int ipv6_flags)
+ : IPAddress(addr), ipv6_flags_(ipv6_flags) {}
+
+ InterfaceAddress(const in6_addr& ip6, int ipv6_flags)
+ : IPAddress(ip6), ipv6_flags_(ipv6_flags) {}
+
+ const InterfaceAddress & operator=(const InterfaceAddress& other);
+
+ bool operator==(const InterfaceAddress& other) const;
+ bool operator!=(const InterfaceAddress& other) const;
+
+ int ipv6_flags() const { return ipv6_flags_; }
+ friend std::ostream& operator<<(std::ostream& os,
+ const InterfaceAddress& addr);
+
+ private:
+ int ipv6_flags_;
+};
+
bool IPFromAddrInfo(struct addrinfo* info, IPAddress* out);
bool IPFromString(const std::string& str, IPAddress* out);
+bool IPFromString(const std::string& str, int flags,
+ InterfaceAddress* out);
bool IPIsAny(const IPAddress& ip);
bool IPIsLoopback(const IPAddress& ip);
bool IPIsPrivate(const IPAddress& ip);
diff --git a/base/ipaddress_unittest.cc b/base/ipaddress_unittest.cc
index 657595f..e847335 100644
--- a/base/ipaddress_unittest.cc
+++ b/base/ipaddress_unittest.cc
@@ -856,4 +856,41 @@
IPAddress::set_strip_sensitive(false);
}
+TEST(IPAddressTest, TestInterfaceAddress) {
+ in6_addr addr;
+ InterfaceAddress addr1(kIPv6PublicAddr,
+ IPV6_ADDRESS_FLAG_TEMPORARY);
+ EXPECT_EQ(addr1.ipv6_flags(), IPV6_ADDRESS_FLAG_TEMPORARY);
+ EXPECT_EQ(addr1.family(), AF_INET6);
+
+ addr = addr1.ipv6_address();
+ EXPECT_TRUE(IN6_ARE_ADDR_EQUAL(&addr, &kIPv6PublicAddr));
+
+ InterfaceAddress addr2 = addr1;
+ EXPECT_EQ(addr1, addr2);
+ EXPECT_EQ(addr2.ipv6_flags(), IPV6_ADDRESS_FLAG_TEMPORARY);
+ addr = addr2.ipv6_address();
+ EXPECT_TRUE(IN6_ARE_ADDR_EQUAL(&addr, &kIPv6PublicAddr));
+
+ InterfaceAddress addr3(addr1);
+ EXPECT_EQ(addr1, addr3);
+ EXPECT_EQ(addr3.ipv6_flags(), IPV6_ADDRESS_FLAG_TEMPORARY);
+ addr = addr3.ipv6_address();
+ EXPECT_TRUE(IN6_ARE_ADDR_EQUAL(&addr, &kIPv6PublicAddr));
+
+ InterfaceAddress addr4(kIPv6PublicAddr,
+ IPV6_ADDRESS_FLAG_DEPRECATED);
+ EXPECT_NE(addr1, addr4);
+
+ // When you compare them as IPAddress, since operator==
+ // is not virtual, it'll be equal.
+ IPAddress *paddr1 = &addr1;
+ IPAddress *paddr4 = &addr4;
+ EXPECT_EQ(*paddr1, *paddr4);
+
+ InterfaceAddress addr5(kIPv6LinkLocalAddr,
+ IPV6_ADDRESS_FLAG_TEMPORARY);
+ EXPECT_NE(addr1, addr5);
+}
+
} // namespace rtc
diff --git a/base/latebindingsymboltable.cc b/base/latebindingsymboltable.cc
index 1896bd0..030f720 100644
--- a/base/latebindingsymboltable.cc
+++ b/base/latebindingsymboltable.cc
@@ -100,7 +100,7 @@
// is necessary for same-named symbols in different ABI
// versions of the same library to not explode.
RTLD_NOW|RTLD_LOCAL
-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && defined(RTLD_DEEPBIND)
// RTLD_DEEPBIND makes symbol dependencies in the
// newly-loaded tree prefer to resolve to definitions within
// that tree (the default on OS X). This is necessary for
diff --git a/base/linux.cc b/base/linux.cc
index b958543..9800f47 100644
--- a/base/linux.cc
+++ b/base/linux.cc
@@ -233,7 +233,7 @@
return true;
}
-#if !defined(WEBRTC_CHROMIUM_BUILDs)
+#if !defined(WEBRTC_CHROMIUM_BUILD)
static bool ExpectLineFromStream(FileStream* stream,
std::string* out) {
StreamResult res = stream->ReadLine(out);
diff --git a/base/linux.h b/base/linux.h
index 8f60187..dd863ba 100644
--- a/base/linux.h
+++ b/base/linux.h
@@ -104,7 +104,7 @@
ConfigParser::MapVector sections_;
};
-#if !defined(WEBRTC_CHROMIUM_BUILDs)
+#if !defined(WEBRTC_CHROMIUM_BUILD)
// Builds a string containing the info from lsb_release on a single line.
std::string ReadLinuxLsbRelease();
#endif
diff --git a/base/linux_unittest.cc b/base/linux_unittest.cc
index c65ef07..19401b4 100644
--- a/base/linux_unittest.cc
+++ b/base/linux_unittest.cc
@@ -88,7 +88,7 @@
EXPECT_EQ(true, parser.Parse(&key_val_pairs));
}
-#if !defined(WEBRTC_CHROMIUM_BUILDs)
+#if !defined(WEBRTC_CHROMIUM_BUILD)
TEST(ReadLinuxLsbRelease, ReturnsSomething) {
std::string str = ReadLinuxLsbRelease();
// ChromeOS don't have lsb_release
diff --git a/base/logging.h b/base/logging.h
index 91d61b3..e07045f 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -246,21 +246,7 @@
const void* data, size_t len, bool hex_mode,
LogMultilineState* state);
-//////////////////////////////////////////////////////////////////////
-// Macros which automatically disable logging when LOGGING == 0
-//////////////////////////////////////////////////////////////////////
-
-// If LOGGING is not explicitly defined, default to enabled in debug mode
-#if !defined(LOGGING)
-#if defined(_DEBUG) && !defined(NDEBUG)
-#define LOGGING 1
-#else
-#define LOGGING 0
-#endif
-#endif // !defined(LOGGING)
-
#ifndef LOG
-#if LOGGING
// The following non-obvious technique for implementation of a
// conditional log stream was stolen from google3/base/logging.h.
@@ -317,30 +303,6 @@
#define LOG_T(sev) LOG(sev) << this << ": "
-#else // !LOGGING
-
-// Hopefully, the compiler will optimize away some of this code.
-// Note: syntax of "1 ? (void)0 : LogMessage" was causing errors in g++,
-// converted to "while (false)"
-#define LOG(sev) \
- while (false)rtc:: LogMessage(NULL, 0, rtc::sev).stream()
-#define LOG_V(sev) \
- while (false) rtc::LogMessage(NULL, 0, sev).stream()
-#define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": "
-#define LOG_CHECK_LEVEL(sev) \
- false
-#define LOG_CHECK_LEVEL_V(sev) \
- false
-
-#define LOG_E(sev, ctx, err, ...) \
- while (false) rtc::LogMessage(__FILE__, __LINE__, rtc::sev, \
- rtc::ERRCTX_ ## ctx, err , ##__VA_ARGS__) \
- .stream()
-
-#define LOG_T(sev) LOG(sev) << this << ": "
-#define LOG_T_F(sev) LOG(sev) << this << ": " << __FUNCTION__ <<
-#endif // !LOGGING
-
#define LOG_ERRNO_EX(sev, err) \
LOG_E(sev, ERRNO, err)
#define LOG_ERRNO(sev) \
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc
index 59630d7..aa43837 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/pathutils.h"
#include "webrtc/base/stream.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -82,7 +83,7 @@
}
};
-TEST(LogTest, MultipleThreads) {
+TEST(LogTest, DISABLED_ON_MAC(MultipleThreads)) {
int sev = LogMessage::GetLogToStream(NULL);
LogThread thread1, thread2, thread3;
diff --git a/base/maccocoathreadhelper.mm b/base/maccocoathreadhelper.mm
index 7bf9e92..59ae6c4 100644
--- a/base/maccocoathreadhelper.mm
+++ b/base/maccocoathreadhelper.mm
@@ -23,12 +23,7 @@
if ([NSThread isMultiThreaded] == NO) {
// The sole purpose of this autorelease pool is to avoid a console
// message on Leopard that tells us we're autoreleasing the thread
- // with no autorelease pool in place; we can't set up an autorelease
- // pool before this, because this is executed from an initializer,
- // which is run before main. This means we leak an autorelease pool,
- // and one thread, and if other objects are set up in initializers after
- // this they'll be silently added to this pool and never released.
-
+ // with no autorelease pool in place.
// Doing NSAutoreleasePool* hack = [[NSAutoreleasePool alloc] init];
// causes unused variable error.
NSAutoreleasePool* hack;
@@ -36,6 +31,7 @@
[NSThread detachNewThreadSelector:@selector(class)
toTarget:[NSObject class]
withObject:nil];
+ [hack drain];
}
assert([NSThread isMultiThreaded]);
diff --git a/base/macsocketserver_unittest.cc b/base/macsocketserver_unittest.cc
index e98be91..4c0432a 100644
--- a/base/macsocketserver_unittest.cc
+++ b/base/macsocketserver_unittest.cc
@@ -33,7 +33,7 @@
#ifndef CARBON_DEPRECATED
// Test that MacCFSocketServer::Wait works as expected.
-TEST(MacCFSocketServerTest, TestWait) {
+TEST(MacCFSocketServerTest, DISABLED_TestWait) {
MacCFSocketServer server;
uint32 start = Time();
server.Wait(1000, true);
@@ -41,7 +41,7 @@
}
// Test that MacCFSocketServer::Wakeup works as expected.
-TEST(MacCFSocketServerTest, TestWakeup) {
+TEST(MacCFSocketServerTest, DISABLED_TestWakeup) {
MacCFSocketServer server;
WakeThread thread(&server);
uint32 start = Time();
@@ -51,7 +51,7 @@
}
// Test that MacCarbonSocketServer::Wait works as expected.
-TEST(MacCarbonSocketServerTest, TestWait) {
+TEST(MacCarbonSocketServerTest, DISABLED_TestWait) {
MacCarbonSocketServer server;
uint32 start = Time();
server.Wait(1000, true);
@@ -59,7 +59,7 @@
}
// Test that MacCarbonSocketServer::Wakeup works as expected.
-TEST(MacCarbonSocketServerTest, TestWakeup) {
+TEST(MacCarbonSocketServerTest, DISABLED_TestWakeup) {
MacCarbonSocketServer server;
WakeThread thread(&server);
uint32 start = Time();
@@ -69,7 +69,7 @@
}
// Test that MacCarbonAppSocketServer::Wait works as expected.
-TEST(MacCarbonAppSocketServerTest, TestWait) {
+TEST(MacCarbonAppSocketServerTest, DISABLED_TestWait) {
MacCarbonAppSocketServer server;
uint32 start = Time();
server.Wait(1000, true);
@@ -77,7 +77,7 @@
}
// Test that MacCarbonAppSocketServer::Wakeup works as expected.
-TEST(MacCarbonAppSocketServerTest, TestWakeup) {
+TEST(MacCarbonAppSocketServerTest, DISABLED_TestWakeup) {
MacCarbonAppSocketServer server;
WakeThread thread(&server);
uint32 start = Time();
@@ -102,19 +102,19 @@
SocketServerScope scope_;
};
-TEST_F(MacAsyncSocketTest, TestConnectIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectIPv4) {
SocketTest::TestConnectIPv4();
}
-TEST_F(MacAsyncSocketTest, TestConnectIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectIPv6) {
SocketTest::TestConnectIPv6();
}
-TEST_F(MacAsyncSocketTest, TestConnectWithDnsLookupIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectWithDnsLookupIPv4) {
SocketTest::TestConnectWithDnsLookupIPv4();
}
-TEST_F(MacAsyncSocketTest, TestConnectWithDnsLookupIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectWithDnsLookupIPv6) {
SocketTest::TestConnectWithDnsLookupIPv6();
}
@@ -123,7 +123,7 @@
SocketTest::TestConnectFailIPv4();
}
-TEST_F(MacAsyncSocketTest, TestConnectFailIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectFailIPv6) {
SocketTest::TestConnectFailIPv6();
}
@@ -136,11 +136,11 @@
SocketTest::TestConnectWithDnsLookupFailIPv6();
}
-TEST_F(MacAsyncSocketTest, TestConnectWithClosedSocketIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectWithClosedSocketIPv4) {
SocketTest::TestConnectWithClosedSocketIPv4();
}
-TEST_F(MacAsyncSocketTest, TestConnectWithClosedSocketIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectWithClosedSocketIPv6) {
SocketTest::TestConnectWithClosedSocketIPv6();
}
@@ -155,51 +155,51 @@
}
// Flaky at the moment (0.5% failure rate). Seems the client doesn't get
// signalled in a timely manner...
-TEST_F(MacAsyncSocketTest, TestClientCloseDuringConnectIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestClientCloseDuringConnectIPv4) {
SocketTest::TestClientCloseDuringConnectIPv4();
}
-TEST_F(MacAsyncSocketTest, TestClientCloseDuringConnectIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestClientCloseDuringConnectIPv6) {
SocketTest::TestClientCloseDuringConnectIPv6();
}
-TEST_F(MacAsyncSocketTest, TestServerCloseIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestServerCloseIPv4) {
SocketTest::TestServerCloseIPv4();
}
-TEST_F(MacAsyncSocketTest, TestServerCloseIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestServerCloseIPv6) {
SocketTest::TestServerCloseIPv6();
}
-TEST_F(MacAsyncSocketTest, TestCloseInClosedCallbackIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestCloseInClosedCallbackIPv4) {
SocketTest::TestCloseInClosedCallbackIPv4();
}
-TEST_F(MacAsyncSocketTest, TestCloseInClosedCallbackIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestCloseInClosedCallbackIPv6) {
SocketTest::TestCloseInClosedCallbackIPv6();
}
-TEST_F(MacAsyncSocketTest, TestSocketServerWaitIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestSocketServerWaitIPv4) {
SocketTest::TestSocketServerWaitIPv4();
}
-TEST_F(MacAsyncSocketTest, TestSocketServerWaitIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestSocketServerWaitIPv6) {
SocketTest::TestSocketServerWaitIPv6();
}
-TEST_F(MacAsyncSocketTest, TestTcpIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestTcpIPv4) {
SocketTest::TestTcpIPv4();
}
-TEST_F(MacAsyncSocketTest, TestTcpIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestTcpIPv6) {
SocketTest::TestTcpIPv6();
}
-TEST_F(MacAsyncSocketTest, TestSingleFlowControlCallbackIPv4) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestSingleFlowControlCallbackIPv4) {
SocketTest::TestSingleFlowControlCallbackIPv4();
}
-TEST_F(MacAsyncSocketTest, TestSingleFlowControlCallbackIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestSingleFlowControlCallbackIPv6) {
SocketTest::TestSingleFlowControlCallbackIPv6();
}
@@ -226,11 +226,11 @@
};
};
-TEST_F(MacCarbonAppAsyncSocketTest, TestSocketServerWaitIPv4) {
+TEST_F(MacCarbonAppAsyncSocketTest, DISABLED_TestSocketServerWaitIPv4) {
SocketTest::TestSocketServerWaitIPv4();
}
-TEST_F(MacCarbonAppAsyncSocketTest, TestSocketServerWaitIPv6) {
+TEST_F(MacCarbonAppAsyncSocketTest, DISABLED_TestSocketServerWaitIPv6) {
SocketTest::TestSocketServerWaitIPv6();
}
#endif
diff --git a/base/messagequeue_unittest.cc b/base/messagequeue_unittest.cc
index 78024e0..2027d91 100644
--- a/base/messagequeue_unittest.cc
+++ b/base/messagequeue_unittest.cc
@@ -16,6 +16,7 @@
#include "webrtc/base/thread.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/base/nullsocketserver.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
using namespace rtc;
@@ -79,7 +80,7 @@
DelayedPostsWithIdenticalTimesAreProcessedInFifoOrder(&q_nullss);
}
-TEST_F(MessageQueueTest, DisposeNotLocked) {
+TEST_F(MessageQueueTest, DISABLED_ON_MAC(DisposeNotLocked)) {
bool was_locked = true;
bool deleted = false;
DeletedLockChecker* d = new DeletedLockChecker(this, &was_locked, &deleted);
diff --git a/base/nat_unittest.cc b/base/nat_unittest.cc
index 8b9d8a1..19c1225 100644
--- a/base/nat_unittest.cc
+++ b/base/nat_unittest.cc
@@ -19,6 +19,7 @@
#include "webrtc/base/physicalsocketserver.h"
#include "webrtc/base/testclient.h"
#include "webrtc/base/virtualsocketserver.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
using namespace rtc;
@@ -209,7 +210,7 @@
// can't talk to ip, so check for connectivity as well.
for (std::vector<Network*>::iterator it = networks.begin();
it != networks.end(); ++it) {
- const IPAddress& ip = (*it)->ip();
+ const IPAddress& ip = (*it)->GetBestIP();
if (ip.family() == int_addr.family() && TestConnectivity(int_addr, ip)) {
ext_addr2.SetIP(ip);
break;
@@ -236,11 +237,11 @@
TestFilters(int_pss.get(), int_addr, ext_pss.get(), ext_addrs);
}
-TEST(NatTest, TestPhysicalIPv4) {
+TEST(NatTest, DISABLED_ON_MAC(TestPhysicalIPv4)) {
TestPhysicalInternal(SocketAddress("127.0.0.1", 0));
}
-TEST(NatTest, TestPhysicalIPv6) {
+TEST(NatTest, DISABLED_ON_MAC(TestPhysicalIPv6)) {
if (HasIPv6Enabled()) {
TestPhysicalInternal(SocketAddress("::1", 0));
} else {
@@ -278,11 +279,11 @@
TestFilters(int_vss.get(), int_addr, ext_vss.get(), ext_addrs);
}
-TEST(NatTest, TestVirtualIPv4) {
+TEST(NatTest, DISABLED_ON_MAC(TestVirtualIPv4)) {
TestVirtualInternal(AF_INET);
}
-TEST(NatTest, TestVirtualIPv6) {
+TEST(NatTest, DISABLED_ON_MAC(TestVirtualIPv6)) {
if (HasIPv6Enabled()) {
TestVirtualInternal(AF_INET6);
} else {
diff --git a/base/network.cc b/base/network.cc
index d94c69e..c1f978b 100644
--- a/base/network.cc
+++ b/base/network.cc
@@ -65,6 +65,11 @@
const int kHighestNetworkPreference = 127;
+typedef struct {
+ Network* net;
+ std::vector<InterfaceAddress> ips;
+} AddressList;
+
bool CompareNetworks(const Network* a, const Network* b) {
if (a->prefix_length() == b->prefix_length()) {
if (a->name() == b->name()) {
@@ -83,10 +88,13 @@
return a->type() < b->type();
}
+ IPAddress ip_a = a->GetBestIP();
+ IPAddress ip_b = b->GetBestIP();
+
// After type, networks are sorted by IP address precedence values
// from RFC 3484-bis
- if (IPAddressPrecedence(a->ip()) != IPAddressPrecedence(b->ip())) {
- return IPAddressPrecedence(a->ip()) > IPAddressPrecedence(b->ip());
+ if (IPAddressPrecedence(ip_a) != IPAddressPrecedence(ip_b)) {
+ return IPAddressPrecedence(ip_a) > IPAddressPrecedence(ip_b);
}
// TODO(mallinath) - Add VPN and Link speed conditions while sorting.
@@ -144,10 +152,12 @@
void NetworkManagerBase::MergeNetworkList(const NetworkList& new_networks,
bool* changed) {
- // Sort the list so that we can detect when it changes.
- typedef std::pair<Network*, std::vector<IPAddress> > address_list;
- std::map<std::string, address_list> address_map;
+ // AddressList in this map will track IP addresses for all Networks
+ // with the same key.
+ std::map<std::string, AddressList> consolidated_address_list;
NetworkList list(new_networks);
+
+ // Result of Network merge. Element in this list should have unique key.
NetworkList merged_list;
std::sort(list.begin(), list.end(), CompareNetworks);
@@ -162,16 +172,19 @@
std::string key = MakeNetworkKey(list[i]->name(),
list[i]->prefix(),
list[i]->prefix_length());
- if (address_map.find(key) == address_map.end()) {
- address_map[key] = address_list(list[i], std::vector<IPAddress>());
+ if (consolidated_address_list.find(key) ==
+ consolidated_address_list.end()) {
+ AddressList addrlist;
+ addrlist.net = list[i];
+ consolidated_address_list[key] = addrlist;
might_add_to_merged_list = true;
}
- const std::vector<IPAddress>& addresses = list[i]->GetIPs();
- address_list& current_list = address_map[key];
- for (std::vector<IPAddress>::const_iterator it = addresses.begin();
+ const std::vector<InterfaceAddress>& addresses = list[i]->GetIPs();
+ AddressList& current_list = consolidated_address_list[key];
+ for (std::vector<InterfaceAddress>::const_iterator it = addresses.begin();
it != addresses.end();
++it) {
- current_list.second.push_back(*it);
+ current_list.ips.push_back(*it);
}
if (!might_add_to_merged_list) {
delete list[i];
@@ -179,20 +192,24 @@
}
// Next, look for existing network objects to re-use.
- for (std::map<std::string, address_list >::iterator it = address_map.begin();
- it != address_map.end();
+ for (std::map<std::string, AddressList>::iterator it =
+ consolidated_address_list.begin();
+ it != consolidated_address_list.end();
++it) {
const std::string& key = it->first;
- Network* net = it->second.first;
+ Network* net = it->second.net;
NetworkMap::iterator existing = networks_map_.find(key);
if (existing == networks_map_.end()) {
// This network is new. Place it in the network map.
merged_list.push_back(net);
networks_map_[key] = net;
+ // Also, we might have accumulated IPAddresses from the first
+ // step, set it here.
+ net->SetIPs(it->second.ips, true);
*changed = true;
} else {
// This network exists in the map already. Reset its IP addresses.
- *changed = existing->second->SetIPs(it->second.second, *changed);
+ *changed = existing->second->SetIPs(it->second.ips, *changed);
merged_list.push_back(existing->second);
if (existing->second != net) {
delete net;
@@ -460,7 +477,7 @@
}
return true;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
#if defined(WEBRTC_LINUX)
bool IsDefaultRoute(const std::string& network_name) {
@@ -622,27 +639,17 @@
ignored_(false), type_(type), preference_(0) {
}
-std::string Network::ToString() const {
- std::stringstream ss;
- // Print out the first space-terminated token of the network desc, plus
- // the IP address.
- ss << "Net[" << description_.substr(0, description_.find(' '))
- << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_
- << ":" << AdapterTypeToString(type_) << "]";
- return ss.str();
-}
-
// Sets the addresses of this network. Returns true if the address set changed.
// Change detection is short circuited if the changed argument is true.
-bool Network::SetIPs(const std::vector<IPAddress>& ips, bool changed) {
+bool Network::SetIPs(const std::vector<InterfaceAddress>& ips, bool changed) {
changed = changed || ips.size() != ips_.size();
// Detect changes with a nested loop; n-squared but we expect on the order
// of 2-3 addresses per network.
- for (std::vector<IPAddress>::const_iterator it = ips.begin();
+ for (std::vector<InterfaceAddress>::const_iterator it = ips.begin();
!changed && it != ips.end();
++it) {
bool found = false;
- for (std::vector<IPAddress>::iterator inner_it = ips_.begin();
+ for (std::vector<InterfaceAddress>::iterator inner_it = ips_.begin();
!found && inner_it != ips_.end();
++inner_it) {
if (*it == *inner_it) {
@@ -655,4 +662,52 @@
return changed;
}
+// Select the best IP address to use from this Network.
+IPAddress Network::GetBestIP() const {
+ if (ips_.size() == 0) {
+ return IPAddress();
+ }
+
+ if (prefix_.family() == AF_INET) {
+ return static_cast<IPAddress>(ips_.at(0));
+ }
+
+ InterfaceAddress selected_ip, ula_ip;
+
+ for (size_t i = 0; i < ips_.size(); i++) {
+ // Ignore any address which has been deprecated already.
+ if (ips_[i].ipv6_flags() & IPV6_ADDRESS_FLAG_DEPRECATED)
+ continue;
+
+ // ULA address should only be returned when we have no other
+ // global IP.
+ if (IPIsULA(static_cast<const IPAddress&>(ips_[i]))) {
+ ula_ip = ips_[i];
+ continue;
+ }
+ selected_ip = ips_[i];
+
+ // Search could stop once a temporary non-deprecated one is found.
+ if (ips_[i].ipv6_flags() & IPV6_ADDRESS_FLAG_TEMPORARY)
+ break;
+ }
+
+ // No proper global IPv6 address found, use ULA instead.
+ if (IPIsUnspec(selected_ip) && !IPIsUnspec(ula_ip)) {
+ selected_ip = ula_ip;
+ }
+
+ return static_cast<IPAddress>(selected_ip);
+}
+
+std::string Network::ToString() const {
+ std::stringstream ss;
+ // Print out the first space-terminated token of the network desc, plus
+ // the IP address.
+ ss << "Net[" << description_.substr(0, description_.find(' '))
+ << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_
+ << ":" << AdapterTypeToString(type_) << "]";
+ return ss.str();
+}
+
} // namespace rtc
diff --git a/base/network.h b/base/network.h
index 855b1b7..6f9d08e 100644
--- a/base/network.h
+++ b/base/network.h
@@ -188,23 +188,37 @@
std::string key() const { return key_; }
// Returns the Network's current idea of the 'best' IP it has.
- // 'Best' currently means the first one added.
- // TODO: We should be preferring temporary addresses.
- // Returns an unset IP if this network has no active addresses.
- IPAddress ip() const {
- if (ips_.size() == 0) {
- return IPAddress();
- }
- return ips_.at(0);
- }
+ // Or return an unset IP if this network has no active addresses.
+ // Here is the rule on how we mark the IPv6 address as ignorable for WebRTC.
+ // 1) return all global temporary dynamic and non-deprecrated ones.
+ // 2) if #1 not available, return global ones.
+ // 3) if #2 not available, use ULA ipv6 as last resort. (ULA stands
+ // for unique local address, which is not route-able in open
+ // internet but might be useful for a close WebRTC deployment.
+
+ // TODO(guoweis): rule #3 actually won't happen at current
+ // implementation. The reason being that ULA address starting with
+ // 0xfc 0r 0xfd will be grouped into its own Network. The result of
+ // that is WebRTC will have one extra Network to generate candidates
+ // but the lack of rule #3 shouldn't prevent turning on IPv6 since
+ // ULA should only be tried in a close deployment anyway.
+
+ // Note that when not specifying any flag, it's treated as case global
+ // IPv6 address
+ IPAddress GetBestIP() const;
+
+ // Keep the original function here for now.
+ // TODO(guoweis): Remove this when all callers are migrated to GetBestIP().
+ IPAddress ip() const { return GetBestIP(); }
+
// Adds an active IP address to this network. Does not check for duplicates.
- void AddIP(const IPAddress& ip) { ips_.push_back(ip); }
+ void AddIP(const InterfaceAddress& ip) { ips_.push_back(ip); }
// Sets the network's IP address list. Returns true if new IP addresses were
// detected. Passing true to already_changed skips this check.
- bool SetIPs(const std::vector<IPAddress>& ips, bool already_changed);
+ bool SetIPs(const std::vector<InterfaceAddress>& ips, bool already_changed);
// Get the list of IP Addresses associated with this network.
- const std::vector<IPAddress>& GetIPs() { return ips_;}
+ const std::vector<InterfaceAddress>& GetIPs() const { return ips_;}
// Clear the network's list of addresses.
void ClearIPs() { ips_.clear(); }
@@ -231,7 +245,7 @@
IPAddress prefix_;
int prefix_length_;
std::string key_;
- std::vector<IPAddress> ips_;
+ std::vector<InterfaceAddress> ips_;
int scope_id_;
bool ignored_;
AdapterType type_;
diff --git a/base/network_unittest.cc b/base/network_unittest.cc
index 431f8b4..acb118d 100644
--- a/base/network_unittest.cc
+++ b/base/network_unittest.cc
@@ -114,7 +114,7 @@
++it) {
sockaddr_storage storage;
memset(&storage, 0, sizeof(storage));
- IPAddress ip = (*it)->ip();
+ IPAddress ip = (*it)->GetBestIP();
SocketAddress bindaddress(ip, 0);
bindaddress.SetScopeID((*it)->scope_id());
// TODO(thaloun): Use rtc::AsyncSocket once it supports IPv6.
@@ -614,4 +614,81 @@
}
#endif
+// Test MergeNetworkList successfully combines all IPs for the same
+// prefix/length into a single Network.
+TEST_F(NetworkTest, TestMergeNetworkList) {
+ BasicNetworkManager manager;
+ NetworkManager::NetworkList list;
+
+ // Create 2 IPAddress classes with only last digit different.
+ IPAddress ip1, ip2;
+ EXPECT_TRUE(IPFromString("2400:4030:1:2c00:be30:0:0:1", &ip1));
+ EXPECT_TRUE(IPFromString("2400:4030:1:2c00:be30:0:0:2", &ip2));
+
+ // Create 2 networks with the same prefix and length.
+ Network* net1 = new Network("em1", "em1", TruncateIP(ip1, 64), 64);
+ Network* net2 = new Network("em1", "em1", TruncateIP(ip1, 64), 64);
+
+ // Add different IP into each.
+ net1->AddIP(ip1);
+ net2->AddIP(ip2);
+
+ list.push_back(net1);
+ list.push_back(net2);
+ bool changed;
+ MergeNetworkList(manager, list, &changed);
+ EXPECT_TRUE(changed);
+
+ NetworkManager::NetworkList list2;
+ manager.GetNetworks(&list2);
+
+ // Make sure the resulted networklist has only 1 element and 2
+ // IPAddresses.
+ EXPECT_EQ(list2.size(), 1uL);
+ EXPECT_EQ(list2[0]->GetIPs().size(), 2uL);
+ EXPECT_EQ(list2[0]->GetIPs()[0], ip1);
+ EXPECT_EQ(list2[0]->GetIPs()[1], ip2);
+}
+
+// Test that the filtering logic follows the defined ruleset in network.h.
+TEST_F(NetworkTest, TestIPv6Selection) {
+ InterfaceAddress ip;
+ std::string ipstr;
+
+ ipstr = "2401:fa00:4:1000:be30:5bff:fee5:c3";
+ ASSERT_TRUE(IPFromString(ipstr, IPV6_ADDRESS_FLAG_DEPRECATED, &ip));
+
+ // Create a network with this prefix.
+ Network ipv6_network(
+ "test_eth0", "Test NetworkAdapter", TruncateIP(ip, 64), 64);
+
+ // When there is no address added, it should return an unspecified
+ // address.
+ EXPECT_EQ(ipv6_network.GetBestIP(), IPAddress());
+ EXPECT_TRUE(IPIsUnspec(ipv6_network.GetBestIP()));
+
+ // Deprecated one should not be returned.
+ ipv6_network.AddIP(ip);
+ EXPECT_EQ(ipv6_network.GetBestIP(), IPAddress());
+
+ // Add ULA one. ULA is unique local address which is starting either
+ // with 0xfc or 0xfd.
+ ipstr = "fd00:fa00:4:1000:be30:5bff:fee5:c4";
+ ASSERT_TRUE(IPFromString(ipstr, IPV6_ADDRESS_FLAG_NONE, &ip));
+ ipv6_network.AddIP(ip);
+ EXPECT_EQ(ipv6_network.GetBestIP(), static_cast<IPAddress>(ip));
+
+ // Add global one.
+ ipstr = "2401:fa00:4:1000:be30:5bff:fee5:c5";
+ ASSERT_TRUE(IPFromString(ipstr, IPV6_ADDRESS_FLAG_NONE, &ip));
+ ipv6_network.AddIP(ip);
+ EXPECT_EQ(ipv6_network.GetBestIP(), static_cast<IPAddress>(ip));
+
+ // Add global dynamic temporary one.
+ ipstr = "2401:fa00:4:1000:be30:5bff:fee5:c6";
+ ASSERT_TRUE(IPFromString(ipstr, IPV6_ADDRESS_FLAG_TEMPORARY, &ip));
+ ipv6_network.AddIP(ip);
+ EXPECT_EQ(ipv6_network.GetBestIP(), static_cast<IPAddress>(ip));
+}
+
} // namespace rtc
diff --git a/base/nssstreamadapter.cc b/base/nssstreamadapter.cc
index 1d06c1c..40c017f 100644
--- a/base/nssstreamadapter.cc
+++ b/base/nssstreamadapter.cc
@@ -486,6 +486,8 @@
return -1;
}
+ // TODO(juberti): Check for client_auth_enabled()
+
rv = SSL_OptionSet(ssl_fd_, SSL_REQUIRE_CERTIFICATE, PR_TRUE);
if (rv != SECSuccess) {
Error("BeginSSL", -1, false);
@@ -952,17 +954,11 @@
// Static initialization and shutdown
NSSContext *NSSContext::Instance() {
if (!global_nss_context) {
- NSSContext *new_ctx = new NSSContext();
-
- if (!(new_ctx->slot_ = PK11_GetInternalSlot())) {
- delete new_ctx;
- goto fail;
- }
-
- global_nss_context = new_ctx;
+ scoped_ptr<NSSContext> new_ctx(new NSSContext());
+ new_ctx->slot_ = PK11_GetInternalSlot();
+ if (new_ctx->slot_)
+ global_nss_context = new_ctx.release();
}
-
- fail:
return global_nss_context;
}
diff --git a/base/nullsocketserver_unittest.cc b/base/nullsocketserver_unittest.cc
index fe21f6a..6d3eb52 100644
--- a/base/nullsocketserver_unittest.cc
+++ b/base/nullsocketserver_unittest.cc
@@ -10,6 +10,7 @@
#include "webrtc/base/gunit.h"
#include "webrtc/base/nullsocketserver.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -27,7 +28,7 @@
NullSocketServer ss_;
};
-TEST_F(NullSocketServerTest, WaitAndSet) {
+TEST_F(NullSocketServerTest, DISABLED_ON_MAC(WaitAndSet)) {
Thread thread;
EXPECT_TRUE(thread.Start());
thread.Post(this, 0);
diff --git a/base/openssladapter.cc b/base/openssladapter.cc
index 3618aad..68a1fcb 100644
--- a/base/openssladapter.cc
+++ b/base/openssladapter.cc
@@ -24,6 +24,7 @@
#include <openssl/err.h>
#include <openssl/opensslv.h>
#include <openssl/rand.h>
+#include <openssl/x509.h>
#include <openssl/x509v3.h>
#if HAVE_CONFIG_H
@@ -694,7 +695,10 @@
}
STACK_OF(CONF_VALUE)* value = meth->i2v(meth, ext_str, NULL);
- for (int j = 0; j < sk_CONF_VALUE_num(value); ++j) {
+
+ // Cast to size_t to be compilable for both OpenSSL and BoringSSL.
+ for (size_t j = 0; j < static_cast<size_t>(sk_CONF_VALUE_num(value));
+ ++j) {
CONF_VALUE* nval = sk_CONF_VALUE_value(value, j);
// The value for nval can contain wildcards
if (!strcmp(nval->name, "DNS") && string_match(host, nval->value)) {
@@ -718,7 +722,7 @@
}
char data[256];
- X509_name_st* subject;
+ X509_NAME* subject;
if (!ok
&& ((subject = X509_get_subject_name(certificate)) != NULL)
&& (X509_NAME_get_text_by_NID(subject, NID_commonName,
diff --git a/base/opensslidentity.cc b/base/opensslidentity.cc
index 915680c..30ac6e2 100644
--- a/base/opensslidentity.cc
+++ b/base/opensslidentity.cc
@@ -253,13 +253,11 @@
std::string OpenSSLCertificate::ToPEMString() const {
BIO* bio = BIO_new(BIO_s_mem());
if (!bio) {
- UNREACHABLE();
- return std::string();
+ FATAL() << "unreachable code";
}
if (!PEM_write_bio_X509(bio, x509_)) {
BIO_free(bio);
- UNREACHABLE();
- return std::string();
+ FATAL() << "unreachable code";
}
BIO_write(bio, "\0", 1);
char* buffer;
@@ -276,13 +274,11 @@
// Calculates the DER representation of the certificate, from scratch.
BIO* bio = BIO_new(BIO_s_mem());
if (!bio) {
- UNREACHABLE();
- return;
+ FATAL() << "unreachable code";
}
if (!i2d_X509_bio(bio, x509_)) {
BIO_free(bio);
- UNREACHABLE();
- return;
+ FATAL() << "unreachable code";
}
char* data;
size_t length = BIO_get_mem_data(bio, &data);
diff --git a/base/opensslstreamadapter.cc b/base/opensslstreamadapter.cc
index 5eaeb1b..133eb72 100644
--- a/base/opensslstreamadapter.cc
+++ b/base/opensslstreamadapter.cc
@@ -615,6 +615,16 @@
SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE |
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+ // Specify an ECDH group for ECDHE ciphers, otherwise they cannot be
+ // negotiated when acting as the server. Use NIST's P-256 which is commonly
+ // supported.
+ EC_KEY* ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+ if (ecdh == NULL)
+ return -1;
+ SSL_set_options(ssl_, SSL_OP_SINGLE_ECDH_USE);
+ SSL_set_tmp_ecdh(ssl_, ecdh);
+ EC_KEY_free(ecdh);
+
// Do the connect
return ContinueSSL();
}
@@ -685,6 +695,12 @@
}
if (ssl_) {
+ int ret = SSL_shutdown(ssl_);
+ if (ret < 0) {
+ LOG(LS_WARNING) << "SSL_shutdown failed, error = "
+ << SSL_get_error(ssl_, ret);
+ }
+
SSL_free(ssl_);
ssl_ = NULL;
}
@@ -733,8 +749,15 @@
SSL_CTX_set_info_callback(ctx, OpenSSLAdapter::SSLInfoCallback);
#endif
- SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER |SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
- SSLVerifyCallback);
+ int mode = SSL_VERIFY_PEER;
+ if (client_auth_enabled()) {
+ // Require a certificate from the client.
+ // Note: Normally this is always true in production, but it may be disabled
+ // for testing purposes (e.g. SSLAdapter unit tests).
+ mode |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
+ }
+
+ SSL_CTX_set_verify(ctx, mode, SSLVerifyCallback);
SSL_CTX_set_verify_depth(ctx, 4);
SSL_CTX_set_cipher_list(ctx, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
diff --git a/base/physicalsocketserver_unittest.cc b/base/physicalsocketserver_unittest.cc
index f29c5fc..4d57e73 100644
--- a/base/physicalsocketserver_unittest.cc
+++ b/base/physicalsocketserver_unittest.cc
@@ -18,6 +18,7 @@
#include "webrtc/base/socket_unittest.h"
#include "webrtc/base/testutils.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -106,11 +107,11 @@
SocketTest::TestCloseInClosedCallbackIPv6();
}
-TEST_F(PhysicalSocketTest, TestSocketServerWaitIPv4) {
+TEST_F(PhysicalSocketTest, DISABLED_ON_MAC(TestSocketServerWaitIPv4)) {
SocketTest::TestSocketServerWaitIPv4();
}
-TEST_F(PhysicalSocketTest, TestSocketServerWaitIPv6) {
+TEST_F(PhysicalSocketTest, DISABLED_ON_MAC(TestSocketServerWaitIPv6)) {
SocketTest::TestSocketServerWaitIPv6();
}
@@ -130,10 +131,16 @@
SocketTest::TestUdpIPv6();
}
+// Disable for TSan v2, see
+// https://code.google.com/p/webrtc/issues/detail?id=3498 for details.
+#if !defined(THREAD_SANITIZER)
+
TEST_F(PhysicalSocketTest, TestUdpReadyToSendIPv4) {
SocketTest::TestUdpReadyToSendIPv4();
}
+#endif // if !defined(THREAD_SANITIZER)
+
TEST_F(PhysicalSocketTest, TestUdpReadyToSendIPv6) {
SocketTest::TestUdpReadyToSendIPv6();
}
@@ -200,7 +207,7 @@
// Test receiving a synchronous signal while not in Wait() and then entering
// Wait() afterwards.
-TEST_F(PosixSignalDeliveryTest, RaiseThenWait) {
+TEST_F(PosixSignalDeliveryTest, DISABLED_ON_MAC(RaiseThenWait)) {
ASSERT_TRUE(ss_->SetPosixSignalHandler(SIGTERM, &RecordSignal));
raise(SIGTERM);
EXPECT_TRUE(ss_->Wait(0, true));
@@ -210,7 +217,7 @@
// Test that we can handle getting tons of repeated signals and that we see all
// the different ones.
-TEST_F(PosixSignalDeliveryTest, InsanelyManySignals) {
+TEST_F(PosixSignalDeliveryTest, DISABLED_ON_MAC(InsanelyManySignals)) {
ss_->SetPosixSignalHandler(SIGTERM, &RecordSignal);
ss_->SetPosixSignalHandler(SIGINT, &RecordSignal);
for (int i = 0; i < 10000; ++i) {
@@ -225,7 +232,7 @@
}
// Test that a signal during a Wait() call is detected.
-TEST_F(PosixSignalDeliveryTest, SignalDuringWait) {
+TEST_F(PosixSignalDeliveryTest, DISABLED_ON_MAC(SignalDuringWait)) {
ss_->SetPosixSignalHandler(SIGALRM, &RecordSignal);
alarm(1);
EXPECT_TRUE(ss_->Wait(1500, true));
@@ -250,7 +257,7 @@
// Test that it works no matter what thread the kernel chooses to give the
// signal to (since it's not guaranteed to be the one that Wait() runs on).
-TEST_F(PosixSignalDeliveryTest, SignalOnDifferentThread) {
+TEST_F(PosixSignalDeliveryTest, DISABLED_ON_MAC(SignalOnDifferentThread)) {
ss_->SetPosixSignalHandler(SIGTERM, &RecordSignal);
// Mask out SIGTERM so that it can't be delivered to this thread.
sigset_t mask;
diff --git a/base/platform_file.cc b/base/platform_file.cc
new file mode 100644
index 0000000..d518b74
--- /dev/null
+++ b/base/platform_file.cc
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/base/platform_file.h"
+
+#if defined(WEBRTC_WIN)
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+namespace rtc {
+
+#if defined(WEBRTC_WIN)
+const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE;
+
+FILE* FdopenPlatformFileForWriting(PlatformFile file) {
+ if (file == kInvalidPlatformFileValue)
+ return NULL;
+ int fd = _open_osfhandle(reinterpret_cast<intptr_t>(file), 0);
+ if (fd < 0)
+ return NULL;
+
+ return _fdopen(fd, "w");
+}
+
+bool ClosePlatformFile(PlatformFile file) {
+ return CloseHandle(file) != 0;
+}
+#else
+const PlatformFile kInvalidPlatformFileValue = -1;
+
+FILE* FdopenPlatformFileForWriting(PlatformFile file) {
+ return fdopen(file, "w");
+}
+
+bool ClosePlatformFile(PlatformFile file) {
+ return close(file);
+}
+#endif
+
+} // namespace rtc
diff --git a/base/platform_file.h b/base/platform_file.h
new file mode 100644
index 0000000..12e08e9
--- /dev/null
+++ b/base/platform_file.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_BASE_PLATFORM_FILE_H_
+#define WEBRTC_BASE_PLATFORM_FILE_H_
+
+#include <stdio.h>
+
+#if defined(WEBRTC_WIN)
+#include <windows.h>
+#endif
+
+namespace rtc {
+
+#if defined(WEBRTC_WIN)
+typedef HANDLE PlatformFile;
+#elif defined(WEBRTC_POSIX)
+typedef int PlatformFile;
+#else
+#error Unsupported platform
+#endif
+
+extern const PlatformFile kInvalidPlatformFileValue;
+
+// Associates a standard FILE stream with an existing PlatformFile.
+// Note that after this function has returned a valid FILE stream,
+// the PlatformFile should no longer be used.
+FILE* FdopenPlatformFileForWriting(PlatformFile file);
+
+// Closes a PlatformFile.
+// Don't use ClosePlatformFile to close a file opened with FdopenPlatformFile.
+// Use fclose instead.
+bool ClosePlatformFile(PlatformFile file);
+
+} // namespace rtc
+
+#endif // WEBRTC_BASE_PLATFORM_FILE_H_
diff --git a/base/proxy_unittest.cc b/base/proxy_unittest.cc
index d8a523f..a1ade0c 100644
--- a/base/proxy_unittest.cc
+++ b/base/proxy_unittest.cc
@@ -17,6 +17,7 @@
#include "webrtc/base/testclient.h"
#include "webrtc/base/testechoserver.h"
#include "webrtc/base/virtualsocketserver.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
using rtc::Socket;
using rtc::Thread;
@@ -74,7 +75,7 @@
};
// Tests whether we can use a SOCKS5 proxy to connect to a server.
-TEST_F(ProxyTest, TestSocks5Connect) {
+TEST_F(ProxyTest, DISABLED_ON_MAC(TestSocks5Connect)) {
rtc::AsyncSocket* socket =
ss()->CreateAsyncSocket(kSocksProxyIntAddr.family(), SOCK_STREAM);
rtc::AsyncSocksProxySocket* proxy_socket =
@@ -118,7 +119,7 @@
*/
// Tests whether we can autodetect a SOCKS5 proxy.
-TEST_F(ProxyTest, TestAutoDetectSocks5) {
+TEST_F(ProxyTest, DISABLED_ON_MAC(TestAutoDetectSocks5)) {
EXPECT_EQ(rtc::PROXY_SOCKS5, DetectProxyType(kSocksProxyIntAddr));
}
@@ -130,6 +131,6 @@
*/
// Tests whether we fail properly for no proxy.
-TEST_F(ProxyTest, TestAutoDetectBogus) {
+TEST_F(ProxyTest, DISABLED_ON_MAC(TestAutoDetectBogus)) {
EXPECT_EQ(rtc::PROXY_UNKNOWN, DetectProxyType(kBogusProxyIntAddr));
}
diff --git a/base/rtc_base.target.darwin-arm.mk b/base/rtc_base.target.darwin-arm.mk
new file mode 100644
index 0000000..f5b6f22
--- /dev/null
+++ b/base/rtc_base.target.darwin-arm.mk
@@ -0,0 +1,370 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.darwin-arm64.mk b/base/rtc_base.target.darwin-arm64.mk
new file mode 100644
index 0000000..b68a131
--- /dev/null
+++ b/base/rtc_base.target.darwin-arm64.mk
@@ -0,0 +1,340 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.darwin-mips.mk b/base/rtc_base.target.darwin-mips.mk
new file mode 100644
index 0000000..be47367
--- /dev/null
+++ b/base/rtc_base.target.darwin-mips.mk
@@ -0,0 +1,348 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.darwin-mips64.mk b/base/rtc_base.target.darwin-mips64.mk
new file mode 100644
index 0000000..be47367
--- /dev/null
+++ b/base/rtc_base.target.darwin-mips64.mk
@@ -0,0 +1,348 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.darwin-x86.mk b/base/rtc_base.target.darwin-x86.mk
new file mode 100644
index 0000000..7510b25
--- /dev/null
+++ b/base/rtc_base.target.darwin-x86.mk
@@ -0,0 +1,352 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.darwin-x86_64.mk b/base/rtc_base.target.darwin-x86_64.mk
new file mode 100644
index 0000000..708d0f4
--- /dev/null
+++ b/base/rtc_base.target.darwin-x86_64.mk
@@ -0,0 +1,350 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.linux-arm.mk b/base/rtc_base.target.linux-arm.mk
new file mode 100644
index 0000000..f5b6f22
--- /dev/null
+++ b/base/rtc_base.target.linux-arm.mk
@@ -0,0 +1,370 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.linux-arm64.mk b/base/rtc_base.target.linux-arm64.mk
new file mode 100644
index 0000000..b68a131
--- /dev/null
+++ b/base/rtc_base.target.linux-arm64.mk
@@ -0,0 +1,340 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.linux-mips.mk b/base/rtc_base.target.linux-mips.mk
new file mode 100644
index 0000000..be47367
--- /dev/null
+++ b/base/rtc_base.target.linux-mips.mk
@@ -0,0 +1,348 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.linux-mips64.mk b/base/rtc_base.target.linux-mips64.mk
new file mode 100644
index 0000000..be47367
--- /dev/null
+++ b/base/rtc_base.target.linux-mips64.mk
@@ -0,0 +1,348 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.linux-x86.mk b/base/rtc_base.target.linux-x86.mk
new file mode 100644
index 0000000..7510b25
--- /dev/null
+++ b/base/rtc_base.target.linux-x86.mk
@@ -0,0 +1,352 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base.target.linux-x86_64.mk b/base/rtc_base.target.linux-x86_64.mk
new file mode 100644
index 0000000..708d0f4
--- /dev/null
+++ b/base/rtc_base.target.linux-x86_64.mk
@@ -0,0 +1,350 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/asyncfile.cc \
+ third_party/webrtc/base/asynchttprequest.cc \
+ third_party/webrtc/base/asyncsocket.cc \
+ third_party/webrtc/base/asynctcpsocket.cc \
+ third_party/webrtc/base/asyncudpsocket.cc \
+ third_party/webrtc/base/autodetectproxy.cc \
+ third_party/webrtc/base/base64.cc \
+ third_party/webrtc/base/bytebuffer.cc \
+ third_party/webrtc/base/common.cc \
+ third_party/webrtc/base/cpumonitor.cc \
+ third_party/webrtc/base/crc32.cc \
+ third_party/webrtc/base/diskcache.cc \
+ third_party/webrtc/base/event.cc \
+ third_party/webrtc/base/fileutils.cc \
+ third_party/webrtc/base/firewallsocketserver.cc \
+ third_party/webrtc/base/flags.cc \
+ third_party/webrtc/base/helpers.cc \
+ third_party/webrtc/base/httpbase.cc \
+ third_party/webrtc/base/httpclient.cc \
+ third_party/webrtc/base/httpcommon.cc \
+ third_party/webrtc/base/httprequest.cc \
+ third_party/webrtc/base/ifaddrs-android.cc \
+ third_party/webrtc/base/ipaddress.cc \
+ third_party/webrtc/base/linux.cc \
+ third_party/webrtc/base/messagedigest.cc \
+ third_party/webrtc/base/messagehandler.cc \
+ third_party/webrtc/base/messagequeue.cc \
+ third_party/webrtc/base/nethelpers.cc \
+ third_party/webrtc/base/network.cc \
+ third_party/webrtc/base/pathutils.cc \
+ third_party/webrtc/base/physicalsocketserver.cc \
+ third_party/webrtc/base/proxydetect.cc \
+ third_party/webrtc/base/proxyinfo.cc \
+ third_party/webrtc/base/ratelimiter.cc \
+ third_party/webrtc/base/ratetracker.cc \
+ third_party/webrtc/base/sha1.cc \
+ third_party/webrtc/base/signalthread.cc \
+ third_party/webrtc/base/socketadapters.cc \
+ third_party/webrtc/base/socketaddress.cc \
+ third_party/webrtc/base/socketaddresspair.cc \
+ third_party/webrtc/base/socketpool.cc \
+ third_party/webrtc/base/socketstream.cc \
+ third_party/webrtc/base/ssladapter.cc \
+ third_party/webrtc/base/sslfingerprint.cc \
+ third_party/webrtc/base/sslidentity.cc \
+ third_party/webrtc/base/sslsocketfactory.cc \
+ third_party/webrtc/base/sslstreamadapter.cc \
+ third_party/webrtc/base/sslstreamadapterhelper.cc \
+ third_party/webrtc/base/stream.cc \
+ third_party/webrtc/base/systeminfo.cc \
+ third_party/webrtc/base/task.cc \
+ third_party/webrtc/base/taskparent.cc \
+ third_party/webrtc/base/taskrunner.cc \
+ third_party/webrtc/base/thread.cc \
+ third_party/webrtc/base/thread_checker_impl.cc \
+ third_party/webrtc/base/timing.cc \
+ third_party/webrtc/base/unixfilesystem.cc \
+ third_party/webrtc/base/urlencode.cc \
+ third_party/webrtc/base/worker.cc \
+ third_party/webrtc/overrides/webrtc/base/logging.cc \
+ third_party/webrtc/base/openssladapter.cc \
+ third_party/webrtc/base/openssldigest.cc \
+ third_party/webrtc/base/opensslidentity.cc \
+ third_party/webrtc/base/opensslstreamadapter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DLOGGING=1' \
+ '-DUSE_WEBRTC_DEV_BRANCH' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
+ $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
+ $(LOCAL_PATH)/third_party/boringssl/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base
+rtc_base: third_party_webrtc_base_rtc_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.darwin-arm.mk b/base/rtc_base_approved.target.darwin-arm.mk
new file mode 100644
index 0000000..1bf90c0
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-arm.mk
@@ -0,0 +1,297 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.darwin-arm64.mk b/base/rtc_base_approved.target.darwin-arm64.mk
new file mode 100644
index 0000000..26d24d0
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-arm64.mk
@@ -0,0 +1,267 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.darwin-mips.mk b/base/rtc_base_approved.target.darwin-mips.mk
new file mode 100644
index 0000000..5fa66aa
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-mips.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.darwin-mips64.mk b/base/rtc_base_approved.target.darwin-mips64.mk
new file mode 100644
index 0000000..5fa66aa
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-mips64.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.darwin-x86.mk b/base/rtc_base_approved.target.darwin-x86.mk
new file mode 100644
index 0000000..26a3dc5
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-x86.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.darwin-x86_64.mk b/base/rtc_base_approved.target.darwin-x86_64.mk
new file mode 100644
index 0000000..7280616
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-x86_64.mk
@@ -0,0 +1,277 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.linux-arm.mk b/base/rtc_base_approved.target.linux-arm.mk
new file mode 100644
index 0000000..1bf90c0
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-arm.mk
@@ -0,0 +1,297 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.linux-arm64.mk b/base/rtc_base_approved.target.linux-arm64.mk
new file mode 100644
index 0000000..26d24d0
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-arm64.mk
@@ -0,0 +1,267 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.linux-mips.mk b/base/rtc_base_approved.target.linux-mips.mk
new file mode 100644
index 0000000..5fa66aa
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-mips.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.linux-mips64.mk b/base/rtc_base_approved.target.linux-mips64.mk
new file mode 100644
index 0000000..5fa66aa
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-mips64.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.linux-x86.mk b/base/rtc_base_approved.target.linux-x86.mk
new file mode 100644
index 0000000..26a3dc5
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-x86.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/rtc_base_approved.target.linux-x86_64.mk b/base/rtc_base_approved.target.linux-x86_64.mk
new file mode 100644
index 0000000..7280616
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-x86_64.mk
@@ -0,0 +1,277 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_base_rtc_base_approved_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/base/checks.cc \
+ third_party/webrtc/base/exp_filter.cc \
+ third_party/webrtc/base/md5.cc \
+ third_party/webrtc/base/platform_file.cc \
+ third_party/webrtc/base/stringencode.cc \
+ third_party/webrtc/base/stringutils.cc \
+ third_party/webrtc/base/timeutils.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_rtc_base_approved_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_base_approved
+rtc_base_approved: third_party_webrtc_base_rtc_base_approved_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/schanneladapter.cc b/base/schanneladapter.cc
index 50c0638..9af15a7 100644
--- a/base/schanneladapter.cc
+++ b/base/schanneladapter.cc
@@ -132,8 +132,9 @@
//sc_cred.dwMinimumCipherStrength = 128; // Note: use system default
sc_cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS | SCH_CRED_AUTO_CRED_VALIDATION;
- ret = AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL,
- &sc_cred, NULL, NULL, &impl_->cred, NULL);
+ ret = AcquireCredentialsHandle(NULL, const_cast<LPTSTR>(UNISP_NAME),
+ SECPKG_CRED_OUTBOUND, NULL, &sc_cred, NULL,
+ NULL, &impl_->cred, NULL);
if (ret != SEC_E_OK) {
LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
<< ErrorName(ret, SECURITY_ERRORS);
diff --git a/base/sharedexclusivelock.h b/base/sharedexclusivelock.h
index f64d7cf..aaaba3b 100644
--- a/base/sharedexclusivelock.h
+++ b/base/sharedexclusivelock.h
@@ -19,14 +19,14 @@
// This class provides shared-exclusive lock. It can be used in cases like
// multiple-readers/single-writer model.
-class SharedExclusiveLock {
+class LOCKABLE SharedExclusiveLock {
public:
SharedExclusiveLock();
// Locking/unlocking methods. It is encouraged to use SharedScope or
// ExclusiveScope for protection.
- void LockExclusive();
- void UnlockExclusive();
+ void LockExclusive() EXCLUSIVE_LOCK_FUNCTION();
+ void UnlockExclusive() UNLOCK_FUNCTION();
void LockShared();
void UnlockShared();
@@ -39,15 +39,14 @@
DISALLOW_COPY_AND_ASSIGN(SharedExclusiveLock);
};
-class SharedScope {
+class SCOPED_LOCKABLE SharedScope {
public:
- explicit SharedScope(SharedExclusiveLock* lock) : lock_(lock) {
+ explicit SharedScope(SharedExclusiveLock* lock) SHARED_LOCK_FUNCTION(lock)
+ : lock_(lock) {
lock_->LockShared();
}
- ~SharedScope() {
- lock_->UnlockShared();
- }
+ ~SharedScope() UNLOCK_FUNCTION() { lock_->UnlockShared(); }
private:
SharedExclusiveLock* lock_;
@@ -55,15 +54,15 @@
DISALLOW_COPY_AND_ASSIGN(SharedScope);
};
-class ExclusiveScope {
+class SCOPED_LOCKABLE ExclusiveScope {
public:
- explicit ExclusiveScope(SharedExclusiveLock* lock) : lock_(lock) {
+ explicit ExclusiveScope(SharedExclusiveLock* lock)
+ EXCLUSIVE_LOCK_FUNCTION(lock)
+ : lock_(lock) {
lock_->LockExclusive();
}
- ~ExclusiveScope() {
- lock_->UnlockExclusive();
- }
+ ~ExclusiveScope() UNLOCK_FUNCTION() { lock_->UnlockExclusive(); }
private:
SharedExclusiveLock* lock_;
diff --git a/base/sharedexclusivelock_unittest.cc b/base/sharedexclusivelock_unittest.cc
index 42334af..ea406cf 100644
--- a/base/sharedexclusivelock_unittest.cc
+++ b/base/sharedexclusivelock_unittest.cc
@@ -16,6 +16,7 @@
#include "webrtc/base/sharedexclusivelock.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/timeutils.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -157,7 +158,7 @@
EXPECT_LE(reader1.waiting_time_in_ms(), kNoWaitThresholdInMs);
}
-TEST_F(SharedExclusiveLockTest, TestSharedExclusive) {
+TEST_F(SharedExclusiveLockTest, DISABLED_ON_MAC(TestSharedExclusive)) {
bool done;
WriteTask writer(shared_exclusive_lock_.get(), &value_, &done);
@@ -176,7 +177,7 @@
EXPECT_GE(writer.waiting_time_in_ms(), kWaitThresholdInMs);
}
-TEST_F(SharedExclusiveLockTest, TestExclusiveShared) {
+TEST_F(SharedExclusiveLockTest, DISABLED_ON_MAC(TestExclusiveShared)) {
int value;
bool done;
ReadTask reader(shared_exclusive_lock_.get(), &value_, &done);
@@ -196,7 +197,7 @@
EXPECT_GE(reader.waiting_time_in_ms(), kWaitThresholdInMs);
}
-TEST_F(SharedExclusiveLockTest, TestExclusiveExclusive) {
+TEST_F(SharedExclusiveLockTest, DISABLED_ON_MAC(TestExclusiveExclusive)) {
bool done;
WriteTask writer(shared_exclusive_lock_.get(), &value_, &done);
diff --git a/base/signalthread.h b/base/signalthread.h
index a97bda1..8e18be6 100644
--- a/base/signalthread.h
+++ b/base/signalthread.h
@@ -115,16 +115,17 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(Worker);
};
- class EnterExit {
+ class SCOPED_LOCKABLE EnterExit {
public:
- explicit EnterExit(SignalThread* t) : t_(t) {
+ explicit EnterExit(SignalThread* t) EXCLUSIVE_LOCK_FUNCTION(t->cs_)
+ : t_(t) {
t_->cs_.Enter();
// If refcount_ is zero then the object has already been deleted and we
// will be double-deleting it in ~EnterExit()! (shouldn't happen)
ASSERT(t_->refcount_ != 0);
++t_->refcount_;
}
- ~EnterExit() {
+ ~EnterExit() UNLOCK_FUNCTION() {
bool d = (0 == --t_->refcount_);
t_->cs_.Leave();
if (d)
diff --git a/base/signalthread_unittest.cc b/base/signalthread_unittest.cc
index e0ea54e..3f53431 100644
--- a/base/signalthread_unittest.cc
+++ b/base/signalthread_unittest.cc
@@ -11,6 +11,7 @@
#include "webrtc/base/gunit.h"
#include "webrtc/base/signalthread.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
using namespace rtc;
@@ -133,7 +134,7 @@
// Test for when the main thread goes away while the
// signal thread is still working. This may happen
// when shutting down the process.
-TEST_F(SignalThreadTest, OwnerThreadGoesAway) {
+TEST_F(SignalThreadTest, DISABLED_ON_MAC(OwnerThreadGoesAway)) {
{
scoped_ptr<OwnerThread> owner(new OwnerThread(this));
main_thread_ = owner.get();
@@ -156,7 +157,7 @@
EXPECT_EQ(stopped, thread_stopped_); \
EXPECT_EQ(deleted, thread_deleted_);
-TEST_F(SignalThreadTest, ThreadFinishes) {
+TEST_F(SignalThreadTest, DISABLED_ON_MAC(ThreadFinishes)) {
thread_->Start();
EXPECT_STATE(1, 0, 0, 0, 0);
Thread::SleepMs(500);
@@ -165,7 +166,7 @@
EXPECT_STATE(1, 1, 1, 0, 1);
}
-TEST_F(SignalThreadTest, ReleasedThreadFinishes) {
+TEST_F(SignalThreadTest, DISABLED_ON_MAC(ReleasedThreadFinishes)) {
thread_->Start();
EXPECT_STATE(1, 0, 0, 0, 0);
thread_->Release();
@@ -177,7 +178,7 @@
EXPECT_STATE(1, 1, 1, 0, 1);
}
-TEST_F(SignalThreadTest, DestroyedThreadCleansUp) {
+TEST_F(SignalThreadTest, DISABLED_ON_MAC(DestroyedThreadCleansUp)) {
thread_->Start();
EXPECT_STATE(1, 0, 0, 0, 0);
thread_->Destroy(true);
@@ -186,7 +187,7 @@
EXPECT_STATE(1, 0, 0, 1, 1);
}
-TEST_F(SignalThreadTest, DeferredDestroyedThreadCleansUp) {
+TEST_F(SignalThreadTest, DISABLED_ON_MAC(DeferredDestroyedThreadCleansUp)) {
thread_->Start();
EXPECT_STATE(1, 0, 0, 0, 0);
thread_->Destroy(false);
diff --git a/base/socketadapters.cc b/base/socketadapters.cc
index 1cdd1bc..137597f 100644
--- a/base/socketadapters.cc
+++ b/base/socketadapters.cc
@@ -749,7 +749,7 @@
}
}
-void AsyncSocksProxyServerSocket::SendHelloReply(int method) {
+void AsyncSocksProxyServerSocket::SendHelloReply(uint8 method) {
ByteBuffer response;
response.WriteUInt8(5); // Socks Version
response.WriteUInt8(method); // Auth method
@@ -773,7 +773,7 @@
state_ = SS_CONNECT;
}
-void AsyncSocksProxyServerSocket::SendAuthReply(int result) {
+void AsyncSocksProxyServerSocket::SendAuthReply(uint8 result) {
ByteBuffer response;
response.WriteUInt8(1); // Negotiation Version
response.WriteUInt8(result);
diff --git a/base/socketadapters.h b/base/socketadapters.h
index 3292df2..ddf4f18 100644
--- a/base/socketadapters.h
+++ b/base/socketadapters.h
@@ -195,9 +195,9 @@
void DirectSend(const ByteBuffer& buf);
void HandleHello(ByteBuffer* request);
- void SendHelloReply(int method);
+ void SendHelloReply(uint8 method);
void HandleAuth(ByteBuffer* request);
- void SendAuthReply(int result);
+ void SendAuthReply(uint8 result);
void HandleConnect(ByteBuffer* request);
virtual void SendConnectResult(int result, const SocketAddress& addr);
diff --git a/base/socketaddress.cc b/base/socketaddress.cc
index 47ddd04..b15c0c4 100644
--- a/base/socketaddress.cc
+++ b/base/socketaddress.cc
@@ -121,7 +121,7 @@
void SocketAddress::SetPort(int port) {
ASSERT((0 <= port) && (port < 65536));
- port_ = port;
+ port_ = static_cast<uint16>(port);
}
uint32 SocketAddress::ip() const {
@@ -227,25 +227,20 @@
}
bool SocketAddress::operator<(const SocketAddress& addr) const {
- if (ip_ < addr.ip_)
- return true;
- else if (addr.ip_ < ip_)
- return false;
+ if (ip_ != addr.ip_)
+ return ip_ < addr.ip_;
- // We only check hostnames if both IPs are zero. This matches EqualIPs()
- if (addr.IsAnyIP()) {
- if (hostname_ < addr.hostname_)
- return true;
- else if (addr.hostname_ < hostname_)
- return false;
- }
+ // We only check hostnames if both IPs are ANY or unspecified. This matches
+ // EqualIPs().
+ if ((IPIsAny(ip_) || IPIsUnspec(ip_)) && hostname_ != addr.hostname_)
+ return hostname_ < addr.hostname_;
return port_ < addr.port_;
}
bool SocketAddress::EqualIPs(const SocketAddress& addr) const {
return (ip_ == addr.ip_) &&
- ((!IPIsAny(ip_)) || (hostname_ == addr.hostname_));
+ ((!IPIsAny(ip_) && !IPIsUnspec(ip_)) || (hostname_ == addr.hostname_));
}
bool SocketAddress::EqualPorts(const SocketAddress& addr) const {
@@ -284,9 +279,9 @@
}
static size_t ToSockAddrStorageHelper(sockaddr_storage* addr,
- IPAddress ip, int port, int scope_id) {
+ IPAddress ip, uint16 port, int scope_id) {
memset(addr, 0, sizeof(sockaddr_storage));
- addr->ss_family = ip.family();
+ addr->ss_family = static_cast<unsigned short>(ip.family());
if (addr->ss_family == AF_INET6) {
sockaddr_in6* saddr = reinterpret_cast<sockaddr_in6*>(addr);
saddr->sin6_addr = ip.ipv6_address();
diff --git a/base/socketaddress_unittest.cc b/base/socketaddress_unittest.cc
index 6166183..6e9f089 100644
--- a/base/socketaddress_unittest.cc
+++ b/base/socketaddress_unittest.cc
@@ -273,10 +273,18 @@
addr2 = SocketAddress("fe80::1", 5678);
EXPECT_PRED2(AreUnequal, addr1, addr2);
+
+ SocketAddress addr3("a.b.c.d", 1);
+ SocketAddress addr4("b.b.c.d", 1);
+ EXPECT_PRED2(AreUnequal, addr3, addr4);
+ EXPECT_PRED2(AreEqual, addr3, addr3);
+
+ addr3.SetIP(addr1.ip());
+ addr4.SetIP(addr1.ip());
+ EXPECT_PRED2(AreEqual,addr3, addr4);
}
-bool IsLessThan(const SocketAddress& addr1,
- const SocketAddress& addr2) {
+bool IsLessThan(const SocketAddress& addr1, const SocketAddress& addr2) {
return addr1 < addr2 &&
!(addr2 < addr1) &&
!(addr1 == addr2);
@@ -307,6 +315,10 @@
addr2 = SocketAddress("fe80::1", 5678);
EXPECT_FALSE(addr1 < addr2);
EXPECT_FALSE(addr2 < addr1);
+
+ SocketAddress addr3("a.b.c.d", 1);
+ SocketAddress addr4("b.b.c.d", 1);
+ EXPECT_PRED2(IsLessThan, addr3, addr4);
}
TEST(SocketAddressTest, TestToSensitiveString) {
diff --git a/base/ssladapter_unittest.cc b/base/ssladapter_unittest.cc
new file mode 100644
index 0000000..6d4536d
--- /dev/null
+++ b/base/ssladapter_unittest.cc
@@ -0,0 +1,342 @@
+/*
+ * Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <string>
+
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/ipaddress.h"
+#include "webrtc/base/socketstream.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/sslstreamadapter.h"
+#include "webrtc/base/stream.h"
+#include "webrtc/base/virtualsocketserver.h"
+
+static const int kTimeout = 5000;
+
+static rtc::AsyncSocket* CreateSocket(const rtc::SSLMode& ssl_mode) {
+ rtc::SocketAddress address(rtc::IPAddress(INADDR_ANY), 0);
+
+ rtc::AsyncSocket* socket = rtc::Thread::Current()->
+ socketserver()->CreateAsyncSocket(
+ address.family(), (ssl_mode == rtc::SSL_MODE_DTLS) ?
+ SOCK_DGRAM : SOCK_STREAM);
+ socket->Bind(address);
+
+ return socket;
+}
+
+static std::string GetSSLProtocolName(const rtc::SSLMode& ssl_mode) {
+ return (ssl_mode == rtc::SSL_MODE_DTLS) ? "DTLS" : "TLS";
+}
+
+class SSLAdapterTestDummyClient : public sigslot::has_slots<> {
+ public:
+ explicit SSLAdapterTestDummyClient(const rtc::SSLMode& ssl_mode)
+ : ssl_mode_(ssl_mode) {
+ rtc::AsyncSocket* socket = CreateSocket(ssl_mode_);
+
+ ssl_adapter_.reset(rtc::SSLAdapter::Create(socket));
+
+ // Ignore any certificate errors for the purpose of testing.
+ // Note: We do this only because we don't have a real certificate.
+ // NEVER USE THIS IN PRODUCTION CODE!
+ ssl_adapter_->set_ignore_bad_cert(true);
+
+ ssl_adapter_->SignalReadEvent.connect(this,
+ &SSLAdapterTestDummyClient::OnSSLAdapterReadEvent);
+ ssl_adapter_->SignalCloseEvent.connect(this,
+ &SSLAdapterTestDummyClient::OnSSLAdapterCloseEvent);
+ }
+
+ rtc::AsyncSocket::ConnState GetState() const {
+ return ssl_adapter_->GetState();
+ }
+
+ const std::string& GetReceivedData() const {
+ return data_;
+ }
+
+ int Connect(const std::string& hostname, const rtc::SocketAddress& address) {
+ LOG(LS_INFO) << "Starting " << GetSSLProtocolName(ssl_mode_)
+ << " handshake with " << hostname;
+
+ if (ssl_adapter_->StartSSL(hostname.c_str(), false) != 0) {
+ return -1;
+ }
+
+ LOG(LS_INFO) << "Initiating connection with " << address;
+
+ return ssl_adapter_->Connect(address);
+ }
+
+ int Close() {
+ return ssl_adapter_->Close();
+ }
+
+ int Send(const std::string& message) {
+ LOG(LS_INFO) << "Client sending '" << message << "'";
+
+ return ssl_adapter_->Send(message.data(), message.length());
+ }
+
+ void OnSSLAdapterReadEvent(rtc::AsyncSocket* socket) {
+ char buffer[4096] = "";
+
+ // Read data received from the server and store it in our internal buffer.
+ int read = socket->Recv(buffer, sizeof(buffer) - 1);
+ if (read != -1) {
+ buffer[read] = '\0';
+
+ LOG(LS_INFO) << "Client received '" << buffer << "'";
+
+ data_ += buffer;
+ }
+ }
+
+ void OnSSLAdapterCloseEvent(rtc::AsyncSocket* socket, int error) {
+ // OpenSSLAdapter signals handshake failure with a close event, but without
+ // closing the socket! Let's close the socket here. This way GetState() can
+ // return CS_CLOSED after failure.
+ if (socket->GetState() != rtc::AsyncSocket::CS_CLOSED) {
+ socket->Close();
+ }
+ }
+
+ private:
+ const rtc::SSLMode ssl_mode_;
+
+ rtc::scoped_ptr<rtc::SSLAdapter> ssl_adapter_;
+
+ std::string data_;
+};
+
+class SSLAdapterTestDummyServer : public sigslot::has_slots<> {
+ public:
+ explicit SSLAdapterTestDummyServer(const rtc::SSLMode& ssl_mode)
+ : ssl_mode_(ssl_mode) {
+ // Generate a key pair and a certificate for this host.
+ ssl_identity_.reset(rtc::SSLIdentity::Generate(GetHostname()));
+
+ server_socket_.reset(CreateSocket(ssl_mode_));
+
+ server_socket_->SignalReadEvent.connect(this,
+ &SSLAdapterTestDummyServer::OnServerSocketReadEvent);
+
+ server_socket_->Listen(1);
+
+ LOG(LS_INFO) << ((ssl_mode_ == rtc::SSL_MODE_DTLS) ? "UDP" : "TCP")
+ << " server listening on " << server_socket_->GetLocalAddress();
+ }
+
+ rtc::SocketAddress GetAddress() const {
+ return server_socket_->GetLocalAddress();
+ }
+
+ std::string GetHostname() const {
+ // Since we don't have a real certificate anyway, the value here doesn't
+ // really matter.
+ return "example.com";
+ }
+
+ const std::string& GetReceivedData() const {
+ return data_;
+ }
+
+ int Send(const std::string& message) {
+ if (ssl_stream_adapter_ == NULL
+ || ssl_stream_adapter_->GetState() != rtc::SS_OPEN) {
+ // No connection yet.
+ return -1;
+ }
+
+ LOG(LS_INFO) << "Server sending '" << message << "'";
+
+ size_t written;
+ int error;
+
+ rtc::StreamResult r = ssl_stream_adapter_->Write(message.data(),
+ message.length(), &written, &error);
+ if (r == rtc::SR_SUCCESS) {
+ return written;
+ } else {
+ return -1;
+ }
+ }
+
+ void OnServerSocketReadEvent(rtc::AsyncSocket* socket) {
+ if (ssl_stream_adapter_ != NULL) {
+ // Only a single connection is supported.
+ return;
+ }
+
+ rtc::SocketAddress address;
+ rtc::AsyncSocket* new_socket = socket->Accept(&address);
+ rtc::SocketStream* stream = new rtc::SocketStream(new_socket);
+
+ ssl_stream_adapter_.reset(rtc::SSLStreamAdapter::Create(stream));
+ ssl_stream_adapter_->SetServerRole();
+
+ // SSLStreamAdapter is normally used for peer-to-peer communication, but
+ // here we're testing communication between a client and a server
+ // (e.g. a WebRTC-based application and an RFC 5766 TURN server), where
+ // clients are not required to provide a certificate during handshake.
+ // Accordingly, we must disable client authentication here.
+ ssl_stream_adapter_->set_client_auth_enabled(false);
+
+ ssl_stream_adapter_->SetIdentity(ssl_identity_->GetReference());
+
+ // Set a bogus peer certificate digest.
+ unsigned char digest[20];
+ size_t digest_len = sizeof(digest);
+ ssl_stream_adapter_->SetPeerCertificateDigest(rtc::DIGEST_SHA_1, digest,
+ digest_len);
+
+ ssl_stream_adapter_->StartSSLWithPeer();
+
+ ssl_stream_adapter_->SignalEvent.connect(this,
+ &SSLAdapterTestDummyServer::OnSSLStreamAdapterEvent);
+ }
+
+ void OnSSLStreamAdapterEvent(rtc::StreamInterface* stream, int sig, int err) {
+ if (sig & rtc::SE_READ) {
+ char buffer[4096] = "";
+
+ size_t read;
+ int error;
+
+ // Read data received from the client and store it in our internal
+ // buffer.
+ rtc::StreamResult r = stream->Read(buffer,
+ sizeof(buffer) - 1, &read, &error);
+ if (r == rtc::SR_SUCCESS) {
+ buffer[read] = '\0';
+
+ LOG(LS_INFO) << "Server received '" << buffer << "'";
+
+ data_ += buffer;
+ }
+ }
+ }
+
+ private:
+ const rtc::SSLMode ssl_mode_;
+
+ rtc::scoped_ptr<rtc::AsyncSocket> server_socket_;
+ rtc::scoped_ptr<rtc::SSLStreamAdapter> ssl_stream_adapter_;
+
+ rtc::scoped_ptr<rtc::SSLIdentity> ssl_identity_;
+
+ std::string data_;
+};
+
+class SSLAdapterTestBase : public testing::Test,
+ public sigslot::has_slots<> {
+ public:
+ explicit SSLAdapterTestBase(const rtc::SSLMode& ssl_mode)
+ : ssl_mode_(ssl_mode),
+ ss_scope_(new rtc::VirtualSocketServer(NULL)),
+ server_(new SSLAdapterTestDummyServer(ssl_mode_)),
+ client_(new SSLAdapterTestDummyClient(ssl_mode_)),
+ handshake_wait_(kTimeout) {
+ }
+
+ static void SetUpTestCase() {
+ rtc::InitializeSSL();
+ }
+
+ static void TearDownTestCase() {
+ rtc::CleanupSSL();
+ }
+
+ void SetHandshakeWait(int wait) {
+ handshake_wait_ = wait;
+ }
+
+ void TestHandshake(bool expect_success) {
+ int rv;
+
+ // The initial state is CS_CLOSED
+ ASSERT_EQ(rtc::AsyncSocket::CS_CLOSED, client_->GetState());
+
+ rv = client_->Connect(server_->GetHostname(), server_->GetAddress());
+ ASSERT_EQ(0, rv);
+
+ // Now the state should be CS_CONNECTING
+ ASSERT_EQ(rtc::AsyncSocket::CS_CONNECTING, client_->GetState());
+
+ if (expect_success) {
+ // If expecting success, the client should end up in the CS_CONNECTED
+ // state after handshake.
+ EXPECT_EQ_WAIT(rtc::AsyncSocket::CS_CONNECTED, client_->GetState(),
+ handshake_wait_);
+
+ LOG(LS_INFO) << GetSSLProtocolName(ssl_mode_) << " handshake complete.";
+
+ } else {
+ // On handshake failure the client should end up in the CS_CLOSED state.
+ EXPECT_EQ_WAIT(rtc::AsyncSocket::CS_CLOSED, client_->GetState(),
+ handshake_wait_);
+
+ LOG(LS_INFO) << GetSSLProtocolName(ssl_mode_) << " handshake failed.";
+ }
+ }
+
+ void TestTransfer(const std::string& message) {
+ int rv;
+
+ rv = client_->Send(message);
+ ASSERT_EQ(static_cast<int>(message.length()), rv);
+
+ // The server should have received the client's message.
+ EXPECT_EQ_WAIT(message, server_->GetReceivedData(), kTimeout);
+
+ rv = server_->Send(message);
+ ASSERT_EQ(static_cast<int>(message.length()), rv);
+
+ // The client should have received the server's message.
+ EXPECT_EQ_WAIT(message, client_->GetReceivedData(), kTimeout);
+
+ LOG(LS_INFO) << "Transfer complete.";
+ }
+
+ private:
+ const rtc::SSLMode ssl_mode_;
+
+ const rtc::SocketServerScope ss_scope_;
+
+ rtc::scoped_ptr<SSLAdapterTestDummyServer> server_;
+ rtc::scoped_ptr<SSLAdapterTestDummyClient> client_;
+
+ int handshake_wait_;
+};
+
+class SSLAdapterTestTLS : public SSLAdapterTestBase {
+ public:
+ SSLAdapterTestTLS() : SSLAdapterTestBase(rtc::SSL_MODE_TLS) {}
+};
+
+
+#if SSL_USE_OPENSSL
+
+// Basic tests: TLS
+
+// Test that handshake works
+TEST_F(SSLAdapterTestTLS, TestTLSConnect) {
+ TestHandshake(true);
+}
+
+// Test transfer between client and server
+TEST_F(SSLAdapterTestTLS, TestTLSTransfer) {
+ TestHandshake(true);
+ TestTransfer("Hello, world!");
+}
+
+#endif // SSL_USE_OPENSSL
+
diff --git a/base/sslstreamadapter.h b/base/sslstreamadapter.h
index ffe6b2f..ea966c5 100644
--- a/base/sslstreamadapter.h
+++ b/base/sslstreamadapter.h
@@ -48,11 +48,15 @@
static SSLStreamAdapter* Create(StreamInterface* stream);
explicit SSLStreamAdapter(StreamInterface* stream)
- : StreamAdapterInterface(stream), ignore_bad_cert_(false) { }
+ : StreamAdapterInterface(stream), ignore_bad_cert_(false),
+ client_auth_enabled_(true) { }
void set_ignore_bad_cert(bool ignore) { ignore_bad_cert_ = ignore; }
bool ignore_bad_cert() const { return ignore_bad_cert_; }
+ void set_client_auth_enabled(bool enabled) { client_auth_enabled_ = enabled; }
+ bool client_auth_enabled() const { return client_auth_enabled_; }
+
// Specify our SSL identity: key and certificate. Mostly this is
// only used in the peer-to-peer mode (unless we actually want to
// provide a client certificate to a server).
@@ -151,10 +155,16 @@
static bool HaveDtlsSrtp();
static bool HaveExporter();
+ private:
// If true, the server certificate need not match the configured
// server_name, and in fact missing certificate authority and other
// verification errors are ignored.
bool ignore_bad_cert_;
+
+ // If true (default), the client is required to provide a certificate during
+ // handshake. If no certificate is given, handshake fails. This applies to
+ // server mode only.
+ bool client_auth_enabled_;
};
} // namespace rtc
diff --git a/base/sslstreamadapter_unittest.cc b/base/sslstreamadapter_unittest.cc
index af78bff..f7dcb71 100644
--- a/base/sslstreamadapter_unittest.cc
+++ b/base/sslstreamadapter_unittest.cc
@@ -21,6 +21,7 @@
#include "webrtc/base/sslidentity.h"
#include "webrtc/base/sslstreamadapter.h"
#include "webrtc/base/stream.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
static const int kBlockSize = 4096;
static const char kAES_CM_HMAC_SHA1_80[] = "AES_CM_128_HMAC_SHA1_80";
@@ -750,7 +751,7 @@
};
// Test a handshake with small MTU
-TEST_F(SSLStreamAdapterTestDTLS, TestDTLSConnectWithSmallMtu) {
+TEST_F(SSLStreamAdapterTestDTLS, DISABLED_ON_MAC(TestDTLSConnectWithSmallMtu)) {
MAYBE_SKIP_TEST(HaveDtls);
SetMtu(700);
SetHandshakeWait(20000);
diff --git a/base/stream_unittest.cc b/base/stream_unittest.cc
index a6664d7..5c2cb57 100644
--- a/base/stream_unittest.cc
+++ b/base/stream_unittest.cc
@@ -10,6 +10,7 @@
#include "webrtc/base/gunit.h"
#include "webrtc/base/stream.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -434,7 +435,7 @@
EXPECT_EQ(SR_BLOCK, buf.ReadOffset(out, 10, 16, NULL));
}
-TEST(AsyncWriteTest, TestWrite) {
+TEST(AsyncWriteTest, DISABLED_ON_MAC(TestWrite)) {
FifoBuffer* buf = new FifoBuffer(100);
AsyncWriteStream stream(buf, Thread::Current());
EXPECT_EQ(SS_OPEN, stream.GetState());
diff --git a/base/stringencode.cc b/base/stringencode.cc
index 1e0a149..52b75da 100644
--- a/base/stringencode.cc
+++ b/base/stringencode.cc
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include "webrtc/base/basictypes.h"
-#include "webrtc/base/common.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/stringutils.h"
namespace rtc {
@@ -26,7 +26,7 @@
size_t escape(char * buffer, size_t buflen,
const char * source, size_t srclen,
const char * illegal, char escape) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen <= 0)
return 0;
@@ -48,7 +48,7 @@
size_t unescape(char * buffer, size_t buflen,
const char * source, size_t srclen,
char escape) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen <= 0)
return 0;
@@ -67,7 +67,7 @@
size_t encode(char * buffer, size_t buflen,
const char * source, size_t srclen,
const char * illegal, char escape) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen <= 0)
return 0;
@@ -118,9 +118,9 @@
// all operating systems, unless one system is overly restrictive.
#if defined(WEBRTC_WIN)
return "\\/:*?\"<>|";
-#else // !WEBRTC_WIN
+#else // !WEBRTC_WIN
// TODO
- ASSERT(false);
+ DCHECK(false);
return "";
#endif // !WEBRTC_WIN
}
@@ -257,7 +257,7 @@
size_t html_encode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen <= 0)
return 0;
@@ -275,7 +275,7 @@
case '\'': escseq = "'"; esclen = 5; break;
case '\"': escseq = """; esclen = 6; break;
case '&': escseq = "&"; esclen = 5; break;
- default: ASSERT(false);
+ default: DCHECK(false);
}
if (bufpos + esclen >= buflen) {
break;
@@ -287,7 +287,8 @@
}
} else {
// Largest value is 0x1FFFFF => � (10 characters)
- char escseq[11];
+ const size_t kEscseqSize = 11;
+ char escseq[kEscseqSize];
unsigned long val;
if (size_t vallen = utf8_decode(&source[srcpos], srclen - srcpos, &val)) {
srcpos += vallen;
@@ -295,7 +296,7 @@
// Not a valid utf8 sequence, just use the raw character.
val = static_cast<unsigned char>(source[srcpos++]);
}
- size_t esclen = sprintfn(escseq, ARRAY_SIZE(escseq), "&#%lu;", val);
+ size_t esclen = sprintfn(escseq, kEscseqSize, "&#%lu;", val);
if (bufpos + esclen >= buflen) {
break;
}
@@ -309,13 +310,13 @@
size_t html_decode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
return xml_decode(buffer, buflen, source, srclen);
}
size_t xml_encode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen <= 0)
return 0;
@@ -331,7 +332,7 @@
case '\'': escseq = "'"; esclen = 6; break;
case '\"': escseq = """; esclen = 6; break;
case '&': escseq = "&"; esclen = 5; break;
- default: ASSERT(false);
+ default: DCHECK(false);
}
if (bufpos + esclen >= buflen) {
break;
@@ -348,7 +349,7 @@
size_t xml_decode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen <= 0)
return 0;
@@ -410,7 +411,7 @@
static const char HEX[] = "0123456789abcdef";
char hex_encode(unsigned char val) {
- ASSERT(val < 16);
+ DCHECK_LT(val, 16);
return (val < 16) ? HEX[val] : '!';
}
@@ -435,7 +436,7 @@
size_t hex_encode_with_delimiter(char* buffer, size_t buflen,
const char* csource, size_t srclen,
char delimiter) {
- ASSERT(NULL != buffer); // TODO: estimate output size
+ DCHECK(buffer); // TODO: estimate output size
if (buflen == 0)
return 0;
@@ -475,7 +476,7 @@
char* buffer = STACK_ARRAY(char, kBufferSize);
size_t length = hex_encode_with_delimiter(buffer, kBufferSize,
source, srclen, delimiter);
- ASSERT(srclen == 0 || length > 0);
+ DCHECK(srclen == 0 || length > 0);
return std::string(buffer, length);
}
@@ -487,7 +488,7 @@
size_t hex_decode_with_delimiter(char* cbuffer, size_t buflen,
const char* source, size_t srclen,
char delimiter) {
- ASSERT(NULL != cbuffer); // TODO: estimate output size
+ DCHECK(cbuffer); // TODO: estimate output size
if (buflen == 0)
return 0;
@@ -551,7 +552,7 @@
size_t tokenize(const std::string& source, char delimiter,
std::vector<std::string>* fields) {
- ASSERT(NULL != fields);
+ DCHECK(fields);
fields->clear();
size_t last = 0;
for (size_t i = 0; i < source.length(); ++i) {
@@ -608,7 +609,7 @@
size_t split(const std::string& source, char delimiter,
std::vector<std::string>* fields) {
- ASSERT(NULL != fields);
+ DCHECK(fields);
fields->clear();
size_t last = 0;
for (size_t i = 0; i < source.length(); ++i) {
diff --git a/base/stringencode.h b/base/stringencode.h
index b6c666f..2e69a9c 100644
--- a/base/stringencode.h
+++ b/base/stringencode.h
@@ -15,7 +15,7 @@
#include <sstream>
#include <vector>
-#include "webrtc/base/common.h"
+#include "webrtc/base/checks.h"
namespace rtc {
@@ -167,7 +167,7 @@
template <class T>
static bool ToString(const T &t, std::string* s) {
- ASSERT(NULL != s);
+ DCHECK(s);
std::ostringstream oss;
oss << std::boolalpha << t;
*s = oss.str();
@@ -176,7 +176,7 @@
template <class T>
static bool FromString(const std::string& s, T* t) {
- ASSERT(NULL != t);
+ DCHECK(t);
std::istringstream iss(s);
iss >> std::boolalpha >> *t;
return !iss.fail();
diff --git a/base/stringutils.cc b/base/stringutils.cc
index 041708d..cb99c25 100644
--- a/base/stringutils.cc
+++ b/base/stringutils.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/checks.h"
#include "webrtc/base/stringutils.h"
-#include "webrtc/base/common.h"
namespace rtc {
@@ -57,7 +57,7 @@
if (n-- == 0) return 0;
c1 = transformation(*s1);
// Double check that characters are not UTF-8
- ASSERT(static_cast<unsigned char>(*s2) < 128);
+ DCHECK_LT(static_cast<unsigned char>(*s2), 128);
// Note: *s2 gets implicitly promoted to wchar_t
c2 = transformation(*s2);
if (c1 != c2) return (c1 < c2) ? -1 : 1;
@@ -80,14 +80,14 @@
#if _DEBUG
// Double check that characters are not UTF-8
for (size_t pos = 0; pos < srclen; ++pos)
- ASSERT(static_cast<unsigned char>(source[pos]) < 128);
+ DCHECK_LT(static_cast<unsigned char>(source[pos]), 128);
#endif // _DEBUG
std::copy(source, source + srclen, buffer);
buffer[srclen] = 0;
return srclen;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
void replace_substrs(const char *search,
size_t search_len,
diff --git a/base/systeminfo.cc b/base/systeminfo.cc
index 213c272..c8d2c78 100644
--- a/base/systeminfo.cc
+++ b/base/systeminfo.cc
@@ -259,7 +259,7 @@
__cpuid(cpu_info, 0);
cpu_info[0] = cpu_info[1]; // Reorder output
cpu_info[1] = cpu_info[3];
- cpu_info[2] = cpu_info[2];
+ // cpu_info[2] = cpu_info[2]; // Avoid -Werror=self-assign
cpu_info[3] = 0;
cpu_vendor_ = std::string(reinterpret_cast<char*>(&cpu_info[0]));
#elif defined(CPU_ARM)
diff --git a/base/task_unittest.cc b/base/task_unittest.cc
index 8831259..b74c29f 100644
--- a/base/task_unittest.cc
+++ b/base/task_unittest.cc
@@ -27,6 +27,7 @@
#include "webrtc/base/taskrunner.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/timeutils.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
namespace rtc {
@@ -288,7 +289,7 @@
TaskInfo happy_[HAPPY_TASK_COUNT];
};
-TEST(start_task_test, Timeout) {
+TEST(start_task_test, DISABLED_ON_MAC(Timeout)) {
TaskTest task_test;
task_test.Start();
task_test.check_passed();
@@ -335,7 +336,7 @@
DISALLOW_EVIL_CONSTRUCTORS(TaskAbortTest);
};
-TEST(start_task_test, Abort) {
+TEST(start_task_test, DISABLED_ON_MAC(Abort)) {
TaskAbortTest abort_test;
abort_test.Start();
}
@@ -398,7 +399,7 @@
DISALLOW_EVIL_CONSTRUCTORS(AbortShouldWakeTest);
};
-TEST(start_task_test, AbortShouldWake) {
+TEST(start_task_test, DISABLED_ON_MAC(AbortShouldWake)) {
AbortShouldWakeTest abort_should_wake_test;
abort_should_wake_test.Start();
}
@@ -479,7 +480,7 @@
DISALLOW_EVIL_CONSTRUCTORS(TimeoutChangeTest);
};
-TEST(start_task_test, TimeoutChange) {
+TEST(start_task_test, DISABLED_ON_MAC(TimeoutChange)) {
TimeoutChangeTest timeout_change_test;
timeout_change_test.Start();
}
@@ -496,7 +497,7 @@
DISALLOW_EVIL_CONSTRUCTORS(DeleteTestTaskRunner);
};
-TEST(unstarted_task_test, DeleteTask) {
+TEST(unstarted_task_test, DISABLED_ON_MAC(DeleteTask)) {
// This test ensures that we don't
// crash if a task is deleted without running it.
DeleteTestTaskRunner task_runner;
@@ -511,7 +512,7 @@
task_runner.RunTasks();
}
-TEST(unstarted_task_test, DoNotDeleteTask1) {
+TEST(unstarted_task_test, DISABLED_ON_MAC(DoNotDeleteTask1)) {
// This test ensures that we don't
// crash if a task runner is deleted without
// running a certain task.
@@ -525,7 +526,7 @@
// Never run the tasks
}
-TEST(unstarted_task_test, DoNotDeleteTask2) {
+TEST(unstarted_task_test, DISABLED_ON_MAC(DoNotDeleteTask2)) {
// This test ensures that we don't
// crash if a taskrunner is delete with a
// task that has never been started.
diff --git a/base/testclient_unittest.cc b/base/testclient_unittest.cc
index c282668..21a7055 100644
--- a/base/testclient_unittest.cc
+++ b/base/testclient_unittest.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/testclient.h"
#include "webrtc/base/testechoserver.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
using namespace rtc;
@@ -51,11 +52,11 @@
}
// Tests whether the TestClient can send UDP to itself.
-TEST(TestClientTest, TestUdpIPv4) {
+TEST(TestClientTest, DISABLED_ON_MAC(TestUdpIPv4)) {
TestUdpInternal(SocketAddress("127.0.0.1", 0));
}
-TEST(TestClientTest, TestUdpIPv6) {
+TEST(TestClientTest, DISABLED_ON_MAC(TestUdpIPv6)) {
if (HasIPv6Enabled()) {
TestUdpInternal(SocketAddress("::1", 0));
} else {
@@ -64,11 +65,11 @@
}
// Tests whether the TestClient can connect to a server and exchange data.
-TEST(TestClientTest, TestTcpIPv4) {
+TEST(TestClientTest, DISABLED_ON_MAC(TestTcpIPv4)) {
TestTcpInternal(SocketAddress("127.0.0.1", 0));
}
-TEST(TestClientTest, TestTcpIPv6) {
+TEST(TestClientTest, DISABLED_ON_MAC(TestTcpIPv6)) {
if (HasIPv6Enabled()) {
TestTcpInternal(SocketAddress("::1", 0));
} else {
diff --git a/base/thread.cc b/base/thread.cc
index 49a299d..40257ab 100644
--- a/base/thread.cc
+++ b/base/thread.cc
@@ -107,7 +107,7 @@
Thread* result = CurrentThread();
if (NULL == result) {
result = new Thread();
- result->WrapCurrentWithThreadManager(this);
+ result->WrapCurrentWithThreadManager(this, true);
}
return result;
}
@@ -125,6 +125,16 @@
Runnable* runnable;
};
+Thread::ScopedDisallowBlockingCalls::ScopedDisallowBlockingCalls()
+ : thread_(Thread::Current()),
+ previous_state_(thread_->SetAllowBlockingCalls(false)) {
+}
+
+Thread::ScopedDisallowBlockingCalls::~ScopedDisallowBlockingCalls() {
+ ASSERT(thread_->IsCurrent());
+ thread_->SetAllowBlockingCalls(previous_state_);
+}
+
Thread::Thread(SocketServer* ss)
: MessageQueue(ss),
priority_(PRIORITY_NORMAL),
@@ -133,7 +143,8 @@
thread_(NULL),
thread_id_(0),
#endif
- owned_(true) {
+ owned_(true),
+ blocking_calls_allowed_(true) {
SetName("Thread", this); // default name
}
@@ -143,6 +154,8 @@
}
bool Thread::SleepMs(int milliseconds) {
+ AssertBlockingIsAllowedOnCurrentThread();
+
#if defined(WEBRTC_WIN)
::Sleep(milliseconds);
return true;
@@ -175,6 +188,7 @@
bool Thread::SetPriority(ThreadPriority priority) {
#if defined(WEBRTC_WIN)
if (running()) {
+ ASSERT(thread_ != NULL);
BOOL ret = FALSE;
if (priority == PRIORITY_NORMAL) {
ret = ::SetThreadPriority(thread_, THREAD_PRIORITY_NORMAL);
@@ -275,10 +289,35 @@
return true;
}
+bool Thread::WrapCurrent() {
+ return WrapCurrentWithThreadManager(ThreadManager::Instance(), true);
+}
+
+void Thread::UnwrapCurrent() {
+ // Clears the platform-specific thread-specific storage.
+ ThreadManager::Instance()->SetCurrentThread(NULL);
+#if defined(WEBRTC_WIN)
+ if (thread_ != NULL) {
+ if (!CloseHandle(thread_)) {
+ LOG_GLE(LS_ERROR) << "When unwrapping thread, failed to close handle.";
+ }
+ thread_ = NULL;
+ }
+#endif
+ running_.Reset();
+}
+
+void Thread::SafeWrapCurrent() {
+ WrapCurrentWithThreadManager(ThreadManager::Instance(), false);
+}
+
void Thread::Join() {
+ AssertBlockingIsAllowedOnCurrentThread();
+
if (running()) {
ASSERT(!IsCurrent());
#if defined(WEBRTC_WIN)
+ ASSERT(thread_ != NULL);
WaitForSingleObject(thread_, INFINITE);
CloseHandle(thread_);
thread_ = NULL;
@@ -291,6 +330,21 @@
}
}
+bool Thread::SetAllowBlockingCalls(bool allow) {
+ ASSERT(IsCurrent());
+ bool previous = blocking_calls_allowed_;
+ blocking_calls_allowed_ = allow;
+ return previous;
+}
+
+// static
+void Thread::AssertBlockingIsAllowedOnCurrentThread() {
+#ifdef _DEBUG
+ Thread* current = Thread::Current();
+ ASSERT(!current || current->blocking_calls_allowed_);
+#endif
+}
+
#if defined(WEBRTC_WIN)
// As seen on MSDN.
// http://msdn.microsoft.com/en-us/library/xcb2z8hs(VS.71).aspx
@@ -363,7 +417,6 @@
// Sent messages are sent to the MessageHandler directly, in the context
// of "thread", like Win32 SendMessage. If in the right context,
// call the handler directly.
-
Message msg;
msg.phandler = phandler;
msg.message_id = id;
@@ -373,6 +426,8 @@
return;
}
+ AssertBlockingIsAllowedOnCurrentThread();
+
AutoThread thread;
Thread *current_thread = Thread::Current();
ASSERT(current_thread != NULL); // AutoThread ensures this
@@ -395,7 +450,9 @@
crit_.Enter();
while (!ready) {
crit_.Leave();
- current_thread->ReceiveSends();
+ // We need to limit "ReceiveSends" to |this| thread to avoid an arbitrary
+ // thread invoking calls on the current thread.
+ current_thread->ReceiveSendsFromThread(this);
current_thread->socketserver()->Wait(kForever, false);
waited = true;
crit_.Enter();
@@ -419,17 +476,23 @@
}
void Thread::ReceiveSends() {
+ ReceiveSendsFromThread(NULL);
+}
+
+void Thread::ReceiveSendsFromThread(const Thread* source) {
// Receive a sent message. Cleanup scenarios:
// - thread sending exits: We don't allow this, since thread can exit
// only via Join, so Send must complete.
// - thread receiving exits: Wakeup/set ready in Thread::Clear()
// - object target cleared: Wakeup/set ready in Thread::Clear()
+ _SendMessage smsg;
+
crit_.Enter();
- while (!sendlist_.empty()) {
- _SendMessage smsg = sendlist_.front();
- sendlist_.pop_front();
+ while (PopSendMessageFromThread(source, &smsg)) {
crit_.Leave();
+
smsg.msg.phandler->OnMessage(&smsg.msg);
+
crit_.Enter();
*smsg.ready = true;
smsg.thread->socketserver()->WakeUp();
@@ -437,6 +500,18 @@
crit_.Leave();
}
+bool Thread::PopSendMessageFromThread(const Thread* source, _SendMessage* msg) {
+ for (std::list<_SendMessage>::iterator it = sendlist_.begin();
+ it != sendlist_.end(); ++it) {
+ if (it->thread == source || source == NULL) {
+ *msg = *it;
+ sendlist_.erase(it);
+ return true;
+ }
+ }
+ return false;
+}
+
void Thread::Clear(MessageHandler *phandler, uint32 id,
MessageList* removed) {
CritScope cs(&crit_);
@@ -494,43 +569,32 @@
}
}
-bool Thread::WrapCurrent() {
- return WrapCurrentWithThreadManager(ThreadManager::Instance());
-}
-
-bool Thread::WrapCurrentWithThreadManager(ThreadManager* thread_manager) {
+bool Thread::WrapCurrentWithThreadManager(ThreadManager* thread_manager,
+ bool need_synchronize_access) {
if (running())
return false;
+
#if defined(WEBRTC_WIN)
- // We explicitly ask for no rights other than synchronization.
- // This gives us the best chance of succeeding.
- thread_ = OpenThread(SYNCHRONIZE, FALSE, GetCurrentThreadId());
- if (!thread_) {
- LOG_GLE(LS_ERROR) << "Unable to get handle to thread.";
- return false;
+ if (need_synchronize_access) {
+ // We explicitly ask for no rights other than synchronization.
+ // This gives us the best chance of succeeding.
+ thread_ = OpenThread(SYNCHRONIZE, FALSE, GetCurrentThreadId());
+ if (!thread_) {
+ LOG_GLE(LS_ERROR) << "Unable to get handle to thread.";
+ return false;
+ }
+ thread_id_ = GetCurrentThreadId();
}
- thread_id_ = GetCurrentThreadId();
#elif defined(WEBRTC_POSIX)
thread_ = pthread_self();
#endif
+
owned_ = false;
running_.Set();
thread_manager->SetCurrentThread(this);
return true;
}
-void Thread::UnwrapCurrent() {
- // Clears the platform-specific thread-specific storage.
- ThreadManager::Instance()->SetCurrentThread(NULL);
-#if defined(WEBRTC_WIN)
- if (!CloseHandle(thread_)) {
- LOG_GLE(LS_ERROR) << "When unwrapping thread, failed to close handle.";
- }
-#endif
- running_.Reset();
-}
-
-
AutoThread::AutoThread(SocketServer* ss) : Thread(ss) {
if (!ThreadManager::Instance()->CurrentThread()) {
ThreadManager::Instance()->SetCurrentThread(this);
diff --git a/base/thread.h b/base/thread.h
index 3872746..34ec45e 100644
--- a/base/thread.h
+++ b/base/thread.h
@@ -108,6 +108,19 @@
static Thread* Current();
+ // Used to catch performance regressions. Use this to disallow blocking calls
+ // (Invoke) for a given scope. If a synchronous call is made while this is in
+ // effect, an assert will be triggered.
+ // Note that this is a single threaded class.
+ class ScopedDisallowBlockingCalls {
+ public:
+ ScopedDisallowBlockingCalls();
+ ~ScopedDisallowBlockingCalls();
+ private:
+ Thread* const thread_;
+ const bool previous_state_;
+ };
+
bool IsCurrent() const {
return Current() == this;
}
@@ -148,6 +161,8 @@
// Uses Send() internally, which blocks the current thread until execution
// is complete.
// Ex: bool result = thread.Invoke<bool>(&MyFunctionReturningBool);
+ // NOTE: This function can only be called when synchronous calls are allowed.
+ // See ScopedDisallowBlockingCalls for details.
template <class ReturnT, class FunctorT>
ReturnT Invoke(const FunctorT& functor) {
FunctorMessageHandler<ReturnT, FunctorT> handler(functor);
@@ -186,15 +201,6 @@
}
#endif
- // This method should be called when thread is created using non standard
- // method, like derived implementation of rtc::Thread and it can not be
- // started by calling Start(). This will set started flag to true and
- // owned to false. This must be called from the current thread.
- // NOTE: These methods should be used by the derived classes only, added here
- // only for testing.
- bool WrapCurrent();
- void UnwrapCurrent();
-
// Expose private method running() for tests.
//
// DANGER: this is a terrible public API. Most callers that might want to
@@ -202,27 +208,55 @@
// question to guarantee that the returned value remains true for the duration
// of whatever code is conditionally executing because of the return value!
bool RunningForTest() { return running(); }
- // This is a legacy call-site that probably doesn't need to exist in the first
- // place.
- // TODO(fischman): delete once the ASSERT added in channelmanager.cc sticks
- // for a month (ETA 2014/06/22).
- bool RunningForChannelManager() { return running(); }
+
+ // Sets the per-thread allow-blocking-calls flag and returns the previous
+ // value.
+ bool SetAllowBlockingCalls(bool allow);
protected:
+ // This method should be called when thread is created using non standard
+ // method, like derived implementation of rtc::Thread and it can not be
+ // started by calling Start(). This will set started flag to true and
+ // owned to false. This must be called from the current thread.
+ bool WrapCurrent();
+ void UnwrapCurrent();
+
+ // Same as WrapCurrent except that it never fails as it does not try to
+ // acquire the synchronization access of the thread. The caller should never
+ // call Stop() or Join() on this thread.
+ void SafeWrapCurrent();
+
// Blocks the calling thread until this thread has terminated.
void Join();
+ static void AssertBlockingIsAllowedOnCurrentThread();
+
+ friend class ScopedDisallowBlockingCalls;
+
private:
static void *PreRun(void *pv);
// ThreadManager calls this instead WrapCurrent() because
// ThreadManager::Instance() cannot be used while ThreadManager is
// being created.
- bool WrapCurrentWithThreadManager(ThreadManager* thread_manager);
+ // The method tries to get synchronization rights of the thread on Windows if
+ // |need_synchronize_access| is true.
+ bool WrapCurrentWithThreadManager(ThreadManager* thread_manager,
+ bool need_synchronize_access);
// Return true if the thread was started and hasn't yet stopped.
bool running() { return running_.Wait(0); }
+ // Processes received "Send" requests. If |source| is not NULL, only requests
+ // from |source| are processed, otherwise, all requests are processed.
+ void ReceiveSendsFromThread(const Thread* source);
+
+ // If |source| is not NULL, pops the first "Send" message from |source| in
+ // |sendlist_|, otherwise, pops the first "Send" message of |sendlist_|.
+ // The caller must lock |crit_| before calling.
+ // Returns true if there is such a message.
+ bool PopSendMessageFromThread(const Thread* source, _SendMessage* msg);
+
std::list<_SendMessage> sendlist_;
std::string name_;
ThreadPriority priority_;
@@ -238,6 +272,7 @@
#endif
bool owned_;
+ bool blocking_calls_allowed_; // By default set to |true|.
friend class ThreadManager;
diff --git a/system_wrappers/interface/thread_annotations.h b/base/thread_annotations.h
similarity index 100%
rename from system_wrappers/interface/thread_annotations.h
rename to base/thread_annotations.h
diff --git a/base/thread_checker_unittest.cc b/base/thread_checker_unittest.cc
index 13c1da5..25b9f50 100644
--- a/base/thread_checker_unittest.cc
+++ b/base/thread_checker_unittest.cc
@@ -10,12 +10,12 @@
// Borrowed from Chromium's src/base/threading/thread_checker_unittest.cc.
-#include <assert.h>
-
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
// Duplicated from base/threading/thread_checker.h so that we can be
// good citizens there and undef the macro.
@@ -38,7 +38,7 @@
// Verifies that it was called on the same thread as the constructor.
void DoStuff() {
- assert(CalledOnValidThread());
+ DCHECK(CalledOnValidThread());
}
void DetachFromThread() {
@@ -105,7 +105,7 @@
} // namespace
-TEST(ThreadCheckerTest, CallsAllowedOnSameThread) {
+TEST(ThreadCheckerTest, DISABLED_ON_MAC(CallsAllowedOnSameThread)) {
scoped_ptr<ThreadCheckerClass> thread_checker_class(
new ThreadCheckerClass);
@@ -116,7 +116,7 @@
thread_checker_class.reset();
}
-TEST(ThreadCheckerTest, DestructorAllowedOnDifferentThread) {
+TEST(ThreadCheckerTest, DISABLED_ON_MAC(DestructorAllowedOnDifferentThread)) {
scoped_ptr<ThreadCheckerClass> thread_checker_class(
new ThreadCheckerClass);
@@ -129,7 +129,7 @@
delete_on_thread.Join();
}
-TEST(ThreadCheckerTest, DetachFromThread) {
+TEST(ThreadCheckerTest, DISABLED_ON_MAC(DetachFromThread)) {
scoped_ptr<ThreadCheckerClass> thread_checker_class(
new ThreadCheckerClass);
@@ -157,7 +157,8 @@
}
#if ENABLE_THREAD_CHECKER
-TEST(ThreadCheckerDeathTest, MethodNotAllowedOnDifferentThreadInDebug) {
+TEST(ThreadCheckerDeathTest,
+ DISABLED_MethodNotAllowedOnDifferentThreadInDebug) {
ASSERT_DEATH({
ThreadCheckerClass::MethodOnDifferentThreadImpl();
}, "");
diff --git a/base/thread_unittest.cc b/base/thread_unittest.cc
index 6a54ac7..57b6df6 100644
--- a/base/thread_unittest.cc
+++ b/base/thread_unittest.cc
@@ -15,6 +15,7 @@
#include "webrtc/base/physicalsocketserver.h"
#include "webrtc/base/socketaddress.h"
#include "webrtc/base/thread.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
#if defined(WEBRTC_WIN)
#include <comdef.h> // NOLINT
@@ -105,6 +106,13 @@
CustomThread() {}
virtual ~CustomThread() { Stop(); }
bool Start() { return false; }
+
+ bool WrapCurrent() {
+ return Thread::WrapCurrent();
+ }
+ void UnwrapCurrent() {
+ Thread::UnwrapCurrent();
+ }
};
@@ -191,7 +199,7 @@
// Test that setting thread names doesn't cause a malfunction.
// There's no easy way to verify the name was set properly at this time.
-TEST(ThreadTest, Names) {
+TEST(ThreadTest, DISABLED_ON_MAC(Names)) {
// Default name
Thread *thread;
thread = new Thread();
@@ -214,7 +222,7 @@
// Test that setting thread priorities doesn't cause a malfunction.
// There's no easy way to verify the priority was set properly at this time.
-TEST(ThreadTest, Priorities) {
+TEST(ThreadTest, DISABLED_ON_MAC(Priorities)) {
Thread *thread;
thread = new Thread();
EXPECT_TRUE(thread->SetPriority(PRIORITY_HIGH));
@@ -239,9 +247,7 @@
}
-TEST(ThreadTest, Wrap) {
- Thread* current_thread = Thread::Current();
- current_thread->UnwrapCurrent();
+TEST(ThreadTest, DISABLED_ON_MAC(Wrap)) {
CustomThread* cthread = new CustomThread();
EXPECT_TRUE(cthread->WrapCurrent());
EXPECT_TRUE(cthread->RunningForTest());
@@ -249,10 +255,9 @@
cthread->UnwrapCurrent();
EXPECT_FALSE(cthread->RunningForTest());
delete cthread;
- current_thread->WrapCurrent();
}
-TEST(ThreadTest, Invoke) {
+TEST(ThreadTest, DISABLED_ON_MAC(Invoke)) {
// Create and start the thread.
Thread thread;
thread.Start();
@@ -271,6 +276,78 @@
thread.Invoke<void>(&LocalFuncs::Func2);
}
+// Verifies that two threads calling Invoke on each other at the same time does
+// not deadlock.
+TEST(ThreadTest, TwoThreadsInvokeNoDeadlock) {
+ AutoThread thread;
+ Thread* current_thread = Thread::Current();
+ ASSERT_TRUE(current_thread != NULL);
+
+ Thread other_thread;
+ other_thread.Start();
+
+ struct LocalFuncs {
+ static void Set(bool* out) { *out = true; }
+ static void InvokeSet(Thread* thread, bool* out) {
+ thread->Invoke<void>(Bind(&Set, out));
+ }
+ };
+
+ bool called = false;
+ other_thread.Invoke<void>(
+ Bind(&LocalFuncs::InvokeSet, current_thread, &called));
+
+ EXPECT_TRUE(called);
+}
+
+// Verifies that if thread A invokes a call on thread B and thread C is trying
+// to invoke A at the same time, thread A does not handle C's invoke while
+// invoking B.
+TEST(ThreadTest, ThreeThreadsInvoke) {
+ AutoThread thread;
+ Thread* thread_a = Thread::Current();
+ Thread thread_b, thread_c;
+ thread_b.Start();
+ thread_c.Start();
+
+ struct LocalFuncs {
+ static void Set(bool* out) { *out = true; }
+ static void InvokeSet(Thread* thread, bool* out) {
+ thread->Invoke<void>(Bind(&Set, out));
+ }
+
+ // Set |out| true and call InvokeSet on |thread|.
+ static void SetAndInvokeSet(bool* out, Thread* thread, bool* out_inner) {
+ *out = true;
+ InvokeSet(thread, out_inner);
+ }
+
+ // Asynchronously invoke SetAndInvokeSet on |thread1| and wait until
+ // |thread1| starts the call.
+ static void AsyncInvokeSetAndWait(
+ Thread* thread1, Thread* thread2, bool* out) {
+ bool async_invoked = false;
+
+ AsyncInvoker invoker;
+ invoker.AsyncInvoke<void>(
+ thread1, Bind(&SetAndInvokeSet, &async_invoked, thread2, out));
+
+ EXPECT_TRUE_WAIT(async_invoked, 2000);
+ }
+ };
+
+ bool thread_a_called = false;
+
+ // Start the sequence A --(invoke)--> B --(async invoke)--> C --(invoke)--> A.
+ // Thread B returns when C receives the call and C should be blocked until A
+ // starts to process messages.
+ thread_b.Invoke<void>(Bind(&LocalFuncs::AsyncInvokeSetAndWait,
+ &thread_c, thread_a, &thread_a_called));
+ EXPECT_FALSE(thread_a_called);
+
+ EXPECT_TRUE_WAIT(thread_a_called, 2000);
+}
+
class AsyncInvokeTest : public testing::Test {
public:
void IntCallback(int value) {
@@ -300,7 +377,7 @@
Thread* expected_thread_;
};
-TEST_F(AsyncInvokeTest, FireAndForget) {
+TEST_F(AsyncInvokeTest, DISABLED_FireAndForget) {
AsyncInvoker invoker;
// Create and start the thread.
Thread thread;
@@ -311,7 +388,7 @@
EXPECT_TRUE_WAIT(called, kWaitTimeout);
}
-TEST_F(AsyncInvokeTest, WithCallback) {
+TEST_F(AsyncInvokeTest, DISABLED_WithCallback) {
AsyncInvoker invoker;
// Create and start the thread.
Thread thread;
@@ -324,7 +401,7 @@
EXPECT_EQ_WAIT(42, int_value_, kWaitTimeout);
}
-TEST_F(AsyncInvokeTest, CancelInvoker) {
+TEST_F(AsyncInvokeTest, DISABLED_CancelInvoker) {
// Create and start the thread.
Thread thread;
thread.Start();
@@ -340,7 +417,7 @@
EXPECT_EQ(0, int_value_);
}
-TEST_F(AsyncInvokeTest, CancelCallingThread) {
+TEST_F(AsyncInvokeTest, DISABLED_CancelCallingThread) {
AsyncInvoker invoker;
{ // Create and start the thread.
Thread thread;
@@ -357,7 +434,7 @@
EXPECT_EQ(0, int_value_);
}
-TEST_F(AsyncInvokeTest, KillInvokerBeforeExecute) {
+TEST_F(AsyncInvokeTest, DISABLED_KillInvokerBeforeExecute) {
Thread thread;
thread.Start();
{
@@ -374,7 +451,7 @@
EXPECT_EQ(0, int_value_);
}
-TEST_F(AsyncInvokeTest, Flush) {
+TEST_F(AsyncInvokeTest, DISABLED_Flush) {
AsyncInvoker invoker;
bool flag1 = false;
bool flag2 = false;
@@ -392,7 +469,7 @@
EXPECT_TRUE(flag2);
}
-TEST_F(AsyncInvokeTest, FlushWithIds) {
+TEST_F(AsyncInvokeTest, DISABLED_FlushWithIds) {
AsyncInvoker invoker;
bool flag1 = false;
bool flag2 = false;
diff --git a/base/timeutils.cc b/base/timeutils.cc
index dcf83e3..64dae2f 100644
--- a/base/timeutils.cc
+++ b/base/timeutils.cc
@@ -18,12 +18,14 @@
#endif
#if defined(WEBRTC_WIN)
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
+#endif
#include <windows.h>
#include <mmsystem.h>
#endif
-#include "webrtc/base/common.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/timeutils.h"
#define EFFICIENT_IMPLEMENTATION 1
@@ -39,7 +41,9 @@
if (timebase.denom == 0) {
// Get the timebase if this is the first time we run.
// Recommended by Apple's QA1398.
- VERIFY(KERN_SUCCESS == mach_timebase_info(&timebase));
+ if (mach_timebase_info(&timebase) != KERN_SUCCESS) {
+ DCHECK(false);
+ }
}
// Use timebase to convert absolute time tick units into nanoseconds.
ticks = mach_absolute_time() * timebase.numer / timebase.denom;
@@ -118,7 +122,7 @@
*result = *tm;
return result;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
void CurrentTmTime(struct tm *tm, int *microseconds) {
struct timeval timeval;
@@ -132,8 +136,8 @@
}
uint32 TimeAfter(int32 elapsed) {
- ASSERT(elapsed >= 0);
- ASSERT(static_cast<uint32>(elapsed) < HALF);
+ DCHECK_GE(elapsed, 0);
+ DCHECK_LT(static_cast<uint32>(elapsed), HALF);
return Time() + elapsed;
}
diff --git a/base/timing.cc b/base/timing.cc
index aa1fc42..0c5ed5e 100644
--- a/base/timing.cc
+++ b/base/timing.cc
@@ -46,6 +46,7 @@
#endif
}
+// static
double Timing::WallTimeNow() {
#if defined(WEBRTC_POSIX)
struct timeval time;
diff --git a/base/timing.h b/base/timing.h
index 58b17a9..1dee607 100644
--- a/base/timing.h
+++ b/base/timing.h
@@ -24,7 +24,8 @@
// WallTimeNow() returns the current wall-clock time in seconds,
// within 10 milliseconds resolution.
- virtual double WallTimeNow();
+ // WallTimeNow is static and does not require a timer_handle_ on Windows.
+ static double WallTimeNow();
// TimerNow() is like WallTimeNow(), but is monotonically
// increasing. It returns seconds in resolution of 10 microseconds
diff --git a/base/urlencode.cc b/base/urlencode.cc
index b152829..8dc185d 100644
--- a/base/urlencode.cc
+++ b/base/urlencode.cc
@@ -15,9 +15,9 @@
static int HexPairValue(const char * code) {
int value = 0;
- const char * pch = code;
- for (;;) {
- int digit = *pch++;
+ for (const char * pch = code; pch < code + 2; ++pch) {
+ value <<= 4;
+ int digit = *pch;
if (digit >= '0' && digit <= '9') {
value += digit - '0';
}
@@ -30,10 +30,8 @@
else {
return -1;
}
- if (pch == code + 2)
- return value;
- value <<= 4;
}
+ return value;
}
static int InternalUrlDecode(const char *source, char *dest,
@@ -53,7 +51,7 @@
if (source[1] && source[2]) {
int value = HexPairValue(source + 1);
if (value >= 0) {
- *(dest++) = value;
+ *(dest++) = static_cast<char>(value);
source += 2;
}
else {
diff --git a/base/virtualsocket_unittest.cc b/base/virtualsocket_unittest.cc
index 253d2c5..0a26cc9 100644
--- a/base/virtualsocket_unittest.cc
+++ b/base/virtualsocket_unittest.cc
@@ -21,6 +21,7 @@
#include "webrtc/base/thread.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/base/virtualsocketserver.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
using namespace rtc;
@@ -775,37 +776,37 @@
const SocketAddress kIPv6AnyAddress;
};
-TEST_F(VirtualSocketServerTest, basic_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(basic_v4)) {
SocketAddress ipv4_test_addr(IPAddress(INADDR_ANY), 5000);
BasicTest(ipv4_test_addr);
}
-TEST_F(VirtualSocketServerTest, basic_v6) {
+TEST_F(VirtualSocketServerTest,DISABLED_ON_MAC( basic_v6)) {
SocketAddress ipv6_test_addr(IPAddress(in6addr_any), 5000);
BasicTest(ipv6_test_addr);
}
-TEST_F(VirtualSocketServerTest, connect_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(connect_v4)) {
ConnectTest(kIPv4AnyAddress);
}
-TEST_F(VirtualSocketServerTest, connect_v6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(connect_v6)) {
ConnectTest(kIPv6AnyAddress);
}
-TEST_F(VirtualSocketServerTest, connect_to_non_listener_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(connect_to_non_listener_v4)) {
ConnectToNonListenerTest(kIPv4AnyAddress);
}
-TEST_F(VirtualSocketServerTest, connect_to_non_listener_v6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(connect_to_non_listener_v6)) {
ConnectToNonListenerTest(kIPv6AnyAddress);
}
-TEST_F(VirtualSocketServerTest, close_during_connect_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(close_during_connect_v4)) {
CloseDuringConnectTest(kIPv4AnyAddress);
}
-TEST_F(VirtualSocketServerTest, close_during_connect_v6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(close_during_connect_v6)) {
CloseDuringConnectTest(kIPv6AnyAddress);
}
@@ -817,11 +818,11 @@
CloseTest(kIPv6AnyAddress);
}
-TEST_F(VirtualSocketServerTest, tcp_send_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(tcp_send_v4)) {
TcpSendTest(kIPv4AnyAddress);
}
-TEST_F(VirtualSocketServerTest, tcp_send_v6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(tcp_send_v6)) {
TcpSendTest(kIPv6AnyAddress);
}
@@ -833,17 +834,17 @@
TcpSendsPacketsInOrderTest(kIPv6AnyAddress);
}
-TEST_F(VirtualSocketServerTest, bandwidth_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(bandwidth_v4)) {
SocketAddress ipv4_test_addr(IPAddress(INADDR_ANY), 1000);
BandwidthTest(ipv4_test_addr);
}
-TEST_F(VirtualSocketServerTest, bandwidth_v6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(bandwidth_v6)) {
SocketAddress ipv6_test_addr(IPAddress(in6addr_any), 1000);
BandwidthTest(ipv6_test_addr);
}
-TEST_F(VirtualSocketServerTest, delay_v4) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(delay_v4)) {
SocketAddress ipv4_test_addr(IPAddress(INADDR_ANY), 1000);
DelayTest(ipv4_test_addr);
}
@@ -855,104 +856,104 @@
}
// Works, receiving socket sees 127.0.0.2.
-TEST_F(VirtualSocketServerTest, CanConnectFromMappedIPv6ToIPv4Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanConnectFromMappedIPv6ToIPv4Any)) {
CrossFamilyConnectionTest(SocketAddress("::ffff:127.0.0.2", 0),
SocketAddress("0.0.0.0", 5000),
true);
}
// Fails.
-TEST_F(VirtualSocketServerTest, CantConnectFromUnMappedIPv6ToIPv4Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CantConnectFromUnMappedIPv6ToIPv4Any)) {
CrossFamilyConnectionTest(SocketAddress("::2", 0),
SocketAddress("0.0.0.0", 5000),
false);
}
// Fails.
-TEST_F(VirtualSocketServerTest, CantConnectFromUnMappedIPv6ToMappedIPv6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CantConnectFromUnMappedIPv6ToMappedIPv6)) {
CrossFamilyConnectionTest(SocketAddress("::2", 0),
SocketAddress("::ffff:127.0.0.1", 5000),
false);
}
// Works. receiving socket sees ::ffff:127.0.0.2.
-TEST_F(VirtualSocketServerTest, CanConnectFromIPv4ToIPv6Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanConnectFromIPv4ToIPv6Any)) {
CrossFamilyConnectionTest(SocketAddress("127.0.0.2", 0),
SocketAddress("::", 5000),
true);
}
// Fails.
-TEST_F(VirtualSocketServerTest, CantConnectFromIPv4ToUnMappedIPv6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CantConnectFromIPv4ToUnMappedIPv6)) {
CrossFamilyConnectionTest(SocketAddress("127.0.0.2", 0),
SocketAddress("::1", 5000),
false);
}
// Works. Receiving socket sees ::ffff:127.0.0.1.
-TEST_F(VirtualSocketServerTest, CanConnectFromIPv4ToMappedIPv6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanConnectFromIPv4ToMappedIPv6)) {
CrossFamilyConnectionTest(SocketAddress("127.0.0.1", 0),
SocketAddress("::ffff:127.0.0.2", 5000),
true);
}
// Works, receiving socket sees a result from GetNextIP.
-TEST_F(VirtualSocketServerTest, CanConnectFromUnboundIPv6ToIPv4Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanConnectFromUnboundIPv6ToIPv4Any)) {
CrossFamilyConnectionTest(SocketAddress("::", 0),
SocketAddress("0.0.0.0", 5000),
true);
}
// Works, receiving socket sees whatever GetNextIP gave the client.
-TEST_F(VirtualSocketServerTest, CanConnectFromUnboundIPv4ToIPv6Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanConnectFromUnboundIPv4ToIPv6Any)) {
CrossFamilyConnectionTest(SocketAddress("0.0.0.0", 0),
SocketAddress("::", 5000),
true);
}
-TEST_F(VirtualSocketServerTest, CanSendDatagramFromUnboundIPv4ToIPv6Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanSendDatagramFromUnboundIPv4ToIPv6Any)) {
CrossFamilyDatagramTest(SocketAddress("0.0.0.0", 0),
SocketAddress("::", 5000),
true);
}
-TEST_F(VirtualSocketServerTest, CanSendDatagramFromMappedIPv6ToIPv4Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanSendDatagramFromMappedIPv6ToIPv4Any)) {
CrossFamilyDatagramTest(SocketAddress("::ffff:127.0.0.1", 0),
SocketAddress("0.0.0.0", 5000),
true);
}
-TEST_F(VirtualSocketServerTest, CantSendDatagramFromUnMappedIPv6ToIPv4Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CantSendDatagramFromUnMappedIPv6ToIPv4Any)) {
CrossFamilyDatagramTest(SocketAddress("::2", 0),
SocketAddress("0.0.0.0", 5000),
false);
}
-TEST_F(VirtualSocketServerTest, CantSendDatagramFromUnMappedIPv6ToMappedIPv6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CantSendDatagramFromUnMappedIPv6ToMappedIPv6)) {
CrossFamilyDatagramTest(SocketAddress("::2", 0),
SocketAddress("::ffff:127.0.0.1", 5000),
false);
}
-TEST_F(VirtualSocketServerTest, CanSendDatagramFromIPv4ToIPv6Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanSendDatagramFromIPv4ToIPv6Any)) {
CrossFamilyDatagramTest(SocketAddress("127.0.0.2", 0),
SocketAddress("::", 5000),
true);
}
-TEST_F(VirtualSocketServerTest, CantSendDatagramFromIPv4ToUnMappedIPv6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CantSendDatagramFromIPv4ToUnMappedIPv6)) {
CrossFamilyDatagramTest(SocketAddress("127.0.0.2", 0),
SocketAddress("::1", 5000),
false);
}
-TEST_F(VirtualSocketServerTest, CanSendDatagramFromIPv4ToMappedIPv6) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanSendDatagramFromIPv4ToMappedIPv6)) {
CrossFamilyDatagramTest(SocketAddress("127.0.0.1", 0),
SocketAddress("::ffff:127.0.0.2", 5000),
true);
}
-TEST_F(VirtualSocketServerTest, CanSendDatagramFromUnboundIPv6ToIPv4Any) {
+TEST_F(VirtualSocketServerTest, DISABLED_ON_MAC(CanSendDatagramFromUnboundIPv6ToIPv4Any)) {
CrossFamilyDatagramTest(SocketAddress("::", 0),
SocketAddress("0.0.0.0", 5000),
true);
diff --git a/base/virtualsocketserver.cc b/base/virtualsocketserver.cc
index f8e8dde..90d19e4 100644
--- a/base/virtualsocketserver.cc
+++ b/base/virtualsocketserver.cc
@@ -639,6 +639,10 @@
return !msg_queue_->IsQuitting();
}
+void VirtualSocketServer::SetNextPortForTesting(uint16 port) {
+ next_port_ = port;
+}
+
int VirtualSocketServer::Bind(VirtualSocket* socket,
const SocketAddress& addr) {
ASSERT(NULL != socket);
diff --git a/base/virtualsocketserver.h b/base/virtualsocketserver.h
index 87e3536..0ea51ab 100644
--- a/base/virtualsocketserver.h
+++ b/base/virtualsocketserver.h
@@ -110,6 +110,9 @@
// if Thread::Stop() was called.
bool ProcessMessagesUntilIdle();
+ // Sets the next port number to use for testing.
+ void SetNextPortForTesting(uint16 port);
+
protected:
// Returns a new IP not used before in this network.
IPAddress GetNextIP(int family);
diff --git a/base/webrtc_base.target.darwin-arm.mk b/base/webrtc_base.target.darwin-arm.mk
index 95e7f5f..cbe571c 100644
--- a/base/webrtc_base.target.darwin-arm.mk
+++ b/base/webrtc_base.target.darwin-arm.mk
@@ -2,413 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -fno-tree-sra \
- -fno-partial-inlining \
- -fno-early-inlining \
- -fno-tree-copy-prop \
- -fno-tree-loop-optimize \
- -fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_ARCH_ARM' \
- '-DWEBRTC_ARCH_ARM_V7' \
- '-DWEBRTC_DETECT_ARM_NEON' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-abi \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -fno-tree-sra \
- -fno-partial-inlining \
- -fno-early-inlining \
- -fno-tree-copy-prop \
- -fno-tree-loop-optimize \
- -fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_ARCH_ARM' \
- '-DWEBRTC_ARCH_ARM_V7' \
- '-DWEBRTC_DETECT_ARM_NEON' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-abi \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -417,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.darwin-arm64.mk b/base/webrtc_base.target.darwin-arm64.mk
index b00610d..cbe571c 100644
--- a/base/webrtc_base.target.darwin-arm64.mk
+++ b/base/webrtc_base.target.darwin-arm64.mk
@@ -2,375 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -379,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.darwin-mips.mk b/base/webrtc_base.target.darwin-mips.mk
index 0c1efd8..cbe571c 100644
--- a/base/webrtc_base.target.darwin-mips.mk
+++ b/base/webrtc_base.target.darwin-mips.mk
@@ -2,397 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -mhard-float \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -EL \
- -mhard-float \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-uninitialized \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -mhard-float \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -EL \
- -mhard-float \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-uninitialized \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -401,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.darwin-mips64.mk b/base/webrtc_base.target.darwin-mips64.mk
new file mode 100644
index 0000000..cbe571c
--- /dev/null
+++ b/base/webrtc_base.target.darwin-mips64.mk
@@ -0,0 +1,42 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_base
+webrtc_base: third_party_webrtc_base_webrtc_base_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.darwin-x86.mk b/base/webrtc_base.target.darwin-x86.mk
index b85152f..cbe571c 100644
--- a/base/webrtc_base.target.darwin-x86.mk
+++ b/base/webrtc_base.target.darwin-x86.mk
@@ -2,391 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -msse2 \
- -mfpmath=sse \
- -mmmx \
- -m32 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -fno-stack-protector \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -msse2 \
- -mfpmath=sse \
- -mmmx \
- -m32 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -fno-stack-protector \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -395,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.darwin-x86_64.mk b/base/webrtc_base.target.darwin-x86_64.mk
index 77a77b6..cbe571c 100644
--- a/base/webrtc_base.target.darwin-x86_64.mk
+++ b/base/webrtc_base.target.darwin-x86_64.mk
@@ -2,391 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -m64 \
- -march=x86-64 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(LOCAL_PATH)/third_party/openssl/config/x64 \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -m64 \
- -march=x86-64 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(LOCAL_PATH)/third_party/openssl/config/x64 \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -395,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.linux-arm.mk b/base/webrtc_base.target.linux-arm.mk
index 95e7f5f..cbe571c 100644
--- a/base/webrtc_base.target.linux-arm.mk
+++ b/base/webrtc_base.target.linux-arm.mk
@@ -2,413 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -fno-tree-sra \
- -fno-partial-inlining \
- -fno-early-inlining \
- -fno-tree-copy-prop \
- -fno-tree-loop-optimize \
- -fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_ARCH_ARM' \
- '-DWEBRTC_ARCH_ARM_V7' \
- '-DWEBRTC_DETECT_ARM_NEON' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-abi \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -fno-tree-sra \
- -fno-partial-inlining \
- -fno-early-inlining \
- -fno-tree-copy-prop \
- -fno-tree-loop-optimize \
- -fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_ARCH_ARM' \
- '-DWEBRTC_ARCH_ARM_V7' \
- '-DWEBRTC_DETECT_ARM_NEON' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-abi \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -417,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.linux-arm64.mk b/base/webrtc_base.target.linux-arm64.mk
index b00610d..cbe571c 100644
--- a/base/webrtc_base.target.linux-arm64.mk
+++ b/base/webrtc_base.target.linux-arm64.mk
@@ -2,375 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -379,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.linux-mips.mk b/base/webrtc_base.target.linux-mips.mk
index 0c1efd8..cbe571c 100644
--- a/base/webrtc_base.target.linux-mips.mk
+++ b/base/webrtc_base.target.linux-mips.mk
@@ -2,397 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -mhard-float \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -EL \
- -mhard-float \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-uninitialized \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -mhard-float \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -EL \
- -mhard-float \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-uninitialized \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -401,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.linux-mips64.mk b/base/webrtc_base.target.linux-mips64.mk
new file mode 100644
index 0000000..cbe571c
--- /dev/null
+++ b/base/webrtc_base.target.linux-mips64.mk
@@ -0,0 +1,42 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_base
+webrtc_base: third_party_webrtc_base_webrtc_base_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.linux-x86.mk b/base/webrtc_base.target.linux-x86.mk
index b85152f..cbe571c 100644
--- a/base/webrtc_base.target.linux-x86.mk
+++ b/base/webrtc_base.target.linux-x86.mk
@@ -2,391 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -msse2 \
- -mfpmath=sse \
- -mmmx \
- -m32 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -fno-stack-protector \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -msse2 \
- -mfpmath=sse \
- -mmmx \
- -m32 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -fno-stack-protector \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -395,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/webrtc_base.target.linux-x86_64.mk b/base/webrtc_base.target.linux-x86_64.mk
index 77a77b6..cbe571c 100644
--- a/base/webrtc_base.target.linux-x86_64.mk
+++ b/base/webrtc_base.target.linux-x86_64.mk
@@ -2,391 +2,24 @@
include $(CLEAR_VARS)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE := third_party_webrtc_base_webrtc_base_gyp
-LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_STEM := webrtc_base
+LOCAL_MODULE_SUFFIX := .stamp
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
-GYP_TARGET_DEPENDENCIES :=
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_base_rtc_base_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_base_rtc_base_gyp.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-
-GYP_COPIED_SOURCE_ORIGIN_DIRS :=
-
-LOCAL_SRC_FILES := \
- third_party/webrtc/base/asyncfile.cc \
- third_party/webrtc/base/asynchttprequest.cc \
- third_party/webrtc/base/asyncsocket.cc \
- third_party/webrtc/base/asynctcpsocket.cc \
- third_party/webrtc/base/asyncudpsocket.cc \
- third_party/webrtc/base/autodetectproxy.cc \
- third_party/webrtc/base/base64.cc \
- third_party/webrtc/base/bytebuffer.cc \
- third_party/webrtc/base/checks.cc \
- third_party/webrtc/base/common.cc \
- third_party/webrtc/base/cpumonitor.cc \
- third_party/webrtc/base/crc32.cc \
- third_party/webrtc/base/diskcache.cc \
- third_party/webrtc/base/event.cc \
- third_party/webrtc/base/fileutils.cc \
- third_party/webrtc/base/firewallsocketserver.cc \
- third_party/webrtc/base/flags.cc \
- third_party/webrtc/base/helpers.cc \
- third_party/webrtc/base/httpbase.cc \
- third_party/webrtc/base/httpclient.cc \
- third_party/webrtc/base/httpcommon.cc \
- third_party/webrtc/base/httprequest.cc \
- third_party/webrtc/base/ifaddrs-android.cc \
- third_party/webrtc/base/ipaddress.cc \
- third_party/webrtc/base/linux.cc \
- third_party/webrtc/base/md5.cc \
- third_party/webrtc/base/messagedigest.cc \
- third_party/webrtc/base/messagehandler.cc \
- third_party/webrtc/base/messagequeue.cc \
- third_party/webrtc/base/nethelpers.cc \
- third_party/webrtc/base/network.cc \
- third_party/webrtc/base/nssidentity.cc \
- third_party/webrtc/base/nssstreamadapter.cc \
- third_party/webrtc/base/openssladapter.cc \
- third_party/webrtc/base/openssldigest.cc \
- third_party/webrtc/base/opensslidentity.cc \
- third_party/webrtc/base/opensslstreamadapter.cc \
- third_party/webrtc/base/pathutils.cc \
- third_party/webrtc/base/physicalsocketserver.cc \
- third_party/webrtc/base/proxydetect.cc \
- third_party/webrtc/base/proxyinfo.cc \
- third_party/webrtc/base/ratelimiter.cc \
- third_party/webrtc/base/ratetracker.cc \
- third_party/webrtc/base/sha1.cc \
- third_party/webrtc/base/signalthread.cc \
- third_party/webrtc/base/socketadapters.cc \
- third_party/webrtc/base/socketaddress.cc \
- third_party/webrtc/base/socketaddresspair.cc \
- third_party/webrtc/base/socketpool.cc \
- third_party/webrtc/base/socketstream.cc \
- third_party/webrtc/base/ssladapter.cc \
- third_party/webrtc/base/sslfingerprint.cc \
- third_party/webrtc/base/sslidentity.cc \
- third_party/webrtc/base/sslsocketfactory.cc \
- third_party/webrtc/base/sslstreamadapter.cc \
- third_party/webrtc/base/sslstreamadapterhelper.cc \
- third_party/webrtc/base/stream.cc \
- third_party/webrtc/base/stringencode.cc \
- third_party/webrtc/base/stringutils.cc \
- third_party/webrtc/base/systeminfo.cc \
- third_party/webrtc/base/task.cc \
- third_party/webrtc/base/taskparent.cc \
- third_party/webrtc/base/taskrunner.cc \
- third_party/webrtc/base/thread.cc \
- third_party/webrtc/base/thread_checker_impl.cc \
- third_party/webrtc/base/timeutils.cc \
- third_party/webrtc/base/timing.cc \
- third_party/webrtc/base/unixfilesystem.cc \
- third_party/webrtc/base/urlencode.cc \
- third_party/webrtc/base/worker.cc \
- third_party/webrtc/overrides/webrtc/base/logging.cc
-
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Debug := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -m64 \
- -march=x86-64 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -g \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Debug := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
- '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
- '-D_DEBUG'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Debug := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(LOCAL_PATH)/third_party/openssl/config/x64 \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Debug := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Debug := false
-
-# Flags passed to both C and C++ files.
-MY_CFLAGS_Release := \
- -fstack-protector \
- --param=ssp-buffer-size=4 \
- -Werror \
- -fno-exceptions \
- -fno-strict-aliasing \
- -Wno-unused-parameter \
- -Wno-missing-field-initializers \
- -fvisibility=hidden \
- -pipe \
- -fPIC \
- -Wno-unused-local-typedefs \
- -fno-builtin-cos \
- -fno-builtin-sin \
- -fno-builtin-cosf \
- -fno-builtin-sinf \
- -m64 \
- -march=x86-64 \
- -ffunction-sections \
- -funwind-tables \
- -g \
- -fstack-protector \
- -fno-short-enums \
- -finline-limit=64 \
- -Wa,--noexecstack \
- -U_FORTIFY_SOURCE \
- -Wno-extra \
- -Wno-ignored-qualifiers \
- -Wno-type-limits \
- -Wno-unused-but-set-variable \
- -Os \
- -fno-ident \
- -fdata-sections \
- -ffunction-sections \
- -fomit-frame-pointer \
- -funwind-tables
-
-MY_DEFS_Release := \
- '-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=1' \
- '-DCLD_VERSION=1' \
- '-DENABLE_PRINTING=1' \
- '-DENABLE_MANAGED_USERS=1' \
- '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
- '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
- '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
- '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
- '-DVIDEO_HOLE=1' \
- '-DWEBRTC_RESTRICT_LOGGING' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_CHROMIUM_BUILD' \
- '-DLOGGING_INSIDE_WEBRTC' \
- '-DWEBRTC_POSIX' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DLOGGING=1' \
- '-DUSE_WEBRTC_DEV_BRANCH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
- '-DUSE_OPENSSL=1' \
- '-DUSE_OPENSSL_CERTS=1' \
- '-D__STDC_CONSTANT_MACROS' \
- '-D__STDC_FORMAT_MACROS' \
- '-DANDROID' \
- '-D__GNU_SOURCE=1' \
- '-DUSE_STLPORT=1' \
- '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
- '-DCHROME_BUILD_ID=""' \
- '-DNDEBUG' \
- '-DNVALGRIND' \
- '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
- '-D_FORTIFY_SOURCE=2'
-
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES_Release := \
- $(gyp_shared_intermediate_dir) \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/third_party/webrtc/overrides \
- $(LOCAL_PATH)/third_party \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/overrides/include \
- $(LOCAL_PATH)/third_party/third_party/jsoncpp/source/include \
- $(LOCAL_PATH)/third_party/openssl/openssl/include \
- $(LOCAL_PATH)/third_party/openssl/config/x64 \
- $(PWD)/frameworks/wilhelm/include \
- $(PWD)/bionic \
- $(PWD)/external/stlport/stlport
-
-
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS_Release := \
- -fno-rtti \
- -fno-threadsafe-statics \
- -fvisibility-inlines-hidden \
- -Wsign-compare \
- -Wno-non-virtual-dtor \
- -Wno-sign-promo
-
-
-LOCAL_FDO_SUPPORT_Release := false
-
-LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
-LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
-LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libdl
-
# Add target alias to "gyp_all_modules" target.
.PHONY: gyp_all_modules
gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
@@ -395,4 +28,15 @@
.PHONY: webrtc_base
webrtc_base: third_party_webrtc_base_webrtc_base_gyp
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+LOCAL_2ND_ARCH_VAR_PREFIX :=
diff --git a/base/window.h b/base/window.h
index d961026..9f4381a 100644
--- a/base/window.h
+++ b/base/window.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_BASE_WINDOW_H_
#define WEBRTC_BASE_WINDOW_H_
+#include "webrtc/base/basictypes.h"
#include "webrtc/base/stringencode.h"
// Define platform specific window types.
diff --git a/base/windowpickerfactory.h b/base/windowpickerfactory.h
index 00a4cc4..dec3a33 100644
--- a/base/windowpickerfactory.h
+++ b/base/windowpickerfactory.h
@@ -16,8 +16,8 @@
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
#include "webrtc/base/macutils.h"
#include "webrtc/base/macwindowpicker.h"
-#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
-#include "webrtc/base/linuxwindowpicker.h"
+#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && defined(HAVE_X11)
+#include "webrtc/base/x11windowpicker.h"
#endif
#include "webrtc/base/windowpicker.h"
@@ -39,7 +39,7 @@
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
return new MacWindowPicker();
#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && defined(HAVE_X11)
- return new LinuxWindowPicker();
+ return new X11WindowPicker();
#else
return NULL;
#endif
diff --git a/base/linuxwindowpicker.cc b/base/x11windowpicker.cc
similarity index 96%
rename from base/linuxwindowpicker.cc
rename to base/x11windowpicker.cc
index 56d565e..7e47f6a 100644
--- a/base/linuxwindowpicker.cc
+++ b/base/x11windowpicker.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/base/linuxwindowpicker.h"
+#include "webrtc/base/x11windowpicker.h"
#include <math.h>
#include <string.h>
@@ -625,7 +625,7 @@
Window app_window = GetApplicationWindow(children[num_children - 1 - i]);
#endif
if (app_window &&
- !LinuxWindowPicker::IsDesktopElement(display_, app_window)) {
+ !X11WindowPicker::IsDesktopElement(display_, app_window)) {
std::string title;
if (GetWindowTitle(app_window, &title)) {
WindowId id(app_window);
@@ -721,13 +721,13 @@
bool has_render_extension_;
};
-LinuxWindowPicker::LinuxWindowPicker() : enumerator_(new XWindowEnumerator()) {
+X11WindowPicker::X11WindowPicker() : enumerator_(new XWindowEnumerator()) {
}
-LinuxWindowPicker::~LinuxWindowPicker() {
+X11WindowPicker::~X11WindowPicker() {
}
-bool LinuxWindowPicker::IsDesktopElement(_XDisplay* display, Window window) {
+bool X11WindowPicker::IsDesktopElement(_XDisplay* display, Window window) {
if (window == 0) {
LOG(LS_WARNING) << "Zero is never a valid window.";
return false;
@@ -769,48 +769,48 @@
return result;
}
-bool LinuxWindowPicker::Init() {
+bool X11WindowPicker::Init() {
return enumerator_->Init();
}
-bool LinuxWindowPicker::GetWindowList(WindowDescriptionList* descriptions) {
+bool X11WindowPicker::GetWindowList(WindowDescriptionList* descriptions) {
return enumerator_->EnumerateWindows(descriptions);
}
-bool LinuxWindowPicker::GetDesktopList(DesktopDescriptionList* descriptions) {
+bool X11WindowPicker::GetDesktopList(DesktopDescriptionList* descriptions) {
return enumerator_->EnumerateDesktops(descriptions);
}
-bool LinuxWindowPicker::IsVisible(const WindowId& id) {
+bool X11WindowPicker::IsVisible(const WindowId& id) {
return enumerator_->IsVisible(id);
}
-bool LinuxWindowPicker::MoveToFront(const WindowId& id) {
+bool X11WindowPicker::MoveToFront(const WindowId& id) {
return enumerator_->MoveToFront(id);
}
-uint8* LinuxWindowPicker::GetWindowIcon(const WindowId& id, int* width,
+uint8* X11WindowPicker::GetWindowIcon(const WindowId& id, int* width,
int* height) {
return enumerator_->GetWindowIcon(id, width, height);
}
-uint8* LinuxWindowPicker::GetWindowThumbnail(const WindowId& id, int width,
+uint8* X11WindowPicker::GetWindowThumbnail(const WindowId& id, int width,
int height) {
return enumerator_->GetWindowThumbnail(id, width, height);
}
-int LinuxWindowPicker::GetNumDesktops() {
+int X11WindowPicker::GetNumDesktops() {
return enumerator_->GetNumDesktops();
}
-uint8* LinuxWindowPicker::GetDesktopThumbnail(const DesktopId& id,
+uint8* X11WindowPicker::GetDesktopThumbnail(const DesktopId& id,
int width,
int height) {
return enumerator_->GetDesktopThumbnail(id, width, height);
}
-bool LinuxWindowPicker::GetDesktopDimensions(const DesktopId& id, int* width,
+bool X11WindowPicker::GetDesktopDimensions(const DesktopId& id, int* width,
int* height) {
return enumerator_->GetDesktopDimensions(id, width, height);
}
diff --git a/base/linuxwindowpicker.h b/base/x11windowpicker.h
similarity index 94%
rename from base/linuxwindowpicker.h
rename to base/x11windowpicker.h
index f87b150..26c7054 100644
--- a/base/linuxwindowpicker.h
+++ b/base/x11windowpicker.h
@@ -23,10 +23,10 @@
class XWindowEnumerator;
-class LinuxWindowPicker : public WindowPicker {
+class X11WindowPicker : public WindowPicker {
public:
- LinuxWindowPicker();
- ~LinuxWindowPicker();
+ X11WindowPicker();
+ ~X11WindowPicker();
static bool IsDesktopElement(_XDisplay* display, Window window);
diff --git a/base/linuxwindowpicker_unittest.cc b/base/x11windowpicker_unittest.cc
similarity index 82%
rename from base/linuxwindowpicker_unittest.cc
rename to base/x11windowpicker_unittest.cc
index c2276cc..482ac89 100644
--- a/base/linuxwindowpicker_unittest.cc
+++ b/base/x11windowpicker_unittest.cc
@@ -9,7 +9,7 @@
*/
#include "webrtc/base/gunit.h"
-#include "webrtc/base/linuxwindowpicker.h"
+#include "webrtc/base/x11windowpicker.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/testutils.h"
#include "webrtc/base/windowpicker.h"
@@ -20,17 +20,17 @@
namespace rtc {
-TEST(LinuxWindowPickerTest, TestGetWindowList) {
+TEST(X11WindowPickerTest, TestGetWindowList) {
MAYBE_SKIP_SCREENCAST_TEST();
- LinuxWindowPicker window_picker;
+ X11WindowPicker window_picker;
WindowDescriptionList descriptions;
window_picker.Init();
window_picker.GetWindowList(&descriptions);
}
-TEST(LinuxWindowPickerTest, TestGetDesktopList) {
+TEST(X11WindowPickerTest, TestGetDesktopList) {
MAYBE_SKIP_SCREENCAST_TEST();
- LinuxWindowPicker window_picker;
+ X11WindowPicker window_picker;
DesktopDescriptionList descriptions;
EXPECT_TRUE(window_picker.Init());
EXPECT_TRUE(window_picker.GetDesktopList(&descriptions));
diff --git a/build/OWNERS b/build/OWNERS
index 2978427..aa0f5b4 100644
--- a/build/OWNERS
+++ b/build/OWNERS
@@ -1,7 +1,6 @@
-fischman@webrtc.org
-kjellander@webrtc.org
-wu@webrtc.org
-
+kjellander@webrtc.org
+
+per-file tsan_suppressions.cc=*
# These are for the common case of adding or renaming files. If you're doing
# structural changes, please get a review from a reviewer in this file.
diff --git a/build/apk_tests.gyp b/build/apk_tests.gyp
index 0185975..eed0799 100644
--- a/build/apk_tests.gyp
+++ b/build/apk_tests.gyp
@@ -29,7 +29,7 @@
'<(webrtc_root)/modules/modules.gyp:audio_decoder_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -43,7 +43,7 @@
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -57,7 +57,7 @@
'<(webrtc_root)/common_video/common_video_unittests.gyp:common_video_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -71,7 +71,7 @@
'<(webrtc_root)/modules/modules.gyp:modules_tests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -85,7 +85,7 @@
'<(webrtc_root)/modules/modules.gyp:modules_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -99,7 +99,7 @@
'<(webrtc_root)/system_wrappers/source/system_wrappers_tests.gyp:system_wrappers_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -113,7 +113,7 @@
'<(webrtc_root)/test/test.gyp:test_support_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -127,7 +127,7 @@
'<(webrtc_root)/tools/tools.gyp:tools_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -141,7 +141,7 @@
'<(webrtc_root)/video_engine/video_engine.gyp:video_engine_core_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -155,7 +155,7 @@
'<(webrtc_root)/webrtc.gyp:video_engine_tests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -169,7 +169,7 @@
'<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine_unittests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -183,7 +183,7 @@
'<(webrtc_root)/webrtc.gyp:webrtc_perf_tests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -197,7 +197,7 @@
'<(webrtc_root)/modules/modules.gyp:audio_codec_speed_tests',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -212,7 +212,7 @@
'video_capture_java',
],
'includes': [
- '../../../build/apk_test.gypi',
+ '../../build/apk_test.gypi',
],
},
{
@@ -226,7 +226,7 @@
'java_in_dir': '<(webrtc_root)/modules/video_capture/android/java',
},
'includes': [
- '../../../build/java.gypi',
+ '../../build/java.gypi',
],
},
],
diff --git a/build/common.gypi b/build/common.gypi
index cbc398e..1536b66 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -23,13 +23,13 @@
['build_with_chromium==1', {
'build_with_libjingle': 1,
'webrtc_root%': '<(DEPTH)/third_party/webrtc',
- 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests.gyp',
+ 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp',
'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp',
'gen_core_neon_offsets_gyp%': '<(DEPTH)/third_party/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp',
}, {
'build_with_libjingle%': 0,
'webrtc_root%': '<(DEPTH)/webrtc',
- 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_test_noop.gyp',
+ 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp',
'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp',
'gen_core_neon_offsets_gyp%':'<(DEPTH)/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp',
}],
@@ -53,6 +53,7 @@
'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)',
'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
'include_opus%': '<(include_opus)',
+ 'rtc_relative_path%': 1,
'rbe_components_path%': '<(rbe_components_path)',
'external_libraries%': '0',
'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/',
@@ -107,11 +108,20 @@
# Define MIPS architecture variant, MIPS DSP variant and MIPS FPU
# This may be subject to change in accordance to Chromium's MIPS flags
- 'mips_arch_variant%': 'mips32r1',
'mips_dsp_rev%': 0,
'mips_fpu%' : 1,
'enable_android_opensl%': 1,
+ # Link-Time Optimizations
+ # Executes code generation at link-time instead of compile-time
+ # https://gcc.gnu.org/wiki/LinkTimeOptimization
+ 'use_lto%': 0,
+
+ # Defer ssl perference to that specified through sslconfig.h instead of
+ # choosing openssl or nss directly. In practice, this can be used to
+ # enable schannel on windows.
+ 'use_legacy_ssl_defaults%': 0,
+
'conditions': [
['build_with_chromium==1', {
# Exclude pulse audio on Chromium since its prerequisites don't require
@@ -121,11 +131,6 @@
# Exclude internal ADM since Chromium uses its own IO handling.
'include_internal_audio_device%': 0,
- # Exclude internal VCM in Chromium build.
- 'include_internal_video_capture%': 0,
-
- # Exclude internal video render module in Chromium build.
- 'include_internal_video_render%': 0,
}, { # Settings for the standalone (not-in-Chromium) build.
# TODO(andrew): For now, disable the Chrome plugins, which causes a
# flood of chromium-style warnings. Investigate enabling them:
@@ -134,8 +139,6 @@
'include_pulse_audio%': 1,
'include_internal_audio_device%': 1,
- 'include_internal_video_capture%': 1,
- 'include_internal_video_render%': 1,
}],
['build_with_libjingle==1', {
'include_tests%': 0,
@@ -177,6 +180,9 @@
'<!@(pkg-config --cflags dbus-glib-1)',
],
}],
+ ['rtc_relative_path==1', {
+ 'defines': ['EXPAT_RELATIVE_PATH',],
+ }],
['enable_video==1', {
'defines': ['WEBRTC_MODULE_UTILITY_VIDEO',],
}],
@@ -245,7 +251,7 @@
}],
],
}],
- ['target_arch=="mipsel"', {
+ ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
'defines': [
'MIPS32_LE',
],
@@ -262,7 +268,7 @@
'-msoft-float',
],
}],
- ['mips_arch_variant=="mips32r2"', {
+ ['mips_arch_variant=="r2"', {
'defines': [
'MIPS32_R2_LE',
],
diff --git a/build/download_vs_toolchain.py b/build/download_vs_toolchain.py
index 2462bdc..e69de29 100644
--- a/build/download_vs_toolchain.py
+++ b/build/download_vs_toolchain.py
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-# This script is used to run the vs_toolchain.py script to download the
-# Visual Studio toolchain. It's just a temporary measure while waiting for the
-# Chrome team to move find_depot_tools into src/build to get rid of these
-# workarounds (similar one in gyp_webrtc).
-
-import os
-import sys
-
-
-script_dir = os.path.dirname(os.path.realpath(__file__))
-checkout_root = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir))
-sys.path.insert(0, os.path.join(checkout_root, 'build'))
-sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
-
-
-import vs_toolchain
-
-
-if __name__ == '__main__':
- sys.exit(vs_toolchain.main())
diff --git a/build/gyp_webrtc b/build/gyp_webrtc
index 4d5ae79..edc6b36 100755
--- a/build/gyp_webrtc
+++ b/build/gyp_webrtc
@@ -20,7 +20,6 @@
checkout_root = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir))
sys.path.insert(0, os.path.join(checkout_root, 'build'))
-sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
import gyp_chromium
import gyp_helper
import vs_toolchain
@@ -28,6 +27,13 @@
sys.path.insert(0, os.path.join(checkout_root, 'tools', 'gyp', 'pylib'))
import gyp
+def GetSupplementalFiles():
+ """Returns a list of the supplemental files that are included in all GYP
+ sources."""
+ # Can't use the one in gyp_chromium since the directory location of the root
+ # is different.
+ return glob.glob(os.path.join(checkout_root, '*', 'supplement.gypi'))
+
if __name__ == '__main__':
args = sys.argv[1:]
@@ -52,7 +58,10 @@
# If we didn't get a file, assume 'all.gyp' in the root of the checkout.
if not gyp_file_specified:
- args.append(os.path.join(checkout_root, 'all.gyp'))
+ # Because of a bug in gyp, simply adding the abspath to all.gyp doesn't
+ # work, but chdir'ing and adding the relative path does. Spooky :/
+ os.chdir(checkout_root)
+ args.append('all.gyp')
# There shouldn't be a circular dependency relationship between .gyp files,
args.append('--no-circular-check')
@@ -68,7 +77,7 @@
# Enforce gyp syntax checking. This adds about 20% execution time.
args.append('--check')
- supplemental_includes = gyp_chromium.GetSupplementalFiles()
+ supplemental_includes = GetSupplementalFiles()
gn_vars_dict = gyp_chromium.GetGypVars(supplemental_includes)
# Automatically turn on crosscompile support for platforms that need it.
diff --git a/build/merge_libs.gyp b/build/merge_libs.gyp
index 4f8cdac..d661002 100644
--- a/build/merge_libs.gyp
+++ b/build/merge_libs.gyp
@@ -10,7 +10,6 @@
'includes': ['common.gypi',],
'variables': {
'merge_libs_dependencies': [
- '../webrtc.gyp:webrtc',
],
},
'targets': [
@@ -19,6 +18,9 @@
'type': 'executable',
'dependencies': [
'<@(merge_libs_dependencies)',
+ '../webrtc.gyp:webrtc',
+ '../sound/sound.gyp:rtc_sound',
+ '../libjingle/xmllite/xmllite.gyp:rtc_xmllite',
],
'sources': ['no_op.cc',],
},
diff --git a/build/merge_libs.py b/build/merge_libs.py
index 1e78c68..84904d6 100644
--- a/build/merge_libs.py
+++ b/build/merge_libs.py
@@ -16,6 +16,7 @@
import subprocess
import sys
+IGNORE_PATTERNS = ['do_not_use', 'protoc']
def FindFiles(path, pattern):
"""Finds files matching |pattern| under |path|.
@@ -35,9 +36,10 @@
files = []
for root, _, filenames in os.walk(path):
for filename in fnmatch.filter(filenames, pattern):
- if 'do_not_use' not in filename and 'protoc' not in filename:
- # We use the relative path here to avoid "argument list too long"
- # errors on Linux.
+ if filename not in IGNORE_PATTERNS:
+ # We use the relative path here to avoid "argument list too
+ # long" errors on Linux. Note: This doesn't always work, so
+ # we use the find command on Linux.
files.append(os.path.relpath(os.path.join(root, filename)))
return files
@@ -58,23 +60,28 @@
os.remove(output_lib)
if sys.platform.startswith('linux'):
- objects = FindFiles(search_path, '*.o')
- cmd = 'ar crs '
+ pattern = '*.o'
+ cmd = 'ar crs'
elif sys.platform == 'darwin':
- objects = FindFiles(search_path, '*.a')
+ pattern = '*.a'
cmd = 'libtool -static -v -o '
elif sys.platform == 'win32':
- objects = FindFiles(search_path, '*.lib')
+ pattern = '*.lib'
cmd = 'lib /OUT:'
else:
sys.stderr.write('Platform not supported: %r\n\n' % sys.platform)
return 1
- cmd += output_lib + ' ' + ' '.join(objects)
+ if sys.platform.startswith('linux'):
+ cmd = ' '.join(['find', search_path, '-name "' + pattern + '"' +
+ ' -and -not -name ' +
+ ' -and -not -name '.join(IGNORE_PATTERNS) +
+ ' -exec', cmd, output_lib, '{} +'])
+ else:
+ cmd = ' '.join([cmd + output_lib] + FindFiles(search_path, pattern))
print cmd
subprocess.check_call(cmd, shell=True)
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv))
-
diff --git a/build/merge_libs_voice.gyp b/build/merge_libs_voice.gyp
new file mode 100644
index 0000000..10e3059
--- /dev/null
+++ b/build/merge_libs_voice.gyp
@@ -0,0 +1,48 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': ['common.gypi',],
+ 'variables': {
+ 'merge_libs_dependencies': [
+ ],
+ },
+ 'targets': [
+ {
+ 'target_name': 'no_op_voice',
+ 'type': 'executable',
+ 'dependencies': [
+ '<@(merge_libs_dependencies)',
+ '../voice_engine/voice_engine.gyp:voice_engine'
+ ],
+ 'sources': ['no_op.cc',],
+ },
+ {
+ 'target_name': 'merged_lib_voice',
+ 'type': 'none',
+ 'dependencies': [
+ 'no_op_voice',
+ ],
+ 'actions': [
+ {
+ 'variables': {
+ 'output_lib_name': 'rtc_voice_merged',
+ 'output_lib': '<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(output_lib_name)<(STATIC_LIB_SUFFIX)',
+ },
+ 'action_name': 'merge_libs_voice',
+ 'inputs': ['<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)no_op_voice<(EXECUTABLE_SUFFIX)'],
+ 'outputs': ['<(output_lib)'],
+ 'action': ['python',
+ 'merge_libs.py',
+ '<(PRODUCT_DIR)',
+ '<(output_lib)',],
+ },
+ ],
+ },
+ ],
+}
diff --git a/build/tsan_suppressions_webrtc.cc b/build/tsan_suppressions_webrtc.cc
new file mode 100644
index 0000000..0ae74f1
--- /dev/null
+++ b/build/tsan_suppressions_webrtc.cc
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+// This file contains the WebRTC suppressions for ThreadSanitizer.
+// Please refer to
+// http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
+// for more info.
+
+#if defined(THREAD_SANITIZER)
+
+// Please make sure the code below declares a single string variable
+// kTSanDefaultSuppressions contains TSan suppressions delimited by newlines.
+// See http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
+// for the instructions on writing suppressions.
+char kTSanDefaultSuppressions[] =
+
+// WebRTC specific suppressions.
+
+// Split up suppressions covered previously by thread.cc and messagequeue.cc.
+"race:rtc::MessageQueue::Quit\n"
+"race:FileVideoCapturerTest::VideoCapturerListener::OnFrameCaptured\n"
+"race:vp8cx_remove_encoder_threads\n"
+
+// Usage of trace callback and trace level is racy in libjingle_media_unittests.
+// https://code.google.com/p/webrtc/issues/detail?id=3372
+"race:webrtc::TraceImpl::WriteToFile\n"
+"race:webrtc::VideoEngine::SetTraceFilter\n"
+"race:webrtc::VoiceEngine::SetTraceFilter\n"
+"race:webrtc::Trace::set_level_filter\n"
+"race:webrtc::GetStaticInstance<webrtc::TraceImpl>\n"
+
+// Audio processing
+// https://code.google.com/p/webrtc/issues/detail?id=2521 for details.
+"race:webrtc/modules/audio_processing/aec/aec_core.c\n"
+"race:webrtc/modules/audio_processing/aec/aec_rdft.c\n"
+
+// libjingle_p2p_unittest
+// https://code.google.com/p/webrtc/issues/detail?id=2079
+"race:webrtc/base/testclient.cc\n"
+"race:webrtc/base/virtualsocketserver.cc\n"
+"race:talk/p2p/base/stunserver_unittest.cc\n"
+
+// libjingle_unittest
+// https://code.google.com/p/webrtc/issues/detail?id=2080
+"race:webrtc/base/logging.cc\n"
+"race:webrtc/base/sharedexclusivelock_unittest.cc\n"
+"race:webrtc/base/signalthread_unittest.cc\n"
+
+// third_party/usrsctp
+// TODO(jiayl): https://code.google.com/p/webrtc/issues/detail?id=3492
+"race:user_sctp_timer_iterate\n"
+
+// Potential deadlocks detected after roll in r6516.
+// https://code.google.com/p/webrtc/issues/detail?id=3509
+"deadlock:cricket::WebRtcVideoChannel2::WebRtcVideoSendStream::InputFrame\n"
+"deadlock:cricket::WebRtcVideoChannel2::WebRtcVideoSendStream::SetCapturer\n"
+"deadlock:webrtc::ProcessThreadImpl::RegisterModule\n"
+"deadlock:webrtc::RTCPReceiver::SetSsrcs\n"
+"deadlock:webrtc::RTPSenderAudio::RegisterAudioPayload\n"
+"deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n"
+"deadlock:webrtc::vcm::VideoReceiver::RegisterPacketRequestCallback\n"
+"deadlock:webrtc::ViECaptureImpl::ConnectCaptureDevice\n"
+"deadlock:webrtc::ViEChannel::StartSend\n"
+"deadlock:webrtc::ViECodecImpl::GetSendSideDelay\n"
+"deadlock:webrtc::ViEEncoder::OnLocalSsrcChanged\n"
+"deadlock:webrtc::ViESender::RegisterSendTransport\n"
+
+// End of suppressions.
+; // Please keep this semicolon.
+
+#endif // THREAD_SANITIZER
diff --git a/build/webrtc.gni b/build/webrtc.gni
index e269a26..878b6ff 100644
--- a/build/webrtc.gni
+++ b/build/webrtc.gni
@@ -6,34 +6,49 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
+import("//build/config/arm.gni")
+
declare_args() {
# Assume Chromium build for now, since that's the priority case for getting GN
# up and running with WebRTC.
build_with_chromium = true
build_with_libjingle = true
- if (build_with_libjingle) {
- include_tests = false
- restrict_webrtc_logging = true
- } else {
- include_tests = true
- restrict_webrtc_logging = false
- }
+ # Disable this to avoid building the Opus audio codec.
+ rtc_include_opus = true
+
+ # Used to specify an external Jsoncpp include path when not compiling the
+ # library that comes with WebRTC (i.e. rtc_build_json == 0).
+ rtc_jsoncpp_root = "//third_party/jsoncpp/source/include"
+
+ # Used to specify an external OpenSSL include path when not compiling the
+ # library that comes with WebRTC (i.e. rtc_build_ssl == 0).
+ rtc_ssl_root = ""
# Adds video support to dependencies shared by voice and video engine.
# This should normally be enabled; the intended use is to disable only
# when building voice engine exclusively.
- enable_video = true
+ rtc_enable_video = true
# Selects fixed-point code where possible.
- prefer_fixed_point = false
+ rtc_prefer_fixed_point = false
- build_libjpeg = true
+ # Enable data logging. Produces text files with data logged within engines
+ # which can be easily parsed for offline processing.
+ rtc_enable_data_logging = false
+
# Enables the use of protocol buffers for debug recordings.
- enable_protobuf = true
+ rtc_enable_protobuf = true
+
+ # Disable these to not build components which can be externally provided.
+ rtc_build_json = true
+ rtc_build_libjpeg = true
+ rtc_build_libyuv = true
+ rtc_build_libvpx = true
+ rtc_build_ssl = true
# Disable by default.
- have_dbus_glib = false
+ rtc_have_dbus_glib = false
# Enable to use the Mozilla internal settings.
build_with_mozilla = false
@@ -44,14 +59,52 @@
mips_dsp_rev = 0
mips_fpu = true
- enable_android_opensl = true
+ rtc_enable_android_opensl = true
+
+ # Link-Time Optimizations.
+ # Executes code generation at link-time instead of compile-time.
+ # https://gcc.gnu.org/wiki/LinkTimeOptimization
+ rtc_use_lto = false
+
+ if (build_with_chromium) {
+ # Exclude pulse audio on Chromium since its prerequisites don't require
+ # pulse audio.
+ rtc_include_pulse_audio = false
+
+ # Exclude internal ADM since Chromium uses its own IO handling.
+ rtc_include_internal_audio_device = false
+
+ } else {
+ # Settings for the standalone (not-in-Chromium) build.
+
+ # TODO(andrew): For now, disable the Chrome plugins, which causes a
+ # flood of chromium-style warnings. Investigate enabling them:
+ # http://code.google.com/p/webrtc/issues/detail?id=163
+ clang_use_chrome_plugins = false
+
+ rtc_include_pulse_audio = true
+ rtc_include_internal_audio_device = true
+ }
+
+ if (build_with_libjingle) {
+ rtc_include_tests = false
+ rtc_restrict_logging = true
+ } else {
+ rtc_include_tests = true
+ rtc_restrict_logging = false
+ }
if (is_ios) {
- build_libjpeg = false
- enable_protobuf = false
+ rtc_build_libjpeg = false
+ rtc_enable_protobuf = false
}
if (cpu_arch == "arm") {
- prefer_fixed_point = true
+ rtc_prefer_fixed_point = true
}
+
+ # WebRTC builds ARM v7 Neon instruction set optimized code for both iOS and
+ # Android, which is why we currently cannot use the variables in
+ # //build/config/arm.gni (since it disables Neon for Android).
+ rtc_build_armv7_neon = (cpu_arch == "arm" && arm_version == 7)
}
diff --git a/call.h b/call.h
index 480d73e..bb1dca1 100644
--- a/call.h
+++ b/call.h
@@ -56,6 +56,10 @@
// etc.
class Call {
public:
+ enum NetworkState {
+ kNetworkUp,
+ kNetworkDown,
+ };
struct Config {
explicit Config(newapi::Transport* send_transport)
: webrtc_config(NULL),
@@ -86,17 +90,12 @@
static Call* Create(const Call::Config& config,
const webrtc::Config& webrtc_config);
- virtual VideoSendStream::Config GetDefaultSendConfig() = 0;
-
virtual VideoSendStream* CreateVideoSendStream(
const VideoSendStream::Config& config,
- const std::vector<VideoStream>& video_streams,
- const void* encoder_settings) = 0;
+ const VideoEncoderConfig& encoder_config) = 0;
virtual void DestroyVideoSendStream(VideoSendStream* send_stream) = 0;
- virtual VideoReceiveStream::Config GetDefaultReceiveConfig() = 0;
-
virtual VideoReceiveStream* CreateVideoReceiveStream(
const VideoReceiveStream::Config& config) = 0;
virtual void DestroyVideoReceiveStream(
@@ -115,6 +114,8 @@
// differ from the actual receive bitrate.
virtual uint32_t ReceiveBitrateEstimate() = 0;
+ virtual void SignalNetworkState(NetworkState state) = 0;
+
virtual ~Call() {}
};
} // namespace webrtc
diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn
new file mode 100644
index 0000000..036daa1
--- /dev/null
+++ b/common_audio/BUILD.gn
@@ -0,0 +1,215 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("//build/config/arm.gni")
+import("../build/webrtc.gni")
+
+config("common_audio_config") {
+ include_dirs = [
+ "resampler/include",
+ "signal_processing/include",
+ "vad/include",
+ ]
+}
+
+source_set("common_audio") {
+ sources = [
+ "audio_util.cc",
+ "fir_filter.cc",
+ "fir_filter.h",
+ "fir_filter_neon.h",
+ "fir_filter_sse.h",
+ "include/audio_util.h",
+ "resampler/include/push_resampler.h",
+ "resampler/include/resampler.h",
+ "resampler/push_resampler.cc",
+ "resampler/push_sinc_resampler.cc",
+ "resampler/push_sinc_resampler.h",
+ "resampler/resampler.cc",
+ "resampler/sinc_resampler.cc",
+ "resampler/sinc_resampler.h",
+ "signal_processing/include/real_fft.h",
+ "signal_processing/include/signal_processing_library.h",
+ "signal_processing/include/spl_inl.h",
+ "signal_processing/auto_corr_to_refl_coef.c",
+ "signal_processing/auto_correlation.c",
+ "signal_processing/complex_fft_tables.h",
+ "signal_processing/copy_set_operations.c",
+ "signal_processing/cross_correlation.c",
+ "signal_processing/division_operations.c",
+ "signal_processing/dot_product_with_scale.c",
+ "signal_processing/downsample_fast.c",
+ "signal_processing/energy.c",
+ "signal_processing/filter_ar.c",
+ "signal_processing/filter_ma_fast_q12.c",
+ "signal_processing/get_hanning_window.c",
+ "signal_processing/get_scaling_square.c",
+ "signal_processing/ilbc_specific_functions.c",
+ "signal_processing/levinson_durbin.c",
+ "signal_processing/lpc_to_refl_coef.c",
+ "signal_processing/min_max_operations.c",
+ "signal_processing/randomization_functions.c",
+ "signal_processing/refl_coef_to_lpc.c",
+ "signal_processing/real_fft.c",
+ "signal_processing/resample.c",
+ "signal_processing/resample_48khz.c",
+ "signal_processing/resample_by_2.c",
+ "signal_processing/resample_by_2_internal.c",
+ "signal_processing/resample_by_2_internal.h",
+ "signal_processing/resample_fractional.c",
+ "signal_processing/spl_init.c",
+ "signal_processing/spl_sqrt.c",
+ "signal_processing/spl_version.c",
+ "signal_processing/splitting_filter.c",
+ "signal_processing/sqrt_of_one_minus_x_squared.c",
+ "signal_processing/vector_scaling_operations.c",
+ "vad/include/webrtc_vad.h",
+ "vad/webrtc_vad.c",
+ "vad/vad_core.c",
+ "vad/vad_core.h",
+ "vad/vad_filterbank.c",
+ "vad/vad_filterbank.h",
+ "vad/vad_gmm.c",
+ "vad/vad_gmm.h",
+ "vad/vad_sp.c",
+ "vad/vad_sp.h",
+ "wav_header.cc",
+ "wav_header.h",
+ "wav_writer.cc",
+ "wav_writer.h",
+ ]
+
+ deps = [ "../system_wrappers" ]
+
+ if (cpu_arch == "arm") {
+ sources += [
+ "signal_processing/complex_bit_reverse_arm.S",
+ "signal_processing/spl_sqrt_floor_arm.S",
+ ]
+
+ if (arm_version == 7) {
+ deps += [ ":common_audio_neon" ]
+ sources += [ "signal_processing/filter_ar_fast_q12_armv7.S" ]
+ } else {
+ sources += [ "signal_processing/filter_ar_fast_q12.c" ]
+ }
+ }
+
+ if (cpu_arch == "mipsel") {
+ sources += [
+ "signal_processing/include/spl_inl_mips.h",
+ "signal_processing/complex_bit_reverse_mips.c",
+ "signal_processing/complex_fft_mips.c",
+ "signal_processing/cross_correlation_mips.c",
+ "signal_processing/downsample_fast_mips.c",
+ "signal_processing/filter_ar_fast_q12_mips.c",
+ "signal_processing/min_max_operations_mips.c",
+ "signal_processing/resample_by_2_mips.c",
+ "signal_processing/spl_sqrt_floor_mips.c",
+ ]
+ if (mips_dsp_rev > 0) {
+ sources += [ "signal_processing/vector_scaling_operations_mips.c" ]
+ }
+ } else {
+ sources += [
+ "signal_processing/complex_fft.c",
+ "signal_processing/filter_ar_fast_q12.c",
+ ]
+ }
+
+ if (cpu_arch != "arm" && cpu_arch != "mipsel") {
+ sources += [
+ "signal_processing/complex_bit_reverse.c",
+ "signal_processing/spl_sqrt_floor.c",
+ ]
+ }
+
+ if (is_win) {
+ cflags = [
+ "/wd4334", # Ignore warning on shift operator promotion.
+ ]
+ }
+
+ direct_dependent_configs = [
+ "..:common_inherited_config",
+ ":common_audio_config",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ if (cpu_arch == "x86" || cpu_arch == "x64") {
+ deps += [ ":common_audio_sse2" ]
+ }
+}
+
+if (cpu_arch == "x86" || cpu_arch == "x64") {
+ source_set("common_audio_sse2") {
+ sources = [
+ "fir_filter_sse.cc",
+ "resampler/sinc_resampler_sse.cc",
+ ]
+
+ cflags = [ "-msse2" ]
+
+ configs += [ "..:common_inherited_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+ }
+}
+
+if (rtc_build_armv7_neon) {
+ source_set("common_audio_neon") {
+ sources = [
+ "fir_filter_neon.cc",
+ "resampler/sinc_resampler_neon.cc",
+ "signal_processing/cross_correlation_neon.S",
+ "signal_processing/downsample_fast_neon.S",
+ "signal_processing/min_max_operations_neon.S",
+ "signal_processing/vector_scaling_operations_neon.S",
+ ]
+
+ configs += [
+ "..:common_config",
+ "..:common_inherited_config",
+ ]
+
+ # Enable compilation for the ARM v7 Neon instruction set. This is needed
+ # since //build/config/arm.gni only enables Neon for iOS, not Android.
+ # This provides the same functionality as webrtc/build/arm_neon.gypi.
+ # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
+ # //build/config/arm.gni instead, to reduce code duplication.
+ # Remove the -mfpu=vfpv3-d16 cflag.
+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+ cflags = [
+ "-flax-vector-conversions",
+ "-mfpu=neon",
+ ]
+
+ # Disable LTO in audio_processing_neon target due to compiler bug.
+ if (rtc_use_lto) {
+ cflags -= [
+ "-flto",
+ "-ffat-lto-objects",
+ ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+ }
+}
diff --git a/common_audio/OWNERS b/common_audio/OWNERS
index 83d774b..98ec472 100644
--- a/common_audio/OWNERS
+++ b/common_audio/OWNERS
@@ -9,3 +9,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/common_audio/audio_util.cc b/common_audio/audio_util.cc
index 0c961e1..f2936b0 100644
--- a/common_audio/audio_util.cc
+++ b/common_audio/audio_util.cc
@@ -14,18 +14,18 @@
namespace webrtc {
-void RoundToInt16(const float* src, int size, int16_t* dest) {
- for (int i = 0; i < size; ++i)
+void RoundToInt16(const float* src, size_t size, int16_t* dest) {
+ for (size_t i = 0; i < size; ++i)
dest[i] = RoundToInt16(src[i]);
}
-void ScaleAndRoundToInt16(const float* src, int size, int16_t* dest) {
- for (int i = 0; i < size; ++i)
+void ScaleAndRoundToInt16(const float* src, size_t size, int16_t* dest) {
+ for (size_t i = 0; i < size; ++i)
dest[i] = ScaleAndRoundToInt16(src[i]);
}
-void ScaleToFloat(const int16_t* src, int size, float* dest) {
- for (int i = 0; i < size; ++i)
+void ScaleToFloat(const int16_t* src, size_t size, float* dest) {
+ for (size_t i = 0; i < size; ++i)
dest[i] = ScaleToFloat(src[i]);
}
diff --git a/common_audio/common_audio.gyp b/common_audio/common_audio.gyp
index 3bed4e4..aaf06dc 100644
--- a/common_audio/common_audio.gyp
+++ b/common_audio/common_audio.gyp
@@ -92,6 +92,10 @@
'vad/vad_gmm.h',
'vad/vad_sp.c',
'vad/vad_sp.h',
+ 'wav_header.cc',
+ 'wav_header.h',
+ 'wav_writer.cc',
+ 'wav_writer.h',
],
'conditions': [
['target_arch=="ia32" or target_arch=="x64"', {
@@ -118,7 +122,7 @@
}],
], # conditions
}],
- ['target_arch=="mipsel"', {
+ ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
'sources': [
'signal_processing/include/spl_inl_mips.h',
'signal_processing/complex_bit_reverse_mips.c',
@@ -180,6 +184,15 @@
'signal_processing/min_max_operations_neon.S',
'signal_processing/vector_scaling_operations_neon.S',
],
+ 'conditions': [
+ # Disable LTO in common_audio_neon target due to compiler bug
+ ['use_lto==1', {
+ 'cflags!': [
+ '-flto',
+ '-ffat-lto-objects',
+ ],
+ }],
+ ],
},
], # targets
}],
@@ -211,11 +224,11 @@
'vad/vad_sp_unittest.cc',
'vad/vad_unittest.cc',
'vad/vad_unittest.h',
+ 'wav_header_unittest.cc',
+ 'wav_writer_unittest.cc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -224,9 +237,7 @@
},
], # targets
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'common_audio_unittests_apk_target',
diff --git a/common_audio/common_audio.target.darwin-arm.mk b/common_audio/common_audio.target.darwin-arm.mk
index df254da..a882dc7 100644
--- a/common_audio/common_audio.target.darwin-arm.mk
+++ b/common_audio/common_audio.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -66,6 +65,8 @@
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc \
third_party/webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S \
third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor_arm.S \
third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S
@@ -76,7 +77,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,13 +90,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -111,6 +111,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -118,7 +119,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -135,12 +135,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -181,23 +184,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,13 +215,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -239,7 +243,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -256,12 +259,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -303,68 +309,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.darwin-arm64.mk b/common_audio/common_audio.target.darwin-arm64.mk
index 70f3420..e43b96a 100644
--- a/common_audio/common_audio.target.darwin-arm64.mk
+++ b/common_audio/common_audio.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -68,14 +67,15 @@
third_party/webrtc/common_audio/vad/vad_core.c \
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
- third_party/webrtc/common_audio/vad/vad_sp.c
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -101,13 +101,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -124,12 +124,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -167,21 +170,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,7 +217,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -230,12 +233,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -274,59 +280,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.darwin-mips.mk b/common_audio/common_audio.target.darwin-mips.mk
index 2a476ae..a9dd674 100644
--- a/common_audio/common_audio.target.darwin-mips.mk
+++ b/common_audio/common_audio.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,6 +31,8 @@
third_party/webrtc/common_audio/resampler/sinc_resampler.cc \
third_party/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c \
third_party/webrtc/common_audio/signal_processing/auto_correlation.c \
+ third_party/webrtc/common_audio/signal_processing/complex_fft.c \
+ third_party/webrtc/common_audio/signal_processing/complex_bit_reverse.c \
third_party/webrtc/common_audio/signal_processing/copy_set_operations.c \
third_party/webrtc/common_audio/signal_processing/cross_correlation.c \
third_party/webrtc/common_audio/signal_processing/division_operations.c \
@@ -39,6 +40,7 @@
third_party/webrtc/common_audio/signal_processing/downsample_fast.c \
third_party/webrtc/common_audio/signal_processing/energy.c \
third_party/webrtc/common_audio/signal_processing/filter_ar.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c \
third_party/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c \
third_party/webrtc/common_audio/signal_processing/get_hanning_window.c \
third_party/webrtc/common_audio/signal_processing/get_scaling_square.c \
@@ -56,6 +58,7 @@
third_party/webrtc/common_audio/signal_processing/resample_fractional.c \
third_party/webrtc/common_audio/signal_processing/spl_init.c \
third_party/webrtc/common_audio/signal_processing/spl_sqrt.c \
+ third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor.c \
third_party/webrtc/common_audio/signal_processing/spl_version.c \
third_party/webrtc/common_audio/signal_processing/splitting_filter.c \
third_party/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c \
@@ -65,14 +68,8 @@
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
third_party/webrtc/common_audio/vad/vad_sp.c \
- third_party/webrtc/common_audio/signal_processing/complex_bit_reverse_mips.c \
- third_party/webrtc/common_audio/signal_processing/complex_fft_mips.c \
- third_party/webrtc/common_audio/signal_processing/cross_correlation_mips.c \
- third_party/webrtc/common_audio/signal_processing/downsample_fast_mips.c \
- third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12_mips.c \
- third_party/webrtc/common_audio/signal_processing/min_max_operations_mips.c \
- third_party/webrtc/common_audio/signal_processing/resample_by_2_mips.c \
- third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor_mips.c
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
@@ -80,7 +77,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,13 +85,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -110,6 +103,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -117,7 +111,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -134,17 +127,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -179,23 +173,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,13 +199,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -232,7 +224,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -249,17 +240,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -295,64 +287,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.darwin-mips64.mk b/common_audio/common_audio.target.darwin-mips64.mk
new file mode 100644
index 0000000..a9dd674
--- /dev/null
+++ b/common_audio/common_audio.target.darwin-mips64.mk
@@ -0,0 +1,321 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/common_audio/audio_util.cc \
+ third_party/webrtc/common_audio/fir_filter.cc \
+ third_party/webrtc/common_audio/resampler/push_resampler.cc \
+ third_party/webrtc/common_audio/resampler/push_sinc_resampler.cc \
+ third_party/webrtc/common_audio/resampler/resampler.cc \
+ third_party/webrtc/common_audio/resampler/sinc_resampler.cc \
+ third_party/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c \
+ third_party/webrtc/common_audio/signal_processing/auto_correlation.c \
+ third_party/webrtc/common_audio/signal_processing/complex_fft.c \
+ third_party/webrtc/common_audio/signal_processing/complex_bit_reverse.c \
+ third_party/webrtc/common_audio/signal_processing/copy_set_operations.c \
+ third_party/webrtc/common_audio/signal_processing/cross_correlation.c \
+ third_party/webrtc/common_audio/signal_processing/division_operations.c \
+ third_party/webrtc/common_audio/signal_processing/dot_product_with_scale.c \
+ third_party/webrtc/common_audio/signal_processing/downsample_fast.c \
+ third_party/webrtc/common_audio/signal_processing/energy.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ar.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c \
+ third_party/webrtc/common_audio/signal_processing/get_hanning_window.c \
+ third_party/webrtc/common_audio/signal_processing/get_scaling_square.c \
+ third_party/webrtc/common_audio/signal_processing/ilbc_specific_functions.c \
+ third_party/webrtc/common_audio/signal_processing/levinson_durbin.c \
+ third_party/webrtc/common_audio/signal_processing/lpc_to_refl_coef.c \
+ third_party/webrtc/common_audio/signal_processing/min_max_operations.c \
+ third_party/webrtc/common_audio/signal_processing/randomization_functions.c \
+ third_party/webrtc/common_audio/signal_processing/refl_coef_to_lpc.c \
+ third_party/webrtc/common_audio/signal_processing/real_fft.c \
+ third_party/webrtc/common_audio/signal_processing/resample.c \
+ third_party/webrtc/common_audio/signal_processing/resample_48khz.c \
+ third_party/webrtc/common_audio/signal_processing/resample_by_2.c \
+ third_party/webrtc/common_audio/signal_processing/resample_by_2_internal.c \
+ third_party/webrtc/common_audio/signal_processing/resample_fractional.c \
+ third_party/webrtc/common_audio/signal_processing/spl_init.c \
+ third_party/webrtc/common_audio/signal_processing/spl_sqrt.c \
+ third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor.c \
+ third_party/webrtc/common_audio/signal_processing/spl_version.c \
+ third_party/webrtc/common_audio/signal_processing/splitting_filter.c \
+ third_party/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c \
+ third_party/webrtc/common_audio/signal_processing/vector_scaling_operations.c \
+ third_party/webrtc/common_audio/vad/webrtc_vad.c \
+ third_party/webrtc/common_audio/vad/vad_core.c \
+ third_party/webrtc/common_audio/vad/vad_filterbank.c \
+ third_party/webrtc/common_audio/vad/vad_gmm.c \
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_common_audio_common_audio_gyp
+
+# Alias gyp target name.
+.PHONY: common_audio
+common_audio: third_party_webrtc_common_audio_common_audio_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/common_audio/common_audio.target.darwin-x86.mk b/common_audio/common_audio.target.darwin-x86.mk
index 33dddb3..457310b 100644
--- a/common_audio/common_audio.target.darwin-x86.mk
+++ b/common_audio/common_audio.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -68,14 +67,15 @@
third_party/webrtc/common_audio/vad/vad_core.c \
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
- third_party/webrtc/common_audio/vad/vad_sp.c
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -106,6 +106,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,7 +114,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -130,12 +130,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -173,21 +176,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -225,7 +229,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +245,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -286,63 +292,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.darwin-x86_64.mk b/common_audio/common_audio.target.darwin-x86_64.mk
index 0ad08ce..08955b6 100644
--- a/common_audio/common_audio.target.darwin-x86_64.mk
+++ b/common_audio/common_audio.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -68,7 +67,9 @@
third_party/webrtc/common_audio/vad/vad_core.c \
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
- third_party/webrtc/common_audio/vad/vad_sp.c
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
@@ -76,7 +77,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -105,6 +105,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,7 +113,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -129,12 +129,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -172,22 +175,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -223,7 +227,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -240,12 +243,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -284,63 +290,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.linux-arm.mk b/common_audio/common_audio.target.linux-arm.mk
index df254da..a882dc7 100644
--- a/common_audio/common_audio.target.linux-arm.mk
+++ b/common_audio/common_audio.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -66,6 +65,8 @@
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc \
third_party/webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S \
third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor_arm.S \
third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S
@@ -76,7 +77,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,13 +90,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -111,6 +111,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -118,7 +119,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -135,12 +135,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -181,23 +184,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,13 +215,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -239,7 +243,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -256,12 +259,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -303,68 +309,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.linux-arm64.mk b/common_audio/common_audio.target.linux-arm64.mk
index 70f3420..e43b96a 100644
--- a/common_audio/common_audio.target.linux-arm64.mk
+++ b/common_audio/common_audio.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -68,14 +67,15 @@
third_party/webrtc/common_audio/vad/vad_core.c \
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
- third_party/webrtc/common_audio/vad/vad_sp.c
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -101,13 +101,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -124,12 +124,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -167,21 +170,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,7 +217,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -230,12 +233,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -274,59 +280,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.linux-mips.mk b/common_audio/common_audio.target.linux-mips.mk
index 2a476ae..a9dd674 100644
--- a/common_audio/common_audio.target.linux-mips.mk
+++ b/common_audio/common_audio.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,6 +31,8 @@
third_party/webrtc/common_audio/resampler/sinc_resampler.cc \
third_party/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c \
third_party/webrtc/common_audio/signal_processing/auto_correlation.c \
+ third_party/webrtc/common_audio/signal_processing/complex_fft.c \
+ third_party/webrtc/common_audio/signal_processing/complex_bit_reverse.c \
third_party/webrtc/common_audio/signal_processing/copy_set_operations.c \
third_party/webrtc/common_audio/signal_processing/cross_correlation.c \
third_party/webrtc/common_audio/signal_processing/division_operations.c \
@@ -39,6 +40,7 @@
third_party/webrtc/common_audio/signal_processing/downsample_fast.c \
third_party/webrtc/common_audio/signal_processing/energy.c \
third_party/webrtc/common_audio/signal_processing/filter_ar.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c \
third_party/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c \
third_party/webrtc/common_audio/signal_processing/get_hanning_window.c \
third_party/webrtc/common_audio/signal_processing/get_scaling_square.c \
@@ -56,6 +58,7 @@
third_party/webrtc/common_audio/signal_processing/resample_fractional.c \
third_party/webrtc/common_audio/signal_processing/spl_init.c \
third_party/webrtc/common_audio/signal_processing/spl_sqrt.c \
+ third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor.c \
third_party/webrtc/common_audio/signal_processing/spl_version.c \
third_party/webrtc/common_audio/signal_processing/splitting_filter.c \
third_party/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c \
@@ -65,14 +68,8 @@
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
third_party/webrtc/common_audio/vad/vad_sp.c \
- third_party/webrtc/common_audio/signal_processing/complex_bit_reverse_mips.c \
- third_party/webrtc/common_audio/signal_processing/complex_fft_mips.c \
- third_party/webrtc/common_audio/signal_processing/cross_correlation_mips.c \
- third_party/webrtc/common_audio/signal_processing/downsample_fast_mips.c \
- third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12_mips.c \
- third_party/webrtc/common_audio/signal_processing/min_max_operations_mips.c \
- third_party/webrtc/common_audio/signal_processing/resample_by_2_mips.c \
- third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor_mips.c
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
@@ -80,7 +77,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,13 +85,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -110,6 +103,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -117,7 +111,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -134,17 +127,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -179,23 +173,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,13 +199,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -232,7 +224,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -249,17 +240,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -295,64 +287,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.linux-mips64.mk b/common_audio/common_audio.target.linux-mips64.mk
new file mode 100644
index 0000000..a9dd674
--- /dev/null
+++ b/common_audio/common_audio.target.linux-mips64.mk
@@ -0,0 +1,321 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/common_audio/audio_util.cc \
+ third_party/webrtc/common_audio/fir_filter.cc \
+ third_party/webrtc/common_audio/resampler/push_resampler.cc \
+ third_party/webrtc/common_audio/resampler/push_sinc_resampler.cc \
+ third_party/webrtc/common_audio/resampler/resampler.cc \
+ third_party/webrtc/common_audio/resampler/sinc_resampler.cc \
+ third_party/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c \
+ third_party/webrtc/common_audio/signal_processing/auto_correlation.c \
+ third_party/webrtc/common_audio/signal_processing/complex_fft.c \
+ third_party/webrtc/common_audio/signal_processing/complex_bit_reverse.c \
+ third_party/webrtc/common_audio/signal_processing/copy_set_operations.c \
+ third_party/webrtc/common_audio/signal_processing/cross_correlation.c \
+ third_party/webrtc/common_audio/signal_processing/division_operations.c \
+ third_party/webrtc/common_audio/signal_processing/dot_product_with_scale.c \
+ third_party/webrtc/common_audio/signal_processing/downsample_fast.c \
+ third_party/webrtc/common_audio/signal_processing/energy.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ar.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c \
+ third_party/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c \
+ third_party/webrtc/common_audio/signal_processing/get_hanning_window.c \
+ third_party/webrtc/common_audio/signal_processing/get_scaling_square.c \
+ third_party/webrtc/common_audio/signal_processing/ilbc_specific_functions.c \
+ third_party/webrtc/common_audio/signal_processing/levinson_durbin.c \
+ third_party/webrtc/common_audio/signal_processing/lpc_to_refl_coef.c \
+ third_party/webrtc/common_audio/signal_processing/min_max_operations.c \
+ third_party/webrtc/common_audio/signal_processing/randomization_functions.c \
+ third_party/webrtc/common_audio/signal_processing/refl_coef_to_lpc.c \
+ third_party/webrtc/common_audio/signal_processing/real_fft.c \
+ third_party/webrtc/common_audio/signal_processing/resample.c \
+ third_party/webrtc/common_audio/signal_processing/resample_48khz.c \
+ third_party/webrtc/common_audio/signal_processing/resample_by_2.c \
+ third_party/webrtc/common_audio/signal_processing/resample_by_2_internal.c \
+ third_party/webrtc/common_audio/signal_processing/resample_fractional.c \
+ third_party/webrtc/common_audio/signal_processing/spl_init.c \
+ third_party/webrtc/common_audio/signal_processing/spl_sqrt.c \
+ third_party/webrtc/common_audio/signal_processing/spl_sqrt_floor.c \
+ third_party/webrtc/common_audio/signal_processing/spl_version.c \
+ third_party/webrtc/common_audio/signal_processing/splitting_filter.c \
+ third_party/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c \
+ third_party/webrtc/common_audio/signal_processing/vector_scaling_operations.c \
+ third_party/webrtc/common_audio/vad/webrtc_vad.c \
+ third_party/webrtc/common_audio/vad/vad_core.c \
+ third_party/webrtc/common_audio/vad/vad_filterbank.c \
+ third_party/webrtc/common_audio/vad/vad_gmm.c \
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_common_audio_common_audio_gyp
+
+# Alias gyp target name.
+.PHONY: common_audio
+common_audio: third_party_webrtc_common_audio_common_audio_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/common_audio/common_audio.target.linux-x86.mk b/common_audio/common_audio.target.linux-x86.mk
index 33dddb3..457310b 100644
--- a/common_audio/common_audio.target.linux-x86.mk
+++ b/common_audio/common_audio.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -68,14 +67,15 @@
third_party/webrtc/common_audio/vad/vad_core.c \
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
- third_party/webrtc/common_audio/vad/vad_sp.c
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -106,6 +106,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,7 +114,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -130,12 +130,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -173,21 +176,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -225,7 +229,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +245,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -286,63 +292,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio.target.linux-x86_64.mk b/common_audio/common_audio.target.linux-x86_64.mk
index 0ad08ce..08955b6 100644
--- a/common_audio/common_audio.target.linux-x86_64.mk
+++ b/common_audio/common_audio.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -68,7 +67,9 @@
third_party/webrtc/common_audio/vad/vad_core.c \
third_party/webrtc/common_audio/vad/vad_filterbank.c \
third_party/webrtc/common_audio/vad/vad_gmm.c \
- third_party/webrtc/common_audio/vad/vad_sp.c
+ third_party/webrtc/common_audio/vad/vad_sp.c \
+ third_party/webrtc/common_audio/wav_header.cc \
+ third_party/webrtc/common_audio/wav_writer.cc
# Flags passed to both C and C++ files.
@@ -76,7 +77,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -105,6 +105,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,7 +113,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -129,12 +129,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -172,22 +175,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -223,7 +227,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -240,12 +243,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -284,63 +290,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio_neon.target.darwin-arm.mk b/common_audio/common_audio_neon.target.darwin-arm.mk
index 2bda86c..d16d413 100644
--- a/common_audio/common_audio_neon.target.darwin-arm.mk
+++ b/common_audio/common_audio_neon.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_neon_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -74,6 +72,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -141,23 +142,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -262,68 +266,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio_neon.target.linux-arm.mk b/common_audio/common_audio_neon.target.linux-arm.mk
index 2bda86c..d16d413 100644
--- a/common_audio/common_audio_neon.target.linux-arm.mk
+++ b/common_audio/common_audio_neon.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_neon_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -74,6 +72,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -141,23 +142,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -262,68 +266,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio_sse2.target.darwin-x86.mk b/common_audio/common_audio_sse2.target.darwin-x86.mk
index 7bb13a3..cbb6f0b 100644
--- a/common_audio/common_audio_sse2.target.darwin-x86.mk
+++ b/common_audio/common_audio_sse2.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -181,7 +183,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -198,12 +199,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -239,63 +243,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio_sse2.target.darwin-x86_64.mk b/common_audio/common_audio_sse2.target.darwin-x86_64.mk
index a406155..2dc2301 100644
--- a/common_audio/common_audio_sse2.target.darwin-x86_64.mk
+++ b/common_audio/common_audio_sse2.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,22 +128,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -196,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -237,63 +241,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio_sse2.target.linux-x86.mk b/common_audio/common_audio_sse2.target.linux-x86.mk
index 7bb13a3..cbb6f0b 100644
--- a/common_audio/common_audio_sse2.target.linux-x86.mk
+++ b/common_audio/common_audio_sse2.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -181,7 +183,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -198,12 +199,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -239,63 +243,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/common_audio_sse2.target.linux-x86_64.mk b/common_audio/common_audio_sse2.target.linux-x86_64.mk
index a406155..2dc2301 100644
--- a/common_audio/common_audio_sse2.target.linux-x86_64.mk
+++ b/common_audio/common_audio_sse2.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_audio_common_audio_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,22 +128,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -196,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -237,63 +241,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_audio/fir_filter.cc b/common_audio/fir_filter.cc
index a5411b8..a5160fd 100644
--- a/common_audio/fir_filter.cc
+++ b/common_audio/fir_filter.cc
@@ -85,7 +85,7 @@
for (size_t i = 0; i < coefficients_length_; ++i) {
coefficients_[i] = coefficients[coefficients_length_ - i - 1];
}
- memset(state_.get(), 0.f, state_length_ * sizeof(state_[0]));
+ memset(state_.get(), 0, state_length_ * sizeof(state_[0]));
}
void FIRFilterC::Filter(const float* in, size_t length, float* out) {
diff --git a/common_audio/fir_filter_sse.cc b/common_audio/fir_filter_sse.cc
index 7d873a7..6e7ae70 100644
--- a/common_audio/fir_filter_sse.cc
+++ b/common_audio/fir_filter_sse.cc
@@ -31,14 +31,14 @@
16))) {
// Add zeros at the end of the coefficients.
size_t padding = coefficients_length_ - coefficients_length;
- memset(coefficients_.get(), 0.f, padding * sizeof(coefficients_[0]));
+ memset(coefficients_.get(), 0, padding * sizeof(coefficients_[0]));
// The coefficients are reversed to compensate for the order in which the
// input samples are acquired (most recent last).
for (size_t i = 0; i < coefficients_length; ++i) {
coefficients_[i + padding] = coefficients[coefficients_length - i - 1];
}
memset(state_.get(),
- 0.f,
+ 0,
(max_input_length + state_length_) * sizeof(state_[0]));
}
diff --git a/common_audio/include/audio_util.h b/common_audio/include/audio_util.h
index 18fdbe2..0ce034b 100644
--- a/common_audio/include/audio_util.h
+++ b/common_audio/include/audio_util.h
@@ -47,14 +47,14 @@
}
// Round |size| elements of |src| to int16 with clamping and write to |dest|.
-void RoundToInt16(const float* src, int size, int16_t* dest);
+void RoundToInt16(const float* src, size_t size, int16_t* dest);
// Scale (from [-1, 1]) and round |size| elements of |src| to full-range int16
// with clamping and write to |dest|.
-void ScaleAndRoundToInt16(const float* src, int size, int16_t* dest);
+void ScaleAndRoundToInt16(const float* src, size_t size, int16_t* dest);
// Scale |size| elements of |src| to float [-1, 1] and write to |dest|.
-void ScaleToFloat(const int16_t* src, int size, float* dest);
+void ScaleToFloat(const int16_t* src, size_t size, float* dest);
// Deinterleave audio from |interleaved| to the channel buffers pointed to
// by |deinterleaved|. There must be sufficient space allocated in the
@@ -62,7 +62,7 @@
// per buffer).
template <typename T>
void Deinterleave(const T* interleaved, int samples_per_channel,
- int num_channels, T** deinterleaved) {
+ int num_channels, T* const* deinterleaved) {
for (int i = 0; i < num_channels; ++i) {
T* channel = deinterleaved[i];
int interleaved_idx = i;
diff --git a/common_audio/resampler/Android.mk b/common_audio/resampler/Android.mk
deleted file mode 100644
index b1d630a..0000000
--- a/common_audio/resampler/Android.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_resampler
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := resampler.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../signal_processing/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
-LOCAL_LDLIBS += -ldl -lpthread
-endif
-
-ifneq ($(TARGET_SIMULATOR),true)
-LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/common_audio/resampler/sinc_resampler.cc b/common_audio/resampler/sinc_resampler.cc
index 84f8125..165cb35 100644
--- a/common_audio/resampler/sinc_resampler.cc
+++ b/common_audio/resampler/sinc_resampler.cc
@@ -222,23 +222,22 @@
for (int i = 0; i < kKernelSize; ++i) {
const int idx = i + offset_idx * kKernelSize;
- const float pre_sinc = M_PI * (i - kKernelSize / 2 - subsample_offset);
+ const float pre_sinc =
+ static_cast<float>(M_PI * (i - kKernelSize / 2 - subsample_offset));
kernel_pre_sinc_storage_[idx] = pre_sinc;
// Compute Blackman window, matching the offset of the sinc().
const float x = (i - subsample_offset) / kKernelSize;
- const float window = kA0 - kA1 * cos(2.0 * M_PI * x) + kA2
- * cos(4.0 * M_PI * x);
+ const float window = static_cast<float>(kA0 - kA1 * cos(2.0 * M_PI * x) +
+ kA2 * cos(4.0 * M_PI * x));
kernel_window_storage_[idx] = window;
// Compute the sinc with offset, then window the sinc() function and store
// at the correct offset.
- if (pre_sinc == 0) {
- kernel_storage_[idx] = sinc_scale_factor * window;
- } else {
- kernel_storage_[idx] =
- window * sin(sinc_scale_factor * pre_sinc) / pre_sinc;
- }
+ kernel_storage_[idx] = static_cast<float>(window *
+ ((pre_sinc == 0) ?
+ sinc_scale_factor :
+ (sin(sinc_scale_factor * pre_sinc) / pre_sinc)));
}
}
}
@@ -260,12 +259,10 @@
const float window = kernel_window_storage_[idx];
const float pre_sinc = kernel_pre_sinc_storage_[idx];
- if (pre_sinc == 0) {
- kernel_storage_[idx] = sinc_scale_factor * window;
- } else {
- kernel_storage_[idx] =
- window * sin(sinc_scale_factor * pre_sinc) / pre_sinc;
- }
+ kernel_storage_[idx] = static_cast<float>(window *
+ ((pre_sinc == 0) ?
+ sinc_scale_factor :
+ (sin(sinc_scale_factor * pre_sinc) / pre_sinc)));
}
}
}
@@ -289,18 +286,19 @@
//
// Note: The loop construct here can severely impact performance on ARM
// or when built with clang. See https://codereview.chromium.org/18566009/
- for (int i = ceil((block_size_ - virtual_source_idx_) / current_io_ratio);
+ for (int i = static_cast<int>(
+ ceil((block_size_ - virtual_source_idx_) / current_io_ratio));
i > 0; --i) {
assert(virtual_source_idx_ < block_size_);
// |virtual_source_idx_| lies in between two kernel offsets so figure out
// what they are.
- const int source_idx = virtual_source_idx_;
+ const int source_idx = static_cast<int>(virtual_source_idx_);
const double subsample_remainder = virtual_source_idx_ - source_idx;
const double virtual_offset_idx =
subsample_remainder * kKernelOffsetCount;
- const int offset_idx = virtual_offset_idx;
+ const int offset_idx = static_cast<int>(virtual_offset_idx);
// We'll compute "convolutions" for the two kernels which straddle
// |virtual_source_idx_|.
@@ -347,7 +345,7 @@
#undef CONVOLVE_FUNC
int SincResampler::ChunkSize() const {
- return block_size_ / io_sample_rate_ratio_;
+ return static_cast<int>(block_size_ / io_sample_rate_ratio_);
}
void SincResampler::Flush() {
@@ -373,8 +371,8 @@
}
// Linearly interpolate the two "convolutions".
- return (1.0 - kernel_interpolation_factor) * sum1
- + kernel_interpolation_factor * sum2;
+ return static_cast<float>((1.0 - kernel_interpolation_factor) * sum1 +
+ kernel_interpolation_factor * sum2);
}
} // namespace webrtc
diff --git a/common_audio/resampler/sinc_resampler_sse.cc b/common_audio/resampler/sinc_resampler_sse.cc
index bdbe7b1..e00e0e5 100644
--- a/common_audio/resampler/sinc_resampler_sse.cc
+++ b/common_audio/resampler/sinc_resampler_sse.cc
@@ -41,8 +41,10 @@
}
// Linearly interpolate the two "convolutions".
- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1(1.0 - kernel_interpolation_factor));
- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1(kernel_interpolation_factor));
+ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1(
+ static_cast<float>(1.0 - kernel_interpolation_factor)));
+ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1(
+ static_cast<float>(kernel_interpolation_factor)));
m_sums1 = _mm_add_ps(m_sums1, m_sums2);
// Sum components together.
diff --git a/common_audio/signal_processing/Android.mk b/common_audio/signal_processing/Android.mk
deleted file mode 100644
index aed7e73..0000000
--- a/common_audio/signal_processing/Android.mk
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_spl
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- auto_corr_to_refl_coef.c \
- auto_correlation.c \
- complex_fft.c \
- copy_set_operations.c \
- cross_correlation.c \
- division_operations.c \
- dot_product_with_scale.c \
- downsample_fast.c \
- energy.c \
- filter_ar.c \
- filter_ma_fast_q12.c \
- get_hanning_window.c \
- get_scaling_square.c \
- ilbc_specific_functions.c \
- levinson_durbin.c \
- lpc_to_refl_coef.c \
- min_max_operations.c \
- randomization_functions.c \
- real_fft.c \
- refl_coef_to_lpc.c \
- resample.c \
- resample_48khz.c \
- resample_by_2.c \
- resample_by_2_internal.c \
- resample_fractional.c \
- spl_init.c \
- spl_sqrt.c \
- spl_version.c \
- splitting_filter.c \
- sqrt_of_one_minus_x_squared.c \
- vector_scaling_operations.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../.. \
- external/webrtc
-
-ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
-LOCAL_SRC_FILES += \
- filter_ar_fast_q12_armv7.S
-else
-LOCAL_SRC_FILES += \
- filter_ar_fast_q12.c
-endif
-
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_SRC_FILES += \
- complex_bit_reverse_arm.S \
- spl_sqrt_floor_arm.S
-else
-LOCAL_SRC_FILES += \
- complex_bit_reverse.c \
- spl_sqrt_floor.c
-endif
-
-LOCAL_SHARED_LIBRARIES := libstlport
-
-ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
-LOCAL_LDLIBS += -ldl -lpthread
-endif
-
-ifneq ($(TARGET_SIMULATOR),true)
-LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-#########################
-# Build the neon library.
-ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_spl_neon
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- cross_correlation_neon.S \
- downsample_fast_neon.S \
- min_max_operations_neon.S \
- vector_scaling_operations_neon.S
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- $(MY_ARM_CFLAGS_NEON)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../.. \
- external/webrtc
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
diff --git a/common_audio/signal_processing/auto_corr_to_refl_coef.c b/common_audio/signal_processing/auto_corr_to_refl_coef.c
index daffd93..f99dd62 100644
--- a/common_audio/signal_processing/auto_corr_to_refl_coef.c
+++ b/common_audio/signal_processing/auto_corr_to_refl_coef.c
@@ -88,15 +88,15 @@
pptr = P;
wptr = w1ptr;
tmp = (int16_t)(((int32_t)*p1ptr * (int32_t)*K + 16384) >> 15);
- *pptr = WEBRTC_SPL_ADD_SAT_W16( *pptr, tmp );
+ *pptr = WebRtcSpl_AddSatW16(*pptr, tmp);
pptr++;
for (i = 1; i <= use_order - n; i++)
{
tmp = (int16_t)(((int32_t)*wptr * (int32_t)*K + 16384) >> 15);
- *pptr = WEBRTC_SPL_ADD_SAT_W16( *(pptr+1), tmp );
+ *pptr = WebRtcSpl_AddSatW16(*(pptr + 1), tmp);
pptr++;
tmp = (int16_t)(((int32_t)*pptr * (int32_t)*K + 16384) >> 15);
- *wptr = WEBRTC_SPL_ADD_SAT_W16( *wptr, tmp );
+ *wptr = WebRtcSpl_AddSatW16(*wptr, tmp);
wptr++;
}
}
diff --git a/common_audio/signal_processing/copy_set_operations.c b/common_audio/signal_processing/copy_set_operations.c
index 0c2493b..84d3bc4 100644
--- a/common_audio/signal_processing/copy_set_operations.c
+++ b/common_audio/signal_processing/copy_set_operations.c
@@ -17,8 +17,6 @@
* WebRtcSpl_CopyFromEndW16()
* WebRtcSpl_ZerosArrayW16()
* WebRtcSpl_ZerosArrayW32()
- * WebRtcSpl_OnesArrayW16()
- * WebRtcSpl_OnesArrayW32()
*
* The description header can be found in signal_processing_library.h
*
@@ -62,47 +60,21 @@
}
}
-int16_t WebRtcSpl_CopyFromEndW16(const int16_t *vector_in,
- int16_t length,
- int16_t samples,
- int16_t *vector_out)
+void WebRtcSpl_CopyFromEndW16(const int16_t *vector_in,
+ int length,
+ int samples,
+ int16_t *vector_out)
{
// Copy the last <samples> of the input vector to vector_out
WEBRTC_SPL_MEMCPY_W16(vector_out, &vector_in[length - samples], samples);
-
- return samples;
}
-int16_t WebRtcSpl_ZerosArrayW16(int16_t *vector, int16_t length)
+void WebRtcSpl_ZerosArrayW16(int16_t *vector, int length)
{
WebRtcSpl_MemSetW16(vector, 0, length);
- return length;
}
-int16_t WebRtcSpl_ZerosArrayW32(int32_t *vector, int16_t length)
+void WebRtcSpl_ZerosArrayW32(int32_t *vector, int length)
{
WebRtcSpl_MemSetW32(vector, 0, length);
- return length;
-}
-
-int16_t WebRtcSpl_OnesArrayW16(int16_t *vector, int16_t length)
-{
- int16_t i;
- int16_t *tmpvec = vector;
- for (i = 0; i < length; i++)
- {
- *tmpvec++ = 1;
- }
- return length;
-}
-
-int16_t WebRtcSpl_OnesArrayW32(int32_t *vector, int16_t length)
-{
- int16_t i;
- int32_t *tmpvec = vector;
- for (i = 0; i < length; i++)
- {
- *tmpvec++ = 1;
- }
- return length;
}
diff --git a/common_audio/signal_processing/get_scaling_square.c b/common_audio/signal_processing/get_scaling_square.c
index 606902d..9b6049c 100644
--- a/common_audio/signal_processing/get_scaling_square.c
+++ b/common_audio/signal_processing/get_scaling_square.c
@@ -17,14 +17,16 @@
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-int WebRtcSpl_GetScalingSquare(int16_t *in_vector, int in_vector_length, int times)
+int16_t WebRtcSpl_GetScalingSquare(int16_t* in_vector,
+ int in_vector_length,
+ int times)
{
- int nbits = WebRtcSpl_GetSizeInBits(times);
+ int16_t nbits = WebRtcSpl_GetSizeInBits(times);
int i;
int16_t smax = -1;
int16_t sabs;
int16_t *sptr = in_vector;
- int t;
+ int16_t t;
int looptimes = in_vector_length;
for (i = looptimes; i > 0; i--)
diff --git a/common_audio/signal_processing/include/signal_processing_library.h b/common_audio/signal_processing/include/signal_processing_library.h
index 3a5d51c..21c5663 100644
--- a/common_audio/signal_processing/include/signal_processing_library.h
+++ b/common_audio/signal_processing/include/signal_processing_library.h
@@ -36,19 +36,6 @@
#define WEBRTC_SPL_ABS_W32(a) \
(((int32_t)a >= 0) ? ((int32_t)a) : -((int32_t)a))
-#ifdef WEBRTC_ARCH_LITTLE_ENDIAN
-#define WEBRTC_SPL_GET_BYTE(a, nr) (((int8_t *)a)[nr])
-#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \
- (((int8_t *)d_ptr)[index] = (val))
-#else
-#define WEBRTC_SPL_GET_BYTE(a, nr) \
- ((((int16_t *)a)[nr >> 1]) >> (((nr + 1) & 0x1) * 8) & 0x00ff)
-#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \
- ((int16_t *)d_ptr)[index >> 1] = \
- ((((int16_t *)d_ptr)[index >> 1]) \
- & (0x00ff << (8 * ((index) & 0x1)))) | (val << (8 * ((index + 1) & 0x1)))
-#endif
-
#define WEBRTC_SPL_MUL(a, b) \
((int32_t) ((int32_t)(a) * (int32_t)(b)))
#define WEBRTC_SPL_UMUL(a, b) \
@@ -57,14 +44,8 @@
((uint32_t) (uint16_t)(a) * (uint16_t)(b))
#define WEBRTC_SPL_UMUL_32_16(a, b) \
((uint32_t) ((uint32_t)(a) * (uint16_t)(b)))
-#define WEBRTC_SPL_UMUL_32_16_RSFT16(a, b) \
- ((uint32_t) ((uint32_t)(a) * (uint16_t)(b)) >> 16)
#define WEBRTC_SPL_MUL_16_U16(a, b) \
((int32_t)(int16_t)(a) * (uint16_t)(b))
-#define WEBRTC_SPL_DIV(a, b) \
- ((int32_t) ((int32_t)(a) / (int32_t)(b)))
-#define WEBRTC_SPL_UDIV(a, b) \
- ((uint32_t) ((uint32_t)(a) / (uint32_t)(b)))
#ifndef WEBRTC_ARCH_ARM_V7
// For ARMv7 platforms, these are inline functions in spl_inl_armv7.h
@@ -75,9 +56,6 @@
#define WEBRTC_SPL_MUL_16_32_RSFT16(a, b) \
(WEBRTC_SPL_MUL_16_16(a, b >> 16) \
+ ((WEBRTC_SPL_MUL_16_16(a, (b & 0xffff) >> 1) + 0x4000) >> 15))
-#define WEBRTC_SPL_MUL_32_32_RSFT32(a32a, a32b, b32) \
- ((int32_t)(WEBRTC_SPL_MUL_16_32_RSFT16(a32a, b32) \
- + (WEBRTC_SPL_MUL_16_32_RSFT16(a32b, b32) >> 16)))
#endif
#endif
@@ -102,17 +80,10 @@
#define WEBRTC_SPL_SCALEDIFF32(A, B, C) \
(C + (B >> 16) * A + (((uint32_t)(0x0000FFFF & B) * A) >> 16))
-#define WEBRTC_SPL_ADD_SAT_W32(a, b) WebRtcSpl_AddSatW32(a, b)
#define WEBRTC_SPL_SAT(a, b, c) (b > a ? a : b < c ? c : b)
-#define WEBRTC_SPL_MUL_32_16(a, b) ((a) * (b))
-
-#define WEBRTC_SPL_SUB_SAT_W32(a, b) WebRtcSpl_SubSatW32(a, b)
-#define WEBRTC_SPL_ADD_SAT_W16(a, b) WebRtcSpl_AddSatW16(a, b)
// Shifting with negative numbers allowed
// Positive means left shift
-#define WEBRTC_SPL_SHIFT_W16(x, c) \
- (((c) >= 0) ? ((x) << (c)) : ((x) >> (-(c))))
#define WEBRTC_SPL_SHIFT_W32(x, c) \
(((c) >= 0) ? ((x) << (c)) : ((x) >> (-(c))))
@@ -133,14 +104,9 @@
extern "C" {
#endif
-#define WEBRTC_SPL_MEMCPY_W8(v1, v2, length) \
- memcpy(v1, v2, (length) * sizeof(char))
#define WEBRTC_SPL_MEMCPY_W16(v1, v2, length) \
memcpy(v1, v2, (length) * sizeof(int16_t))
-#define WEBRTC_SPL_MEMMOVE_W16(v1, v2, length) \
- memmove(v1, v2, (length) * sizeof(int16_t))
-
// inline functions:
#include "webrtc/common_audio/signal_processing/include/spl_inl.h"
@@ -157,9 +123,9 @@
// Get SPL Version
int16_t WebRtcSpl_get_version(char* version, int16_t length_in_bytes);
-int WebRtcSpl_GetScalingSquare(int16_t* in_vector,
- int in_vector_length,
- int times);
+int16_t WebRtcSpl_GetScalingSquare(int16_t* in_vector,
+ int in_vector_length,
+ int times);
// Copy and set operations. Implementation in copy_set_operations.c.
// Descriptions at bottom of file.
@@ -172,18 +138,14 @@
void WebRtcSpl_MemCpyReversedOrder(int16_t* out_vector,
int16_t* in_vector,
int vector_length);
-int16_t WebRtcSpl_CopyFromEndW16(const int16_t* in_vector,
- int16_t in_vector_length,
- int16_t samples,
- int16_t* out_vector);
-int16_t WebRtcSpl_ZerosArrayW16(int16_t* vector,
- int16_t vector_length);
-int16_t WebRtcSpl_ZerosArrayW32(int32_t* vector,
- int16_t vector_length);
-int16_t WebRtcSpl_OnesArrayW16(int16_t* vector,
- int16_t vector_length);
-int16_t WebRtcSpl_OnesArrayW32(int32_t* vector,
- int16_t vector_length);
+void WebRtcSpl_CopyFromEndW16(const int16_t* in_vector,
+ int in_vector_length,
+ int samples,
+ int16_t* out_vector);
+void WebRtcSpl_ZerosArrayW16(int16_t* vector,
+ int vector_length);
+void WebRtcSpl_ZerosArrayW32(int32_t* vector,
+ int vector_length);
// End: Copy and set operations.
@@ -965,10 +927,10 @@
*
******************************************************************/
-void WebRtcSpl_DownsampleBy2(const int16_t* in, int16_t len,
+void WebRtcSpl_DownsampleBy2(const int16_t* in, int len,
int16_t* out, int32_t* filtState);
-void WebRtcSpl_UpsampleBy2(const int16_t* in, int16_t len,
+void WebRtcSpl_UpsampleBy2(const int16_t* in, int len,
int16_t* out, int32_t* filtState);
/************************************************************
@@ -1144,8 +1106,6 @@
// Output:
// - out_vector : Vector with the requested samples
//
-// Return value : Number of copied samples in |out_vector|
-//
//
// WebRtcSpl_ZerosArrayW16(...)
@@ -1160,24 +1120,6 @@
// Output:
// - vector : Vector containing all zeros
//
-// Return value : Number of samples in vector
-//
-
-//
-// WebRtcSpl_OnesArrayW16(...)
-// WebRtcSpl_OnesArrayW32(...)
-//
-// Inserts the value "one" in all positions of a w16 and a w32 vector
-// respectively.
-//
-// Input:
-// - vector_length : Number of samples in vector
-//
-// Output:
-// - vector : Vector containing all ones
-//
-// Return value : Number of samples in vector
-//
//
// WebRtcSpl_VectorBitShiftW16(...)
diff --git a/common_audio/signal_processing/include/spl_inl.h b/common_audio/signal_processing/include/spl_inl.h
index a4ddb3f..d3cc6de 100644
--- a/common_audio/signal_processing/include/spl_inl.h
+++ b/common_audio/signal_processing/include/spl_inl.h
@@ -35,106 +35,6 @@
return out16;
}
-static __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {
- return WebRtcSpl_SatW32ToW16((int32_t) a + (int32_t) b);
-}
-
-static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {
- return WebRtcSpl_SatW32ToW16((int32_t) var1 - (int32_t) var2);
-}
-#endif // #if !defined(MIPS_DSP_R1_LE)
-
-#if !defined(MIPS32_LE)
-static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
- int bits;
-
- if (0xFFFF0000 & n) {
- bits = 16;
- } else {
- bits = 0;
- }
- if (0x0000FF00 & (n >> bits)) bits += 8;
- if (0x000000F0 & (n >> bits)) bits += 4;
- if (0x0000000C & (n >> bits)) bits += 2;
- if (0x00000002 & (n >> bits)) bits += 1;
- if (0x00000001 & (n >> bits)) bits += 1;
-
- return bits;
-}
-
-static __inline int WebRtcSpl_NormW32(int32_t a) {
- int zeros;
-
- if (a == 0) {
- return 0;
- }
- else if (a < 0) {
- a = ~a;
- }
-
- if (!(0xFFFF8000 & a)) {
- zeros = 16;
- } else {
- zeros = 0;
- }
- if (!(0xFF800000 & (a << zeros))) zeros += 8;
- if (!(0xF8000000 & (a << zeros))) zeros += 4;
- if (!(0xE0000000 & (a << zeros))) zeros += 2;
- if (!(0xC0000000 & (a << zeros))) zeros += 1;
-
- return zeros;
-}
-
-static __inline int WebRtcSpl_NormU32(uint32_t a) {
- int zeros;
-
- if (a == 0) return 0;
-
- if (!(0xFFFF0000 & a)) {
- zeros = 16;
- } else {
- zeros = 0;
- }
- if (!(0xFF000000 & (a << zeros))) zeros += 8;
- if (!(0xF0000000 & (a << zeros))) zeros += 4;
- if (!(0xC0000000 & (a << zeros))) zeros += 2;
- if (!(0x80000000 & (a << zeros))) zeros += 1;
-
- return zeros;
-}
-
-static __inline int WebRtcSpl_NormW16(int16_t a) {
- int zeros;
-
- if (a == 0) {
- return 0;
- }
- else if (a < 0) {
- a = ~a;
- }
-
- if (!(0xFF80 & a)) {
- zeros = 8;
- } else {
- zeros = 0;
- }
- if (!(0xF800 & (a << zeros))) zeros += 4;
- if (!(0xE000 & (a << zeros))) zeros += 2;
- if (!(0xC000 & (a << zeros))) zeros += 1;
-
- return zeros;
-}
-
-static __inline int32_t WebRtc_MulAccumW16(int16_t a, int16_t b, int32_t c) {
- return (a * b + c);
-}
-#endif // #if !defined(MIPS32_LE)
-
-#endif // WEBRTC_ARCH_ARM_V7
-
-// The following functions have no optimized versions.
-// TODO(kma): Consider saturating add/sub instructions in X86 platform.
-#if !defined(MIPS_DSP_R1_LE)
static __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) {
int32_t l_sum;
@@ -172,6 +72,102 @@
return l_diff;
}
+
+static __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {
+ return WebRtcSpl_SatW32ToW16((int32_t) a + (int32_t) b);
+}
+
+static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {
+ return WebRtcSpl_SatW32ToW16((int32_t) var1 - (int32_t) var2);
+}
#endif // #if !defined(MIPS_DSP_R1_LE)
+#if !defined(MIPS32_LE)
+static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
+ int16_t bits;
+
+ if (0xFFFF0000 & n) {
+ bits = 16;
+ } else {
+ bits = 0;
+ }
+ if (0x0000FF00 & (n >> bits)) bits += 8;
+ if (0x000000F0 & (n >> bits)) bits += 4;
+ if (0x0000000C & (n >> bits)) bits += 2;
+ if (0x00000002 & (n >> bits)) bits += 1;
+ if (0x00000001 & (n >> bits)) bits += 1;
+
+ return bits;
+}
+
+static __inline int16_t WebRtcSpl_NormW32(int32_t a) {
+ int16_t zeros;
+
+ if (a == 0) {
+ return 0;
+ }
+ else if (a < 0) {
+ a = ~a;
+ }
+
+ if (!(0xFFFF8000 & a)) {
+ zeros = 16;
+ } else {
+ zeros = 0;
+ }
+ if (!(0xFF800000 & (a << zeros))) zeros += 8;
+ if (!(0xF8000000 & (a << zeros))) zeros += 4;
+ if (!(0xE0000000 & (a << zeros))) zeros += 2;
+ if (!(0xC0000000 & (a << zeros))) zeros += 1;
+
+ return zeros;
+}
+
+static __inline int16_t WebRtcSpl_NormU32(uint32_t a) {
+ int16_t zeros;
+
+ if (a == 0) return 0;
+
+ if (!(0xFFFF0000 & a)) {
+ zeros = 16;
+ } else {
+ zeros = 0;
+ }
+ if (!(0xFF000000 & (a << zeros))) zeros += 8;
+ if (!(0xF0000000 & (a << zeros))) zeros += 4;
+ if (!(0xC0000000 & (a << zeros))) zeros += 2;
+ if (!(0x80000000 & (a << zeros))) zeros += 1;
+
+ return zeros;
+}
+
+static __inline int16_t WebRtcSpl_NormW16(int16_t a) {
+ int16_t zeros;
+
+ if (a == 0) {
+ return 0;
+ }
+ else if (a < 0) {
+ a = ~a;
+ }
+
+ if (!(0xFF80 & a)) {
+ zeros = 8;
+ } else {
+ zeros = 0;
+ }
+ if (!(0xF800 & (a << zeros))) zeros += 4;
+ if (!(0xE000 & (a << zeros))) zeros += 2;
+ if (!(0xC000 & (a << zeros))) zeros += 1;
+
+ return zeros;
+}
+
+static __inline int32_t WebRtc_MulAccumW16(int16_t a, int16_t b, int32_t c) {
+ return (a * b + c);
+}
+#endif // #if !defined(MIPS32_LE)
+
+#endif // WEBRTC_ARCH_ARM_V7
+
#endif // WEBRTC_SPL_SPL_INL_H_
diff --git a/common_audio/signal_processing/include/spl_inl_armv7.h b/common_audio/signal_processing/include/spl_inl_armv7.h
index a437a55..0d10129 100644
--- a/common_audio/signal_processing/include/spl_inl_armv7.h
+++ b/common_audio/signal_processing/include/spl_inl_armv7.h
@@ -30,31 +30,6 @@
return tmp;
}
-/* This function produces result that is not bit exact with that by the generic
- * C version in some cases, although the former is at least as accurate as the
- * later.
- */
-static __inline int32_t WEBRTC_SPL_MUL_32_32_RSFT32(int16_t a,
- int16_t b,
- int32_t c) {
- int32_t tmp = 0;
- __asm __volatile (
- "pkhbt %[tmp], %[b], %[a], lsl #16\n\t"
- "smmulr %[tmp], %[tmp], %[c]\n\t"
- :[tmp]"+&r"(tmp)
- :[a]"r"(a),
- [b]"r"(b),
- [c]"r"(c)
- );
- return tmp;
-}
-
-static __inline int32_t WEBRTC_SPL_MUL_32_32_RSFT32BI(int32_t a, int32_t b) {
- int32_t tmp = 0;
- __asm volatile ("smmulr %0, %1, %2":"=r"(tmp):"r"(a), "r"(b));
- return tmp;
-}
-
static __inline int32_t WEBRTC_SPL_MUL_16_16(int16_t a, int16_t b) {
int32_t tmp = 0;
__asm __volatile ("smulbb %0, %1, %2":"=r"(tmp):"r"(a), "r"(b));
@@ -76,10 +51,6 @@
return (int16_t) s_sum;
}
-/* TODO(kma): find the cause of unittest errors by the next two functions:
- * http://code.google.com/p/webrtc/issues/detail?id=740.
- */
-#if 0
static __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) {
int32_t l_sum = 0;
@@ -95,7 +66,6 @@
return l_sub;
}
-#endif
static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {
int32_t s_sub = 0;
@@ -113,7 +83,7 @@
return (int16_t)(32 - tmp);
}
-static __inline int WebRtcSpl_NormW32(int32_t a) {
+static __inline int16_t WebRtcSpl_NormW32(int32_t a) {
int32_t tmp = 0;
if (a == 0) {
@@ -125,20 +95,20 @@
__asm __volatile ("clz %0, %1":"=r"(tmp):"r"(a));
- return tmp - 1;
+ return (int16_t)(tmp - 1);
}
-static __inline int WebRtcSpl_NormU32(uint32_t a) {
+static __inline int16_t WebRtcSpl_NormU32(uint32_t a) {
int tmp = 0;
if (a == 0) return 0;
__asm __volatile ("clz %0, %1":"=r"(tmp):"r"(a));
- return tmp;
+ return (int16_t)tmp;
}
-static __inline int WebRtcSpl_NormW16(int16_t a) {
+static __inline int16_t WebRtcSpl_NormW16(int16_t a) {
int32_t tmp = 0;
if (a == 0) {
@@ -150,7 +120,7 @@
__asm __volatile ("clz %0, %1":"=r"(tmp):"r"(a));
- return tmp - 17;
+ return (int16_t)(tmp - 17);
}
// TODO(kma): add unit test.
diff --git a/common_audio/signal_processing/include/spl_inl_mips.h b/common_audio/signal_processing/include/spl_inl_mips.h
index e173777..cd04bdd 100644
--- a/common_audio/signal_processing/include/spl_inl_mips.h
+++ b/common_audio/signal_processing/include/spl_inl_mips.h
@@ -66,62 +66,6 @@
return value32;
}
-static __inline int32_t WEBRTC_SPL_MUL_32_32_RSFT32BI(int32_t a,
- int32_t b) {
- int32_t tmp = 0;
-
- if ((32767 < a) || (a < 0))
- tmp = WEBRTC_SPL_MUL_16_32_RSFT16(((int16_t)(a >> 16)), b);
- tmp += WEBRTC_SPL_MUL_16_32_RSFT16(((int16_t)((a & 0x0000FFFF) >> 1)),
- b) >> 15;
-
- return tmp;
-}
-
-static __inline int32_t WEBRTC_SPL_MUL_32_32_RSFT32(int16_t a,
- int16_t b,
- int32_t c) {
- int32_t tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0;
-
- __asm __volatile(
- "sra %[tmp1], %[c], 16 \n\t"
- "andi %[tmp2], %[c], 0xFFFF \n\t"
-#if defined(MIPS32_R2_LE)
- "seh %[a], %[a] \n\t"
- "seh %[b], %[b] \n\t"
-#else
- "sll %[a], %[a], 16 \n\t"
- "sra %[a], %[a], 16 \n\t"
- "sll %[b], %[b], 16 \n\t"
- "sra %[b], %[b], 16 \n\t"
-#endif
- "sra %[tmp2], %[tmp2], 1 \n\t"
- "mul %[tmp3], %[a], %[tmp2] \n\t"
- "mul %[tmp4], %[b], %[tmp2] \n\t"
- "mul %[tmp2], %[a], %[tmp1] \n\t"
- "mul %[tmp1], %[b], %[tmp1] \n\t"
-#if defined(MIPS_DSP_R1_LE)
- "shra_r.w %[tmp3], %[tmp3], 15 \n\t"
- "shra_r.w %[tmp4], %[tmp4], 15 \n\t"
-#else
- "addiu %[tmp3], %[tmp3], 0x4000 \n\t"
- "sra %[tmp3], %[tmp3], 15 \n\t"
- "addiu %[tmp4], %[tmp4], 0x4000 \n\t"
- "sra %[tmp4], %[tmp4], 15 \n\t"
-#endif
- "addu %[tmp3], %[tmp3], %[tmp2] \n\t"
- "addu %[tmp4], %[tmp4], %[tmp1] \n\t"
- "sra %[tmp4], %[tmp4], 16 \n\t"
- "addu %[tmp1], %[tmp3], %[tmp4] \n\t"
- : [tmp1] "=&r" (tmp1), [tmp2] "=&r" (tmp2),
- [tmp3] "=&r" (tmp3), [tmp4] "=&r" (tmp4),
- [a] "+r" (a), [b] "+r" (b)
- : [c] "r" (c)
- : "hi", "lo"
- );
- return tmp1;
-}
-
#if defined(MIPS_DSP_R1_LE)
static __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) {
__asm __volatile(
@@ -193,10 +137,10 @@
: [n] "r" (n), [i32] "r" (i32)
);
- return bits;
+ return (int16_t)bits;
}
-static __inline int WebRtcSpl_NormW32(int32_t a) {
+static __inline int16_t WebRtcSpl_NormW32(int32_t a) {
int zeros = 0;
__asm __volatile(
@@ -216,10 +160,10 @@
: [a] "r" (a)
);
- return zeros;
+ return (int16_t)zeros;
}
-static __inline int WebRtcSpl_NormU32(uint32_t a) {
+static __inline int16_t WebRtcSpl_NormU32(uint32_t a) {
int zeros = 0;
__asm __volatile(
@@ -228,10 +172,10 @@
: [a] "r" (a)
);
- return (zeros & 0x1f);
+ return (int16_t)(zeros & 0x1f);
}
-static __inline int WebRtcSpl_NormW16(int16_t a) {
+static __inline int16_t WebRtcSpl_NormW16(int16_t a) {
int zeros = 0;
int a0 = a << 16;
@@ -252,7 +196,7 @@
: [a0] "r" (a0)
);
- return zeros;
+ return (int16_t)zeros;
}
static __inline int32_t WebRtc_MulAccumW16(int16_t a,
diff --git a/common_audio/signal_processing/resample_by_2.c b/common_audio/signal_processing/resample_by_2.c
index eab091b..9c0784e 100644
--- a/common_audio/signal_processing/resample_by_2.c
+++ b/common_audio/signal_processing/resample_by_2.c
@@ -67,10 +67,10 @@
// decimator
#if !defined(MIPS32_LE)
-void WebRtcSpl_DownsampleBy2(const int16_t* in, int16_t len,
+void WebRtcSpl_DownsampleBy2(const int16_t* in, int len,
int16_t* out, int32_t* filtState) {
int32_t tmp1, tmp2, diff, in32, out32;
- int16_t i;
+ int i;
register int32_t state0 = filtState[0];
register int32_t state1 = filtState[1];
@@ -125,10 +125,10 @@
#endif // #if defined(MIPS32_LE)
-void WebRtcSpl_UpsampleBy2(const int16_t* in, int16_t len,
+void WebRtcSpl_UpsampleBy2(const int16_t* in, int len,
int16_t* out, int32_t* filtState) {
int32_t tmp1, tmp2, diff, in32, out32;
- int16_t i;
+ int i;
register int32_t state0 = filtState[0];
register int32_t state1 = filtState[1];
diff --git a/common_audio/signal_processing/resample_by_2_mips.c b/common_audio/signal_processing/resample_by_2_mips.c
index 8e840bb..6ffce55 100644
--- a/common_audio/signal_processing/resample_by_2_mips.c
+++ b/common_audio/signal_processing/resample_by_2_mips.c
@@ -29,11 +29,11 @@
// decimator
void WebRtcSpl_DownsampleBy2(const int16_t* in,
- int16_t len,
+ int len,
int16_t* out,
int32_t* filtState) {
int32_t out32;
- int16_t i, len1;
+ int i, len1;
register int32_t state0 = filtState[0];
register int32_t state1 = filtState[1];
diff --git a/common_audio/signal_processing/signal_processing_unittest.cc b/common_audio/signal_processing/signal_processing_unittest.cc
index 81ca369..3fa3d2e 100644
--- a/common_audio/signal_processing/signal_processing_unittest.cc
+++ b/common_audio/signal_processing/signal_processing_unittest.cc
@@ -30,17 +30,12 @@
int B = 21;
int a = -3;
int b = WEBRTC_SPL_WORD32_MAX;
- int nr = 2;
- int d_ptr2 = 0;
EXPECT_EQ(10, WEBRTC_SPL_MIN(A, B));
EXPECT_EQ(21, WEBRTC_SPL_MAX(A, B));
EXPECT_EQ(3, WEBRTC_SPL_ABS_W16(a));
EXPECT_EQ(3, WEBRTC_SPL_ABS_W32(a));
- EXPECT_EQ(0, WEBRTC_SPL_GET_BYTE(&B, nr));
- WEBRTC_SPL_SET_BYTE(&d_ptr2, 1, nr);
- EXPECT_EQ(65536, d_ptr2);
EXPECT_EQ(-63, WEBRTC_SPL_MUL(a, B));
EXPECT_EQ(-2147483645, WEBRTC_SPL_MUL(a, b));
@@ -48,38 +43,25 @@
b = WEBRTC_SPL_WORD16_MAX >> 1;
EXPECT_EQ(1073627139u, WEBRTC_SPL_UMUL_16_16(a, b));
EXPECT_EQ(4294918147u, WEBRTC_SPL_UMUL_32_16(a, b));
- EXPECT_EQ(65535u, WEBRTC_SPL_UMUL_32_16_RSFT16(a, b));
EXPECT_EQ(-49149, WEBRTC_SPL_MUL_16_U16(a, b));
a = b;
b = -3;
- EXPECT_EQ(-5461, WEBRTC_SPL_DIV(a, b));
- EXPECT_EQ(0u, WEBRTC_SPL_UDIV(a, b));
EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_32_RSFT16(a, b));
EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_32_RSFT15(a, b));
EXPECT_EQ(-3, WEBRTC_SPL_MUL_16_32_RSFT14(a, b));
EXPECT_EQ(-24, WEBRTC_SPL_MUL_16_32_RSFT11(a, b));
- int a32a = (WEBRTC_SPL_WORD32_MAX >> 16);
- int a32b = (WEBRTC_SPL_WORD32_MAX & 0x0000ffff);
- EXPECT_EQ(5, WEBRTC_SPL_MUL_32_32_RSFT32(a32a, a32b, A));
-
EXPECT_EQ(-12288, WEBRTC_SPL_MUL_16_16_RSFT(a, b, 2));
EXPECT_EQ(-12287, WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, 2));
- EXPECT_EQ(16380, WEBRTC_SPL_ADD_SAT_W32(a, b));
EXPECT_EQ(21, WEBRTC_SPL_SAT(a, A, B));
EXPECT_EQ(21, WEBRTC_SPL_SAT(a, B, A));
- EXPECT_EQ(-49149, WEBRTC_SPL_MUL_32_16(a, b));
-
- EXPECT_EQ(16386, WEBRTC_SPL_SUB_SAT_W32(a, b));
- EXPECT_EQ(16380, WEBRTC_SPL_ADD_SAT_W16(a, b));
// Shifting with negative numbers allowed
int shift_amount = 1; // Workaround compiler warning using variable here.
// Positive means left shift
- EXPECT_EQ(32766, WEBRTC_SPL_SHIFT_W16(a, shift_amount));
EXPECT_EQ(32766, WEBRTC_SPL_SHIFT_W32(a, shift_amount));
// Shifting with negative numbers not allowed
@@ -105,14 +87,10 @@
EXPECT_EQ(-1073741824,
WEBRTC_SPL_MUL_16_32_RSFT16(WEBRTC_SPL_WORD16_MIN,
WEBRTC_SPL_WORD32_MAX));
- EXPECT_EQ(0x3fffffff, WEBRTC_SPL_MUL_32_32_RSFT32(WEBRTC_SPL_WORD16_MAX,
- 0xffff, WEBRTC_SPL_WORD32_MAX));
#else
EXPECT_EQ(-1073741823,
WEBRTC_SPL_MUL_16_32_RSFT16(WEBRTC_SPL_WORD16_MIN,
WEBRTC_SPL_WORD32_MAX));
- EXPECT_EQ(0x3fff7ffe, WEBRTC_SPL_MUL_32_32_RSFT32(WEBRTC_SPL_WORD16_MAX,
- 0xffff, WEBRTC_SPL_WORD32_MAX));
#endif
}
@@ -135,10 +113,9 @@
EXPECT_EQ(0, WebRtcSpl_NormW16(WEBRTC_SPL_WORD16_MIN));
EXPECT_EQ(4, WebRtcSpl_NormW16(b32));
- EXPECT_EQ(0, WebRtcSpl_NormU32(0));
- EXPECT_EQ(0, WebRtcSpl_NormU32(-1));
- EXPECT_EQ(0, WebRtcSpl_NormU32(WEBRTC_SPL_WORD32_MIN));
- EXPECT_EQ(15, WebRtcSpl_NormU32(a32));
+ EXPECT_EQ(0, WebRtcSpl_NormU32(0u));
+ EXPECT_EQ(0, WebRtcSpl_NormU32(0xffffffff));
+ EXPECT_EQ(15, WebRtcSpl_NormU32(static_cast<uint32_t>(a32)));
EXPECT_EQ(104, WebRtcSpl_AddSatW16(a16, b16));
EXPECT_EQ(138, WebRtcSpl_SubSatW16(a16, b16));
@@ -185,11 +162,9 @@
TEST_F(SplTest, BasicArrayOperationsTest) {
const int kVectorSize = 4;
int B[] = {4, 12, 133, 1100};
- uint8_t b8[kVectorSize];
int16_t b16[kVectorSize];
int32_t b32[kVectorSize];
- uint8_t bTmp8[kVectorSize];
int16_t bTmp16[kVectorSize];
int32_t bTmp32[kVectorSize];
@@ -197,35 +172,22 @@
for (int kk = 0; kk < kVectorSize; ++kk) {
EXPECT_EQ(3, b16[kk]);
}
- EXPECT_EQ(kVectorSize, WebRtcSpl_ZerosArrayW16(b16, kVectorSize));
+ WebRtcSpl_ZerosArrayW16(b16, kVectorSize);
for (int kk = 0; kk < kVectorSize; ++kk) {
EXPECT_EQ(0, b16[kk]);
}
- EXPECT_EQ(kVectorSize, WebRtcSpl_OnesArrayW16(b16, kVectorSize));
- for (int kk = 0; kk < kVectorSize; ++kk) {
- EXPECT_EQ(1, b16[kk]);
- }
WebRtcSpl_MemSetW32(b32, 3, kVectorSize);
for (int kk = 0; kk < kVectorSize; ++kk) {
EXPECT_EQ(3, b32[kk]);
}
- EXPECT_EQ(kVectorSize, WebRtcSpl_ZerosArrayW32(b32, kVectorSize));
+ WebRtcSpl_ZerosArrayW32(b32, kVectorSize);
for (int kk = 0; kk < kVectorSize; ++kk) {
EXPECT_EQ(0, b32[kk]);
}
- EXPECT_EQ(kVectorSize, WebRtcSpl_OnesArrayW32(b32, kVectorSize));
for (int kk = 0; kk < kVectorSize; ++kk) {
- EXPECT_EQ(1, b32[kk]);
- }
- for (int kk = 0; kk < kVectorSize; ++kk) {
- bTmp8[kk] = (int8_t)kk;
bTmp16[kk] = (int16_t)kk;
bTmp32[kk] = (int32_t)kk;
}
- WEBRTC_SPL_MEMCPY_W8(b8, bTmp8, kVectorSize);
- for (int kk = 0; kk < kVectorSize; ++kk) {
- EXPECT_EQ(b8[kk], bTmp8[kk]);
- }
WEBRTC_SPL_MEMCPY_W16(b16, bTmp16, kVectorSize);
for (int kk = 0; kk < kVectorSize; ++kk) {
EXPECT_EQ(b16[kk], bTmp16[kk]);
@@ -234,7 +196,7 @@
// for (int kk = 0; kk < kVectorSize; ++kk) {
// EXPECT_EQ(b32[kk], bTmp32[kk]);
// }
- EXPECT_EQ(2, WebRtcSpl_CopyFromEndW16(b16, kVectorSize, 2, bTmp16));
+ WebRtcSpl_CopyFromEndW16(b16, kVectorSize, 2, bTmp16);
for (int kk = 0; kk < 2; ++kk) {
EXPECT_EQ(kk+2, bTmp16[kk]);
}
diff --git a/common_audio/signal_processing/splitting_filter.c b/common_audio/signal_processing/splitting_filter.c
index dbda042..4f6430c 100644
--- a/common_audio/signal_processing/splitting_filter.c
+++ b/common_audio/signal_processing/splitting_filter.c
@@ -45,7 +45,7 @@
// |data_length|
//
-void WebRtcSpl_AllPassQMF(int32_t* in_data, int16_t data_length,
+void WebRtcSpl_AllPassQMF(int32_t* in_data, int data_length,
int32_t* out_data, const uint16_t* filter_coefficients,
int32_t* filter_state)
{
@@ -65,7 +65,7 @@
// filter operation takes the |in_data| (which is the output from the previous cascade
// filter) and store the output in |out_data|.
// Note that the input vector values are changed during the process.
- int16_t k;
+ int k;
int32_t diff;
// First all-pass cascade; filter from in_data to out_data.
@@ -74,14 +74,16 @@
// First loop, use the states stored in memory.
// "diff" should be safe from wrap around since max values are 2^25
- diff = WEBRTC_SPL_SUB_SAT_W32(in_data[0], filter_state[1]); // = (x[0] - y_1[-1])
+ // diff = (x[0] - y_1[-1])
+ diff = WebRtcSpl_SubSatW32(in_data[0], filter_state[1]);
// y_1[0] = x[-1] + a_1 * (x[0] - y_1[-1])
out_data[0] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[0], diff, filter_state[0]);
// For the remaining loops, use previous values.
for (k = 1; k < data_length; k++)
{
- diff = WEBRTC_SPL_SUB_SAT_W32(in_data[k], out_data[k - 1]); // = (x[n] - y_1[n-1])
+ // diff = (x[n] - y_1[n-1])
+ diff = WebRtcSpl_SubSatW32(in_data[k], out_data[k - 1]);
// y_1[n] = x[n-1] + a_1 * (x[n] - y_1[n-1])
out_data[k] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[0], diff, in_data[k - 1]);
}
@@ -91,12 +93,14 @@
filter_state[1] = out_data[data_length - 1]; // y_1[N-1], becomes y_1[-1] next time
// Second all-pass cascade; filter from out_data to in_data.
- diff = WEBRTC_SPL_SUB_SAT_W32(out_data[0], filter_state[3]); // = (y_1[0] - y_2[-1])
+ // diff = (y_1[0] - y_2[-1])
+ diff = WebRtcSpl_SubSatW32(out_data[0], filter_state[3]);
// y_2[0] = y_1[-1] + a_2 * (y_1[0] - y_2[-1])
in_data[0] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[1], diff, filter_state[2]);
for (k = 1; k < data_length; k++)
{
- diff = WEBRTC_SPL_SUB_SAT_W32(out_data[k], in_data[k - 1]); // =(y_1[n] - y_2[n-1])
+ // diff = (y_1[n] - y_2[n-1])
+ diff = WebRtcSpl_SubSatW32(out_data[k], in_data[k - 1]);
// y_2[0] = y_1[-1] + a_2 * (y_1[0] - y_2[-1])
in_data[k] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[1], diff, out_data[k-1]);
}
@@ -105,12 +109,14 @@
filter_state[3] = in_data[data_length - 1]; // y_2[N-1], becomes y_2[-1] next time
// Third all-pass cascade; filter from in_data to out_data.
- diff = WEBRTC_SPL_SUB_SAT_W32(in_data[0], filter_state[5]); // = (y_2[0] - y[-1])
+ // diff = (y_2[0] - y[-1])
+ diff = WebRtcSpl_SubSatW32(in_data[0], filter_state[5]);
// y[0] = y_2[-1] + a_3 * (y_2[0] - y[-1])
out_data[0] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[2], diff, filter_state[4]);
for (k = 1; k < data_length; k++)
{
- diff = WEBRTC_SPL_SUB_SAT_W32(in_data[k], out_data[k - 1]); // = (y_2[n] - y[n-1])
+ // diff = (y_2[n] - y[n-1])
+ diff = WebRtcSpl_SubSatW32(in_data[k], out_data[k - 1]);
// y[n] = y_2[n-1] + a_3 * (y_2[n] - y[n-1])
out_data[k] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[2], diff, in_data[k-1]);
}
diff --git a/common_audio/signal_processing/vector_scaling_operations.c b/common_audio/signal_processing/vector_scaling_operations.c
index d839206..c3eaa28 100644
--- a/common_audio/signal_processing/vector_scaling_operations.c
+++ b/common_audio/signal_processing/vector_scaling_operations.c
@@ -75,7 +75,7 @@
(*out++) = WebRtcSpl_SatW32ToW16(tmp_w32);
}
} else {
- int16_t left_shifts = -right_shifts;
+ int left_shifts = -right_shifts;
for (i = length; i > 0; i--) {
tmp_w32 = (*in++) << left_shifts;
(*out++) = WebRtcSpl_SatW32ToW16(tmp_w32);
diff --git a/common_audio/vad/Android.mk b/common_audio/vad/Android.mk
deleted file mode 100644
index ed5de6b..0000000
--- a/common_audio/vad/Android.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_vad
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- webrtc_vad.c \
- vad_core.c \
- vad_filterbank.c \
- vad_gmm.c \
- vad_sp.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../signal_processing/include \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libdl \
- libstlport
-
-ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
-LOCAL_LDLIBS += -ldl -lpthread
-endif
-
-ifneq ($(TARGET_SIMULATOR),true)
-LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/common_audio/wav_header.cc b/common_audio/wav_header.cc
new file mode 100644
index 0000000..ce43896
--- /dev/null
+++ b/common_audio/wav_header.cc
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+// Based on the WAV file format documentation at
+// https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ and
+// http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
+
+#include "webrtc/common_audio/wav_header.h"
+
+#include <algorithm>
+#include <cstring>
+#include <limits>
+
+#include "webrtc/common_audio/include/audio_util.h"
+
+namespace webrtc {
+
+struct ChunkHeader {
+ uint32_t ID;
+ uint32_t Size;
+};
+COMPILE_ASSERT(sizeof(ChunkHeader) == 8, chunk_header_size);
+
+bool CheckWavParameters(int num_channels,
+ int sample_rate,
+ WavFormat format,
+ int bytes_per_sample,
+ uint32_t num_samples) {
+ // num_channels, sample_rate, and bytes_per_sample must be positive, must fit
+ // in their respective fields, and their product must fit in the 32-bit
+ // ByteRate field.
+ if (num_channels <= 0 || sample_rate <= 0 || bytes_per_sample <= 0)
+ return false;
+ if (static_cast<uint64_t>(sample_rate) > std::numeric_limits<uint32_t>::max())
+ return false;
+ if (static_cast<uint64_t>(num_channels) >
+ std::numeric_limits<uint16_t>::max())
+ return false;
+ if (static_cast<uint64_t>(bytes_per_sample) * 8 >
+ std::numeric_limits<uint16_t>::max())
+ return false;
+ if (static_cast<uint64_t>(sample_rate) * num_channels * bytes_per_sample >
+ std::numeric_limits<uint32_t>::max())
+ return false;
+
+ // format and bytes_per_sample must agree.
+ switch (format) {
+ case kWavFormatPcm:
+ // Other values may be OK, but for now we're conservative:
+ if (bytes_per_sample != 1 && bytes_per_sample != 2)
+ return false;
+ break;
+ case kWavFormatALaw:
+ case kWavFormatMuLaw:
+ if (bytes_per_sample != 1)
+ return false;
+ break;
+ default:
+ return false;
+ }
+
+ // The number of bytes in the file, not counting the first ChunkHeader, must
+ // be less than 2^32; otherwise, the ChunkSize field overflows.
+ const uint32_t max_samples =
+ (std::numeric_limits<uint32_t>::max()
+ - (kWavHeaderSize - sizeof(ChunkHeader))) /
+ bytes_per_sample;
+ if (num_samples > max_samples)
+ return false;
+
+ // Each channel must have the same number of samples.
+ if (num_samples % num_channels != 0)
+ return false;
+
+ return true;
+}
+
+#ifdef WEBRTC_ARCH_LITTLE_ENDIAN
+static inline void WriteLE16(uint16_t* f, uint16_t x) { *f = x; }
+static inline void WriteLE32(uint32_t* f, uint32_t x) { *f = x; }
+static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) {
+ *f = static_cast<uint32_t>(a)
+ | static_cast<uint32_t>(b) << 8
+ | static_cast<uint32_t>(c) << 16
+ | static_cast<uint32_t>(d) << 24;
+}
+#else
+#error "Write be-to-le conversion functions"
+#endif
+
+void WriteWavHeader(uint8_t* buf,
+ int num_channels,
+ int sample_rate,
+ WavFormat format,
+ int bytes_per_sample,
+ uint32_t num_samples) {
+ assert(CheckWavParameters(num_channels, sample_rate, format,
+ bytes_per_sample, num_samples));
+
+ struct {
+ struct {
+ ChunkHeader header;
+ uint32_t Format;
+ } riff;
+ struct {
+ ChunkHeader header;
+ uint16_t AudioFormat;
+ uint16_t NumChannels;
+ uint32_t SampleRate;
+ uint32_t ByteRate;
+ uint16_t BlockAlign;
+ uint16_t BitsPerSample;
+ } fmt;
+ struct {
+ ChunkHeader header;
+ } data;
+ } header;
+ COMPILE_ASSERT(sizeof(header) == kWavHeaderSize, no_padding_in_header);
+
+ const uint32_t bytes_in_payload = bytes_per_sample * num_samples;
+
+ WriteFourCC(&header.riff.header.ID, 'R', 'I', 'F', 'F');
+ WriteLE32(&header.riff.header.Size,
+ bytes_in_payload + kWavHeaderSize - sizeof(ChunkHeader));
+ WriteFourCC(&header.riff.Format, 'W', 'A', 'V', 'E');
+
+ WriteFourCC(&header.fmt.header.ID, 'f', 'm', 't', ' ');
+ WriteLE32(&header.fmt.header.Size, sizeof(header.fmt) - sizeof(ChunkHeader));
+ WriteLE16(&header.fmt.AudioFormat, format);
+ WriteLE16(&header.fmt.NumChannels, num_channels);
+ WriteLE32(&header.fmt.SampleRate, sample_rate);
+ WriteLE32(&header.fmt.ByteRate, (static_cast<uint32_t>(num_channels)
+ * sample_rate * bytes_per_sample));
+ WriteLE16(&header.fmt.BlockAlign, num_channels * bytes_per_sample);
+ WriteLE16(&header.fmt.BitsPerSample, 8 * bytes_per_sample);
+
+ WriteFourCC(&header.data.header.ID, 'd', 'a', 't', 'a');
+ WriteLE32(&header.data.header.Size, bytes_in_payload);
+
+ // Do an extra copy rather than writing everything to buf directly, since buf
+ // might not be correctly aligned.
+ memcpy(buf, &header, kWavHeaderSize);
+}
+
+} // namespace webrtc
diff --git a/common_audio/wav_header.h b/common_audio/wav_header.h
new file mode 100644
index 0000000..f9ed8a5
--- /dev/null
+++ b/common_audio/wav_header.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_COMMON_AUDIO_WAV_HEADER_H_
+#define WEBRTC_COMMON_AUDIO_WAV_HEADER_H_
+
+#include <stdint.h>
+
+namespace webrtc {
+
+static const int kWavHeaderSize = 44;
+
+enum WavFormat {
+ kWavFormatPcm = 1, // PCM, each sample of size bytes_per_sample
+ kWavFormatALaw = 6, // 8-bit ITU-T G.711 A-law
+ kWavFormatMuLaw = 7, // 8-bit ITU-T G.711 mu-law
+};
+
+// Return true if the given parameters will make a well-formed WAV header.
+bool CheckWavParameters(int num_channels,
+ int sample_rate,
+ WavFormat format,
+ int bytes_per_sample,
+ uint32_t num_samples);
+
+// Write a kWavHeaderSize bytes long WAV header to buf. The payload that
+// follows the header is supposed to have the specified number of interleaved
+// channels and contain the specified total number of samples of the specified
+// type.
+void WriteWavHeader(uint8_t* buf,
+ int num_channels,
+ int sample_rate,
+ WavFormat format,
+ int bytes_per_sample,
+ uint32_t num_samples);
+
+} // namespace webrtc
+
+#endif // WEBRTC_COMMON_AUDIO_WAV_HEADER_H_
diff --git a/common_audio/wav_header_unittest.cc b/common_audio/wav_header_unittest.cc
new file mode 100644
index 0000000..f05160e
--- /dev/null
+++ b/common_audio/wav_header_unittest.cc
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <limits>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/common_audio/wav_header.h"
+#include "webrtc/system_wrappers/interface/compile_assert.h"
+
+// Try various choices of WAV header parameters, and make sure that the good
+// ones are accepted and the bad ones rejected.
+TEST(WavHeaderTest, CheckWavParameters) {
+ // Try some really stupid values for one parameter at a time.
+ EXPECT_TRUE(webrtc::CheckWavParameters(1, 8000, webrtc::kWavFormatPcm, 1, 0));
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(0, 8000, webrtc::kWavFormatPcm, 1, 0));
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(-1, 8000, webrtc::kWavFormatPcm, 1, 0));
+ EXPECT_FALSE(webrtc::CheckWavParameters(1, 0, webrtc::kWavFormatPcm, 1, 0));
+ EXPECT_FALSE(webrtc::CheckWavParameters(1, 8000, webrtc::WavFormat(0), 1, 0));
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(1, 8000, webrtc::kWavFormatPcm, 0, 0));
+
+ // Try invalid format/bytes-per-sample combinations.
+ EXPECT_TRUE(webrtc::CheckWavParameters(1, 8000, webrtc::kWavFormatPcm, 2, 0));
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(1, 8000, webrtc::kWavFormatPcm, 4, 0));
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(1, 8000, webrtc::kWavFormatALaw, 2, 0));
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(1, 8000, webrtc::kWavFormatMuLaw, 2, 0));
+
+ // Too large values.
+ EXPECT_FALSE(webrtc::CheckWavParameters(
+ 1 << 20, 1 << 20, webrtc::kWavFormatPcm, 1, 0));
+ EXPECT_FALSE(webrtc::CheckWavParameters(
+ 1, 8000, webrtc::kWavFormatPcm, 1, std::numeric_limits<uint32_t>::max()));
+
+ // Not the same number of samples for each channel.
+ EXPECT_FALSE(
+ webrtc::CheckWavParameters(3, 8000, webrtc::kWavFormatPcm, 1, 5));
+}
+
+// Try writing a WAV header and make sure it looks OK.
+TEST(WavHeaderTest, WriteWavHeader) {
+ static const int kSize = 4 + webrtc::kWavHeaderSize + 4;
+ uint8_t buf[kSize];
+ memset(buf, 0xa4, sizeof(buf));
+ webrtc::WriteWavHeader(
+ buf + 4, 17, 12345, webrtc::kWavFormatALaw, 1, 123457689);
+ static const uint8_t kExpectedBuf[] = {
+ 0xa4, 0xa4, 0xa4, 0xa4, // untouched bytes before header
+ 'R', 'I', 'F', 'F',
+ 0xbd, 0xd0, 0x5b, 0x07, // size of whole file - 8: 123457689 + 44 - 8
+ 'W', 'A', 'V', 'E',
+ 'f', 'm', 't', ' ',
+ 16, 0, 0, 0, // size of fmt block - 8: 24 - 8
+ 6, 0, // format: A-law (6)
+ 17, 0, // channels: 17
+ 0x39, 0x30, 0, 0, // sample rate: 12345
+ 0xc9, 0x33, 0x03, 0, // byte rate: 1 * 17 * 12345
+ 17, 0, // block align: NumChannels * BytesPerSample
+ 8, 0, // bits per sample: 1 * 8
+ 'd', 'a', 't', 'a',
+ 0x99, 0xd0, 0x5b, 0x07, // size of payload: 123457689
+ 0xa4, 0xa4, 0xa4, 0xa4, // untouched bytes after header
+ };
+ COMPILE_ASSERT(sizeof(kExpectedBuf) == kSize, buf_size);
+ EXPECT_EQ(0, memcmp(kExpectedBuf, buf, kSize));
+}
diff --git a/common_audio/wav_writer.cc b/common_audio/wav_writer.cc
new file mode 100644
index 0000000..30a220c
--- /dev/null
+++ b/common_audio/wav_writer.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/common_audio/wav_writer.h"
+
+#include <algorithm>
+#include <cstdio>
+#include <limits>
+
+#include "webrtc/base/checks.h"
+#include "webrtc/common_audio/include/audio_util.h"
+#include "webrtc/common_audio/wav_header.h"
+
+namespace webrtc {
+
+// We write 16-bit PCM WAV files.
+static const WavFormat kWavFormat = kWavFormatPcm;
+static const int kBytesPerSample = 2;
+
+WavFile::WavFile(const std::string& filename, int sample_rate, int num_channels)
+ : sample_rate_(sample_rate),
+ num_channels_(num_channels),
+ num_samples_(0),
+ file_handle_(fopen(filename.c_str(), "wb")) {
+ CHECK(file_handle_);
+ CHECK(CheckWavParameters(num_channels_,
+ sample_rate_,
+ kWavFormat,
+ kBytesPerSample,
+ num_samples_));
+
+ // Write a blank placeholder header, since we need to know the total number
+ // of samples before we can fill in the real data.
+ static const uint8_t blank_header[kWavHeaderSize] = {0};
+ CHECK_EQ(1u, fwrite(blank_header, kWavHeaderSize, 1, file_handle_));
+}
+
+WavFile::~WavFile() {
+ Close();
+}
+
+void WavFile::WriteSamples(const int16_t* samples, size_t num_samples) {
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+#error "Need to convert samples to little-endian when writing to WAV file"
+#endif
+ const size_t written =
+ fwrite(samples, sizeof(*samples), num_samples, file_handle_);
+ CHECK_EQ(num_samples, written);
+ num_samples_ += static_cast<uint32_t>(written);
+ CHECK(written <= std::numeric_limits<uint32_t>::max() ||
+ num_samples_ >= written); // detect uint32_t overflow
+ CHECK(CheckWavParameters(num_channels_,
+ sample_rate_,
+ kWavFormat,
+ kBytesPerSample,
+ num_samples_));
+}
+
+void WavFile::WriteSamples(const float* samples, size_t num_samples) {
+ static const size_t kChunksize = 4096 / sizeof(uint16_t);
+ for (size_t i = 0; i < num_samples; i += kChunksize) {
+ int16_t isamples[kChunksize];
+ const size_t chunk = std::min(kChunksize, num_samples - i);
+ RoundToInt16(samples + i, chunk, isamples);
+ WriteSamples(isamples, chunk);
+ }
+}
+
+void WavFile::Close() {
+ CHECK_EQ(0, fseek(file_handle_, 0, SEEK_SET));
+ uint8_t header[kWavHeaderSize];
+ WriteWavHeader(header, num_channels_, sample_rate_, kWavFormat,
+ kBytesPerSample, num_samples_);
+ CHECK_EQ(1u, fwrite(header, kWavHeaderSize, 1, file_handle_));
+ CHECK_EQ(0, fclose(file_handle_));
+ file_handle_ = NULL;
+}
+
+} // namespace webrtc
+
+rtc_WavFile* rtc_WavOpen(const char* filename,
+ int sample_rate,
+ int num_channels) {
+ return reinterpret_cast<rtc_WavFile*>(
+ new webrtc::WavFile(filename, sample_rate, num_channels));
+}
+
+void rtc_WavClose(rtc_WavFile* wf) {
+ delete reinterpret_cast<webrtc::WavFile*>(wf);
+}
+
+void rtc_WavWriteSamples(rtc_WavFile* wf,
+ const float* samples,
+ size_t num_samples) {
+ reinterpret_cast<webrtc::WavFile*>(wf)->WriteSamples(samples, num_samples);
+}
+
+int rtc_WavSampleRate(const rtc_WavFile* wf) {
+ return reinterpret_cast<const webrtc::WavFile*>(wf)->sample_rate();
+}
+
+int rtc_WavNumChannels(const rtc_WavFile* wf) {
+ return reinterpret_cast<const webrtc::WavFile*>(wf)->num_channels();
+}
+
+uint32_t rtc_WavNumSamples(const rtc_WavFile* wf) {
+ return reinterpret_cast<const webrtc::WavFile*>(wf)->num_samples();
+}
diff --git a/common_audio/wav_writer.h b/common_audio/wav_writer.h
new file mode 100644
index 0000000..0966727
--- /dev/null
+++ b/common_audio/wav_writer.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_COMMON_AUDIO_WAV_WRITER_H_
+#define WEBRTC_COMMON_AUDIO_WAV_WRITER_H_
+
+#ifdef __cplusplus
+
+#include <stdint.h>
+#include <cstddef>
+#include <string>
+
+namespace webrtc {
+
+// Simple C++ class for writing 16-bit PCM WAV files. All error handling is
+// by calls to CHECK(), making it unsuitable for anything but debug code.
+class WavFile {
+ public:
+ // Open a new WAV file for writing.
+ WavFile(const std::string& filename, int sample_rate, int num_channels);
+
+ // Close the WAV file, after writing its header.
+ ~WavFile();
+
+ // Write additional samples to the file. Each sample is in the range
+ // [-32768,32767], and there must be the previously specified number of
+ // interleaved channels.
+ void WriteSamples(const float* samples, size_t num_samples);
+ void WriteSamples(const int16_t* samples, size_t num_samples);
+
+ int sample_rate() const { return sample_rate_; }
+ int num_channels() const { return num_channels_; }
+ uint32_t num_samples() const { return num_samples_; }
+
+ private:
+ void Close();
+ const int sample_rate_;
+ const int num_channels_;
+ uint32_t num_samples_; // total number of samples written to file
+ FILE* file_handle_; // output file, owned by this class
+};
+
+} // namespace webrtc
+
+extern "C" {
+#endif // __cplusplus
+
+// C wrappers for the WavFile class.
+typedef struct rtc_WavFile rtc_WavFile;
+rtc_WavFile* rtc_WavOpen(const char* filename,
+ int sample_rate,
+ int num_channels);
+void rtc_WavClose(rtc_WavFile* wf);
+void rtc_WavWriteSamples(rtc_WavFile* wf,
+ const float* samples,
+ size_t num_samples);
+int rtc_WavSampleRate(const rtc_WavFile* wf);
+int rtc_WavNumChannels(const rtc_WavFile* wf);
+uint32_t rtc_WavNumSamples(const rtc_WavFile* wf);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // WEBRTC_COMMON_AUDIO_WAV_WRITER_H_
diff --git a/common_audio/wav_writer_unittest.cc b/common_audio/wav_writer_unittest.cc
new file mode 100644
index 0000000..9c593be
--- /dev/null
+++ b/common_audio/wav_writer_unittest.cc
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+// MSVC++ requires this to be set before any other includes to get M_PI.
+#define _USE_MATH_DEFINES
+
+#include <cmath>
+#include <limits>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
+#include "webrtc/common_audio/wav_header.h"
+#include "webrtc/common_audio/wav_writer.h"
+#include "webrtc/test/testsupport/fileutils.h"
+
+static const float kSamples[] = {0.0, 10.0, 4e4, -1e9};
+
+// Write a tiny WAV file with the C++ interface and verify the result.
+TEST(WavWriterTest, CPP) {
+ const std::string outfile = webrtc::test::OutputPath() + "wavtest1.wav";
+ static const uint32_t kNumSamples = 3;
+ {
+ webrtc::WavFile w(outfile, 14099, 1);
+ EXPECT_EQ(14099, w.sample_rate());
+ EXPECT_EQ(1, w.num_channels());
+ EXPECT_EQ(0u, w.num_samples());
+ w.WriteSamples(kSamples, kNumSamples);
+ EXPECT_EQ(kNumSamples, w.num_samples());
+ }
+ static const uint8_t kExpectedContents[] = {
+ 'R', 'I', 'F', 'F',
+ 42, 0, 0, 0, // size of whole file - 8: 6 + 44 - 8
+ 'W', 'A', 'V', 'E',
+ 'f', 'm', 't', ' ',
+ 16, 0, 0, 0, // size of fmt block - 8: 24 - 8
+ 1, 0, // format: PCM (1)
+ 1, 0, // channels: 1
+ 0x13, 0x37, 0, 0, // sample rate: 14099
+ 0x26, 0x6e, 0, 0, // byte rate: 2 * 14099
+ 2, 0, // block align: NumChannels * BytesPerSample
+ 16, 0, // bits per sample: 2 * 8
+ 'd', 'a', 't', 'a',
+ 6, 0, 0, 0, // size of payload: 6
+ 0, 0, // first sample: 0.0
+ 10, 0, // second sample: 10.0
+ 0xff, 0x7f, // third sample: 4e4 (saturated)
+ };
+ static const int kContentSize =
+ webrtc::kWavHeaderSize + kNumSamples * sizeof(int16_t);
+ COMPILE_ASSERT(sizeof(kExpectedContents) == kContentSize, content_size);
+ EXPECT_EQ(size_t(kContentSize), webrtc::test::GetFileSize(outfile));
+ FILE* f = fopen(outfile.c_str(), "rb");
+ ASSERT_TRUE(f);
+ uint8_t contents[kContentSize];
+ ASSERT_EQ(1u, fread(contents, kContentSize, 1, f));
+ EXPECT_EQ(0, fclose(f));
+ EXPECT_EQ(0, memcmp(kExpectedContents, contents, kContentSize));
+}
+
+// Write a tiny WAV file with the C interface and verify the result.
+TEST(WavWriterTest, C) {
+ const std::string outfile = webrtc::test::OutputPath() + "wavtest2.wav";
+ rtc_WavFile *w = rtc_WavOpen(outfile.c_str(), 11904, 2);
+ EXPECT_EQ(11904, rtc_WavSampleRate(w));
+ EXPECT_EQ(2, rtc_WavNumChannels(w));
+ EXPECT_EQ(0u, rtc_WavNumSamples(w));
+ static const uint32_t kNumSamples = 4;
+ rtc_WavWriteSamples(w, &kSamples[0], 2);
+ EXPECT_EQ(2u, rtc_WavNumSamples(w));
+ rtc_WavWriteSamples(w, &kSamples[2], kNumSamples - 2);
+ EXPECT_EQ(kNumSamples, rtc_WavNumSamples(w));
+ rtc_WavClose(w);
+ static const uint8_t kExpectedContents[] = {
+ 'R', 'I', 'F', 'F',
+ 44, 0, 0, 0, // size of whole file - 8: 8 + 44 - 8
+ 'W', 'A', 'V', 'E',
+ 'f', 'm', 't', ' ',
+ 16, 0, 0, 0, // size of fmt block - 8: 24 - 8
+ 1, 0, // format: PCM (1)
+ 2, 0, // channels: 2
+ 0x80, 0x2e, 0, 0, // sample rate: 11904
+ 0, 0xba, 0, 0, // byte rate: 2 * 2 * 11904
+ 4, 0, // block align: NumChannels * BytesPerSample
+ 16, 0, // bits per sample: 2 * 8
+ 'd', 'a', 't', 'a',
+ 8, 0, 0, 0, // size of payload: 8
+ 0, 0, // first sample: 0.0
+ 10, 0, // second sample: 10.0
+ 0xff, 0x7f, // third sample: 4e4 (saturated)
+ 0, 0x80, // fourth sample: -1e9 (saturated)
+ };
+ static const int kContentSize =
+ webrtc::kWavHeaderSize + kNumSamples * sizeof(int16_t);
+ COMPILE_ASSERT(sizeof(kExpectedContents) == kContentSize, content_size);
+ EXPECT_EQ(size_t(kContentSize), webrtc::test::GetFileSize(outfile));
+ FILE* f = fopen(outfile.c_str(), "rb");
+ ASSERT_TRUE(f);
+ uint8_t contents[kContentSize];
+ ASSERT_EQ(1u, fread(contents, kContentSize, 1, f));
+ EXPECT_EQ(0, fclose(f));
+ EXPECT_EQ(0, memcmp(kExpectedContents, contents, kContentSize));
+}
+
+// Write a larger WAV file. You can listen to this file to sanity-check it.
+TEST(WavWriterTest, LargeFile) {
+ std::string outfile = webrtc::test::OutputPath() + "wavtest3.wav";
+ static const int kSampleRate = 8000;
+ static const int kNumChannels = 2;
+ static const uint32_t kNumSamples = 3 * kSampleRate * kNumChannels;
+ float samples[kNumSamples];
+ for (uint32_t i = 0; i < kNumSamples; i += kNumChannels) {
+ // A nice periodic beeping sound.
+ static const double kToneHz = 440;
+ const double t = static_cast<double>(i) / (kNumChannels * kSampleRate);
+ const double x =
+ std::numeric_limits<int16_t>::max() * std::sin(t * kToneHz * 2 * M_PI);
+ samples[i] = std::pow(std::sin(t * 2 * 2 * M_PI), 10) * x;
+ samples[i + 1] = std::pow(std::cos(t * 2 * 2 * M_PI), 10) * x;
+ }
+ {
+ webrtc::WavFile w(outfile, kSampleRate, kNumChannels);
+ EXPECT_EQ(kSampleRate, w.sample_rate());
+ EXPECT_EQ(kNumChannels, w.num_channels());
+ EXPECT_EQ(0u, w.num_samples());
+ w.WriteSamples(samples, kNumSamples);
+ EXPECT_EQ(kNumSamples, w.num_samples());
+ }
+ EXPECT_EQ(sizeof(int16_t) * kNumSamples + webrtc::kWavHeaderSize,
+ webrtc::test::GetFileSize(outfile));
+}
diff --git a/common_types.h b/common_types.h
index 6892a83..05e1faf 100644
--- a/common_types.h
+++ b/common_types.h
@@ -225,6 +225,7 @@
retransmitted_packets(0),
fec_packets(0) {}
+ // TODO(pbos): Rename bytes -> media_bytes.
uint32_t bytes; // Payload bytes, excluding RTP headers and padding.
uint32_t header_bytes; // Number of bytes used by RTP headers.
uint32_t padding_bytes; // Number of padding bytes.
@@ -268,6 +269,15 @@
const unsigned int ssrc) = 0;
};
+// Callback, used to notify an observer whenever the send-side delay is updated.
+class SendSideDelayObserver {
+ public:
+ virtual ~SendSideDelayObserver() {}
+ virtual void SendSideDelayUpdated(int avg_delay_ms,
+ int max_delay_ms,
+ uint32_t ssrc) = 0;
+};
+
// ==================================================================
// Voice specific types
// ==================================================================
@@ -587,10 +597,24 @@
}
};
+// H264 specific.
+struct VideoCodecH264
+{
+ VideoCodecProfile profile;
+ bool frameDroppingOn;
+ int keyFrameInterval;
+ // These are NULL/0 if not externally negotiated.
+ const uint8_t* spsData;
+ size_t spsLen;
+ const uint8_t* ppsData;
+ size_t ppsLen;
+};
+
// Video codec types
enum VideoCodecType
{
kVideoCodecVP8,
+ kVideoCodecH264,
kVideoCodecI420,
kVideoCodecRED,
kVideoCodecULPFEC,
@@ -601,6 +625,7 @@
union VideoCodecUnion
{
VideoCodecVP8 VP8;
+ VideoCodecH264 H264;
};
diff --git a/common_video/BUILD.gn b/common_video/BUILD.gn
new file mode 100644
index 0000000..1b9ad8c
--- /dev/null
+++ b/common_video/BUILD.gn
@@ -0,0 +1,51 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../build/webrtc.gni")
+
+config("common_video_config") {
+ include_dirs = [
+ "interface",
+ "libyuv/include",
+ ]
+}
+
+source_set("common_video") {
+ sources = [
+ "i420_video_frame.cc",
+ "interface/i420_video_frame.h",
+ "interface/native_handle.h",
+ "interface/texture_video_frame.h",
+ "libyuv/include/scaler.h",
+ "libyuv/include/webrtc_libyuv.h",
+ "libyuv/scaler.cc",
+ "libyuv/webrtc_libyuv.cc",
+ "plane.cc",
+ "plane.h",
+ "texture_video_frame.cc"
+ ]
+
+ include_dirs = [ "../modules/interface" ]
+
+ direct_dependent_configs = [ ":common_video_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [ "../system_wrappers" ]
+
+ if (rtc_build_libyuv) {
+ deps += [ "//third_party/libyuv" ]
+ } else {
+ # Need to add a directory normally exported by libyuv.
+ include_dirs += [ "//third_party/libyuv/include" ]
+ }
+}
diff --git a/common_video/OWNERS b/common_video/OWNERS
index 0c328fa..c11f402 100644
--- a/common_video/OWNERS
+++ b/common_video/OWNERS
@@ -1,5 +1,4 @@
stefan@webrtc.org
-mikhal@webrtc.org
marpan@webrtc.org
henrik.lundin@webrtc.org
@@ -9,3 +8,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/common_video/common_video.target.darwin-arm.mk b/common_video/common_video.target.darwin-arm.mk
index 731dd10..2da28ff 100644
--- a/common_video/common_video.target.darwin-arm.mk
+++ b/common_video/common_video.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,23 +145,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.darwin-arm64.mk b/common_video/common_video.target.darwin-arm64.mk
index c83e01b..5dfaaea 100644
--- a/common_video/common_video.target.darwin-arm64.mk
+++ b/common_video/common_video.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,21 +131,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -240,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.darwin-mips.mk b/common_video/common_video.target.darwin-mips.mk
index 7222157..37dd32f 100644
--- a/common_video/common_video.target.darwin-mips.mk
+++ b/common_video/common_video.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -138,23 +134,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,13 +160,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -191,7 +185,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,17 +201,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -257,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.darwin-mips64.mk b/common_video/common_video.target.darwin-mips64.mk
new file mode 100644
index 0000000..37dd32f
--- /dev/null
+++ b/common_video/common_video.target.darwin-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/common_video/i420_video_frame.cc \
+ third_party/webrtc/common_video/libyuv/webrtc_libyuv.cc \
+ third_party/webrtc/common_video/libyuv/scaler.cc \
+ third_party/webrtc/common_video/plane.cc \
+ third_party/webrtc/common_video/texture_video_frame.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libyuv/include \
+ $(LOCAL_PATH)/third_party/libyuv \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libyuv/include \
+ $(LOCAL_PATH)/third_party/libyuv \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_common_video_common_video_gyp
+
+# Alias gyp target name.
+.PHONY: common_video
+common_video: third_party_webrtc_common_video_common_video_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/common_video/common_video.target.darwin-x86.mk b/common_video/common_video.target.darwin-x86.mk
index d3fb766..b473155 100644
--- a/common_video/common_video.target.darwin-x86.mk
+++ b/common_video/common_video.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,21 +137,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.darwin-x86_64.mk b/common_video/common_video.target.darwin-x86_64.mk
index d5c2c7f..63fe854 100644
--- a/common_video/common_video.target.darwin-x86_64.mk
+++ b/common_video/common_video.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,22 +136,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -250,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.linux-arm.mk b/common_video/common_video.target.linux-arm.mk
index 731dd10..2da28ff 100644
--- a/common_video/common_video.target.linux-arm.mk
+++ b/common_video/common_video.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,23 +145,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.linux-arm64.mk b/common_video/common_video.target.linux-arm64.mk
index c83e01b..5dfaaea 100644
--- a/common_video/common_video.target.linux-arm64.mk
+++ b/common_video/common_video.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,21 +131,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -240,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.linux-mips.mk b/common_video/common_video.target.linux-mips.mk
index 7222157..37dd32f 100644
--- a/common_video/common_video.target.linux-mips.mk
+++ b/common_video/common_video.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -138,23 +134,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,13 +160,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -191,7 +185,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,17 +201,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -257,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.linux-mips64.mk b/common_video/common_video.target.linux-mips64.mk
new file mode 100644
index 0000000..37dd32f
--- /dev/null
+++ b/common_video/common_video.target.linux-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/common_video/i420_video_frame.cc \
+ third_party/webrtc/common_video/libyuv/webrtc_libyuv.cc \
+ third_party/webrtc/common_video/libyuv/scaler.cc \
+ third_party/webrtc/common_video/plane.cc \
+ third_party/webrtc/common_video/texture_video_frame.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libyuv/include \
+ $(LOCAL_PATH)/third_party/libyuv \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libyuv/include \
+ $(LOCAL_PATH)/third_party/libyuv \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_common_video_common_video_gyp
+
+# Alias gyp target name.
+.PHONY: common_video
+common_video: third_party_webrtc_common_video_common_video_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/common_video/common_video.target.linux-x86.mk b/common_video/common_video.target.linux-x86.mk
index d3fb766..b473155 100644
--- a/common_video/common_video.target.linux-x86.mk
+++ b/common_video/common_video.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,21 +137,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video.target.linux-x86_64.mk b/common_video/common_video.target.linux-x86_64.mk
index d5c2c7f..63fe854 100644
--- a/common_video/common_video.target.linux-x86_64.mk
+++ b/common_video/common_video.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_common_video_common_video_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,22 +136,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -250,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/common_video/common_video_unittests.gyp b/common_video/common_video_unittests.gyp
index 91a11ed..0405ba0 100644
--- a/common_video/common_video_unittests.gyp
+++ b/common_video/common_video_unittests.gyp
@@ -30,9 +30,7 @@
4267, # size_t to int truncation.
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -41,9 +39,7 @@
},
], # targets
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'common_video_unittests_apk_target',
diff --git a/common_video/interface/i420_video_frame.h b/common_video/interface/i420_video_frame.h
index 5f7a572..ba23c87 100644
--- a/common_video/interface/i420_video_frame.h
+++ b/common_video/interface/i420_video_frame.h
@@ -11,149 +11,7 @@
#ifndef COMMON_VIDEO_INTERFACE_I420_VIDEO_FRAME_H
#define COMMON_VIDEO_INTERFACE_I420_VIDEO_FRAME_H
-// I420VideoFrame class
-//
-// Storing and handling of YUV (I420) video frames.
-
-#include <assert.h>
-
-#include "webrtc/common_video/plane.h"
-#include "webrtc/system_wrappers/interface/scoped_refptr.h"
-#include "webrtc/typedefs.h"
-
-/*
- * I420VideoFrame includes support for a reference counted impl.
- */
-
-namespace webrtc {
-
-enum PlaneType {
- kYPlane = 0,
- kUPlane = 1,
- kVPlane = 2,
- kNumOfPlanes = 3
-};
-
-class I420VideoFrame {
- public:
- I420VideoFrame();
- virtual ~I420VideoFrame();
- // Infrastructure for refCount implementation.
- // Implements dummy functions for reference counting so that non reference
- // counted instantiation can be done. These functions should not be called
- // when creating the frame with new I420VideoFrame().
- // Note: do not pass a I420VideoFrame created with new I420VideoFrame() or
- // equivalent to a scoped_refptr or memory leak will occur.
- virtual int32_t AddRef() {assert(false); return -1;}
- virtual int32_t Release() {assert(false); return -1;}
-
- // CreateEmptyFrame: Sets frame dimensions and allocates buffers based
- // on set dimensions - height and plane stride.
- // If required size is bigger than the allocated one, new buffers of adequate
- // size will be allocated.
- // Return value: 0 on success, -1 on error.
- virtual int CreateEmptyFrame(int width, int height,
- int stride_y, int stride_u, int stride_v);
-
- // CreateFrame: Sets the frame's members and buffers. If required size is
- // bigger than allocated one, new buffers of adequate size will be allocated.
- // Return value: 0 on success, -1 on error.
- virtual int CreateFrame(int size_y, const uint8_t* buffer_y,
- int size_u, const uint8_t* buffer_u,
- int size_v, const uint8_t* buffer_v,
- int width, int height,
- int stride_y, int stride_u, int stride_v);
-
- // Copy frame: If required size is bigger than allocated one, new buffers of
- // adequate size will be allocated.
- // Return value: 0 on success, -1 on error.
- virtual int CopyFrame(const I420VideoFrame& videoFrame);
-
- // Make a copy of |this|. The caller owns the returned frame.
- // Return value: a new frame on success, NULL on error.
- virtual I420VideoFrame* CloneFrame() const;
-
- // Swap Frame.
- virtual void SwapFrame(I420VideoFrame* videoFrame);
-
- // Get pointer to buffer per plane.
- virtual uint8_t* buffer(PlaneType type);
- // Overloading with const.
- virtual const uint8_t* buffer(PlaneType type) const;
-
- // Get allocated size per plane.
- virtual int allocated_size(PlaneType type) const;
-
- // Get allocated stride per plane.
- virtual int stride(PlaneType type) const;
-
- // Set frame width.
- virtual int set_width(int width);
-
- // Set frame height.
- virtual int set_height(int height);
-
- // Get frame width.
- virtual int width() const {return width_;}
-
- // Get frame height.
- virtual int height() const {return height_;}
-
- // Set frame timestamp (90kHz).
- virtual void set_timestamp(uint32_t timestamp) {timestamp_ = timestamp;}
-
- // Get frame timestamp (90kHz).
- virtual uint32_t timestamp() const {return timestamp_;}
-
- // Set capture ntp time in miliseconds.
- virtual void set_ntp_time_ms(int64_t ntp_time_ms) {
- ntp_time_ms_ = ntp_time_ms;
- }
-
- // Get capture ntp time in miliseconds.
- virtual int64_t ntp_time_ms() const {return ntp_time_ms_;}
-
- // Set render time in miliseconds.
- virtual void set_render_time_ms(int64_t render_time_ms) {render_time_ms_ =
- render_time_ms;}
-
- // Get render time in miliseconds.
- virtual int64_t render_time_ms() const {return render_time_ms_;}
-
- // Return true if underlying plane buffers are of zero size, false if not.
- virtual bool IsZeroSize() const;
-
- // Reset underlying plane buffers sizes to 0. This function doesn't
- // clear memory.
- virtual void ResetSize();
-
- // Return the handle of the underlying video frame. This is used when the
- // frame is backed by a texture. The object should be destroyed when it is no
- // longer in use, so the underlying resource can be freed.
- virtual void* native_handle() const;
-
- protected:
- // Verifies legality of parameters.
- // Return value: 0 on success, -1 on error.
- virtual int CheckDimensions(int width, int height,
- int stride_y, int stride_u, int stride_v);
-
- private:
- // Get the pointer to a specific plane.
- const Plane* GetPlane(PlaneType type) const;
- // Overloading with non-const.
- Plane* GetPlane(PlaneType type);
-
- Plane y_plane_;
- Plane u_plane_;
- Plane v_plane_;
- int width_;
- int height_;
- uint32_t timestamp_;
- int64_t ntp_time_ms_;
- int64_t render_time_ms_;
-}; // I420VideoFrame
-
-} // namespace webrtc
+// TODO(pbos): Remove this file and include webrtc/video_frame.h instead.
+#include "webrtc/video_frame.h"
#endif // COMMON_VIDEO_INTERFACE_I420_VIDEO_FRAME_H
diff --git a/common_video/interface/video_image.h b/common_video/interface/video_image.h
index c8df436..4cbf23f 100644
--- a/common_video/interface/video_image.h
+++ b/common_video/interface/video_image.h
@@ -11,62 +11,7 @@
#ifndef COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H
#define COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H
-#include <stdlib.h>
-#include "webrtc/typedefs.h"
-
-namespace webrtc
-{
-
-enum VideoFrameType
-{
- kKeyFrame = 0,
- kDeltaFrame = 1,
- kGoldenFrame = 2,
- kAltRefFrame = 3,
- kSkipFrame = 4
-};
-
-class EncodedImage
-{
-public:
- EncodedImage()
- : _encodedWidth(0),
- _encodedHeight(0),
- _timeStamp(0),
- capture_time_ms_(0),
- _frameType(kDeltaFrame),
- _buffer(NULL),
- _length(0),
- _size(0),
- _completeFrame(false) {}
-
- EncodedImage(uint8_t* buffer,
- uint32_t length,
- uint32_t size)
- : _encodedWidth(0),
- _encodedHeight(0),
- _timeStamp(0),
- ntp_time_ms_(0),
- capture_time_ms_(0),
- _frameType(kDeltaFrame),
- _buffer(buffer),
- _length(length),
- _size(size),
- _completeFrame(false) {}
-
- uint32_t _encodedWidth;
- uint32_t _encodedHeight;
- uint32_t _timeStamp;
- // NTP time of the capture time in local timebase in milliseconds.
- int64_t ntp_time_ms_;
- int64_t capture_time_ms_;
- VideoFrameType _frameType;
- uint8_t* _buffer;
- uint32_t _length;
- uint32_t _size;
- bool _completeFrame;
-};
-
-} // namespace webrtc
+// TODO(pbos): Remove this file and include webrtc/video_frame.h instead.
+#include "webrtc/video_frame.h"
#endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H
diff --git a/common_video/libyuv/Android.mk b/common_video/libyuv/Android.mk
deleted file mode 100644
index 90f6250..0000000
--- a/common_video/libyuv/Android.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_yuv
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- libyuv.cc \
- scaler.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../libyuv/files/include
-
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
\ No newline at end of file
diff --git a/config.h b/config.h
index 7717bba..6f3fb1d 100644
--- a/config.h
+++ b/config.h
@@ -10,8 +10,8 @@
// TODO(pbos): Move Config from common.h to here.
-#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
-#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
+#ifndef WEBRTC_CONFIG_H_
+#define WEBRTC_CONFIG_H_
#include <string>
#include <vector>
@@ -31,14 +31,20 @@
int fraction_loss;
int cumulative_loss;
int extended_max_sequence_number;
- std::string c_name;
};
struct StreamStats {
- StreamStats() : key_frames(0), delta_frames(0), bitrate_bps(0) {}
+ StreamStats()
+ : key_frames(0),
+ delta_frames(0),
+ bitrate_bps(0),
+ avg_delay_ms(0),
+ max_delay_ms(0) {}
uint32_t key_frames;
uint32_t delta_frames;
int32_t bitrate_bps;
+ int avg_delay_ms;
+ int max_delay_ms;
StreamDataCounters rtp_stats;
RtcpStatistics rtcp_stats;
};
@@ -67,9 +73,10 @@
// RTP header extension to use for the video stream, see RFC 5285.
struct RtpExtension {
- RtpExtension(const char* name, int id) : name(name), id(id) {}
+ RtpExtension(const std::string& name, int id) : name(name), id(id) {}
std::string ToString() const;
- // TODO(mflodman) Add API to query supported extensions.
+ static bool IsSupported(const std::string& name);
+
static const char* kTOffset;
static const char* kAbsSendTime;
std::string name;
@@ -101,6 +108,20 @@
std::vector<int> temporal_layers;
};
+struct VideoEncoderConfig {
+ enum ContentType {
+ kRealtimeVideo,
+ kScreenshare,
+ };
+
+ VideoEncoderConfig()
+ : content_type(kRealtimeVideo), encoder_specific_settings(NULL) {}
+
+ std::vector<VideoStream> streams;
+ ContentType content_type;
+ void* encoder_specific_settings;
+};
+
} // namespace webrtc
-#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
+#endif // WEBRTC_CONFIG_H_
diff --git a/engine_configurations.h b/engine_configurations.h
index be858b8..e9f2309 100644
--- a/engine_configurations.h
+++ b/engine_configurations.h
@@ -51,6 +51,7 @@
#define VIDEOCODEC_I420
#define VIDEOCODEC_VP8
+#define VIDEOCODEC_H264
// ============================================================================
// VoiceEngine
diff --git a/examples/OWNERS b/examples/OWNERS
index 5c2e168..c400f67 100644
--- a/examples/OWNERS
+++ b/examples/OWNERS
@@ -1,2 +1 @@
-fischman@webrtc.org
-henrike@webrtc.org
\ No newline at end of file
+henrike@webrtc.org
diff --git a/examples/android/OWNERS b/examples/android/OWNERS
index 475705e..38865f5 100644
--- a/examples/android/OWNERS
+++ b/examples/android/OWNERS
@@ -1,2 +1 @@
-fischman@webrtc.org
henrike@webrtc.org
diff --git a/examples/android/media_demo/jni/on_load.cc b/examples/android/media_demo/jni/on_load.cc
index 9fc4ca9..fd77171 100644
--- a/examples/android/media_demo/jni/on_load.cc
+++ b/examples/android/media_demo/jni/on_load.cc
@@ -15,7 +15,8 @@
#include "webrtc/examples/android/media_demo/jni/jni_helpers.h"
#include "webrtc/examples/android/media_demo/jni/video_engine_jni.h"
#include "webrtc/examples/android/media_demo/jni/voice_engine_jni.h"
-#include "webrtc/video_engine/include/vie_base.h"
+#include "webrtc/modules/video_capture/video_capture_internal.h"
+#include "webrtc/modules/video_render/video_render_internal.h"
#include "webrtc/voice_engine/include/voe_base.h"
// Macro for native functions that can be found by way of jni-auto discovery.
@@ -38,8 +39,10 @@
jobject context) {
webrtc_examples::SetVoeDeviceObjects(g_vm);
webrtc_examples::SetVieDeviceObjects(g_vm);
- CHECK(webrtc::VideoEngine::SetAndroidObjects(g_vm, context) == 0,
- "Failed to register android objects to video engine");
+ CHECK(webrtc::SetCaptureAndroidVM(g_vm, context) == 0,
+ "Failed to register android objects to video capture");
+ CHECK(webrtc::SetRenderAndroidVM(g_vm) == 0,
+ "Failed to register android objects to video render");
CHECK(webrtc::VoiceEngine::SetAndroidObjects(g_vm, jni, context) == 0,
"Failed to register android objects to voice engine");
}
@@ -47,8 +50,10 @@
JOWW(void, NativeWebRtcContextRegistry_unRegister)(
JNIEnv* jni,
jclass) {
- CHECK(webrtc::VideoEngine::SetAndroidObjects(NULL, NULL) == 0,
- "Failed to unregister android objects from video engine");
+ CHECK(webrtc::SetCaptureAndroidVM(NULL, NULL) == 0,
+ "Failed to unregister android objects from video capture");
+ CHECK(webrtc::SetRenderAndroidVM(NULL) == 0,
+ "Failed to unregister android objects from video render");
CHECK(webrtc::VoiceEngine::SetAndroidObjects(NULL, NULL, NULL) == 0,
"Failed to unregister android objects from voice engine");
webrtc_examples::ClearVieDeviceObjects();
diff --git a/examples/android/media_demo/jni/video_engine_jni.cc b/examples/android/media_demo/jni/video_engine_jni.cc
index c6589ec..c7af1c5 100644
--- a/examples/android/media_demo/jni/video_engine_jni.cc
+++ b/examples/android/media_demo/jni/video_engine_jni.cc
@@ -710,3 +710,9 @@
JOWW(void, CameraDesc_dispose)(JNIEnv* jni, jobject j_camera) {
delete GetCameraDesc(jni, j_camera);
}
+
+JOWW(jint, VideoEngine_setLocalSSRC)(JNIEnv* jni, jobject j_vie, jint channel,
+ jint ssrc) {
+ VideoEngineData* vie_data = GetVideoEngineData(jni, j_vie);
+ return vie_data->rtp->SetLocalSSRC(channel, ssrc);
+}
diff --git a/examples/android/media_demo/src/org/webrtc/webrtcdemo/MediaEngine.java b/examples/android/media_demo/src/org/webrtc/webrtcdemo/MediaEngine.java
index f628431..f55bccc 100644
--- a/examples/android/media_demo/src/org/webrtc/webrtcdemo/MediaEngine.java
+++ b/examples/android/media_demo/src/org/webrtc/webrtcdemo/MediaEngine.java
@@ -259,7 +259,7 @@
public void setTrace(boolean enable) {
if (enable) {
vie.setTraceFile("/sdcard/trace.txt", false);
- vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_ERROR);
+ vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_ALL);
return;
}
vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_NONE);
@@ -561,6 +561,14 @@
check(vie.setSendDestination(videoChannel, videoTxPort, remoteIp) == 0,
"Failed setSendDestination");
}
+
+ // Setting localSSRC manually (arbitrary value) for loopback test,
+ // As otherwise we will get a clash and a new SSRC will be set,
+ // Which will reset the receiver and other minor issues.
+ if (remoteIp.equals("127.0.0.1")) {
+ check(vie.setLocalSSRC(videoChannel, 0x01234567) == 0,
+ "Failed setLocalSSRC");
+ }
}
public int videoTxPort() {
diff --git a/examples/android/media_demo/src/org/webrtc/webrtcdemo/VideoEngine.java b/examples/android/media_demo/src/org/webrtc/webrtcdemo/VideoEngine.java
index 7cfa585..677ff42 100644
--- a/examples/android/media_demo/src/org/webrtc/webrtcdemo/VideoEngine.java
+++ b/examples/android/media_demo/src/org/webrtc/webrtcdemo/VideoEngine.java
@@ -116,4 +116,5 @@
return stopRtpDump(channel, direction.ordinal());
}
private native int stopRtpDump(int channel, int direction);
+ public native int setLocalSSRC(int channel, int ssrc);
}
diff --git a/examples/android/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java b/examples/android/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java
index 9cd2bf9..046b415 100644
--- a/examples/android/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java
+++ b/examples/android/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java
@@ -44,7 +44,7 @@
runner = new OpenSlRunner();
// Native code calls back into JVM to be able to configure OpenSL to low
// latency mode. Provide the context needed to do this.
- runner.RegisterApplicationContext(getApplicationContext());
+ OpenSlRunner.RegisterApplicationContext(getApplicationContext());
}
// Called before activity is destroyed.
@@ -56,11 +56,11 @@
private void startOrStop() {
if (isRunning) {
- runner.Stop();
+ OpenSlRunner.Stop();
btStartStopCall.setText(R.string.startCall);
isRunning = false;
} else if (!isRunning){
- runner.Start();
+ OpenSlRunner.Start();
btStartStopCall.setText(R.string.stopCall);
isRunning = true;
}
diff --git a/experiments.h b/experiments.h
index b03d248..ec871f2 100644
--- a/experiments.h
+++ b/experiments.h
@@ -14,16 +14,6 @@
#include "webrtc/typedefs.h"
namespace webrtc {
-struct PaddingStrategy {
- PaddingStrategy()
- : redundant_payloads(false) {}
- explicit PaddingStrategy(bool redundant_payloads)
- : redundant_payloads(redundant_payloads) {}
- virtual ~PaddingStrategy() {}
-
- const bool redundant_payloads;
-};
-
struct RemoteBitrateEstimatorMinRate {
RemoteBitrateEstimatorMinRate() : min_rate(30000) {}
RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {}
@@ -31,15 +21,6 @@
uint32_t min_rate;
};
-struct SkipEncodingUnusedStreams {
- SkipEncodingUnusedStreams() : enabled(false) {}
- explicit SkipEncodingUnusedStreams(bool set_enabled)
- : enabled(set_enabled) {}
- virtual ~SkipEncodingUnusedStreams() {}
-
- const bool enabled;
-};
-
struct AimdRemoteRateControl {
AimdRemoteRateControl() : enabled(false) {}
explicit AimdRemoteRateControl(bool set_enabled)
diff --git a/libjingle/xmllite/OWNERS b/libjingle/xmllite/OWNERS
new file mode 100644
index 0000000..1a24a6a
--- /dev/null
+++ b/libjingle/xmllite/OWNERS
@@ -0,0 +1,13 @@
+henrika@webrtc.org
+henrike@webrtc.org
+henrikg@webrtc.org
+hta@webrtc.org
+jiayl@webrtc.org
+juberti@webrtc.org
+mflodman@webrtc.org
+perkj@webrtc.org
+pthatcher@webrtc.org
+sergeyu@chromium.org
+tommi@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/libjingle/xmllite/qname.cc b/libjingle/xmllite/qname.cc
new file mode 100644
index 0000000..6abde32
--- /dev/null
+++ b/libjingle/xmllite/qname.cc
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/qname.h"
+
+namespace buzz {
+
+QName::QName() {
+}
+
+QName::QName(const QName& qname)
+ : namespace_(qname.namespace_),
+ local_part_(qname.local_part_) {
+}
+
+QName::QName(const StaticQName& const_value)
+ : namespace_(const_value.ns),
+ local_part_(const_value.local) {
+}
+
+QName::QName(const std::string& ns, const std::string& local)
+ : namespace_(ns),
+ local_part_(local) {
+}
+
+QName::QName(const std::string& merged_or_local) {
+ size_t i = merged_or_local.rfind(':');
+ if (i == std::string::npos) {
+ local_part_ = merged_or_local;
+ } else {
+ namespace_ = merged_or_local.substr(0, i);
+ local_part_ = merged_or_local.substr(i + 1);
+ }
+}
+
+QName::~QName() {
+}
+
+std::string QName::Merged() const {
+ if (namespace_[0] == '\0')
+ return local_part_;
+
+ std::string result;
+ result.reserve(namespace_.length() + 1 + local_part_.length());
+ result += namespace_;
+ result += ':';
+ result += local_part_;
+ return result;
+}
+
+bool QName::IsEmpty() const {
+ return namespace_.empty() && local_part_.empty();
+}
+
+int QName::Compare(const StaticQName& other) const {
+ int result = local_part_.compare(other.local);
+ if (result != 0)
+ return result;
+
+ return namespace_.compare(other.ns);
+}
+
+int QName::Compare(const QName& other) const {
+ int result = local_part_.compare(other.local_part_);
+ if (result != 0)
+ return result;
+
+ return namespace_.compare(other.namespace_);
+}
+
+} // namespace buzz
diff --git a/libjingle/xmllite/qname.h b/libjingle/xmllite/qname.h
new file mode 100644
index 0000000..1e772d3
--- /dev/null
+++ b/libjingle/xmllite/qname.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_LIBJINGLE_XMLLITE_QNAME_H_
+#define WEBRTC_LIBJINGLE_XMLLITE_QNAME_H_
+
+#include <string>
+
+namespace buzz {
+
+class QName;
+
+// StaticQName is used to represend constant quailified names. They
+// can be initialized statically and don't need intializers code, e.g.
+// const StaticQName QN_FOO = { "foo_namespace", "foo" };
+//
+// Beside this use case, QName should be used everywhere
+// else. StaticQName instances are implicitly converted to QName
+// objects.
+struct StaticQName {
+ const char* const ns;
+ const char* const local;
+
+ bool operator==(const QName& other) const;
+ bool operator!=(const QName& other) const;
+};
+
+class QName {
+ public:
+ QName();
+ QName(const QName& qname);
+ QName(const StaticQName& const_value);
+ QName(const std::string& ns, const std::string& local);
+ explicit QName(const std::string& merged_or_local);
+ ~QName();
+
+ const std::string& Namespace() const { return namespace_; }
+ const std::string& LocalPart() const { return local_part_; }
+ std::string Merged() const;
+ bool IsEmpty() const;
+
+ int Compare(const StaticQName& other) const;
+ int Compare(const QName& other) const;
+
+ bool operator==(const StaticQName& other) const {
+ return Compare(other) == 0;
+ }
+ bool operator==(const QName& other) const {
+ return Compare(other) == 0;
+ }
+ bool operator!=(const StaticQName& other) const {
+ return Compare(other) != 0;
+ }
+ bool operator!=(const QName& other) const {
+ return Compare(other) != 0;
+ }
+ bool operator<(const QName& other) const {
+ return Compare(other) < 0;
+ }
+
+ private:
+ std::string namespace_;
+ std::string local_part_;
+};
+
+inline bool StaticQName::operator==(const QName& other) const {
+ return other.Compare(*this) == 0;
+}
+
+inline bool StaticQName::operator!=(const QName& other) const {
+ return other.Compare(*this) != 0;
+}
+
+} // namespace buzz
+
+#endif // WEBRTC_LIBJINGLE_XMLLITE_QNAME_H_
diff --git a/libjingle/xmllite/qname_unittest.cc b/libjingle/xmllite/qname_unittest.cc
new file mode 100644
index 0000000..2a129b8
--- /dev/null
+++ b/libjingle/xmllite/qname_unittest.cc
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <string>
+#include "webrtc/libjingle/xmllite/qname.h"
+#include "webrtc/base/gunit.h"
+
+using buzz::StaticQName;
+using buzz::QName;
+
+TEST(QNameTest, TestTrivial) {
+ QName name("test");
+ EXPECT_EQ(name.LocalPart(), "test");
+ EXPECT_EQ(name.Namespace(), "");
+}
+
+TEST(QNameTest, TestSplit) {
+ QName name("a:test");
+ EXPECT_EQ(name.LocalPart(), "test");
+ EXPECT_EQ(name.Namespace(), "a");
+ QName name2("a-very:long:namespace:test-this");
+ EXPECT_EQ(name2.LocalPart(), "test-this");
+ EXPECT_EQ(name2.Namespace(), "a-very:long:namespace");
+}
+
+TEST(QNameTest, TestMerge) {
+ QName name("a", "test");
+ EXPECT_EQ(name.LocalPart(), "test");
+ EXPECT_EQ(name.Namespace(), "a");
+ EXPECT_EQ(name.Merged(), "a:test");
+ QName name2("a-very:long:namespace", "test-this");
+ EXPECT_EQ(name2.LocalPart(), "test-this");
+ EXPECT_EQ(name2.Namespace(), "a-very:long:namespace");
+ EXPECT_EQ(name2.Merged(), "a-very:long:namespace:test-this");
+}
+
+TEST(QNameTest, TestAssignment) {
+ QName name("a", "test");
+ // copy constructor
+ QName namecopy(name);
+ EXPECT_EQ(namecopy.LocalPart(), "test");
+ EXPECT_EQ(namecopy.Namespace(), "a");
+ QName nameassigned("");
+ nameassigned = name;
+ EXPECT_EQ(nameassigned.LocalPart(), "test");
+ EXPECT_EQ(nameassigned.Namespace(), "a");
+}
+
+TEST(QNameTest, TestConstAssignment) {
+ StaticQName name = { "a", "test" };
+ QName namecopy(name);
+ EXPECT_EQ(namecopy.LocalPart(), "test");
+ EXPECT_EQ(namecopy.Namespace(), "a");
+ QName nameassigned("");
+ nameassigned = name;
+ EXPECT_EQ(nameassigned.LocalPart(), "test");
+ EXPECT_EQ(nameassigned.Namespace(), "a");
+}
+
+TEST(QNameTest, TestEquality) {
+ QName name("a-very:long:namespace:test-this");
+ QName name2("a-very:long:namespace", "test-this");
+ QName name3("a-very:long:namespaxe", "test-this");
+ EXPECT_TRUE(name == name2);
+ EXPECT_FALSE(name == name3);
+}
+
+TEST(QNameTest, TestCompare) {
+ QName name("a");
+ QName name2("nsa", "a");
+ QName name3("nsa", "b");
+ QName name4("nsb", "b");
+
+ EXPECT_TRUE(name < name2);
+ EXPECT_FALSE(name2 < name);
+
+ EXPECT_FALSE(name2 < name2);
+
+ EXPECT_TRUE(name2 < name3);
+ EXPECT_FALSE(name3 < name2);
+
+ EXPECT_TRUE(name3 < name4);
+ EXPECT_FALSE(name4 < name3);
+}
+
+TEST(QNameTest, TestStaticQName) {
+ const StaticQName const_name1 = { "namespace", "local-name1" };
+ const StaticQName const_name2 = { "namespace", "local-name2" };
+ const QName name("namespace", "local-name1");
+ const QName name1 = const_name1;
+ const QName name2 = const_name2;
+
+ EXPECT_TRUE(name == const_name1);
+ EXPECT_TRUE(const_name1 == name);
+ EXPECT_FALSE(name != const_name1);
+ EXPECT_FALSE(const_name1 != name);
+
+ EXPECT_TRUE(name == name1);
+ EXPECT_TRUE(name1 == name);
+ EXPECT_FALSE(name != name1);
+ EXPECT_FALSE(name1 != name);
+
+ EXPECT_FALSE(name == name2);
+ EXPECT_FALSE(name2 == name);
+ EXPECT_TRUE(name != name2);
+ EXPECT_TRUE(name2 != name);
+}
diff --git a/libjingle/xmllite/rtc_xmllite.target.darwin-arm.mk b/libjingle/xmllite/rtc_xmllite.target.darwin-arm.mk
new file mode 100644
index 0000000..65cb34d
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-arm.mk
@@ -0,0 +1,309 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.darwin-arm64.mk b/libjingle/xmllite/rtc_xmllite.target.darwin-arm64.mk
new file mode 100644
index 0000000..5f6a5bf
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-arm64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.darwin-mips.mk b/libjingle/xmllite/rtc_xmllite.target.darwin-mips.mk
new file mode 100644
index 0000000..cc816a5
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-mips.mk
@@ -0,0 +1,287 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.darwin-mips64.mk b/libjingle/xmllite/rtc_xmllite.target.darwin-mips64.mk
new file mode 100644
index 0000000..cc816a5
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-mips64.mk
@@ -0,0 +1,287 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.darwin-x86.mk b/libjingle/xmllite/rtc_xmllite.target.darwin-x86.mk
new file mode 100644
index 0000000..a1f7c8f
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-x86.mk
@@ -0,0 +1,291 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.darwin-x86_64.mk b/libjingle/xmllite/rtc_xmllite.target.darwin-x86_64.mk
new file mode 100644
index 0000000..8fc8297
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-x86_64.mk
@@ -0,0 +1,289 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.linux-arm.mk b/libjingle/xmllite/rtc_xmllite.target.linux-arm.mk
new file mode 100644
index 0000000..65cb34d
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-arm.mk
@@ -0,0 +1,309 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.linux-arm64.mk b/libjingle/xmllite/rtc_xmllite.target.linux-arm64.mk
new file mode 100644
index 0000000..5f6a5bf
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-arm64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.linux-mips.mk b/libjingle/xmllite/rtc_xmllite.target.linux-mips.mk
new file mode 100644
index 0000000..cc816a5
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-mips.mk
@@ -0,0 +1,287 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.linux-mips64.mk b/libjingle/xmllite/rtc_xmllite.target.linux-mips64.mk
new file mode 100644
index 0000000..cc816a5
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-mips64.mk
@@ -0,0 +1,287 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.linux-x86.mk b/libjingle/xmllite/rtc_xmllite.target.linux-x86.mk
new file mode 100644
index 0000000..a1f7c8f
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-x86.mk
@@ -0,0 +1,291 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/rtc_xmllite.target.linux-x86_64.mk b/libjingle/xmllite/rtc_xmllite.target.linux-x86_64.mk
new file mode 100644
index 0000000..8fc8297
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-x86_64.mk
@@ -0,0 +1,289 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/libjingle/xmllite/qname.cc \
+ third_party/webrtc/libjingle/xmllite/xmlbuilder.cc \
+ third_party/webrtc/libjingle/xmllite/xmlconstants.cc \
+ third_party/webrtc/libjingle/xmllite/xmlelement.cc \
+ third_party/webrtc/libjingle/xmllite/xmlnsstack.cc \
+ third_party/webrtc/libjingle/xmllite/xmlparser.cc \
+ third_party/webrtc/libjingle/xmllite/xmlprinter.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_OPENSSL' \
+ '-DHAVE_OPENSSL_SSL_H' \
+ '-DXML_STATIC' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/expat/files/lib \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+# Alias gyp target name.
+.PHONY: rtc_xmllite
+rtc_xmllite: third_party_webrtc_libjingle_xmllite_rtc_xmllite_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/libjingle/xmllite/xmlbuilder.cc b/libjingle/xmllite/xmlbuilder.cc
new file mode 100644
index 0000000..9d982c3
--- /dev/null
+++ b/libjingle/xmllite/xmlbuilder.cc
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlbuilder.h"
+
+#include <set>
+#include <vector>
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+#include "webrtc/base/common.h"
+
+namespace buzz {
+
+XmlBuilder::XmlBuilder() :
+ pelCurrent_(NULL),
+ pelRoot_(),
+ pvParents_(new std::vector<XmlElement *>()) {
+}
+
+void
+XmlBuilder::Reset() {
+ pelRoot_.reset();
+ pelCurrent_ = NULL;
+ pvParents_->clear();
+}
+
+XmlElement *
+XmlBuilder::BuildElement(XmlParseContext * pctx,
+ const char * name, const char ** atts) {
+ QName tagName(pctx->ResolveQName(name, false));
+ if (tagName.IsEmpty())
+ return NULL;
+
+ XmlElement * pelNew = new XmlElement(tagName);
+
+ if (!*atts)
+ return pelNew;
+
+ std::set<QName> seenNonlocalAtts;
+
+ while (*atts) {
+ QName attName(pctx->ResolveQName(*atts, true));
+ if (attName.IsEmpty()) {
+ delete pelNew;
+ return NULL;
+ }
+
+ // verify that namespaced names are unique
+ if (!attName.Namespace().empty()) {
+ if (seenNonlocalAtts.count(attName)) {
+ delete pelNew;
+ return NULL;
+ }
+ seenNonlocalAtts.insert(attName);
+ }
+
+ pelNew->AddAttr(attName, std::string(*(atts + 1)));
+ atts += 2;
+ }
+
+ return pelNew;
+}
+
+void
+XmlBuilder::StartElement(XmlParseContext * pctx,
+ const char * name, const char ** atts) {
+ XmlElement * pelNew = BuildElement(pctx, name, atts);
+ if (pelNew == NULL) {
+ pctx->RaiseError(XML_ERROR_SYNTAX);
+ return;
+ }
+
+ if (!pelCurrent_) {
+ pelCurrent_ = pelNew;
+ pelRoot_.reset(pelNew);
+ pvParents_->push_back(NULL);
+ } else {
+ pelCurrent_->AddElement(pelNew);
+ pvParents_->push_back(pelCurrent_);
+ pelCurrent_ = pelNew;
+ }
+}
+
+void
+XmlBuilder::EndElement(XmlParseContext * pctx, const char * name) {
+ RTC_UNUSED(pctx);
+ RTC_UNUSED(name);
+ pelCurrent_ = pvParents_->back();
+ pvParents_->pop_back();
+}
+
+void
+XmlBuilder::CharacterData(XmlParseContext * pctx,
+ const char * text, int len) {
+ RTC_UNUSED(pctx);
+ if (pelCurrent_) {
+ pelCurrent_->AddParsedText(text, len);
+ }
+}
+
+void
+XmlBuilder::Error(XmlParseContext * pctx, XML_Error err) {
+ RTC_UNUSED(pctx);
+ RTC_UNUSED(err);
+ pelRoot_.reset(NULL);
+ pelCurrent_ = NULL;
+ pvParents_->clear();
+}
+
+XmlElement *
+XmlBuilder::CreateElement() {
+ return pelRoot_.release();
+}
+
+XmlElement *
+XmlBuilder::BuiltElement() {
+ return pelRoot_.get();
+}
+
+XmlBuilder::~XmlBuilder() {
+}
+
+} // namespace buzz
diff --git a/libjingle/xmllite/xmlbuilder.h b/libjingle/xmllite/xmlbuilder.h
new file mode 100644
index 0000000..354bf0b
--- /dev/null
+++ b/libjingle/xmllite/xmlbuilder.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef _xmlbuilder_h_
+#define _xmlbuilder_h_
+
+#include <string>
+#include <vector>
+#include "webrtc/libjingle/xmllite/xmlparser.h"
+#include "webrtc/base/scoped_ptr.h"
+
+#ifdef EXPAT_RELATIVE_PATH
+#include "expat.h"
+#else
+#include "third_party/expat/v2_0_1/Source/lib/expat.h"
+#endif // EXPAT_RELATIVE_PATH
+
+namespace buzz {
+
+class XmlElement;
+class XmlParseContext;
+
+
+class XmlBuilder : public XmlParseHandler {
+public:
+ XmlBuilder();
+
+ static XmlElement * BuildElement(XmlParseContext * pctx,
+ const char * name, const char ** atts);
+ virtual void StartElement(XmlParseContext * pctx,
+ const char * name, const char ** atts);
+ virtual void EndElement(XmlParseContext * pctx, const char * name);
+ virtual void CharacterData(XmlParseContext * pctx,
+ const char * text, int len);
+ virtual void Error(XmlParseContext * pctx, XML_Error);
+ virtual ~XmlBuilder();
+
+ void Reset();
+
+ // Take ownership of the built element; second call returns NULL
+ XmlElement * CreateElement();
+
+ // Peek at the built element without taking ownership
+ XmlElement * BuiltElement();
+
+private:
+ XmlElement * pelCurrent_;
+ rtc::scoped_ptr<XmlElement> pelRoot_;
+ rtc::scoped_ptr<std::vector<XmlElement*> > pvParents_;
+};
+
+}
+
+#endif
diff --git a/libjingle/xmllite/xmlbuilder_unittest.cc b/libjingle/xmllite/xmlbuilder_unittest.cc
new file mode 100644
index 0000000..8a5ce08
--- /dev/null
+++ b/libjingle/xmllite/xmlbuilder_unittest.cc
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include "webrtc/libjingle/xmllite/xmlbuilder.h"
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+#include "webrtc/libjingle/xmllite/xmlparser.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/gunit.h"
+
+using buzz::XmlBuilder;
+using buzz::XmlElement;
+using buzz::XmlParser;
+
+TEST(XmlBuilderTest, TestTrivial) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing/>");
+ EXPECT_EQ("<testing/>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestAttributes1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='b'/>");
+ EXPECT_EQ("<testing a=\"b\"/>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestAttributes2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing e='' long='some text'/>");
+ EXPECT_EQ("<testing e=\"\" long=\"some text\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestNesting1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<top><first/><second><third></third></second></top>");
+ EXPECT_EQ("<top><first/><second><third/></second></top>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestNesting2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<top><fifth><deeper><and><deeper/></and><sibling><leaf/>"
+ "</sibling></deeper></fifth><first/><second><third></third>"
+ "</second></top>");
+ EXPECT_EQ("<top><fifth><deeper><and><deeper/></and><sibling><leaf/>"
+ "</sibling></deeper></fifth><first/><second><third/>"
+ "</second></top>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='>'/>");
+ EXPECT_EQ("<testing a=\">\"/>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='<>&"'/>");
+ EXPECT_EQ("<testing a=\"<>&"\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting3) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='so "important"'/>");
+ EXPECT_EQ("<testing a=\"so "important"\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting4) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='"important", yes'/>");
+ EXPECT_EQ("<testing a=\""important", yes\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting5) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<testing a='<what is "important">'/>");
+ EXPECT_EQ("<testing a=\"<what is "important">\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing>></testing>");
+ EXPECT_EQ("<testing>></testing>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing><>&"</testing>");
+ EXPECT_EQ("<testing><>&\"</testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText3) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing>so <important></testing>");
+ EXPECT_EQ("<testing>so <important></testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText4) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing><important>, yes</testing>");
+ EXPECT_EQ("<testing><important>, yes</testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText5) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<testing>importance &<important>&</testing>");
+ EXPECT_EQ("<testing>importance &<important>&</testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestNamespace1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing xmlns='foo'/>");
+ EXPECT_EQ("<testing xmlns=\"foo\"/>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestNamespace2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing xmlns:a='foo' a:b='c'/>");
+ EXPECT_EQ("<testing xmlns:a=\"foo\" a:b=\"c\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestNamespace3) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing xmlns:a=''/>");
+ EXPECT_TRUE(NULL == builder.BuiltElement());
+}
+
+TEST(XmlBuilderTest, TestNamespace4) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a:b='c'/>");
+ EXPECT_TRUE(NULL == builder.BuiltElement());
+}
+
+TEST(XmlBuilderTest, TestAttrCollision1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='first' a='second'/>");
+ EXPECT_TRUE(NULL == builder.BuiltElement());
+}
+
+TEST(XmlBuilderTest, TestAttrCollision2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<testing xmlns:a='foo' xmlns:b='foo' a:x='c' b:x='d'/>");
+ EXPECT_TRUE(NULL == builder.BuiltElement());
+}
+
+TEST(XmlBuilderTest, TestAttrCollision3) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<testing xmlns:a='foo'><nested xmlns:b='foo' a:x='c' b:x='d'/>"
+ "</testing>");
+ EXPECT_TRUE(NULL == builder.BuiltElement());
+}
+
diff --git a/libjingle/xmllite/xmlconstants.cc b/libjingle/xmllite/xmlconstants.cc
new file mode 100644
index 0000000..0b9a9ff
--- /dev/null
+++ b/libjingle/xmllite/xmlconstants.cc
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+
+namespace buzz {
+
+const char STR_EMPTY[] = "";
+const char NS_XML[] = "http://www.w3.org/XML/1998/namespace";
+const char NS_XMLNS[] = "http://www.w3.org/2000/xmlns/";
+const char STR_XMLNS[] = "xmlns";
+const char STR_XML[] = "xml";
+const char STR_VERSION[] = "version";
+const char STR_ENCODING[] = "encoding";
+
+const StaticQName QN_XMLNS = { STR_EMPTY, STR_XMLNS };
+
+} // namespace buzz
diff --git a/libjingle/xmllite/xmlconstants.h b/libjingle/xmllite/xmlconstants.h
new file mode 100644
index 0000000..0064ee9
--- /dev/null
+++ b/libjingle/xmllite/xmlconstants.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_LIBJINGLE_XMLLITE_XMLCONSTANTS_H_
+#define WEBRTC_LIBJINGLE_XMLLITE_XMLCONSTANTS_H_
+
+#include "webrtc/libjingle/xmllite/qname.h"
+
+namespace buzz {
+
+extern const char STR_EMPTY[];
+extern const char NS_XML[];
+extern const char NS_XMLNS[];
+extern const char STR_XMLNS[];
+extern const char STR_XML[];
+extern const char STR_VERSION[];
+extern const char STR_ENCODING[];
+
+extern const StaticQName QN_XMLNS;
+
+} // namespace buzz
+
+#endif // WEBRTC_LIBJINGLE_XMLLITE_XMLCONSTANTS_H_
diff --git a/libjingle/xmllite/xmlelement.cc b/libjingle/xmllite/xmlelement.cc
new file mode 100644
index 0000000..2d90836
--- /dev/null
+++ b/libjingle/xmllite/xmlelement.cc
@@ -0,0 +1,496 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+
+#include <ostream>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include "webrtc/libjingle/xmllite/qname.h"
+#include "webrtc/libjingle/xmllite/xmlbuilder.h"
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+#include "webrtc/libjingle/xmllite/xmlparser.h"
+#include "webrtc/libjingle/xmllite/xmlprinter.h"
+#include "webrtc/base/common.h"
+
+namespace buzz {
+
+XmlChild::~XmlChild() {
+}
+
+bool XmlText::IsTextImpl() const {
+ return true;
+}
+
+XmlElement* XmlText::AsElementImpl() const {
+ return NULL;
+}
+
+XmlText* XmlText::AsTextImpl() const {
+ return const_cast<XmlText *>(this);
+}
+
+void XmlText::SetText(const std::string& text) {
+ text_ = text;
+}
+
+void XmlText::AddParsedText(const char* buf, int len) {
+ text_.append(buf, len);
+}
+
+void XmlText::AddText(const std::string& text) {
+ text_ += text;
+}
+
+XmlText::~XmlText() {
+}
+
+XmlElement::XmlElement(const QName& name) :
+ name_(name),
+ first_attr_(NULL),
+ last_attr_(NULL),
+ first_child_(NULL),
+ last_child_(NULL),
+ cdata_(false) {
+}
+
+XmlElement::XmlElement(const XmlElement& elt) :
+ XmlChild(),
+ name_(elt.name_),
+ first_attr_(NULL),
+ last_attr_(NULL),
+ first_child_(NULL),
+ last_child_(NULL),
+ cdata_(false) {
+
+ // copy attributes
+ XmlAttr* attr;
+ XmlAttr ** plast_attr = &first_attr_;
+ XmlAttr* newAttr = NULL;
+ for (attr = elt.first_attr_; attr; attr = attr->NextAttr()) {
+ newAttr = new XmlAttr(*attr);
+ *plast_attr = newAttr;
+ plast_attr = &(newAttr->next_attr_);
+ }
+ last_attr_ = newAttr;
+
+ // copy children
+ XmlChild* pChild;
+ XmlChild ** ppLast = &first_child_;
+ XmlChild* newChild = NULL;
+
+ for (pChild = elt.first_child_; pChild; pChild = pChild->NextChild()) {
+ if (pChild->IsText()) {
+ newChild = new XmlText(*(pChild->AsText()));
+ } else {
+ newChild = new XmlElement(*(pChild->AsElement()));
+ }
+ *ppLast = newChild;
+ ppLast = &(newChild->next_child_);
+ }
+ last_child_ = newChild;
+
+ cdata_ = elt.cdata_;
+}
+
+XmlElement::XmlElement(const QName& name, bool useDefaultNs) :
+ name_(name),
+ first_attr_(useDefaultNs ? new XmlAttr(QN_XMLNS, name.Namespace()) : NULL),
+ last_attr_(first_attr_),
+ first_child_(NULL),
+ last_child_(NULL),
+ cdata_(false) {
+}
+
+bool XmlElement::IsTextImpl() const {
+ return false;
+}
+
+XmlElement* XmlElement::AsElementImpl() const {
+ return const_cast<XmlElement *>(this);
+}
+
+XmlText* XmlElement::AsTextImpl() const {
+ return NULL;
+}
+
+const std::string XmlElement::BodyText() const {
+ if (first_child_ && first_child_->IsText() && last_child_ == first_child_) {
+ return first_child_->AsText()->Text();
+ }
+
+ return std::string();
+}
+
+void XmlElement::SetBodyText(const std::string& text) {
+ if (text.empty()) {
+ ClearChildren();
+ } else if (first_child_ == NULL) {
+ AddText(text);
+ } else if (first_child_->IsText() && last_child_ == first_child_) {
+ first_child_->AsText()->SetText(text);
+ } else {
+ ClearChildren();
+ AddText(text);
+ }
+}
+
+const QName XmlElement::FirstElementName() const {
+ const XmlElement* element = FirstElement();
+ if (element == NULL)
+ return QName();
+ return element->Name();
+}
+
+XmlAttr* XmlElement::FirstAttr() {
+ return first_attr_;
+}
+
+const std::string XmlElement::Attr(const StaticQName& name) const {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; attr = attr->next_attr_) {
+ if (attr->name_ == name)
+ return attr->value_;
+ }
+ return std::string();
+}
+
+const std::string XmlElement::Attr(const QName& name) const {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; attr = attr->next_attr_) {
+ if (attr->name_ == name)
+ return attr->value_;
+ }
+ return std::string();
+}
+
+bool XmlElement::HasAttr(const StaticQName& name) const {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; attr = attr->next_attr_) {
+ if (attr->name_ == name)
+ return true;
+ }
+ return false;
+}
+
+bool XmlElement::HasAttr(const QName& name) const {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; attr = attr->next_attr_) {
+ if (attr->name_ == name)
+ return true;
+ }
+ return false;
+}
+
+void XmlElement::SetAttr(const QName& name, const std::string& value) {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; attr = attr->next_attr_) {
+ if (attr->name_ == name)
+ break;
+ }
+ if (!attr) {
+ attr = new XmlAttr(name, value);
+ if (last_attr_)
+ last_attr_->next_attr_ = attr;
+ else
+ first_attr_ = attr;
+ last_attr_ = attr;
+ return;
+ }
+ attr->value_ = value;
+}
+
+void XmlElement::ClearAttr(const QName& name) {
+ XmlAttr* attr;
+ XmlAttr* last_attr = NULL;
+ for (attr = first_attr_; attr; attr = attr->next_attr_) {
+ if (attr->name_ == name)
+ break;
+ last_attr = attr;
+ }
+ if (!attr)
+ return;
+ if (!last_attr)
+ first_attr_ = attr->next_attr_;
+ else
+ last_attr->next_attr_ = attr->next_attr_;
+ if (last_attr_ == attr)
+ last_attr_ = last_attr;
+ delete attr;
+}
+
+XmlChild* XmlElement::FirstChild() {
+ return first_child_;
+}
+
+XmlElement* XmlElement::FirstElement() {
+ XmlChild* pChild;
+ for (pChild = first_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText())
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement* XmlElement::NextElement() {
+ XmlChild* pChild;
+ for (pChild = next_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText())
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement* XmlElement::FirstWithNamespace(const std::string& ns) {
+ XmlChild* pChild;
+ for (pChild = first_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name().Namespace() == ns)
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement *
+XmlElement::NextWithNamespace(const std::string& ns) {
+ XmlChild* pChild;
+ for (pChild = next_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name().Namespace() == ns)
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement *
+XmlElement::FirstNamed(const QName& name) {
+ XmlChild* pChild;
+ for (pChild = first_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name() == name)
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement *
+XmlElement::FirstNamed(const StaticQName& name) {
+ XmlChild* pChild;
+ for (pChild = first_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name() == name)
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement *
+XmlElement::NextNamed(const QName& name) {
+ XmlChild* pChild;
+ for (pChild = next_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name() == name)
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement *
+XmlElement::NextNamed(const StaticQName& name) {
+ XmlChild* pChild;
+ for (pChild = next_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name() == name)
+ return pChild->AsElement();
+ }
+ return NULL;
+}
+
+XmlElement* XmlElement::FindOrAddNamedChild(const QName& name) {
+ XmlElement* child = FirstNamed(name);
+ if (!child) {
+ child = new XmlElement(name);
+ AddElement(child);
+ }
+
+ return child;
+}
+
+const std::string XmlElement::TextNamed(const QName& name) const {
+ XmlChild* pChild;
+ for (pChild = first_child_; pChild; pChild = pChild->next_child_) {
+ if (!pChild->IsText() && pChild->AsElement()->Name() == name)
+ return pChild->AsElement()->BodyText();
+ }
+ return std::string();
+}
+
+void XmlElement::InsertChildAfter(XmlChild* predecessor, XmlChild* next) {
+ if (predecessor == NULL) {
+ next->next_child_ = first_child_;
+ first_child_ = next;
+ }
+ else {
+ next->next_child_ = predecessor->next_child_;
+ predecessor->next_child_ = next;
+ }
+}
+
+void XmlElement::RemoveChildAfter(XmlChild* predecessor) {
+ XmlChild* next;
+
+ if (predecessor == NULL) {
+ next = first_child_;
+ first_child_ = next->next_child_;
+ }
+ else {
+ next = predecessor->next_child_;
+ predecessor->next_child_ = next->next_child_;
+ }
+
+ if (last_child_ == next)
+ last_child_ = predecessor;
+
+ delete next;
+}
+
+void XmlElement::AddAttr(const QName& name, const std::string& value) {
+ ASSERT(!HasAttr(name));
+
+ XmlAttr ** pprev = last_attr_ ? &(last_attr_->next_attr_) : &first_attr_;
+ last_attr_ = (*pprev = new XmlAttr(name, value));
+}
+
+void XmlElement::AddAttr(const QName& name, const std::string& value,
+ int depth) {
+ XmlElement* element = this;
+ while (depth--) {
+ element = element->last_child_->AsElement();
+ }
+ element->AddAttr(name, value);
+}
+
+void XmlElement::AddParsedText(const char* cstr, int len) {
+ if (len == 0)
+ return;
+
+ if (last_child_ && last_child_->IsText()) {
+ last_child_->AsText()->AddParsedText(cstr, len);
+ return;
+ }
+ XmlChild ** pprev = last_child_ ? &(last_child_->next_child_) : &first_child_;
+ last_child_ = *pprev = new XmlText(cstr, len);
+}
+
+void XmlElement::AddCDATAText(const char* buf, int len) {
+ cdata_ = true;
+ AddParsedText(buf, len);
+}
+
+void XmlElement::AddText(const std::string& text) {
+ if (text == STR_EMPTY)
+ return;
+
+ if (last_child_ && last_child_->IsText()) {
+ last_child_->AsText()->AddText(text);
+ return;
+ }
+ XmlChild ** pprev = last_child_ ? &(last_child_->next_child_) : &first_child_;
+ last_child_ = *pprev = new XmlText(text);
+}
+
+void XmlElement::AddText(const std::string& text, int depth) {
+ // note: the first syntax is ambigious for msvc 6
+ // XmlElement* pel(this);
+ XmlElement* element = this;
+ while (depth--) {
+ element = element->last_child_->AsElement();
+ }
+ element->AddText(text);
+}
+
+void XmlElement::AddElement(XmlElement *child) {
+ if (child == NULL)
+ return;
+
+ XmlChild ** pprev = last_child_ ? &(last_child_->next_child_) : &first_child_;
+ *pprev = child;
+ last_child_ = child;
+ child->next_child_ = NULL;
+}
+
+void XmlElement::AddElement(XmlElement *child, int depth) {
+ XmlElement* element = this;
+ while (depth--) {
+ element = element->last_child_->AsElement();
+ }
+ element->AddElement(child);
+}
+
+void XmlElement::ClearNamedChildren(const QName& name) {
+ XmlChild* prev_child = NULL;
+ XmlChild* next_child;
+ XmlChild* child;
+ for (child = FirstChild(); child; child = next_child) {
+ next_child = child->NextChild();
+ if (!child->IsText() && child->AsElement()->Name() == name)
+ {
+ RemoveChildAfter(prev_child);
+ continue;
+ }
+ prev_child = child;
+ }
+}
+
+void XmlElement::ClearAttributes() {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; ) {
+ XmlAttr* to_delete = attr;
+ attr = attr->next_attr_;
+ delete to_delete;
+ }
+ first_attr_ = last_attr_ = NULL;
+}
+
+void XmlElement::ClearChildren() {
+ XmlChild* pchild;
+ for (pchild = first_child_; pchild; ) {
+ XmlChild* to_delete = pchild;
+ pchild = pchild->next_child_;
+ delete to_delete;
+ }
+ first_child_ = last_child_ = NULL;
+}
+
+std::string XmlElement::Str() const {
+ std::stringstream ss;
+ XmlPrinter::PrintXml(&ss, this);
+ return ss.str();
+}
+
+XmlElement* XmlElement::ForStr(const std::string& str) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, str);
+ return builder.CreateElement();
+}
+
+XmlElement::~XmlElement() {
+ XmlAttr* attr;
+ for (attr = first_attr_; attr; ) {
+ XmlAttr* to_delete = attr;
+ attr = attr->next_attr_;
+ delete to_delete;
+ }
+
+ XmlChild* pchild;
+ for (pchild = first_child_; pchild; ) {
+ XmlChild* to_delete = pchild;
+ pchild = pchild->next_child_;
+ delete to_delete;
+ }
+}
+
+} // namespace buzz
diff --git a/libjingle/xmllite/xmlelement.h b/libjingle/xmllite/xmlelement.h
new file mode 100644
index 0000000..70c6f79
--- /dev/null
+++ b/libjingle/xmllite/xmlelement.h
@@ -0,0 +1,234 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_LIBJINGLE_XMLLITE_XMLELEMENT_H_
+#define WEBRTC_LIBJINGLE_XMLLITE_XMLELEMENT_H_
+
+#include <iosfwd>
+#include <string>
+
+#include "webrtc/libjingle/xmllite/qname.h"
+#include "webrtc/base/scoped_ptr.h"
+
+namespace buzz {
+
+class XmlChild;
+class XmlText;
+class XmlElement;
+class XmlAttr;
+
+class XmlChild {
+ public:
+ XmlChild* NextChild() { return next_child_; }
+ const XmlChild* NextChild() const { return next_child_; }
+
+ bool IsText() const { return IsTextImpl(); }
+
+ XmlElement* AsElement() { return AsElementImpl(); }
+ const XmlElement* AsElement() const { return AsElementImpl(); }
+
+ XmlText* AsText() { return AsTextImpl(); }
+ const XmlText* AsText() const { return AsTextImpl(); }
+
+
+ protected:
+ XmlChild() :
+ next_child_(NULL) {
+ }
+
+ virtual bool IsTextImpl() const = 0;
+ virtual XmlElement* AsElementImpl() const = 0;
+ virtual XmlText* AsTextImpl() const = 0;
+
+
+ virtual ~XmlChild();
+
+ private:
+ friend class XmlElement;
+
+ XmlChild(const XmlChild& noimpl);
+
+ XmlChild* next_child_;
+};
+
+class XmlText : public XmlChild {
+ public:
+ explicit XmlText(const std::string& text) :
+ XmlChild(),
+ text_(text) {
+ }
+ explicit XmlText(const XmlText& t) :
+ XmlChild(),
+ text_(t.text_) {
+ }
+ explicit XmlText(const char* cstr, size_t len) :
+ XmlChild(),
+ text_(cstr, len) {
+ }
+ virtual ~XmlText();
+
+ const std::string& Text() const { return text_; }
+ void SetText(const std::string& text);
+ void AddParsedText(const char* buf, int len);
+ void AddText(const std::string& text);
+
+ protected:
+ virtual bool IsTextImpl() const;
+ virtual XmlElement* AsElementImpl() const;
+ virtual XmlText* AsTextImpl() const;
+
+ private:
+ std::string text_;
+};
+
+class XmlAttr {
+ public:
+ XmlAttr* NextAttr() const { return next_attr_; }
+ const QName& Name() const { return name_; }
+ const std::string& Value() const { return value_; }
+
+ private:
+ friend class XmlElement;
+
+ explicit XmlAttr(const QName& name, const std::string& value) :
+ next_attr_(NULL),
+ name_(name),
+ value_(value) {
+ }
+ explicit XmlAttr(const XmlAttr& att) :
+ next_attr_(NULL),
+ name_(att.name_),
+ value_(att.value_) {
+ }
+
+ XmlAttr* next_attr_;
+ QName name_;
+ std::string value_;
+};
+
+class XmlElement : public XmlChild {
+ public:
+ explicit XmlElement(const QName& name);
+ explicit XmlElement(const QName& name, bool useDefaultNs);
+ explicit XmlElement(const XmlElement& elt);
+
+ virtual ~XmlElement();
+
+ const QName& Name() const { return name_; }
+ void SetName(const QName& name) { name_ = name; }
+
+ const std::string BodyText() const;
+ void SetBodyText(const std::string& text);
+
+ const QName FirstElementName() const;
+
+ XmlAttr* FirstAttr();
+ const XmlAttr* FirstAttr() const
+ { return const_cast<XmlElement *>(this)->FirstAttr(); }
+
+ // Attr will return an empty string if the attribute isn't there:
+ // use HasAttr to test presence of an attribute.
+ const std::string Attr(const StaticQName& name) const;
+ const std::string Attr(const QName& name) const;
+ bool HasAttr(const StaticQName& name) const;
+ bool HasAttr(const QName& name) const;
+ void SetAttr(const QName& name, const std::string& value);
+ void ClearAttr(const QName& name);
+
+ XmlChild* FirstChild();
+ const XmlChild* FirstChild() const {
+ return const_cast<XmlElement *>(this)->FirstChild();
+ }
+
+ XmlElement* FirstElement();
+ const XmlElement* FirstElement() const {
+ return const_cast<XmlElement *>(this)->FirstElement();
+ }
+
+ XmlElement* NextElement();
+ const XmlElement* NextElement() const {
+ return const_cast<XmlElement *>(this)->NextElement();
+ }
+
+ XmlElement* FirstWithNamespace(const std::string& ns);
+ const XmlElement* FirstWithNamespace(const std::string& ns) const {
+ return const_cast<XmlElement *>(this)->FirstWithNamespace(ns);
+ }
+
+ XmlElement* NextWithNamespace(const std::string& ns);
+ const XmlElement* NextWithNamespace(const std::string& ns) const {
+ return const_cast<XmlElement *>(this)->NextWithNamespace(ns);
+ }
+
+ XmlElement* FirstNamed(const StaticQName& name);
+ const XmlElement* FirstNamed(const StaticQName& name) const {
+ return const_cast<XmlElement *>(this)->FirstNamed(name);
+ }
+
+ XmlElement* FirstNamed(const QName& name);
+ const XmlElement* FirstNamed(const QName& name) const {
+ return const_cast<XmlElement *>(this)->FirstNamed(name);
+ }
+
+ XmlElement* NextNamed(const StaticQName& name);
+ const XmlElement* NextNamed(const StaticQName& name) const {
+ return const_cast<XmlElement *>(this)->NextNamed(name);
+ }
+
+ XmlElement* NextNamed(const QName& name);
+ const XmlElement* NextNamed(const QName& name) const {
+ return const_cast<XmlElement *>(this)->NextNamed(name);
+ }
+
+ // Finds the first element named 'name'. If that element can't be found then
+ // adds one and returns it.
+ XmlElement* FindOrAddNamedChild(const QName& name);
+
+ const std::string TextNamed(const QName& name) const;
+
+ void InsertChildAfter(XmlChild* predecessor, XmlChild* new_child);
+ void RemoveChildAfter(XmlChild* predecessor);
+
+ void AddParsedText(const char* buf, int len);
+ // Note: CDATA is not supported by XMPP, therefore using this function will
+ // generate non-XMPP compatible XML.
+ void AddCDATAText(const char* buf, int len);
+ void AddText(const std::string& text);
+ void AddText(const std::string& text, int depth);
+ void AddElement(XmlElement* child);
+ void AddElement(XmlElement* child, int depth);
+ void AddAttr(const QName& name, const std::string& value);
+ void AddAttr(const QName& name, const std::string& value, int depth);
+ void ClearNamedChildren(const QName& name);
+ void ClearAttributes();
+ void ClearChildren();
+
+ static XmlElement* ForStr(const std::string& str);
+ std::string Str() const;
+
+ bool IsCDATA() const { return cdata_; }
+
+ protected:
+ virtual bool IsTextImpl() const;
+ virtual XmlElement* AsElementImpl() const;
+ virtual XmlText* AsTextImpl() const;
+
+ private:
+ QName name_;
+ XmlAttr* first_attr_;
+ XmlAttr* last_attr_;
+ XmlChild* first_child_;
+ XmlChild* last_child_;
+ bool cdata_;
+};
+
+} // namespace buzz
+
+#endif // WEBRTC_LIBJINGLE_XMLLITE_XMLELEMENT_H_
diff --git a/libjingle/xmllite/xmlelement_unittest.cc b/libjingle/xmllite/xmlelement_unittest.cc
new file mode 100644
index 0000000..df8faed
--- /dev/null
+++ b/libjingle/xmllite/xmlelement_unittest.cc
@@ -0,0 +1,258 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/thread.h"
+
+using buzz::QName;
+using buzz::XmlAttr;
+using buzz::XmlChild;
+using buzz::XmlElement;
+
+std::ostream& operator<<(std::ostream& os, const QName& name) {
+ os << name.Namespace() << ":" << name.LocalPart();
+ return os;
+}
+
+TEST(XmlElementTest, TestConstructors) {
+ XmlElement elt(QName("google:test", "first"));
+ EXPECT_EQ("<test:first xmlns:test=\"google:test\"/>", elt.Str());
+
+ XmlElement elt2(QName("google:test", "first"), true);
+ EXPECT_EQ("<first xmlns=\"google:test\"/>", elt2.Str());
+}
+
+TEST(XmlElementTest, TestAdd) {
+ XmlElement elt(QName("google:test", "root"), true);
+ elt.AddElement(new XmlElement(QName("google:test", "first")));
+ elt.AddElement(new XmlElement(QName("google:test", "nested")), 1);
+ elt.AddText("nested-value", 2);
+ elt.AddText("between-", 1);
+ elt.AddText("value", 1);
+ elt.AddElement(new XmlElement(QName("google:test", "nested2")), 1);
+ elt.AddElement(new XmlElement(QName("google:test", "second")));
+ elt.AddText("init-value", 1);
+ elt.AddElement(new XmlElement(QName("google:test", "nested3")), 1);
+ elt.AddText("trailing-value", 1);
+
+ // make sure it looks ok overall
+ EXPECT_EQ("<root xmlns=\"google:test\">"
+ "<first><nested>nested-value</nested>between-value<nested2/></first>"
+ "<second>init-value<nested3/>trailing-value</second></root>",
+ elt.Str());
+
+ // make sure text was concatenated
+ XmlChild * pchild =
+ elt.FirstChild()->AsElement()->FirstChild()->NextChild();
+ EXPECT_TRUE(pchild->IsText());
+ EXPECT_EQ("between-value", pchild->AsText()->Text());
+}
+
+TEST(XmlElementTest, TestAttrs) {
+ XmlElement elt(QName("", "root"));
+ elt.SetAttr(QName("", "a"), "avalue");
+ EXPECT_EQ("<root a=\"avalue\"/>", elt.Str());
+
+ elt.SetAttr(QName("", "b"), "bvalue");
+ EXPECT_EQ("<root a=\"avalue\" b=\"bvalue\"/>", elt.Str());
+
+ elt.SetAttr(QName("", "a"), "avalue2");
+ EXPECT_EQ("<root a=\"avalue2\" b=\"bvalue\"/>", elt.Str());
+
+ elt.SetAttr(QName("", "b"), "bvalue2");
+ EXPECT_EQ("<root a=\"avalue2\" b=\"bvalue2\"/>", elt.Str());
+
+ elt.SetAttr(QName("", "c"), "cvalue");
+ EXPECT_EQ("<root a=\"avalue2\" b=\"bvalue2\" c=\"cvalue\"/>", elt.Str());
+
+ XmlAttr * patt = elt.FirstAttr();
+ EXPECT_EQ(QName("", "a"), patt->Name());
+ EXPECT_EQ("avalue2", patt->Value());
+
+ patt = patt->NextAttr();
+ EXPECT_EQ(QName("", "b"), patt->Name());
+ EXPECT_EQ("bvalue2", patt->Value());
+
+ patt = patt->NextAttr();
+ EXPECT_EQ(QName("", "c"), patt->Name());
+ EXPECT_EQ("cvalue", patt->Value());
+
+ patt = patt->NextAttr();
+ EXPECT_TRUE(NULL == patt);
+
+ EXPECT_TRUE(elt.HasAttr(QName("", "a")));
+ EXPECT_TRUE(elt.HasAttr(QName("", "b")));
+ EXPECT_TRUE(elt.HasAttr(QName("", "c")));
+ EXPECT_FALSE(elt.HasAttr(QName("", "d")));
+
+ elt.SetAttr(QName("", "d"), "dvalue");
+ EXPECT_EQ("<root a=\"avalue2\" b=\"bvalue2\" c=\"cvalue\" d=\"dvalue\"/>",
+ elt.Str());
+ EXPECT_TRUE(elt.HasAttr(QName("", "d")));
+
+ elt.ClearAttr(QName("", "z")); // not found, no effect
+ EXPECT_EQ("<root a=\"avalue2\" b=\"bvalue2\" c=\"cvalue\" d=\"dvalue\"/>",
+ elt.Str());
+
+ elt.ClearAttr(QName("", "b"));
+ EXPECT_EQ("<root a=\"avalue2\" c=\"cvalue\" d=\"dvalue\"/>", elt.Str());
+
+ elt.ClearAttr(QName("", "a"));
+ EXPECT_EQ("<root c=\"cvalue\" d=\"dvalue\"/>", elt.Str());
+
+ elt.ClearAttr(QName("", "d"));
+ EXPECT_EQ("<root c=\"cvalue\"/>", elt.Str());
+
+ elt.ClearAttr(QName("", "c"));
+ EXPECT_EQ("<root/>", elt.Str());
+}
+
+TEST(XmlElementTest, TestBodyText) {
+ XmlElement elt(QName("", "root"));
+ EXPECT_EQ("", elt.BodyText());
+
+ elt.AddText("body value text");
+
+ EXPECT_EQ("body value text", elt.BodyText());
+
+ elt.ClearChildren();
+ elt.AddText("more value ");
+ elt.AddText("text");
+
+ EXPECT_EQ("more value text", elt.BodyText());
+
+ elt.ClearChildren();
+ elt.AddText("decoy");
+ elt.AddElement(new XmlElement(QName("", "dummy")));
+ EXPECT_EQ("", elt.BodyText());
+
+ elt.SetBodyText("replacement");
+ EXPECT_EQ("replacement", elt.BodyText());
+
+ elt.SetBodyText("");
+ EXPECT_TRUE(NULL == elt.FirstChild());
+
+ elt.SetBodyText("goodbye");
+ EXPECT_EQ("goodbye", elt.FirstChild()->AsText()->Text());
+ EXPECT_EQ("goodbye", elt.BodyText());
+}
+
+TEST(XmlElementTest, TestCopyConstructor) {
+ XmlElement * element = XmlElement::ForStr(
+ "<root xmlns='test-foo'>This is a <em a='avalue' b='bvalue'>"
+ "little <b>little</b></em> test</root>");
+
+ XmlElement * pelCopy = new XmlElement(*element);
+ EXPECT_EQ("<root xmlns=\"test-foo\">This is a <em a=\"avalue\" b=\"bvalue\">"
+ "little <b>little</b></em> test</root>", pelCopy->Str());
+ delete pelCopy;
+
+ pelCopy = new XmlElement(*(element->FirstChild()->NextChild()->AsElement()));
+ EXPECT_EQ("<foo:em a=\"avalue\" b=\"bvalue\" xmlns:foo=\"test-foo\">"
+ "little <foo:b>little</foo:b></foo:em>", pelCopy->Str());
+
+ XmlAttr * patt = pelCopy->FirstAttr();
+ EXPECT_EQ(QName("", "a"), patt->Name());
+ EXPECT_EQ("avalue", patt->Value());
+
+ patt = patt->NextAttr();
+ EXPECT_EQ(QName("", "b"), patt->Name());
+ EXPECT_EQ("bvalue", patt->Value());
+
+ patt = patt->NextAttr();
+ EXPECT_TRUE(NULL == patt);
+ delete pelCopy;
+ delete element;
+}
+
+TEST(XmlElementTest, TestNameSearch) {
+ XmlElement * element = XmlElement::ForStr(
+ "<root xmlns='test-foo'>"
+ "<firstname>George</firstname>"
+ "<middlename>X.</middlename>"
+ "some text"
+ "<lastname>Harrison</lastname>"
+ "<firstname>John</firstname>"
+ "<middlename>Y.</middlename>"
+ "<lastname>Lennon</lastname>"
+ "</root>");
+ EXPECT_TRUE(NULL ==
+ element->FirstNamed(QName("", "firstname")));
+ EXPECT_EQ(element->FirstChild(),
+ element->FirstNamed(QName("test-foo", "firstname")));
+ EXPECT_EQ(element->FirstChild()->NextChild(),
+ element->FirstNamed(QName("test-foo", "middlename")));
+ EXPECT_EQ(element->FirstElement()->NextElement(),
+ element->FirstNamed(QName("test-foo", "middlename")));
+ EXPECT_EQ("Harrison",
+ element->TextNamed(QName("test-foo", "lastname")));
+ EXPECT_EQ(element->FirstElement()->NextElement()->NextElement(),
+ element->FirstNamed(QName("test-foo", "lastname")));
+ EXPECT_EQ("John", element->FirstNamed(QName("test-foo", "firstname"))->
+ NextNamed(QName("test-foo", "firstname"))->BodyText());
+ EXPECT_EQ("Y.", element->FirstNamed(QName("test-foo", "middlename"))->
+ NextNamed(QName("test-foo", "middlename"))->BodyText());
+ EXPECT_EQ("Lennon", element->FirstNamed(QName("test-foo", "lastname"))->
+ NextNamed(QName("test-foo", "lastname"))->BodyText());
+ EXPECT_TRUE(NULL == element->FirstNamed(QName("test-foo", "firstname"))->
+ NextNamed(QName("test-foo", "firstname"))->
+ NextNamed(QName("test-foo", "firstname")));
+
+ delete element;
+}
+
+class XmlElementCreatorThread : public rtc::Thread {
+ public:
+ XmlElementCreatorThread(int count, buzz::QName qname) :
+ count_(count), qname_(qname) {}
+
+ virtual ~XmlElementCreatorThread() {
+ Stop();
+ }
+
+ virtual void Run() {
+ std::vector<buzz::XmlElement*> elems;
+ for (int i = 0; i < count_; i++) {
+ elems.push_back(new XmlElement(qname_));
+ }
+ for (int i = 0; i < count_; i++) {
+ delete elems[i];
+ }
+ }
+
+ private:
+ int count_;
+ buzz::QName qname_;
+};
+
+// If XmlElement creation and destruction isn't thread safe,
+// this test should crash.
+TEST(XmlElementTest, TestMultithread) {
+ int thread_count = 2; // Was 100, but that's too slow.
+ int elem_count = 100; // Was 100000, but that's too slow.
+ buzz::QName qname("foo", "bar");
+
+ std::vector<rtc::Thread*> threads;
+ for (int i = 0; i < thread_count; i++) {
+ threads.push_back(
+ new XmlElementCreatorThread(elem_count, qname));
+ threads[i]->Start();
+ }
+
+ for (int i = 0; i < thread_count; i++) {
+ threads[i]->Stop();
+ delete threads[i];
+ }
+}
diff --git a/libjingle/xmllite/xmllite.gyp b/libjingle/xmllite/xmllite.gyp
new file mode 100644
index 0000000..e1bef96
--- /dev/null
+++ b/libjingle/xmllite/xmllite.gyp
@@ -0,0 +1,40 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': [ '../../build/common.gypi', ],
+ 'targets': [
+ {
+ 'target_name': 'rtc_xmllite',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(webrtc_root)/base/base.gyp:rtc_base',
+ '<(DEPTH)/third_party/expat/expat.gyp:expat',
+ ],
+ 'export_dependent_settings': [
+ '<(DEPTH)/third_party/expat/expat.gyp:expat',
+ ],
+ 'sources': [
+ 'qname.cc',
+ 'qname.h',
+ 'xmlbuilder.cc',
+ 'xmlbuilder.h',
+ 'xmlconstants.cc',
+ 'xmlconstants.h',
+ 'xmlelement.cc',
+ 'xmlelement.h',
+ 'xmlnsstack.cc',
+ 'xmlnsstack.h',
+ 'xmlparser.cc',
+ 'xmlparser.h',
+ 'xmlprinter.cc',
+ 'xmlprinter.h',
+ ],
+ },
+ ],
+}
diff --git a/libjingle/xmllite/xmllite_tests.gyp b/libjingle/xmllite/xmllite_tests.gyp
new file mode 100644
index 0000000..b71a9b6
--- /dev/null
+++ b/libjingle/xmllite/xmllite_tests.gyp
@@ -0,0 +1,34 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': [ '../../build/common.gypi', ],
+ 'targets': [
+ {
+ 'target_name': 'rtc_xmllite_unittest',
+ 'type': 'executable',
+ 'dependencies': [
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
+ 'xmllite.gyp:rtc_xmllite',
+ ],
+ 'cflags_cc!': [
+ '-Wnon-virtual-dtor',
+ ],
+ 'sources': [
+ 'qname_unittest.cc',
+ 'xmlbuilder_unittest.cc',
+ 'xmlelement_unittest.cc',
+ 'xmlnsstack_unittest.cc',
+ 'xmlparser_unittest.cc',
+ 'xmlprinter_unittest.cc',
+ ],
+ },
+ ],
+}
+
diff --git a/libjingle/xmllite/xmlnsstack.cc b/libjingle/xmllite/xmlnsstack.cc
new file mode 100644
index 0000000..bac2fc6
--- /dev/null
+++ b/libjingle/xmllite/xmlnsstack.cc
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+
+namespace buzz {
+
+XmlnsStack::XmlnsStack() :
+ pxmlnsStack_(new std::vector<std::string>),
+ pxmlnsDepthStack_(new std::vector<size_t>) {
+}
+
+XmlnsStack::~XmlnsStack() {}
+
+void XmlnsStack::PushFrame() {
+ pxmlnsDepthStack_->push_back(pxmlnsStack_->size());
+}
+
+void XmlnsStack::PopFrame() {
+ size_t prev_size = pxmlnsDepthStack_->back();
+ pxmlnsDepthStack_->pop_back();
+ if (prev_size < pxmlnsStack_->size()) {
+ pxmlnsStack_->erase(pxmlnsStack_->begin() + prev_size,
+ pxmlnsStack_->end());
+ }
+}
+
+std::pair<std::string, bool> XmlnsStack::NsForPrefix(
+ const std::string& prefix) {
+ if (prefix.length() >= 3 &&
+ (prefix[0] == 'x' || prefix[0] == 'X') &&
+ (prefix[1] == 'm' || prefix[1] == 'M') &&
+ (prefix[2] == 'l' || prefix[2] == 'L')) {
+ if (prefix == "xml")
+ return std::make_pair(NS_XML, true);
+ if (prefix == "xmlns")
+ return std::make_pair(NS_XMLNS, true);
+ // Other names with xml prefix are illegal.
+ return std::make_pair(STR_EMPTY, false);
+ }
+
+ std::vector<std::string>::iterator pos;
+ for (pos = pxmlnsStack_->end(); pos > pxmlnsStack_->begin(); ) {
+ pos -= 2;
+ if (*pos == prefix)
+ return std::make_pair(*(pos + 1), true);
+ }
+
+ if (prefix == STR_EMPTY)
+ return std::make_pair(STR_EMPTY, true); // default namespace
+
+ return std::make_pair(STR_EMPTY, false); // none found
+}
+
+bool XmlnsStack::PrefixMatchesNs(const std::string& prefix,
+ const std::string& ns) {
+ const std::pair<std::string, bool> match = NsForPrefix(prefix);
+ return match.second && (match.first == ns);
+}
+
+std::pair<std::string, bool> XmlnsStack::PrefixForNs(const std::string& ns,
+ bool isattr) {
+ if (ns == NS_XML)
+ return std::make_pair(std::string("xml"), true);
+ if (ns == NS_XMLNS)
+ return std::make_pair(std::string("xmlns"), true);
+ if (isattr ? ns == STR_EMPTY : PrefixMatchesNs(STR_EMPTY, ns))
+ return std::make_pair(STR_EMPTY, true);
+
+ std::vector<std::string>::iterator pos;
+ for (pos = pxmlnsStack_->end(); pos > pxmlnsStack_->begin(); ) {
+ pos -= 2;
+ if (*(pos + 1) == ns &&
+ (!isattr || !pos->empty()) && PrefixMatchesNs(*pos, ns))
+ return std::make_pair(*pos, true);
+ }
+
+ return std::make_pair(STR_EMPTY, false); // none found
+}
+
+std::string XmlnsStack::FormatQName(const QName& name, bool isAttr) {
+ std::string prefix(PrefixForNs(name.Namespace(), isAttr).first);
+ if (prefix == STR_EMPTY)
+ return name.LocalPart();
+ else
+ return prefix + ':' + name.LocalPart();
+}
+
+void XmlnsStack::AddXmlns(const std::string & prefix, const std::string & ns) {
+ pxmlnsStack_->push_back(prefix);
+ pxmlnsStack_->push_back(ns);
+}
+
+void XmlnsStack::RemoveXmlns() {
+ pxmlnsStack_->pop_back();
+ pxmlnsStack_->pop_back();
+}
+
+static bool IsAsciiLetter(char ch) {
+ return ((ch >= 'a' && ch <= 'z') ||
+ (ch >= 'A' && ch <= 'Z'));
+}
+
+static std::string AsciiLower(const std::string & s) {
+ std::string result(s);
+ size_t i;
+ for (i = 0; i < result.length(); i++) {
+ if (result[i] >= 'A' && result[i] <= 'Z')
+ result[i] += 'a' - 'A';
+ }
+ return result;
+}
+
+static std::string SuggestPrefix(const std::string & ns) {
+ size_t len = ns.length();
+ size_t i = ns.find_last_of('.');
+ if (i != std::string::npos && len - i <= 4 + 1)
+ len = i; // chop off ".html" or ".xsd" or ".?{0,4}"
+ size_t last = len;
+ while (last > 0) {
+ last -= 1;
+ if (IsAsciiLetter(ns[last])) {
+ size_t first = last;
+ last += 1;
+ while (first > 0) {
+ if (!IsAsciiLetter(ns[first - 1]))
+ break;
+ first -= 1;
+ }
+ if (last - first > 4)
+ last = first + 3;
+ std::string candidate(AsciiLower(ns.substr(first, last - first)));
+ if (candidate.find("xml") != 0)
+ return candidate;
+ break;
+ }
+ }
+ return "ns";
+}
+
+std::pair<std::string, bool> XmlnsStack::AddNewPrefix(const std::string& ns,
+ bool isAttr) {
+ if (PrefixForNs(ns, isAttr).second)
+ return std::make_pair(STR_EMPTY, false);
+
+ std::string base(SuggestPrefix(ns));
+ std::string result(base);
+ int i = 2;
+ while (NsForPrefix(result).second) {
+ std::stringstream ss;
+ ss << base;
+ ss << (i++);
+ ss >> result;
+ }
+ AddXmlns(result, ns);
+ return std::make_pair(result, true);
+}
+
+void XmlnsStack::Reset() {
+ pxmlnsStack_->clear();
+ pxmlnsDepthStack_->clear();
+}
+
+}
diff --git a/libjingle/xmllite/xmlnsstack.h b/libjingle/xmllite/xmlnsstack.h
new file mode 100644
index 0000000..174f8ae
--- /dev/null
+++ b/libjingle/xmllite/xmlnsstack.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_LIBJINGLE_XMLLITE_XMLNSSTACK_H_
+#define WEBRTC_LIBJINGLE_XMLLITE_XMLNSSTACK_H_
+
+#include <string>
+#include <vector>
+#include "webrtc/libjingle/xmllite/qname.h"
+#include "webrtc/base/scoped_ptr.h"
+
+namespace buzz {
+
+class XmlnsStack {
+public:
+ XmlnsStack();
+ ~XmlnsStack();
+
+ void AddXmlns(const std::string& prefix, const std::string& ns);
+ void RemoveXmlns();
+ void PushFrame();
+ void PopFrame();
+ void Reset();
+
+ std::pair<std::string, bool> NsForPrefix(const std::string& prefix);
+ bool PrefixMatchesNs(const std::string & prefix, const std::string & ns);
+ std::pair<std::string, bool> PrefixForNs(const std::string& ns, bool isAttr);
+ std::pair<std::string, bool> AddNewPrefix(const std::string& ns, bool isAttr);
+ std::string FormatQName(const QName & name, bool isAttr);
+
+private:
+
+ rtc::scoped_ptr<std::vector<std::string> > pxmlnsStack_;
+ rtc::scoped_ptr<std::vector<size_t> > pxmlnsDepthStack_;
+};
+}
+
+#endif // WEBRTC_LIBJINGLE_XMLLITE_XMLNSSTACK_H_
diff --git a/libjingle/xmllite/xmlnsstack_unittest.cc b/libjingle/xmllite/xmlnsstack_unittest.cc
new file mode 100644
index 0000000..a57a4b0
--- /dev/null
+++ b/libjingle/xmllite/xmlnsstack_unittest.cc
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/gunit.h"
+
+using buzz::NS_XML;
+using buzz::NS_XMLNS;
+using buzz::QName;
+using buzz::XmlnsStack;
+
+TEST(XmlnsStackTest, TestBuiltin) {
+ XmlnsStack stack;
+
+ EXPECT_EQ(std::string(NS_XML), stack.NsForPrefix("xml").first);
+ EXPECT_EQ(std::string(NS_XMLNS), stack.NsForPrefix("xmlns").first);
+ EXPECT_EQ("", stack.NsForPrefix("").first);
+
+ EXPECT_EQ("xml", stack.PrefixForNs(NS_XML, false).first);
+ EXPECT_EQ("xmlns", stack.PrefixForNs(NS_XMLNS, false).first);
+ EXPECT_EQ("", stack.PrefixForNs("", false).first);
+ EXPECT_EQ("", stack.PrefixForNs("", true).first);
+}
+
+TEST(XmlnsStackTest, TestNsForPrefix) {
+ XmlnsStack stack;
+ stack.AddXmlns("pre1", "ns1");
+ stack.AddXmlns("pre2", "ns2");
+ stack.AddXmlns("pre1", "ns3");
+ stack.AddXmlns("", "ns4");
+
+ EXPECT_EQ("ns3", stack.NsForPrefix("pre1").first);
+ EXPECT_TRUE(stack.NsForPrefix("pre1").second);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre2").first);
+ EXPECT_EQ("ns4", stack.NsForPrefix("").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre3").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre3").second);
+}
+
+TEST(XmlnsStackTest, TestPrefixForNs) {
+ XmlnsStack stack;
+ stack.AddXmlns("pre1", "ns1");
+ stack.AddXmlns("pre2", "ns2");
+ stack.AddXmlns("pre1", "ns3");
+ stack.AddXmlns("pre3", "ns2");
+ stack.AddXmlns("pre4", "ns4");
+ stack.AddXmlns("", "ns4");
+
+ EXPECT_EQ("", stack.PrefixForNs("ns1", false).first);
+ EXPECT_FALSE(stack.PrefixForNs("ns1", false).second);
+ EXPECT_EQ("", stack.PrefixForNs("ns1", true).first);
+ EXPECT_FALSE(stack.PrefixForNs("ns1", true).second);
+ EXPECT_EQ("pre3", stack.PrefixForNs("ns2", false).first);
+ EXPECT_TRUE(stack.PrefixForNs("ns2", false).second);
+ EXPECT_EQ("pre3", stack.PrefixForNs("ns2", true).first);
+ EXPECT_TRUE(stack.PrefixForNs("ns2", true).second);
+ EXPECT_EQ("pre1", stack.PrefixForNs("ns3", false).first);
+ EXPECT_EQ("pre1", stack.PrefixForNs("ns3", true).first);
+ EXPECT_EQ("", stack.PrefixForNs("ns4", false).first);
+ EXPECT_TRUE(stack.PrefixForNs("ns4", false).second);
+ EXPECT_EQ("pre4", stack.PrefixForNs("ns4", true).first);
+ EXPECT_EQ("", stack.PrefixForNs("ns5", false).first);
+ EXPECT_FALSE(stack.PrefixForNs("ns5", false).second);
+ EXPECT_EQ("", stack.PrefixForNs("ns5", true).first);
+ EXPECT_EQ("", stack.PrefixForNs("", false).first);
+ EXPECT_EQ("", stack.PrefixForNs("", true).first);
+
+ stack.AddXmlns("", "ns6");
+ EXPECT_EQ("", stack.PrefixForNs("ns6", false).first);
+ EXPECT_TRUE(stack.PrefixForNs("ns6", false).second);
+ EXPECT_EQ("", stack.PrefixForNs("ns6", true).first);
+ EXPECT_FALSE(stack.PrefixForNs("ns6", true).second);
+}
+
+TEST(XmlnsStackTest, TestFrames) {
+ XmlnsStack stack;
+ stack.PushFrame();
+ stack.AddXmlns("pre1", "ns1");
+ stack.AddXmlns("pre2", "ns2");
+
+ stack.PushFrame();
+ stack.AddXmlns("pre1", "ns3");
+ stack.AddXmlns("pre3", "ns2");
+ stack.AddXmlns("pre4", "ns4");
+
+ stack.PushFrame();
+ stack.PushFrame();
+ stack.AddXmlns("", "ns4");
+
+ // basic test
+ EXPECT_EQ("ns3", stack.NsForPrefix("pre1").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre2").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre3").first);
+ EXPECT_EQ("ns4", stack.NsForPrefix("pre4").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre5").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre5").second);
+ EXPECT_EQ("ns4", stack.NsForPrefix("").first);
+ EXPECT_TRUE(stack.NsForPrefix("").second);
+
+ // pop the default xmlns definition
+ stack.PopFrame();
+ EXPECT_EQ("ns3", stack.NsForPrefix("pre1").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre2").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre3").first);
+ EXPECT_EQ("ns4", stack.NsForPrefix("pre4").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre5").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre5").second);
+ EXPECT_EQ("", stack.NsForPrefix("").first);
+ EXPECT_TRUE(stack.NsForPrefix("").second);
+
+ // pop empty frame (nop)
+ stack.PopFrame();
+ EXPECT_EQ("ns3", stack.NsForPrefix("pre1").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre2").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre3").first);
+ EXPECT_EQ("ns4", stack.NsForPrefix("pre4").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre5").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre5").second);
+ EXPECT_EQ("", stack.NsForPrefix("").first);
+ EXPECT_TRUE(stack.NsForPrefix("").second);
+
+ // pop frame with three defs
+ stack.PopFrame();
+ EXPECT_EQ("ns1", stack.NsForPrefix("pre1").first);
+ EXPECT_EQ("ns2", stack.NsForPrefix("pre2").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre3").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre3").second);
+ EXPECT_EQ("", stack.NsForPrefix("pre4").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre4").second);
+ EXPECT_EQ("", stack.NsForPrefix("pre5").first);
+ EXPECT_FALSE(stack.NsForPrefix("pre5").second);
+ EXPECT_EQ("", stack.NsForPrefix("").first);
+ EXPECT_TRUE(stack.NsForPrefix("").second);
+
+ // pop frame with last two defs
+ stack.PopFrame();
+ EXPECT_FALSE(stack.NsForPrefix("pre1").second);
+ EXPECT_FALSE(stack.NsForPrefix("pre2").second);
+ EXPECT_FALSE(stack.NsForPrefix("pre3").second);
+ EXPECT_FALSE(stack.NsForPrefix("pre4").second);
+ EXPECT_FALSE(stack.NsForPrefix("pre5").second);
+ EXPECT_TRUE(stack.NsForPrefix("").second);
+ EXPECT_EQ("", stack.NsForPrefix("pre1").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre2").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre3").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre4").first);
+ EXPECT_EQ("", stack.NsForPrefix("pre5").first);
+ EXPECT_EQ("", stack.NsForPrefix("").first);
+}
+
+TEST(XmlnsStackTest, TestAddNewPrefix) {
+ XmlnsStack stack;
+
+ // builtin namespaces cannot be added
+ EXPECT_FALSE(stack.AddNewPrefix("", true).second);
+ EXPECT_FALSE(stack.AddNewPrefix("", false).second);
+ EXPECT_FALSE(stack.AddNewPrefix(NS_XML, true).second);
+ EXPECT_FALSE(stack.AddNewPrefix(NS_XML, false).second);
+ EXPECT_FALSE(stack.AddNewPrefix(NS_XMLNS, true).second);
+ EXPECT_FALSE(stack.AddNewPrefix(NS_XMLNS, false).second);
+
+ // namespaces already added cannot be added again.
+ EXPECT_EQ("foo", stack.AddNewPrefix("http://a.b.com/foo.htm", true).first);
+ EXPECT_EQ("bare", stack.AddNewPrefix("http://a.b.com/bare", false).first);
+ EXPECT_EQ("z", stack.AddNewPrefix("z", false).first);
+ EXPECT_FALSE(stack.AddNewPrefix("http://a.b.com/foo.htm", true).second);
+ EXPECT_FALSE(stack.AddNewPrefix("http://a.b.com/bare", true).second);
+ EXPECT_FALSE(stack.AddNewPrefix("z", true).second);
+ EXPECT_FALSE(stack.AddNewPrefix("http://a.b.com/foo.htm", false).second);
+ EXPECT_FALSE(stack.AddNewPrefix("http://a.b.com/bare", false).second);
+ EXPECT_FALSE(stack.AddNewPrefix("z", false).second);
+
+ // default namespace usable by non-attributes only
+ stack.AddXmlns("", "http://my/default");
+ EXPECT_FALSE(stack.AddNewPrefix("http://my/default", false).second);
+ EXPECT_EQ("def", stack.AddNewPrefix("http://my/default", true).first);
+
+ // namespace cannot start with 'xml'
+ EXPECT_EQ("ns", stack.AddNewPrefix("http://a.b.com/xmltest", true).first);
+ EXPECT_EQ("ns2", stack.AddNewPrefix("xmlagain", false).first);
+
+ // verify added namespaces are still defined
+ EXPECT_EQ("http://a.b.com/foo.htm", stack.NsForPrefix("foo").first);
+ EXPECT_TRUE(stack.NsForPrefix("foo").second);
+ EXPECT_EQ("http://a.b.com/bare", stack.NsForPrefix("bare").first);
+ EXPECT_TRUE(stack.NsForPrefix("bare").second);
+ EXPECT_EQ("z", stack.NsForPrefix("z").first);
+ EXPECT_TRUE(stack.NsForPrefix("z").second);
+ EXPECT_EQ("http://my/default", stack.NsForPrefix("").first);
+ EXPECT_TRUE(stack.NsForPrefix("").second);
+ EXPECT_EQ("http://my/default", stack.NsForPrefix("def").first);
+ EXPECT_TRUE(stack.NsForPrefix("def").second);
+ EXPECT_EQ("http://a.b.com/xmltest", stack.NsForPrefix("ns").first);
+ EXPECT_TRUE(stack.NsForPrefix("ns").second);
+ EXPECT_EQ("xmlagain", stack.NsForPrefix("ns2").first);
+ EXPECT_TRUE(stack.NsForPrefix("ns2").second);
+}
+
+TEST(XmlnsStackTest, TestFormatQName) {
+ XmlnsStack stack;
+ stack.AddXmlns("pre1", "ns1");
+ stack.AddXmlns("pre2", "ns2");
+ stack.AddXmlns("pre1", "ns3");
+ stack.AddXmlns("", "ns4");
+
+ EXPECT_EQ("zip",
+ stack.FormatQName(QName("ns1", "zip"), false)); // no match
+ EXPECT_EQ("pre2:abracadabra",
+ stack.FormatQName(QName("ns2", "abracadabra"), false));
+ EXPECT_EQ("pre1:a",
+ stack.FormatQName(QName("ns3", "a"), false));
+ EXPECT_EQ("simple",
+ stack.FormatQName(QName("ns4", "simple"), false));
+ EXPECT_EQ("root",
+ stack.FormatQName(QName("", "root"), false)); // no match
+
+ EXPECT_EQ("zip",
+ stack.FormatQName(QName("ns1", "zip"), true)); // no match
+ EXPECT_EQ("pre2:abracadabra",
+ stack.FormatQName(QName("ns2", "abracadabra"), true));
+ EXPECT_EQ("pre1:a",
+ stack.FormatQName(QName("ns3", "a"), true));
+ EXPECT_EQ("simple",
+ stack.FormatQName(QName("ns4", "simple"), true)); // no match
+ EXPECT_EQ("root",
+ stack.FormatQName(QName("", "root"), true));
+}
diff --git a/libjingle/xmllite/xmlparser.cc b/libjingle/xmllite/xmlparser.cc
new file mode 100644
index 0000000..bdb8be7
--- /dev/null
+++ b/libjingle/xmllite/xmlparser.cc
@@ -0,0 +1,261 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlparser.h"
+
+#include <string>
+#include <vector>
+
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+#include "webrtc/base/common.h"
+
+namespace buzz {
+
+
+static void
+StartElementCallback(void * userData, const char *name, const char **atts) {
+ (static_cast<XmlParser *>(userData))->ExpatStartElement(name, atts);
+}
+
+static void
+EndElementCallback(void * userData, const char *name) {
+ (static_cast<XmlParser *>(userData))->ExpatEndElement(name);
+}
+
+static void
+CharacterDataCallback(void * userData, const char *text, int len) {
+ (static_cast<XmlParser *>(userData))->ExpatCharacterData(text, len);
+}
+
+static void
+XmlDeclCallback(void * userData, const char * ver, const char * enc, int st) {
+ (static_cast<XmlParser *>(userData))->ExpatXmlDecl(ver, enc, st);
+}
+
+XmlParser::XmlParser(XmlParseHandler *pxph) :
+ pxph_(pxph), sentError_(false) {
+ expat_ = XML_ParserCreate(NULL);
+ XML_SetUserData(expat_, this);
+ XML_SetElementHandler(expat_, StartElementCallback, EndElementCallback);
+ XML_SetCharacterDataHandler(expat_, CharacterDataCallback);
+ XML_SetXmlDeclHandler(expat_, XmlDeclCallback);
+}
+
+void
+XmlParser::Reset() {
+ if (!XML_ParserReset(expat_, NULL)) {
+ XML_ParserFree(expat_);
+ expat_ = XML_ParserCreate(NULL);
+ }
+ XML_SetUserData(expat_, this);
+ XML_SetElementHandler(expat_, StartElementCallback, EndElementCallback);
+ XML_SetCharacterDataHandler(expat_, CharacterDataCallback);
+ XML_SetXmlDeclHandler(expat_, XmlDeclCallback);
+ context_.Reset();
+ sentError_ = false;
+}
+
+static bool
+XmlParser_StartsWithXmlns(const char *name) {
+ return name[0] == 'x' &&
+ name[1] == 'm' &&
+ name[2] == 'l' &&
+ name[3] == 'n' &&
+ name[4] == 's';
+}
+
+void
+XmlParser::ExpatStartElement(const char *name, const char **atts) {
+ if (context_.RaisedError() != XML_ERROR_NONE)
+ return;
+ const char **att;
+ context_.StartElement();
+ for (att = atts; *att; att += 2) {
+ if (XmlParser_StartsWithXmlns(*att)) {
+ if ((*att)[5] == '\0') {
+ context_.StartNamespace("", *(att + 1));
+ }
+ else if ((*att)[5] == ':') {
+ if (**(att + 1) == '\0') {
+ // In XML 1.0 empty namespace illegal with prefix (not in 1.1)
+ context_.RaiseError(XML_ERROR_SYNTAX);
+ return;
+ }
+ context_.StartNamespace((*att) + 6, *(att + 1));
+ }
+ }
+ }
+ context_.SetPosition(XML_GetCurrentLineNumber(expat_),
+ XML_GetCurrentColumnNumber(expat_),
+ XML_GetCurrentByteIndex(expat_));
+ pxph_->StartElement(&context_, name, atts);
+}
+
+void
+XmlParser::ExpatEndElement(const char *name) {
+ if (context_.RaisedError() != XML_ERROR_NONE)
+ return;
+ context_.EndElement();
+ context_.SetPosition(XML_GetCurrentLineNumber(expat_),
+ XML_GetCurrentColumnNumber(expat_),
+ XML_GetCurrentByteIndex(expat_));
+ pxph_->EndElement(&context_, name);
+}
+
+void
+XmlParser::ExpatCharacterData(const char *text, int len) {
+ if (context_.RaisedError() != XML_ERROR_NONE)
+ return;
+ context_.SetPosition(XML_GetCurrentLineNumber(expat_),
+ XML_GetCurrentColumnNumber(expat_),
+ XML_GetCurrentByteIndex(expat_));
+ pxph_->CharacterData(&context_, text, len);
+}
+
+void
+XmlParser::ExpatXmlDecl(const char * ver, const char * enc, int standalone) {
+ if (context_.RaisedError() != XML_ERROR_NONE)
+ return;
+
+ if (ver && std::string("1.0") != ver) {
+ context_.RaiseError(XML_ERROR_SYNTAX);
+ return;
+ }
+
+ if (standalone == 0) {
+ context_.RaiseError(XML_ERROR_SYNTAX);
+ return;
+ }
+
+ if (enc && !((enc[0] == 'U' || enc[0] == 'u') &&
+ (enc[1] == 'T' || enc[1] == 't') &&
+ (enc[2] == 'F' || enc[2] == 'f') &&
+ enc[3] == '-' && enc[4] =='8')) {
+ context_.RaiseError(XML_ERROR_INCORRECT_ENCODING);
+ return;
+ }
+
+}
+
+bool
+XmlParser::Parse(const char *data, size_t len, bool isFinal) {
+ if (sentError_)
+ return false;
+
+ if (XML_Parse(expat_, data, static_cast<int>(len), isFinal) !=
+ XML_STATUS_OK) {
+ context_.SetPosition(XML_GetCurrentLineNumber(expat_),
+ XML_GetCurrentColumnNumber(expat_),
+ XML_GetCurrentByteIndex(expat_));
+ context_.RaiseError(XML_GetErrorCode(expat_));
+ }
+
+ if (context_.RaisedError() != XML_ERROR_NONE) {
+ sentError_ = true;
+ pxph_->Error(&context_, context_.RaisedError());
+ return false;
+ }
+
+ return true;
+}
+
+XmlParser::~XmlParser() {
+ XML_ParserFree(expat_);
+}
+
+void
+XmlParser::ParseXml(XmlParseHandler *pxph, std::string text) {
+ XmlParser parser(pxph);
+ parser.Parse(text.c_str(), text.length(), true);
+}
+
+XmlParser::ParseContext::ParseContext() :
+ xmlnsstack_(),
+ raised_(XML_ERROR_NONE),
+ line_number_(0),
+ column_number_(0),
+ byte_index_(0) {
+}
+
+void
+XmlParser::ParseContext::StartNamespace(const char *prefix, const char *ns) {
+ xmlnsstack_.AddXmlns(*prefix ? prefix : STR_EMPTY, ns);
+}
+
+void
+XmlParser::ParseContext::StartElement() {
+ xmlnsstack_.PushFrame();
+}
+
+void
+XmlParser::ParseContext::EndElement() {
+ xmlnsstack_.PopFrame();
+}
+
+QName
+XmlParser::ParseContext::ResolveQName(const char* qname, bool isAttr) {
+ const char *c;
+ for (c = qname; *c; ++c) {
+ if (*c == ':') {
+ const std::pair<std::string, bool> result =
+ xmlnsstack_.NsForPrefix(std::string(qname, c - qname));
+ if (!result.second)
+ return QName();
+ return QName(result.first, c + 1);
+ }
+ }
+ if (isAttr)
+ return QName(STR_EMPTY, qname);
+
+ std::pair<std::string, bool> result = xmlnsstack_.NsForPrefix(STR_EMPTY);
+ if (!result.second)
+ return QName();
+
+ return QName(result.first, qname);
+}
+
+void
+XmlParser::ParseContext::Reset() {
+ xmlnsstack_.Reset();
+ raised_ = XML_ERROR_NONE;
+}
+
+void
+XmlParser::ParseContext::SetPosition(int line, int column,
+ long byte_index) {
+ line_number_ = line;
+ column_number_ = column;
+ byte_index_ = byte_index;
+}
+
+void
+XmlParser::ParseContext::GetPosition(unsigned long * line,
+ unsigned long * column,
+ unsigned long * byte_index) {
+ if (line != NULL) {
+ *line = static_cast<unsigned long>(line_number_);
+ }
+
+ if (column != NULL) {
+ *column = static_cast<unsigned long>(column_number_);
+ }
+
+ if (byte_index != NULL) {
+ *byte_index = static_cast<unsigned long>(byte_index_);
+ }
+}
+
+XmlParser::ParseContext::~ParseContext() {
+}
+
+} // namespace buzz
diff --git a/libjingle/xmllite/xmlparser.h b/libjingle/xmllite/xmlparser.h
new file mode 100644
index 0000000..131c585
--- /dev/null
+++ b/libjingle/xmllite/xmlparser.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_LIBJINGLE_XMLLITE_XMLPARSER_H_
+#define WEBRTC_LIBJINGLE_XMLLITE_XMLPARSER_H_
+
+#include <string>
+
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+#ifdef EXPAT_RELATIVE_PATH
+#include "expat.h"
+#else
+#include "third_party/expat/v2_0_1/Source/lib/expat.h"
+#endif // EXPAT_RELATIVE_PATH
+
+struct XML_ParserStruct;
+typedef struct XML_ParserStruct* XML_Parser;
+
+namespace buzz {
+
+class XmlParseHandler;
+class XmlParseContext;
+class XmlParser;
+
+class XmlParseContext {
+public:
+ virtual ~XmlParseContext() {}
+ virtual QName ResolveQName(const char * qname, bool isAttr) = 0;
+ virtual void RaiseError(XML_Error err) = 0;
+ virtual void GetPosition(unsigned long * line, unsigned long * column,
+ unsigned long * byte_index) = 0;
+};
+
+class XmlParseHandler {
+public:
+ virtual ~XmlParseHandler() {}
+ virtual void StartElement(XmlParseContext * pctx,
+ const char * name, const char ** atts) = 0;
+ virtual void EndElement(XmlParseContext * pctx,
+ const char * name) = 0;
+ virtual void CharacterData(XmlParseContext * pctx,
+ const char * text, int len) = 0;
+ virtual void Error(XmlParseContext * pctx,
+ XML_Error errorCode) = 0;
+};
+
+class XmlParser {
+public:
+ static void ParseXml(XmlParseHandler * pxph, std::string text);
+
+ explicit XmlParser(XmlParseHandler * pxph);
+ bool Parse(const char * data, size_t len, bool isFinal);
+ void Reset();
+ virtual ~XmlParser();
+
+ // expat callbacks
+ void ExpatStartElement(const char * name, const char ** atts);
+ void ExpatEndElement(const char * name);
+ void ExpatCharacterData(const char * text, int len);
+ void ExpatXmlDecl(const char * ver, const char * enc, int standalone);
+
+private:
+
+ class ParseContext : public XmlParseContext {
+ public:
+ ParseContext();
+ virtual ~ParseContext();
+ virtual QName ResolveQName(const char * qname, bool isAttr);
+ virtual void RaiseError(XML_Error err) { if (!raised_) raised_ = err; }
+ virtual void GetPosition(unsigned long * line, unsigned long * column,
+ unsigned long * byte_index);
+ XML_Error RaisedError() { return raised_; }
+ void Reset();
+
+ void StartElement();
+ void EndElement();
+ void StartNamespace(const char * prefix, const char * ns);
+ void SetPosition(int line, int column, long byte_index);
+
+ private:
+ XmlnsStack xmlnsstack_;
+ XML_Error raised_;
+ XML_Size line_number_;
+ XML_Size column_number_;
+ XML_Index byte_index_;
+ };
+
+ ParseContext context_;
+ XML_Parser expat_;
+ XmlParseHandler * pxph_;
+ bool sentError_;
+};
+
+} // namespace buzz
+
+#endif // WEBRTC_LIBJINGLE_XMLLITE_XMLPARSER_H_
diff --git a/libjingle/xmllite/xmlparser_unittest.cc b/libjingle/xmllite/xmlparser_unittest.cc
new file mode 100644
index 0000000..a73d81e
--- /dev/null
+++ b/libjingle/xmllite/xmlparser_unittest.cc
@@ -0,0 +1,285 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include "webrtc/libjingle/xmllite/qname.h"
+#include "webrtc/libjingle/xmllite/xmlparser.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/gunit.h"
+
+using buzz::QName;
+using buzz::XmlParser;
+using buzz::XmlParseContext;
+using buzz::XmlParseHandler;
+
+class XmlParserTestHandler : public XmlParseHandler {
+ public:
+ virtual void StartElement(XmlParseContext * pctx,
+ const char * name, const char ** atts) {
+ ss_ << "START (" << pctx->ResolveQName(name, false).Merged();
+ while (*atts) {
+ ss_ << ", " << pctx->ResolveQName(*atts, true).Merged()
+ << "='" << *(atts+1) << "'";
+ atts += 2;
+ }
+ ss_ << ") ";
+ }
+ virtual void EndElement(XmlParseContext * pctx, const char * name) {
+ RTC_UNUSED(pctx);
+ RTC_UNUSED(name);
+ ss_ << "END ";
+ }
+ virtual void CharacterData(XmlParseContext * pctx,
+ const char * text, int len) {
+ RTC_UNUSED(pctx);
+ ss_ << "TEXT (" << std::string(text, len) << ") ";
+ }
+ virtual void Error(XmlParseContext * pctx, XML_Error code) {
+ RTC_UNUSED(pctx);
+ ss_ << "ERROR (" << static_cast<int>(code) << ") ";
+ }
+ virtual ~XmlParserTestHandler() {
+ }
+
+ std::string Str() {
+ return ss_.str();
+ }
+
+ std::string StrClear() {
+ std::string result = ss_.str();
+ ss_.str("");
+ return result;
+ }
+
+ private:
+ std::stringstream ss_;
+};
+
+
+TEST(XmlParserTest, TestTrivial) {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<testing/>");
+ EXPECT_EQ("START (testing) END ", handler.Str());
+}
+
+TEST(XmlParserTest, TestAttributes) {
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<testing a='b'/>");
+ EXPECT_EQ("START (testing, a='b') END ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<testing e='' long='some text'/>");
+ EXPECT_EQ("START (testing, e='', long='some text') END ", handler.Str());
+ }
+}
+
+TEST(XmlParserTest, TestNesting) {
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<top><first/><second><third></third></second></top>");
+ EXPECT_EQ("START (top) START (first) END START (second) START (third) "
+ "END END END ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<top><fifth><deeper><and><deeper/></and>"
+ "<sibling><leaf/></sibling></deeper></fifth><first/><second>"
+ "<third></third></second></top>");
+ EXPECT_EQ("START (top) START (fifth) START (deeper) START (and) START "
+ "(deeper) END END START (sibling) START (leaf) END END END "
+ "END START (first) END START (second) START (third) END END END ",
+ handler.Str());
+ }
+}
+
+TEST(XmlParserTest, TestXmlDecl) {
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<?xml version=\"1.0\"?><testing/>");
+ EXPECT_EQ("START (testing) END ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?><testing/>");
+ EXPECT_EQ("START (testing) END ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"
+ "<testing/>");
+ EXPECT_EQ("START (testing) END ", handler.Str());
+ }
+}
+
+TEST(XmlParserTest, TestNamespace) {
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<top xmlns='my-namespace' a='b'/>");
+ EXPECT_EQ("START (my-namespace:top, xmlns='my-namespace', a='b') END ",
+ handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<foo:top xmlns:foo='my-namespace' "
+ "a='b' foo:c='d'/>");
+ EXPECT_EQ("START (my-namespace:top, "
+ "http://www.w3.org/2000/xmlns/:foo='my-namespace', "
+ "a='b', my-namespace:c='d') END ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<top><nested xmlns='my-namespace'><leaf/>"
+ "</nested><sibling/></top>");
+ EXPECT_EQ("START (top) START (my-namespace:nested, xmlns='my-namespace') "
+ "START (my-namespace:leaf) END END START (sibling) END END ",
+ handler.Str());
+ }
+}
+
+TEST(XmlParserTest, TestIncremental) {
+ XmlParserTestHandler handler;
+ XmlParser parser(&handler);
+ std::string fragment;
+
+ fragment = "<stream:stream";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("", handler.StrClear());
+
+ fragment = " id=\"abcdefg\" xmlns=\"";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("", handler.StrClear());
+
+ fragment = "j:c\" xmlns:stream='hm";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("", handler.StrClear());
+
+ fragment = "ph'><test";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (hmph:stream, id='abcdefg', xmlns='j:c', "
+ "http://www.w3.org/2000/xmlns/:stream='hmph') ", handler.StrClear());
+
+ fragment = "ing/><again/>abracad";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (j:c:testing) END START (j:c:again) END TEXT (abracad) ",
+ handler.StrClear());
+
+ fragment = "abra</stream:";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("TEXT (abra) ", handler.StrClear());
+
+ fragment = "stream>";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("END ", handler.StrClear());
+}
+
+TEST(XmlParserTest, TestReset) {
+ {
+ XmlParserTestHandler handler;
+ XmlParser parser(&handler);
+ std::string fragment;
+
+ fragment = "<top><first/><second><third></third>";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (top) START (first) END START (second) START (third) END ",
+ handler.StrClear());
+
+ parser.Reset();
+ fragment = "<tip><first/><second><third></third>";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (tip) START (first) END START (second) START (third) END ",
+ handler.StrClear());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser parser(&handler);
+ std::string fragment;
+
+ fragment = "<top xmlns='m'>";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (m:top, xmlns='m') ", handler.StrClear());
+
+ fragment = "<testing/><frag";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (m:testing) END ", handler.StrClear());
+
+ parser.Reset();
+ fragment = "<testing><fragment/";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (testing) ", handler.StrClear());
+
+ fragment = ">";
+ parser.Parse(fragment.c_str(), fragment.length(), false);
+ EXPECT_EQ("START (fragment) END ", handler.StrClear());
+ }
+}
+
+TEST(XmlParserTest, TestError) {
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "junk");
+ EXPECT_EQ("ERROR (2) ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<top/> garbage ");
+ EXPECT_EQ("START (top) END ERROR (9) ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<-hm->");
+ EXPECT_EQ("ERROR (4) ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler, "<hello>&foobar;</hello>");
+ EXPECT_EQ("START (hello) ERROR (11) ", handler.Str());
+ }
+ {
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<!DOCTYPE HTML PUBLIC \"foobar\" \"barfoo\">");
+ EXPECT_EQ("ERROR (3) ", handler.Str());
+ }
+ {
+ // XmlParser requires utf-8
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><test/>");
+ EXPECT_EQ("ERROR (19) ", handler.Str());
+ }
+ {
+ // XmlParser requires version 1.0
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<?xml version=\"2.0\"?><test/>");
+ EXPECT_EQ("ERROR (2) ", handler.Str());
+ }
+ {
+ // XmlParser requires standalone documents
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<?xml version=\"1.0\" standalone=\"no\"?><test/>");
+ EXPECT_EQ("ERROR (2) ", handler.Str());
+ }
+ {
+ // XmlParser doesn't like empty namespace URIs
+ XmlParserTestHandler handler;
+ XmlParser::ParseXml(&handler,
+ "<test xmlns:foo='' foo:bar='huh?'>");
+ EXPECT_EQ("ERROR (2) ", handler.Str());
+ }
+}
diff --git a/libjingle/xmllite/xmlprinter.cc b/libjingle/xmllite/xmlprinter.cc
new file mode 100644
index 0000000..27d7cc0
--- /dev/null
+++ b/libjingle/xmllite/xmlprinter.cc
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlprinter.h"
+
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include "webrtc/libjingle/xmllite/xmlconstants.h"
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+
+namespace buzz {
+
+class XmlPrinterImpl {
+public:
+ XmlPrinterImpl(std::ostream* pout, XmlnsStack* ns_stack);
+ void PrintElement(const XmlElement* element);
+ void PrintQuotedValue(const std::string& text);
+ void PrintBodyText(const std::string& text);
+ void PrintCDATAText(const std::string& text);
+
+private:
+ std::ostream *pout_;
+ XmlnsStack* ns_stack_;
+};
+
+void XmlPrinter::PrintXml(std::ostream* pout, const XmlElement* element) {
+ XmlnsStack ns_stack;
+ PrintXml(pout, element, &ns_stack);
+}
+
+void XmlPrinter::PrintXml(std::ostream* pout, const XmlElement* element,
+ XmlnsStack* ns_stack) {
+ XmlPrinterImpl printer(pout, ns_stack);
+ printer.PrintElement(element);
+}
+
+XmlPrinterImpl::XmlPrinterImpl(std::ostream* pout, XmlnsStack* ns_stack)
+ : pout_(pout),
+ ns_stack_(ns_stack) {
+}
+
+void XmlPrinterImpl::PrintElement(const XmlElement* element) {
+ ns_stack_->PushFrame();
+
+ // first go through attrs of pel to add xmlns definitions
+ const XmlAttr* attr;
+ for (attr = element->FirstAttr(); attr; attr = attr->NextAttr()) {
+ if (attr->Name() == QN_XMLNS) {
+ ns_stack_->AddXmlns(STR_EMPTY, attr->Value());
+ } else if (attr->Name().Namespace() == NS_XMLNS) {
+ ns_stack_->AddXmlns(attr->Name().LocalPart(),
+ attr->Value());
+ }
+ }
+
+ // then go through qnames to make sure needed xmlns definitons are added
+ std::vector<std::string> new_ns;
+ std::pair<std::string, bool> prefix;
+ prefix = ns_stack_->AddNewPrefix(element->Name().Namespace(), false);
+ if (prefix.second) {
+ new_ns.push_back(prefix.first);
+ new_ns.push_back(element->Name().Namespace());
+ }
+
+ for (attr = element->FirstAttr(); attr; attr = attr->NextAttr()) {
+ prefix = ns_stack_->AddNewPrefix(attr->Name().Namespace(), true);
+ if (prefix.second) {
+ new_ns.push_back(prefix.first);
+ new_ns.push_back(attr->Name().Namespace());
+ }
+ }
+
+ // print the element name
+ *pout_ << '<' << ns_stack_->FormatQName(element->Name(), false);
+
+ // and the attributes
+ for (attr = element->FirstAttr(); attr; attr = attr->NextAttr()) {
+ *pout_ << ' ' << ns_stack_->FormatQName(attr->Name(), true) << "=\"";
+ PrintQuotedValue(attr->Value());
+ *pout_ << '"';
+ }
+
+ // and the extra xmlns declarations
+ std::vector<std::string>::iterator i(new_ns.begin());
+ while (i < new_ns.end()) {
+ if (*i == STR_EMPTY) {
+ *pout_ << " xmlns=\"" << *(i + 1) << '"';
+ } else {
+ *pout_ << " xmlns:" << *i << "=\"" << *(i + 1) << '"';
+ }
+ i += 2;
+ }
+
+ // now the children
+ const XmlChild* child = element->FirstChild();
+
+ if (child == NULL)
+ *pout_ << "/>";
+ else {
+ *pout_ << '>';
+ while (child) {
+ if (child->IsText()) {
+ if (element->IsCDATA()) {
+ PrintCDATAText(child->AsText()->Text());
+ } else {
+ PrintBodyText(child->AsText()->Text());
+ }
+ } else {
+ PrintElement(child->AsElement());
+ }
+ child = child->NextChild();
+ }
+ *pout_ << "</" << ns_stack_->FormatQName(element->Name(), false) << '>';
+ }
+
+ ns_stack_->PopFrame();
+}
+
+void XmlPrinterImpl::PrintQuotedValue(const std::string& text) {
+ size_t safe = 0;
+ for (;;) {
+ size_t unsafe = text.find_first_of("<>&\"", safe);
+ if (unsafe == std::string::npos)
+ unsafe = text.length();
+ *pout_ << text.substr(safe, unsafe - safe);
+ if (unsafe == text.length())
+ return;
+ switch (text[unsafe]) {
+ case '<': *pout_ << "<"; break;
+ case '>': *pout_ << ">"; break;
+ case '&': *pout_ << "&"; break;
+ case '"': *pout_ << """; break;
+ }
+ safe = unsafe + 1;
+ if (safe == text.length())
+ return;
+ }
+}
+
+void XmlPrinterImpl::PrintBodyText(const std::string& text) {
+ size_t safe = 0;
+ for (;;) {
+ size_t unsafe = text.find_first_of("<>&", safe);
+ if (unsafe == std::string::npos)
+ unsafe = text.length();
+ *pout_ << text.substr(safe, unsafe - safe);
+ if (unsafe == text.length())
+ return;
+ switch (text[unsafe]) {
+ case '<': *pout_ << "<"; break;
+ case '>': *pout_ << ">"; break;
+ case '&': *pout_ << "&"; break;
+ }
+ safe = unsafe + 1;
+ if (safe == text.length())
+ return;
+ }
+}
+
+void XmlPrinterImpl::PrintCDATAText(const std::string& text) {
+ *pout_ << "<![CDATA[" << text << "]]>";
+}
+
+} // namespace buzz
diff --git a/libjingle/xmllite/xmlprinter.h b/libjingle/xmllite/xmlprinter.h
new file mode 100644
index 0000000..40cf195
--- /dev/null
+++ b/libjingle/xmllite/xmlprinter.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_LIBJINGLE_XMLLITE_XMLPRINTER_H_
+#define WEBRTC_LIBJINGLE_XMLLITE_XMLPRINTER_H_
+
+#include <iosfwd>
+#include <string>
+
+namespace buzz {
+
+class XmlElement;
+class XmlnsStack;
+
+class XmlPrinter {
+ public:
+ static void PrintXml(std::ostream* pout, const XmlElement* pelt);
+
+ static void PrintXml(std::ostream* pout, const XmlElement* pelt,
+ XmlnsStack* ns_stack);
+};
+
+} // namespace buzz
+
+#endif // WEBRTC_LIBJINGLE_XMLLITE_XMLPRINTER_H_
diff --git a/libjingle/xmllite/xmlprinter_unittest.cc b/libjingle/xmllite/xmlprinter_unittest.cc
new file mode 100644
index 0000000..b4850b5
--- /dev/null
+++ b/libjingle/xmllite/xmlprinter_unittest.cc
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/libjingle/xmllite/xmlprinter.h"
+
+#include <sstream>
+#include <string>
+
+#include "webrtc/libjingle/xmllite/qname.h"
+#include "webrtc/libjingle/xmllite/xmlelement.h"
+#include "webrtc/libjingle/xmllite/xmlnsstack.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/gunit.h"
+
+using buzz::QName;
+using buzz::XmlElement;
+using buzz::XmlnsStack;
+using buzz::XmlPrinter;
+
+TEST(XmlPrinterTest, TestBasicPrinting) {
+ XmlElement elt(QName("google:test", "first"));
+ std::stringstream ss;
+ XmlPrinter::PrintXml(&ss, &elt);
+ EXPECT_EQ("<test:first xmlns:test=\"google:test\"/>", ss.str());
+}
+
+TEST(XmlPrinterTest, TestNamespacedPrinting) {
+ XmlElement elt(QName("google:test", "first"));
+ elt.AddElement(new XmlElement(QName("nested:test", "second")));
+ std::stringstream ss;
+
+ XmlnsStack ns_stack;
+ ns_stack.AddXmlns("gg", "google:test");
+ ns_stack.AddXmlns("", "nested:test");
+
+ XmlPrinter::PrintXml(&ss, &elt, &ns_stack);
+ EXPECT_EQ("<gg:first><second/></gg:first>", ss.str());
+}
diff --git a/modules/CNG.target.darwin-arm.mk b/modules/CNG.target.darwin-arm.mk
index 83f64d0..0554091 100644
--- a/modules/CNG.target.darwin-arm.mk
+++ b/modules/CNG.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -143,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -205,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -222,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -271,68 +275,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.darwin-arm64.mk b/modules/CNG.target.darwin-arm64.mk
index b475e4c..a973421 100644
--- a/modules/CNG.target.darwin-arm64.mk
+++ b/modules/CNG.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -129,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -196,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -242,59 +246,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.darwin-mips.mk b/modules/CNG.target.darwin-mips.mk
index 4b1ea9d..3ce17eb 100644
--- a/modules/CNG.target.darwin-mips.mk
+++ b/modules/CNG.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -138,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -196,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -213,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -261,64 +253,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.darwin-mips64.mk b/modules/CNG.target.darwin-mips64.mk
new file mode 100644
index 0000000..3ce17eb
--- /dev/null
+++ b/modules/CNG.target.darwin-mips64.mk
@@ -0,0 +1,287 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c \
+ third_party/webrtc/modules/audio_coding/codecs/cng/cng_helpfuns.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_CNG_gyp
+
+# Alias gyp target name.
+.PHONY: CNG
+CNG: third_party_webrtc_modules_CNG_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/CNG.target.darwin-x86.mk b/modules/CNG.target.darwin-x86.mk
index e116e37..fae5031 100644
--- a/modules/CNG.target.darwin-x86.mk
+++ b/modules/CNG.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -254,63 +258,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.darwin-x86_64.mk b/modules/CNG.target.darwin-x86_64.mk
index 7b9e360..10fa41f 100644
--- a/modules/CNG.target.darwin-x86_64.mk
+++ b/modules/CNG.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.linux-arm.mk b/modules/CNG.target.linux-arm.mk
index 83f64d0..0554091 100644
--- a/modules/CNG.target.linux-arm.mk
+++ b/modules/CNG.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -143,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -205,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -222,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -271,68 +275,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.linux-arm64.mk b/modules/CNG.target.linux-arm64.mk
index b475e4c..a973421 100644
--- a/modules/CNG.target.linux-arm64.mk
+++ b/modules/CNG.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -129,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -196,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -242,59 +246,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.linux-mips.mk b/modules/CNG.target.linux-mips.mk
index 4b1ea9d..3ce17eb 100644
--- a/modules/CNG.target.linux-mips.mk
+++ b/modules/CNG.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -138,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -196,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -213,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -261,64 +253,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.linux-mips64.mk b/modules/CNG.target.linux-mips64.mk
new file mode 100644
index 0000000..3ce17eb
--- /dev/null
+++ b/modules/CNG.target.linux-mips64.mk
@@ -0,0 +1,287 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c \
+ third_party/webrtc/modules/audio_coding/codecs/cng/cng_helpfuns.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_CNG_gyp
+
+# Alias gyp target name.
+.PHONY: CNG
+CNG: third_party_webrtc_modules_CNG_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/CNG.target.linux-x86.mk b/modules/CNG.target.linux-x86.mk
index e116e37..fae5031 100644
--- a/modules/CNG.target.linux-x86.mk
+++ b/modules/CNG.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -254,63 +258,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/CNG.target.linux-x86_64.mk b/modules/CNG.target.linux-x86_64.mk
index 7b9e360..10fa41f 100644
--- a/modules/CNG.target.linux-x86_64.mk
+++ b/modules/CNG.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_CNG_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.darwin-arm.mk b/modules/G711.target.darwin-arm.mk
index 54a368c..c5dc896 100644
--- a/modules/G711.target.darwin-arm.mk
+++ b/modules/G711.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,23 +141,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,68 +269,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.darwin-arm64.mk b/modules/G711.target.darwin-arm64.mk
index 5e521e6..abaadee 100644
--- a/modules/G711.target.darwin-arm64.mk
+++ b/modules/G711.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,59 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.darwin-mips.mk b/modules/G711.target.darwin-mips.mk
index a7f5bd2..546da98 100644
--- a/modules/G711.target.darwin-mips.mk
+++ b/modules/G711.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -135,23 +130,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -160,18 +156,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -193,7 +185,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -210,17 +201,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -255,64 +247,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.darwin-mips64.mk b/modules/G711.target.darwin-mips64.mk
new file mode 100644
index 0000000..546da98
--- /dev/null
+++ b/modules/G711.target.darwin-mips64.mk
@@ -0,0 +1,281 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/g711/g711_interface.c \
+ third_party/webrtc/modules/audio_coding/codecs/g711/g711.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_G711_gyp
+
+# Alias gyp target name.
+.PHONY: G711
+G711: third_party_webrtc_modules_G711_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/G711.target.darwin-x86.mk b/modules/G711.target.darwin-x86.mk
index b8fe80b..272c6e6 100644
--- a/modules/G711.target.darwin-x86.mk
+++ b/modules/G711.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,21 +133,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -248,63 +252,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.darwin-x86_64.mk b/modules/G711.target.darwin-x86_64.mk
index 0c08f1d..86f8458 100644
--- a/modules/G711.target.darwin-x86_64.mk
+++ b/modules/G711.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,22 +132,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.linux-arm.mk b/modules/G711.target.linux-arm.mk
index 54a368c..c5dc896 100644
--- a/modules/G711.target.linux-arm.mk
+++ b/modules/G711.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,23 +141,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,68 +269,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.linux-arm64.mk b/modules/G711.target.linux-arm64.mk
index 5e521e6..abaadee 100644
--- a/modules/G711.target.linux-arm64.mk
+++ b/modules/G711.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,59 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.linux-mips.mk b/modules/G711.target.linux-mips.mk
index a7f5bd2..546da98 100644
--- a/modules/G711.target.linux-mips.mk
+++ b/modules/G711.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -135,23 +130,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -160,18 +156,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -193,7 +185,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -210,17 +201,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -255,64 +247,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.linux-mips64.mk b/modules/G711.target.linux-mips64.mk
new file mode 100644
index 0000000..546da98
--- /dev/null
+++ b/modules/G711.target.linux-mips64.mk
@@ -0,0 +1,281 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/g711/g711_interface.c \
+ third_party/webrtc/modules/audio_coding/codecs/g711/g711.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_G711_gyp
+
+# Alias gyp target name.
+.PHONY: G711
+G711: third_party_webrtc_modules_G711_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/G711.target.linux-x86.mk b/modules/G711.target.linux-x86.mk
index b8fe80b..272c6e6 100644
--- a/modules/G711.target.linux-x86.mk
+++ b/modules/G711.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,21 +133,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -248,63 +252,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G711.target.linux-x86_64.mk b/modules/G711.target.linux-x86_64.mk
index 0c08f1d..86f8458 100644
--- a/modules/G711.target.linux-x86_64.mk
+++ b/modules/G711.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G711_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,22 +132,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.darwin-arm.mk b/modules/G722.target.darwin-arm.mk
index ea4fb2e..08a3ea5 100644
--- a/modules/G722.target.darwin-arm.mk
+++ b/modules/G722.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -72,6 +70,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -79,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -96,12 +94,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -141,23 +142,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,13 +177,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -203,7 +205,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -220,12 +221,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -266,68 +270,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.darwin-arm64.mk b/modules/G722.target.darwin-arm64.mk
index adeb833..229ec72 100644
--- a/modules/G722.target.darwin-arm64.mk
+++ b/modules/G722.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,13 +60,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,21 +128,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,7 +179,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -194,12 +195,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -237,59 +241,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.darwin-mips.mk b/modules/G722.target.darwin-mips.mk
index ae0148c..a86bb43 100644
--- a/modules/G722.target.darwin-mips.mk
+++ b/modules/G722.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -42,18 +40,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,17 +86,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -136,23 +131,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -161,18 +157,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -194,7 +186,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -211,17 +202,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -256,64 +248,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.darwin-mips64.mk b/modules/G722.target.darwin-mips64.mk
new file mode 100644
index 0000000..a86bb43
--- /dev/null
+++ b/modules/G722.target.darwin-mips64.mk
@@ -0,0 +1,282 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/g722/g722_interface.c \
+ third_party/webrtc/modules/audio_coding/codecs/g722/g722_encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/g722/g722_decode.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_G722_gyp
+
+# Alias gyp target name.
+.PHONY: G722
+G722: third_party_webrtc_modules_G722_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/G722.target.darwin-x86.mk b/modules/G722.target.darwin-x86.mk
index 820f953..64325b7 100644
--- a/modules/G722.target.darwin-x86.mk
+++ b/modules/G722.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -133,21 +134,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -249,63 +253,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.darwin-x86_64.mk b/modules/G722.target.darwin-x86_64.mk
index c95cb53..308dc13 100644
--- a/modules/G722.target.darwin-x86_64.mk
+++ b/modules/G722.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,22 +133,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.linux-arm.mk b/modules/G722.target.linux-arm.mk
index ea4fb2e..08a3ea5 100644
--- a/modules/G722.target.linux-arm.mk
+++ b/modules/G722.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -72,6 +70,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -79,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -96,12 +94,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -141,23 +142,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,13 +177,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -203,7 +205,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -220,12 +221,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -266,68 +270,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.linux-arm64.mk b/modules/G722.target.linux-arm64.mk
index adeb833..229ec72 100644
--- a/modules/G722.target.linux-arm64.mk
+++ b/modules/G722.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,13 +60,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,21 +128,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,7 +179,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -194,12 +195,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -237,59 +241,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.linux-mips.mk b/modules/G722.target.linux-mips.mk
index ae0148c..a86bb43 100644
--- a/modules/G722.target.linux-mips.mk
+++ b/modules/G722.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -42,18 +40,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,17 +86,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -136,23 +131,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -161,18 +157,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -194,7 +186,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -211,17 +202,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -256,64 +248,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.linux-mips64.mk b/modules/G722.target.linux-mips64.mk
new file mode 100644
index 0000000..a86bb43
--- /dev/null
+++ b/modules/G722.target.linux-mips64.mk
@@ -0,0 +1,282 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/g722/g722_interface.c \
+ third_party/webrtc/modules/audio_coding/codecs/g722/g722_encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/g722/g722_decode.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_G722_gyp
+
+# Alias gyp target name.
+.PHONY: G722
+G722: third_party_webrtc_modules_G722_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/G722.target.linux-x86.mk b/modules/G722.target.linux-x86.mk
index 820f953..64325b7 100644
--- a/modules/G722.target.linux-x86.mk
+++ b/modules/G722.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -133,21 +134,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -249,63 +253,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/G722.target.linux-x86_64.mk b/modules/G722.target.linux-x86_64.mk
index c95cb53..308dc13 100644
--- a/modules/G722.target.linux-x86_64.mk
+++ b/modules/G722.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_G722_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,22 +133,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.darwin-arm.mk b/modules/PCM16B.target.darwin-arm.mk
index 1b37dce..7cf8c9d 100644
--- a/modules/PCM16B.target.darwin-arm.mk
+++ b/modules/PCM16B.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +68,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +76,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,12 +92,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -264,68 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.darwin-arm64.mk b/modules/PCM16B.target.darwin-arm64.mk
index 88e8c71..62e7547 100644
--- a/modules/PCM16B.target.darwin-arm64.mk
+++ b/modules/PCM16B.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,13 +58,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -83,12 +81,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,59 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.darwin-mips.mk b/modules/PCM16B.target.darwin-mips.mk
index cef79db..6e580c9 100644
--- a/modules/PCM16B.target.darwin-mips.mk
+++ b/modules/PCM16B.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -40,18 +38,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +60,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +84,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -254,64 +246,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.darwin-mips64.mk b/modules/PCM16B.target.darwin-mips64.mk
new file mode 100644
index 0000000..6e580c9
--- /dev/null
+++ b/modules/PCM16B.target.darwin-mips64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_PCM16B_gyp
+
+# Alias gyp target name.
+.PHONY: PCM16B
+PCM16B: third_party_webrtc_modules_PCM16B_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/PCM16B.target.darwin-x86.mk b/modules/PCM16B.target.darwin-x86.mk
index 58b8039..aa14d37 100644
--- a/modules/PCM16B.target.darwin-x86.mk
+++ b/modules/PCM16B.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.darwin-x86_64.mk b/modules/PCM16B.target.darwin-x86_64.mk
index 749a7e1..311aa14 100644
--- a/modules/PCM16B.target.darwin-x86_64.mk
+++ b/modules/PCM16B.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -245,63 +249,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.linux-arm.mk b/modules/PCM16B.target.linux-arm.mk
index 1b37dce..7cf8c9d 100644
--- a/modules/PCM16B.target.linux-arm.mk
+++ b/modules/PCM16B.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +68,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +76,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,12 +92,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -264,68 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.linux-arm64.mk b/modules/PCM16B.target.linux-arm64.mk
index 88e8c71..62e7547 100644
--- a/modules/PCM16B.target.linux-arm64.mk
+++ b/modules/PCM16B.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,13 +58,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -83,12 +81,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,59 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.linux-mips.mk b/modules/PCM16B.target.linux-mips.mk
index cef79db..6e580c9 100644
--- a/modules/PCM16B.target.linux-mips.mk
+++ b/modules/PCM16B.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -40,18 +38,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +60,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +84,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -254,64 +246,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.linux-mips64.mk b/modules/PCM16B.target.linux-mips64.mk
new file mode 100644
index 0000000..6e580c9
--- /dev/null
+++ b/modules/PCM16B.target.linux-mips64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_PCM16B_gyp
+
+# Alias gyp target name.
+.PHONY: PCM16B
+PCM16B: third_party_webrtc_modules_PCM16B_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/PCM16B.target.linux-x86.mk b/modules/PCM16B.target.linux-x86.mk
index 58b8039..aa14d37 100644
--- a/modules/PCM16B.target.linux-x86.mk
+++ b/modules/PCM16B.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/PCM16B.target.linux-x86_64.mk b/modules/PCM16B.target.linux-x86_64.mk
index 749a7e1..311aa14 100644
--- a/modules/PCM16B.target.linux-x86_64.mk
+++ b/modules/PCM16B.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_PCM16B_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -245,63 +249,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
new file mode 100644
index 0000000..8972ff9
--- /dev/null
+++ b/modules/audio_coding/BUILD.gn
@@ -0,0 +1,683 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("//build/config/arm.gni")
+import("../../build/webrtc.gni")
+
+config("audio_coding_config") {
+ include_dirs = [
+ "main/interface",
+ "../interface",
+ ]
+}
+
+source_set("audio_coding") {
+ sources = [
+ "main/acm2/acm_amr.cc",
+ "main/acm2/acm_amr.h",
+ "main/acm2/acm_amrwb.cc",
+ "main/acm2/acm_amrwb.h",
+ "main/acm2/acm_celt.cc",
+ "main/acm2/acm_celt.h",
+ "main/acm2/acm_cng.cc",
+ "main/acm2/acm_cng.h",
+ "main/acm2/acm_codec_database.cc",
+ "main/acm2/acm_codec_database.h",
+ "main/acm2/acm_common_defs.h",
+ "main/acm2/acm_dtmf_playout.cc",
+ "main/acm2/acm_dtmf_playout.h",
+ "main/acm2/acm_g722.cc",
+ "main/acm2/acm_g722.h",
+ "main/acm2/acm_g7221.cc",
+ "main/acm2/acm_g7221.h",
+ "main/acm2/acm_g7221c.cc",
+ "main/acm2/acm_g7221c.h",
+ "main/acm2/acm_g729.cc",
+ "main/acm2/acm_g729.h",
+ "main/acm2/acm_g7291.cc",
+ "main/acm2/acm_g7291.h",
+ "main/acm2/acm_generic_codec.cc",
+ "main/acm2/acm_generic_codec.h",
+ "main/acm2/acm_gsmfr.cc",
+ "main/acm2/acm_gsmfr.h",
+ "main/acm2/acm_ilbc.cc",
+ "main/acm2/acm_ilbc.h",
+ "main/acm2/acm_isac.cc",
+ "main/acm2/acm_isac.h",
+ "main/acm2/acm_isac_macros.h",
+ "main/acm2/acm_opus.cc",
+ "main/acm2/acm_opus.h",
+ "main/acm2/acm_speex.cc",
+ "main/acm2/acm_speex.h",
+ "main/acm2/acm_pcm16b.cc",
+ "main/acm2/acm_pcm16b.h",
+ "main/acm2/acm_pcma.cc",
+ "main/acm2/acm_pcma.h",
+ "main/acm2/acm_pcmu.cc",
+ "main/acm2/acm_pcmu.h",
+ "main/acm2/acm_red.cc",
+ "main/acm2/acm_red.h",
+ "main/acm2/acm_receiver.cc",
+ "main/acm2/acm_receiver.h",
+ "main/acm2/acm_resampler.cc",
+ "main/acm2/acm_resampler.h",
+ "main/acm2/audio_coding_module.cc",
+ "main/acm2/audio_coding_module_impl.cc",
+ "main/acm2/audio_coding_module_impl.h",
+ "main/acm2/call_statistics.cc",
+ "main/acm2/call_statistics.h",
+ "main/acm2/initial_delay_manager.cc",
+ "main/acm2/initial_delay_manager.h",
+ "main/acm2/nack.cc",
+ "main/acm2/nack.h",
+ "main/interface/audio_coding_module.h",
+ "main/interface/audio_coding_module_typedefs.h",
+ ]
+
+ defines = []
+
+ direct_dependent_configs = [ ":audio_coding_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":cng",
+ ":g711",
+ ":g722",
+ ":ilbc",
+ ":isac",
+ ":isacfix",
+ ":neteq",
+ ":pcm16b",
+ "../../common_audio",
+ "../../system_wrappers",
+ ]
+
+ if (rtc_include_opus) {
+ defines += [ "WEBRTC_CODEC_OPUS" ]
+ deps += [ ":webrtc_opus" ]
+ }
+}
+
+config("cng_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/cng/include",
+ ]
+}
+
+source_set("cng") {
+ sources = [
+ "codecs/cng/cng_helpfuns.c",
+ "codecs/cng/cng_helpfuns.h",
+ "codecs/cng/include/webrtc_cng.h",
+ "codecs/cng/webrtc_cng.c",
+ ]
+
+ direct_dependent_configs = [ ":cng_config" ]
+
+ deps = [ "../../common_audio" ]
+}
+
+config("g711_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/g711/include",
+ ]
+}
+
+source_set("g711") {
+ sources = [
+ "codecs/g711/include/g711_interface.h",
+ "codecs/g711/g711_interface.c",
+ "codecs/g711/g711.c",
+ "codecs/g711/g711.h",
+ ]
+
+ direct_dependent_configs = [ ":g711_config" ]
+}
+
+config("g722_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/g722/include",
+ ]
+}
+
+source_set("g722") {
+ sources = [
+ "codecs/g722/include/g722_interface.h",
+ "codecs/g722/g722_interface.c",
+ "codecs/g722/g722_encode.c",
+ "codecs/g722/g722_decode.c",
+ "codecs/g722/g722_enc_dec.h",
+ ]
+
+ direct_dependent_configs = [ ":g722_config" ]
+}
+
+config("ilbc_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/ilbc/interface",
+ ]
+}
+
+source_set("ilbc") {
+ sources = [
+ "codecs/ilbc/abs_quant.c",
+ "codecs/ilbc/abs_quant.h",
+ "codecs/ilbc/abs_quant_loop.c",
+ "codecs/ilbc/abs_quant_loop.h",
+ "codecs/ilbc/augmented_cb_corr.c",
+ "codecs/ilbc/augmented_cb_corr.h",
+ "codecs/ilbc/bw_expand.c",
+ "codecs/ilbc/bw_expand.h",
+ "codecs/ilbc/cb_construct.c",
+ "codecs/ilbc/cb_construct.h",
+ "codecs/ilbc/cb_mem_energy_augmentation.c",
+ "codecs/ilbc/cb_mem_energy_augmentation.h",
+ "codecs/ilbc/cb_mem_energy.c",
+ "codecs/ilbc/cb_mem_energy_calc.c",
+ "codecs/ilbc/cb_mem_energy_calc.h",
+ "codecs/ilbc/cb_mem_energy.h",
+ "codecs/ilbc/cb_search.c",
+ "codecs/ilbc/cb_search_core.c",
+ "codecs/ilbc/cb_search_core.h",
+ "codecs/ilbc/cb_search.h",
+ "codecs/ilbc/cb_update_best_index.c",
+ "codecs/ilbc/cb_update_best_index.h",
+ "codecs/ilbc/chebyshev.c",
+ "codecs/ilbc/chebyshev.h",
+ "codecs/ilbc/comp_corr.c",
+ "codecs/ilbc/comp_corr.h",
+ "codecs/ilbc/constants.c",
+ "codecs/ilbc/constants.h",
+ "codecs/ilbc/create_augmented_vec.c",
+ "codecs/ilbc/create_augmented_vec.h",
+ "codecs/ilbc/decode.c",
+ "codecs/ilbc/decode.h",
+ "codecs/ilbc/decode_residual.c",
+ "codecs/ilbc/decode_residual.h",
+ "codecs/ilbc/decoder_interpolate_lsf.c",
+ "codecs/ilbc/decoder_interpolate_lsf.h",
+ "codecs/ilbc/defines.h",
+ "codecs/ilbc/do_plc.c",
+ "codecs/ilbc/do_plc.h",
+ "codecs/ilbc/encode.c",
+ "codecs/ilbc/encode.h",
+ "codecs/ilbc/energy_inverse.c",
+ "codecs/ilbc/energy_inverse.h",
+ "codecs/ilbc/enhancer.c",
+ "codecs/ilbc/enhancer.h",
+ "codecs/ilbc/enhancer_interface.c",
+ "codecs/ilbc/enhancer_interface.h",
+ "codecs/ilbc/enh_upsample.c",
+ "codecs/ilbc/enh_upsample.h",
+ "codecs/ilbc/filtered_cb_vecs.c",
+ "codecs/ilbc/filtered_cb_vecs.h",
+ "codecs/ilbc/frame_classify.c",
+ "codecs/ilbc/frame_classify.h",
+ "codecs/ilbc/gain_dequant.c",
+ "codecs/ilbc/gain_dequant.h",
+ "codecs/ilbc/gain_quant.c",
+ "codecs/ilbc/gain_quant.h",
+ "codecs/ilbc/get_cd_vec.c",
+ "codecs/ilbc/get_cd_vec.h",
+ "codecs/ilbc/get_lsp_poly.c",
+ "codecs/ilbc/get_lsp_poly.h",
+ "codecs/ilbc/get_sync_seq.c",
+ "codecs/ilbc/get_sync_seq.h",
+ "codecs/ilbc/hp_input.c",
+ "codecs/ilbc/hp_input.h",
+ "codecs/ilbc/hp_output.c",
+ "codecs/ilbc/hp_output.h",
+ "codecs/ilbc/ilbc.c",
+ "codecs/ilbc/index_conv_dec.c",
+ "codecs/ilbc/index_conv_dec.h",
+ "codecs/ilbc/index_conv_enc.c",
+ "codecs/ilbc/index_conv_enc.h",
+ "codecs/ilbc/init_decode.c",
+ "codecs/ilbc/init_decode.h",
+ "codecs/ilbc/init_encode.c",
+ "codecs/ilbc/init_encode.h",
+ "codecs/ilbc/interface/ilbc.h",
+ "codecs/ilbc/interpolate.c",
+ "codecs/ilbc/interpolate.h",
+ "codecs/ilbc/interpolate_samples.c",
+ "codecs/ilbc/interpolate_samples.h",
+ "codecs/ilbc/lpc_encode.c",
+ "codecs/ilbc/lpc_encode.h",
+ "codecs/ilbc/lsf_check.c",
+ "codecs/ilbc/lsf_check.h",
+ "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
+ "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
+ "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
+ "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
+ "codecs/ilbc/lsf_to_lsp.c",
+ "codecs/ilbc/lsf_to_lsp.h",
+ "codecs/ilbc/lsf_to_poly.c",
+ "codecs/ilbc/lsf_to_poly.h",
+ "codecs/ilbc/lsp_to_lsf.c",
+ "codecs/ilbc/lsp_to_lsf.h",
+ "codecs/ilbc/my_corr.c",
+ "codecs/ilbc/my_corr.h",
+ "codecs/ilbc/nearest_neighbor.c",
+ "codecs/ilbc/nearest_neighbor.h",
+ "codecs/ilbc/pack_bits.c",
+ "codecs/ilbc/pack_bits.h",
+ "codecs/ilbc/poly_to_lsf.c",
+ "codecs/ilbc/poly_to_lsf.h",
+ "codecs/ilbc/poly_to_lsp.c",
+ "codecs/ilbc/poly_to_lsp.h",
+ "codecs/ilbc/refiner.c",
+ "codecs/ilbc/refiner.h",
+ "codecs/ilbc/simple_interpolate_lsf.c",
+ "codecs/ilbc/simple_interpolate_lsf.h",
+ "codecs/ilbc/simple_lpc_analysis.c",
+ "codecs/ilbc/simple_lpc_analysis.h",
+ "codecs/ilbc/simple_lsf_dequant.c",
+ "codecs/ilbc/simple_lsf_dequant.h",
+ "codecs/ilbc/simple_lsf_quant.c",
+ "codecs/ilbc/simple_lsf_quant.h",
+ "codecs/ilbc/smooth.c",
+ "codecs/ilbc/smooth.h",
+ "codecs/ilbc/smooth_out_data.c",
+ "codecs/ilbc/smooth_out_data.h",
+ "codecs/ilbc/sort_sq.c",
+ "codecs/ilbc/sort_sq.h",
+ "codecs/ilbc/split_vq.c",
+ "codecs/ilbc/split_vq.h",
+ "codecs/ilbc/state_construct.c",
+ "codecs/ilbc/state_construct.h",
+ "codecs/ilbc/state_search.c",
+ "codecs/ilbc/state_search.h",
+ "codecs/ilbc/swap_bytes.c",
+ "codecs/ilbc/swap_bytes.h",
+ "codecs/ilbc/unpack_bits.c",
+ "codecs/ilbc/unpack_bits.h",
+ "codecs/ilbc/vq3.c",
+ "codecs/ilbc/vq3.h",
+ "codecs/ilbc/vq4.c",
+ "codecs/ilbc/vq4.h",
+ "codecs/ilbc/window32_w32.c",
+ "codecs/ilbc/window32_w32.h",
+ "codecs/ilbc/xcorr_coef.c",
+ "codecs/ilbc/xcorr_coef.h",
+ ]
+
+ direct_dependent_configs = [ ":ilbc_config" ]
+
+ deps = [ "../../common_audio" ]
+}
+
+config("isac_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/isac/main/interface",
+ ]
+}
+
+source_set("isac") {
+ sources = [
+ "codecs/isac/main/interface/isac.h",
+ "codecs/isac/main/source/arith_routines.c",
+ "codecs/isac/main/source/arith_routines.h",
+ "codecs/isac/main/source/arith_routines_hist.c",
+ "codecs/isac/main/source/arith_routines_logist.c",
+ "codecs/isac/main/source/bandwidth_estimator.c",
+ "codecs/isac/main/source/bandwidth_estimator.h",
+ "codecs/isac/main/source/codec.h",
+ "codecs/isac/main/source/crc.c",
+ "codecs/isac/main/source/crc.h",
+ "codecs/isac/main/source/decode_bwe.c",
+ "codecs/isac/main/source/decode.c",
+ "codecs/isac/main/source/encode.c",
+ "codecs/isac/main/source/encode_lpc_swb.c",
+ "codecs/isac/main/source/encode_lpc_swb.h",
+ "codecs/isac/main/source/entropy_coding.c",
+ "codecs/isac/main/source/entropy_coding.h",
+ "codecs/isac/main/source/fft.c",
+ "codecs/isac/main/source/fft.h",
+ "codecs/isac/main/source/filterbanks.c",
+ "codecs/isac/main/source/filterbank_tables.c",
+ "codecs/isac/main/source/filterbank_tables.h",
+ "codecs/isac/main/source/filter_functions.c",
+ "codecs/isac/main/source/intialize.c",
+ "codecs/isac/main/source/isac.c",
+ "codecs/isac/main/source/lattice.c",
+ "codecs/isac/main/source/lpc_analysis.c",
+ "codecs/isac/main/source/lpc_analysis.h",
+ "codecs/isac/main/source/lpc_gain_swb_tables.c",
+ "codecs/isac/main/source/lpc_gain_swb_tables.h",
+ "codecs/isac/main/source/lpc_shape_swb12_tables.c",
+ "codecs/isac/main/source/lpc_shape_swb12_tables.h",
+ "codecs/isac/main/source/lpc_shape_swb16_tables.c",
+ "codecs/isac/main/source/lpc_shape_swb16_tables.h",
+ "codecs/isac/main/source/lpc_tables.c",
+ "codecs/isac/main/source/lpc_tables.h",
+ "codecs/isac/main/source/os_specific_inline.h",
+ "codecs/isac/main/source/pitch_estimator.c",
+ "codecs/isac/main/source/pitch_estimator.h",
+ "codecs/isac/main/source/pitch_filter.c",
+ "codecs/isac/main/source/pitch_gain_tables.c",
+ "codecs/isac/main/source/pitch_gain_tables.h",
+ "codecs/isac/main/source/pitch_lag_tables.c",
+ "codecs/isac/main/source/pitch_lag_tables.h",
+ "codecs/isac/main/source/settings.h",
+ "codecs/isac/main/source/spectrum_ar_model_tables.c",
+ "codecs/isac/main/source/spectrum_ar_model_tables.h",
+ "codecs/isac/main/source/structs.h",
+ "codecs/isac/main/source/transform.c",
+ ]
+
+ if (is_linux) {
+ libs = [ "m" ]
+ }
+
+ configs += [ "../..:common_inherited_config" ]
+
+ direct_dependent_configs = [ ":isac_config" ]
+
+ deps = [ "../../common_audio" ]
+}
+
+config("isac_fix_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/isac/fix/interface",
+ ]
+}
+
+source_set("isacfix") {
+ sources = [
+ "codecs/isac/fix/interface/isacfix.h",
+ "codecs/isac/fix/source/arith_routines.c",
+ "codecs/isac/fix/source/arith_routines_hist.c",
+ "codecs/isac/fix/source/arith_routines_logist.c",
+ "codecs/isac/fix/source/arith_routins.h",
+ "codecs/isac/fix/source/bandwidth_estimator.c",
+ "codecs/isac/fix/source/bandwidth_estimator.h",
+ "codecs/isac/fix/source/codec.h",
+ "codecs/isac/fix/source/decode_bwe.c",
+ "codecs/isac/fix/source/decode.c",
+ "codecs/isac/fix/source/decode_plc.c",
+ "codecs/isac/fix/source/encode.c",
+ "codecs/isac/fix/source/entropy_coding.c",
+ "codecs/isac/fix/source/entropy_coding.h",
+ "codecs/isac/fix/source/fft.c",
+ "codecs/isac/fix/source/fft.h",
+ "codecs/isac/fix/source/filterbanks.c",
+ "codecs/isac/fix/source/filterbank_tables.c",
+ "codecs/isac/fix/source/filterbank_tables.h",
+ "codecs/isac/fix/source/filters.c",
+ "codecs/isac/fix/source/initialize.c",
+ "codecs/isac/fix/source/isacfix.c",
+ "codecs/isac/fix/source/lattice.c",
+ "codecs/isac/fix/source/lpc_masking_model.c",
+ "codecs/isac/fix/source/lpc_masking_model.h",
+ "codecs/isac/fix/source/lpc_tables.c",
+ "codecs/isac/fix/source/lpc_tables.h",
+ "codecs/isac/fix/source/pitch_estimator.c",
+ "codecs/isac/fix/source/pitch_estimator.h",
+ "codecs/isac/fix/source/pitch_filter.c",
+ "codecs/isac/fix/source/pitch_gain_tables.c",
+ "codecs/isac/fix/source/pitch_gain_tables.h",
+ "codecs/isac/fix/source/pitch_lag_tables.c",
+ "codecs/isac/fix/source/pitch_lag_tables.h",
+ "codecs/isac/fix/source/settings.h",
+ "codecs/isac/fix/source/spectrum_ar_model_tables.c",
+ "codecs/isac/fix/source/spectrum_ar_model_tables.h",
+ "codecs/isac/fix/source/structs.h",
+ "codecs/isac/fix/source/transform.c",
+ "codecs/isac/fix/source/transform_tables.c",
+ ]
+
+ if (!is_win) {
+ defines = [ "WEBRTC_LINUX" ]
+ }
+
+ direct_dependent_configs = [ ":isac_fix_config" ]
+
+ deps = [
+ "../../common_audio",
+ "../../system_wrappers",
+ ]
+
+ if (rtc_build_armv7_neon) {
+ deps += [ ":isac_neon" ]
+
+ # Enable compilation for the ARM v7 Neon instruction set. This is needed
+ # since //build/config/arm.gni only enables Neon for iOS, not Android.
+ # This provides the same functionality as webrtc/build/arm_neon.gypi.
+ # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
+ # //build/config/arm.gni instead, to reduce code duplication.
+ # Remove the -mfpu=vfpv3-d16 cflag.
+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+ cflags = [
+ "-flax-vector-conversions",
+ "-mfpu=neon",
+ ]
+
+ sources += [
+ "codecs/isac/fix/source/lattice_armv7.S",
+ "codecs/isac/fix/source/pitch_filter_armv6.S",
+ ]
+ } else {
+ sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
+ }
+
+ if (cpu_arch == "mipsel") {
+ sources += [
+ "codecs/isac/fix/source/entropy_coding_mips.c",
+ "codecs/isac/fix/source/filters_mips.c",
+ "codecs/isac/fix/source/lattice_mips.c",
+ "codecs/isac/fix/source/pitch_estimator_mips.c",
+ "codecs/isac/fix/source/transform_mips.c",
+ ]
+ if (mips_dsp_rev > 0) {
+ sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
+ }
+ if (mips_dsp_rev > 1) {
+ sources += [
+ "codecs/isac/fix/source/lpc_masking_model_mips.c",
+ "codecs/isac/fix/source/pitch_filter_mips.c",
+ ]
+ } else {
+ sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
+ }
+ }
+
+ if (rtc_build_armv7_neon) {
+ sources += [
+ "codecs/isac/fix/source/lattice_c.c",
+ "codecs/isac/fix/source/pitch_estimator_c.c",
+ ]
+ }
+}
+
+if (rtc_build_armv7_neon) {
+ source_set("isac_neon") {
+ sources = [
+ "codecs/isac/fix/source/entropy_coding_neon.c",
+ "codecs/isac/fix/source/filterbanks_neon.S",
+ "codecs/isac/fix/source/filters_neon.S",
+ "codecs/isac/fix/source/lattice_neon.S",
+ "codecs/isac/fix/source/lpc_masking_model_neon.S",
+ "codecs/isac/fix/source/transform_neon.S",
+ ]
+
+ include_dirs = [
+ "../../..",
+ ]
+
+ # Disable LTO in audio_processing_neon target due to compiler bug.
+ if (rtc_use_lto) {
+ cflags -= [
+ "-flto",
+ "-ffat-lto-objects",
+ ]
+ }
+
+ # Enable compilation for the ARM v7 Neon instruction set. This is needed
+ # since //build/config/arm.gni only enables Neon for iOS, not Android.
+ # This provides the same functionality as webrtc/build/arm_neon.gypi.
+ # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
+ # //build/config/arm.gni instead, to reduce code duplication.
+ # Remove the -mfpu=vfpv3-d16 cflag.
+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+ cflags = [
+ "-flax-vector-conversions",
+ "-mfpu=neon",
+ ]
+
+ deps = [ "../../common_audio" ]
+ }
+}
+
+config("pcm16b_config") {
+ include_dirs = [
+ "../../..",
+ "codecs/pcm16b/include",
+ ]
+}
+
+source_set("pcm16b") {
+ sources = [
+ "codecs/pcm16b/include/pcm16b.h",
+ "codecs/pcm16b/pcm16b.c",
+ ]
+
+ direct_dependent_configs = [ ":pcm16b_config" ]
+}
+
+config("opus_config") {
+ include_dirs = [ "../../.." ]
+}
+
+source_set("webrtc_opus") {
+ sources = [
+ "codecs/opus/interface/opus_interface.h",
+ "codecs/opus/opus_inst.h",
+ "codecs/opus/opus_interface.c",
+ ]
+ if (build_with_mozilla) {
+ include_dirs = [ getenv("DIST") + "/include/opus" ]
+ } else {
+ configs += [ "../..:common_inherited_config" ]
+
+ deps = [ "//third_party/opus" ]
+ }
+}
+
+config("neteq_config") {
+ include_dirs = [
+ # Need Opus header files for the audio classifier.
+ "//third_party/opus/src/celt",
+ "//third_party/opus/src/src",
+ ]
+}
+
+source_set("neteq") {
+ sources = [
+ "neteq/interface/audio_decoder.h",
+ "neteq/interface/neteq.h",
+ "neteq/accelerate.cc",
+ "neteq/accelerate.h",
+ "neteq/audio_classifier.cc",
+ "neteq/audio_classifier.h",
+ "neteq/audio_decoder_impl.cc",
+ "neteq/audio_decoder_impl.h",
+ "neteq/audio_decoder.cc",
+ "neteq/audio_multi_vector.cc",
+ "neteq/audio_multi_vector.h",
+ "neteq/audio_vector.cc",
+ "neteq/audio_vector.h",
+ "neteq/background_noise.cc",
+ "neteq/background_noise.h",
+ "neteq/buffer_level_filter.cc",
+ "neteq/buffer_level_filter.h",
+ "neteq/comfort_noise.cc",
+ "neteq/comfort_noise.h",
+ "neteq/decision_logic.cc",
+ "neteq/decision_logic.h",
+ "neteq/decision_logic_fax.cc",
+ "neteq/decision_logic_fax.h",
+ "neteq/decision_logic_normal.cc",
+ "neteq/decision_logic_normal.h",
+ "neteq/decoder_database.cc",
+ "neteq/decoder_database.h",
+ "neteq/defines.h",
+ "neteq/delay_manager.cc",
+ "neteq/delay_manager.h",
+ "neteq/delay_peak_detector.cc",
+ "neteq/delay_peak_detector.h",
+ "neteq/dsp_helper.cc",
+ "neteq/dsp_helper.h",
+ "neteq/dtmf_buffer.cc",
+ "neteq/dtmf_buffer.h",
+ "neteq/dtmf_tone_generator.cc",
+ "neteq/dtmf_tone_generator.h",
+ "neteq/expand.cc",
+ "neteq/expand.h",
+ "neteq/merge.cc",
+ "neteq/merge.h",
+ "neteq/neteq_impl.cc",
+ "neteq/neteq_impl.h",
+ "neteq/neteq.cc",
+ "neteq/statistics_calculator.cc",
+ "neteq/statistics_calculator.h",
+ "neteq/normal.cc",
+ "neteq/normal.h",
+ "neteq/packet_buffer.cc",
+ "neteq/packet_buffer.h",
+ "neteq/payload_splitter.cc",
+ "neteq/payload_splitter.h",
+ "neteq/post_decode_vad.cc",
+ "neteq/post_decode_vad.h",
+ "neteq/preemptive_expand.cc",
+ "neteq/preemptive_expand.h",
+ "neteq/random_vector.cc",
+ "neteq/random_vector.h",
+ "neteq/rtcp.cc",
+ "neteq/rtcp.h",
+ "neteq/sync_buffer.cc",
+ "neteq/sync_buffer.h",
+ "neteq/timestamp_scaler.cc",
+ "neteq/timestamp_scaler.h",
+ "neteq/time_stretch.cc",
+ "neteq/time_stretch.h",
+ ]
+
+ direct_dependent_configs = [ ":neteq_config" ]
+
+ forward_dependent_configs_from = [ "//third_party/opus" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":cng",
+ ":g711",
+ ":g722",
+ ":ilbc",
+ ":isac",
+ ":isacfix",
+ ":pcm16b",
+ "../../common_audio",
+ "../../system_wrappers",
+ "//third_party/opus",
+ ]
+}
diff --git a/modules/audio_coding/OWNERS b/modules/audio_coding/OWNERS
new file mode 100644
index 0000000..d5ae847
--- /dev/null
+++ b/modules/audio_coding/OWNERS
@@ -0,0 +1 @@
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/audio_coding/codecs/OWNERS b/modules/audio_coding/codecs/OWNERS
index e1e6256..83880d2 100644
--- a/modules/audio_coding/codecs/OWNERS
+++ b/modules/audio_coding/codecs/OWNERS
@@ -1,3 +1,4 @@
tina.legrand@webrtc.org
turaj@webrtc.org
jan.skoglund@webrtc.org
+henrik.lundin@webrtc.org
diff --git a/modules/audio_coding/codecs/cng/Android.mk b/modules/audio_coding/codecs/cng/Android.mk
deleted file mode 100644
index 32671cc..0000000
--- a/modules/audio_coding/codecs/cng/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_cng
-LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := \
- webrtc_cng.c \
- cng_helpfuns.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../common_audio/signal_processing/include
-
-LOCAL_SHARED_LIBRARIES := \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding/codecs/cng/cng_helpfuns.c b/modules/audio_coding/codecs/cng/cng_helpfuns.c
index ab43aef..bc08d43 100644
--- a/modules/audio_coding/codecs/cng/cng_helpfuns.c
+++ b/modules/audio_coding/codecs/cng/cng_helpfuns.c
@@ -11,7 +11,7 @@
#include "cng_helpfuns.h"
#include "signal_processing_library.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#include "webrtc_cng.h"
/* Values in |k| are Q15, and |a| Q12. */
diff --git a/modules/audio_coding/codecs/cng/cng_helpfuns.h b/modules/audio_coding/codecs/cng/cng_helpfuns.h
index de9e0d0..a553a76 100644
--- a/modules/audio_coding/codecs/cng/cng_helpfuns.h
+++ b/modules/audio_coding/codecs/cng/cng_helpfuns.h
@@ -10,7 +10,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_CNG_HELPFUNS_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_CNG_HELPFUNS_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#ifdef __cplusplus
extern "C" {
diff --git a/modules/audio_coding/codecs/cng/cng_unittest.cc b/modules/audio_coding/codecs/cng/cng_unittest.cc
index d363cb2..0d1c670 100644
--- a/modules/audio_coding/codecs/cng/cng_unittest.cc
+++ b/modules/audio_coding/codecs/cng/cng_unittest.cc
@@ -9,7 +9,7 @@
*/
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc_cng.h"
diff --git a/modules/audio_coding/codecs/cng/include/webrtc_cng.h b/modules/audio_coding/codecs/cng/include/webrtc_cng.h
index 6030f8e..d90a269 100644
--- a/modules/audio_coding/codecs/cng/include/webrtc_cng.h
+++ b/modules/audio_coding/codecs/cng/include/webrtc_cng.h
@@ -12,7 +12,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_MAIN_INTERFACE_WEBRTC_CNG_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_MAIN_INTERFACE_WEBRTC_CNG_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#ifdef __cplusplus
extern "C" {
diff --git a/modules/audio_coding/codecs/g711/Android.mk b/modules/audio_coding/codecs/g711/Android.mk
deleted file mode 100644
index 779bb7c..0000000
--- a/modules/audio_coding/codecs/g711/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_g711
-LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := \
- g711_interface.c \
- g711.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../../..
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding/codecs/g711/g711.c b/modules/audio_coding/codecs/g711/g711.c
index ac9e44a..a183757 100644
--- a/modules/audio_coding/codecs/g711/g711.c
+++ b/modules/audio_coding/codecs/g711/g711.c
@@ -21,7 +21,7 @@
*/
#include "g711.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/* Copied from the CCITT G.711 specification */
static const uint8_t ulaw_to_alaw_table[256] = {
diff --git a/modules/audio_coding/codecs/g711/g711.h b/modules/audio_coding/codecs/g711/g711.h
index f34d266..3b07d8b 100644
--- a/modules/audio_coding/codecs/g711/g711.h
+++ b/modules/audio_coding/codecs/g711/g711.h
@@ -49,7 +49,7 @@
extern "C" {
#endif
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#if defined(__i386__)
/*! \brief Find the bit position of the highest set bit in a word
diff --git a/modules/audio_coding/codecs/g711/g711_interface.c b/modules/audio_coding/codecs/g711/g711_interface.c
index 087e3e1..134c1e4 100644
--- a/modules/audio_coding/codecs/g711/g711_interface.c
+++ b/modules/audio_coding/codecs/g711/g711_interface.c
@@ -10,7 +10,7 @@
#include <string.h>
#include "g711.h"
#include "g711_interface.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
int16_t WebRtcG711_EncodeA(void* state,
int16_t* speechIn,
diff --git a/modules/audio_coding/codecs/g711/include/g711_interface.h b/modules/audio_coding/codecs/g711/include/g711_interface.h
index bee5ffa..83357e4 100644
--- a/modules/audio_coding/codecs/g711/include/g711_interface.h
+++ b/modules/audio_coding/codecs/g711/include/g711_interface.h
@@ -11,7 +11,7 @@
#ifndef MODULES_AUDIO_CODING_CODECS_G711_MAIN_INTERFACE_G711_INTERFACE_H_
#define MODULES_AUDIO_CODING_CODECS_G711_MAIN_INTERFACE_G711_INTERFACE_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
// Comfort noise constants
#define G711_WEBRTC_SPEECH 1
diff --git a/modules/audio_coding/codecs/g722/Android.mk b/modules/audio_coding/codecs/g722/Android.mk
deleted file mode 100644
index 39dea9e..0000000
--- a/modules/audio_coding/codecs/g722/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_g722
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- g722_interface.c \
- g722_encode.c \
- g722_decode.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../../..
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding/codecs/g722/g722_decode.c b/modules/audio_coding/codecs/g722/g722_decode.c
index e62af98..65ca77b 100644
--- a/modules/audio_coding/codecs/g722/g722_decode.c
+++ b/modules/audio_coding/codecs/g722/g722_decode.c
@@ -34,13 +34,12 @@
#include <config.h>
#endif
-#include <stdio.h>
#include <memory.h>
+#include <stdio.h>
#include <stdlib.h>
-#include "typedefs.h"
#include "g722_enc_dec.h"
-
+#include "webrtc/typedefs.h"
#if !defined(FALSE)
#define FALSE 0
diff --git a/modules/audio_coding/codecs/g722/g722_enc_dec.h b/modules/audio_coding/codecs/g722/g722_enc_dec.h
index ef279ac..da61224 100644
--- a/modules/audio_coding/codecs/g722/g722_enc_dec.h
+++ b/modules/audio_coding/codecs/g722/g722_enc_dec.h
@@ -31,6 +31,8 @@
#if !defined(_G722_ENC_DEC_H_)
#define _G722_ENC_DEC_H_
+#include "webrtc/typedefs.h"
+
/*! \page g722_page G.722 encoding and decoding
\section g722_page_sec_1 What does it do?
The G.722 module is a bit exact implementation of the ITU G.722 specification for all three
diff --git a/modules/audio_coding/codecs/g722/g722_encode.c b/modules/audio_coding/codecs/g722/g722_encode.c
index 5b07615..03ac3c5 100644
--- a/modules/audio_coding/codecs/g722/g722_encode.c
+++ b/modules/audio_coding/codecs/g722/g722_encode.c
@@ -34,12 +34,12 @@
#include <config.h>
#endif
-#include <stdio.h>
#include <memory.h>
+#include <stdio.h>
#include <stdlib.h>
-#include "typedefs.h"
#include "g722_enc_dec.h"
+#include "webrtc/typedefs.h"
#if !defined(FALSE)
#define FALSE 0
diff --git a/modules/audio_coding/codecs/g722/g722_interface.c b/modules/audio_coding/codecs/g722/g722_interface.c
index 7075669..a52981b 100644
--- a/modules/audio_coding/codecs/g722/g722_interface.c
+++ b/modules/audio_coding/codecs/g722/g722_interface.c
@@ -12,10 +12,9 @@
#include <stdlib.h>
#include <string.h>
-#include "g722_interface.h"
#include "g722_enc_dec.h"
-#include "typedefs.h"
-
+#include "g722_interface.h"
+#include "webrtc/typedefs.h"
int16_t WebRtcG722_CreateEncoder(G722EncInst **G722enc_inst)
{
diff --git a/modules/audio_coding/codecs/g722/include/g722_interface.h b/modules/audio_coding/codecs/g722/include/g722_interface.h
index 0948a18..1d3d799 100644
--- a/modules/audio_coding/codecs/g722/include/g722_interface.h
+++ b/modules/audio_coding/codecs/g722/include/g722_interface.h
@@ -11,7 +11,7 @@
#ifndef MODULES_AUDIO_CODING_CODECS_G722_MAIN_INTERFACE_G722_INTERFACE_H_
#define MODULES_AUDIO_CODING_CODECS_G722_MAIN_INTERFACE_G722_INTERFACE_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/*
* Solution to support multiple instances
diff --git a/modules/audio_coding/codecs/g722/test/testG722.cc b/modules/audio_coding/codecs/g722/test/testG722.cc
index d51301d..9df1476 100644
--- a/modules/audio_coding/codecs/g722/test/testG722.cc
+++ b/modules/audio_coding/codecs/g722/test/testG722.cc
@@ -15,7 +15,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/* include API */
#include "g722_interface.h"
diff --git a/modules/audio_coding/codecs/ilbc/Android.mk b/modules/audio_coding/codecs/ilbc/Android.mk
deleted file mode 100644
index cbadcab..0000000
--- a/modules/audio_coding/codecs/ilbc/Android.mk
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_ilbc
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- abs_quant.c \
- abs_quant_loop.c \
- augmented_cb_corr.c \
- bw_expand.c \
- cb_construct.c \
- cb_mem_energy.c \
- cb_mem_energy_augmentation.c \
- cb_mem_energy_calc.c \
- cb_search.c \
- cb_search_core.c \
- cb_update_best_index.c \
- chebyshev.c \
- comp_corr.c \
- constants.c \
- create_augmented_vec.c \
- decode.c \
- decode_residual.c \
- decoder_interpolate_lsf.c \
- do_plc.c \
- encode.c \
- energy_inverse.c \
- enh_upsample.c \
- enhancer.c \
- enhancer_interface.c \
- filtered_cb_vecs.c \
- frame_classify.c \
- gain_dequant.c \
- gain_quant.c \
- get_cd_vec.c \
- get_lsp_poly.c \
- get_sync_seq.c \
- hp_input.c \
- hp_output.c \
- ilbc.c \
- index_conv_dec.c \
- index_conv_enc.c \
- init_decode.c \
- init_encode.c \
- interpolate.c \
- interpolate_samples.c \
- lpc_encode.c \
- lsf_check.c \
- lsf_interpolate_to_poly_dec.c \
- lsf_interpolate_to_poly_enc.c \
- lsf_to_lsp.c \
- lsf_to_poly.c \
- lsp_to_lsf.c \
- my_corr.c \
- nearest_neighbor.c \
- pack_bits.c \
- poly_to_lsf.c \
- poly_to_lsp.c \
- refiner.c \
- simple_interpolate_lsf.c \
- simple_lpc_analysis.c \
- simple_lsf_dequant.c \
- simple_lsf_quant.c \
- smooth.c \
- smooth_out_data.c \
- sort_sq.c \
- split_vq.c \
- state_construct.c \
- state_search.c \
- swap_bytes.c \
- unpack_bits.c \
- vq3.c \
- vq4.c \
- window32_w32.c \
- xcorr_coef.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../common_audio/signal_processing/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-
-# iLBC test app
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= test/iLBC_test.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/interface \
- $(LOCAL_PATH)/../../../..
-
-LOCAL_STATIC_LIBRARIES := \
- libwebrtc_ilbc \
- libwebrtc_spl
-
-LOCAL_SHARED_LIBRARIES := \
- libutils
-
-LOCAL_MODULE:= webrtc_ilbc_test
-
-ifdef NDK_ROOT
-include $(BUILD_EXECUTABLE)
-else
-include $(BUILD_NATIVE_TEST)
-endif
-
-# iLBC_testLib test app
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= test/iLBC_testLib.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/interface \
- $(LOCAL_PATH)/../../../..
-
-LOCAL_STATIC_LIBRARIES := \
- libwebrtc_ilbc \
- libwebrtc_spl
-
-LOCAL_SHARED_LIBRARIES := \
- libutils
-
-LOCAL_MODULE:= webrtc_ilbc_testLib
-
-ifdef NDK_ROOT
-include $(BUILD_EXECUTABLE)
-else
-include $(BUILD_NATIVE_TEST)
-endif
diff --git a/modules/audio_coding/codecs/ilbc/constants.h b/modules/audio_coding/codecs/ilbc/constants.h
index cdc8a9c..ff6370e 100644
--- a/modules/audio_coding/codecs/ilbc/constants.h
+++ b/modules/audio_coding/codecs/ilbc/constants.h
@@ -20,7 +20,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CONSTANTS_H_
#include "defines.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/* high pass filters */
diff --git a/modules/audio_coding/codecs/ilbc/decode_residual.c b/modules/audio_coding/codecs/ilbc/decode_residual.c
index d70fd38..c65856b 100644
--- a/modules/audio_coding/codecs/ilbc/decode_residual.c
+++ b/modules/audio_coding/codecs/ilbc/decode_residual.c
@@ -16,6 +16,8 @@
******************************************************************/
+#include <string.h>
+
#include "defines.h"
#include "state_construct.h"
#include "cb_construct.h"
@@ -130,7 +132,7 @@
);
/* update memory */
- WEBRTC_SPL_MEMMOVE_W16(mem, mem+SUBL, CB_MEML-SUBL);
+ memmove(mem, mem + SUBL, (CB_MEML - SUBL) * sizeof(*mem));
WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-SUBL,
&decresidual[(iLBC_encbits->startIdx+1+subframe)*SUBL], SUBL);
@@ -169,7 +171,7 @@
);
/* update memory */
- WEBRTC_SPL_MEMMOVE_W16(mem, mem+SUBL, CB_MEML-SUBL);
+ memmove(mem, mem + SUBL, (CB_MEML - SUBL) * sizeof(*mem));
WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-SUBL,
&reverseDecresidual[subframe*SUBL], SUBL);
diff --git a/modules/audio_coding/codecs/ilbc/defines.h b/modules/audio_coding/codecs/ilbc/defines.h
index b60eaf4..796d7b5 100644
--- a/modules/audio_coding/codecs/ilbc/defines.h
+++ b/modules/audio_coding/codecs/ilbc/defines.h
@@ -18,9 +18,9 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DEFINES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DEFINES_H_
-#include "typedefs.h"
-#include "signal_processing_library.h"
#include <string.h>
+#include "signal_processing_library.h"
+#include "webrtc/typedefs.h"
/* general codec settings */
diff --git a/modules/audio_coding/codecs/ilbc/encode.c b/modules/audio_coding/codecs/ilbc/encode.c
index 2f899a5..318c27a 100644
--- a/modules/audio_coding/codecs/ilbc/encode.c
+++ b/modules/audio_coding/codecs/ilbc/encode.c
@@ -16,6 +16,8 @@
******************************************************************/
+#include <string.h>
+
#include "defines.h"
#include "lpc_encode.h"
#include "frame_classify.h"
@@ -352,7 +354,7 @@
/* update memory */
- WEBRTC_SPL_MEMMOVE_W16(mem, mem+SUBL, (CB_MEML-SUBL));
+ memmove(mem, mem + SUBL, (CB_MEML - SUBL) * sizeof(*mem));
WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-SUBL,
&decresidual[(iLBCbits_inst->startIdx+1+subframe)*SUBL], SUBL);
@@ -457,8 +459,7 @@
);
/* update memory */
-
- WEBRTC_SPL_MEMMOVE_W16(mem, mem+SUBL, (CB_MEML-SUBL));
+ memmove(mem, mem + SUBL, (CB_MEML - SUBL) * sizeof(*mem));
WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-SUBL,
&reverseDecresidual[subframe*SUBL], SUBL);
diff --git a/modules/audio_coding/codecs/ilbc/enhancer_interface.c b/modules/audio_coding/codecs/ilbc/enhancer_interface.c
index 809f48f..1e978eb 100644
--- a/modules/audio_coding/codecs/ilbc/enhancer_interface.c
+++ b/modules/audio_coding/codecs/ilbc/enhancer_interface.c
@@ -16,6 +16,8 @@
******************************************************************/
+#include <string.h>
+
#include "defines.h"
#include "constants.h"
#include "xcorr_coef.h"
@@ -71,9 +73,8 @@
enh_period=iLBCdec_inst->enh_period;
/* Copy in the new data into the enhancer buffer */
-
- WEBRTC_SPL_MEMMOVE_W16(enh_buf, &enh_buf[iLBCdec_inst->blockl],
- ENH_BUFL-iLBCdec_inst->blockl);
+ memmove(enh_buf, &enh_buf[iLBCdec_inst->blockl],
+ (ENH_BUFL - iLBCdec_inst->blockl) * sizeof(*enh_buf));
WEBRTC_SPL_MEMCPY_W16(&enh_buf[ENH_BUFL-iLBCdec_inst->blockl], in,
iLBCdec_inst->blockl);
@@ -92,8 +93,8 @@
}
/* Update the pitch prediction for each enhancer block, move the old ones */
- WEBRTC_SPL_MEMMOVE_W16(enh_period, &enh_period[new_blocks],
- (ENH_NBLOCKS_TOT-new_blocks));
+ memmove(enh_period, &enh_period[new_blocks],
+ (ENH_NBLOCKS_TOT - new_blocks) * sizeof(*enh_period));
k=WebRtcSpl_DownsampleFast(
enh_buf+ENH_BUFL-inLen, /* Input samples */
diff --git a/modules/audio_coding/codecs/ilbc/interface/ilbc.h b/modules/audio_coding/codecs/ilbc/interface/ilbc.h
index 9ab2e86..ccb3f5e 100644
--- a/modules/audio_coding/codecs/ilbc/interface/ilbc.h
+++ b/modules/audio_coding/codecs/ilbc/interface/ilbc.h
@@ -22,7 +22,7 @@
* Define the fixpoint numeric formats
*/
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/*
* Solution to support multiple instances
diff --git a/modules/audio_coding/codecs/ilbc/vq3.h b/modules/audio_coding/codecs/ilbc/vq3.h
index e2e2ab5..b146ea3 100644
--- a/modules/audio_coding/codecs/ilbc/vq3.h
+++ b/modules/audio_coding/codecs/ilbc/vq3.h
@@ -19,7 +19,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_VQ3_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_VQ3_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/*----------------------------------------------------------------*
* Vector quantization of order 3 (based on MSE)
diff --git a/modules/audio_coding/codecs/ilbc/vq4.h b/modules/audio_coding/codecs/ilbc/vq4.h
index 5ae4c87..9263759 100644
--- a/modules/audio_coding/codecs/ilbc/vq4.h
+++ b/modules/audio_coding/codecs/ilbc/vq4.h
@@ -19,7 +19,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_VQ4_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_VQ4_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/*----------------------------------------------------------------*
* Vector quantization of order 4 (based on MSE)
diff --git a/modules/audio_coding/codecs/isac/fix/interface/isacfix.h b/modules/audio_coding/codecs/isac/fix/interface/isacfix.h
index da7163e..942727a 100644
--- a/modules/audio_coding/codecs/isac/fix/interface/isacfix.h
+++ b/modules/audio_coding/codecs/isac/fix/interface/isacfix.h
@@ -14,8 +14,7 @@
/*
* Define the fixpoint numeric formats
*/
-#include "typedefs.h"
-
+#include "webrtc/typedefs.h"
typedef struct {
void *dummy;
@@ -131,7 +130,7 @@
int16_t WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
const int16_t *speechIn,
- int16_t *encoded);
+ uint8_t* encoded);
diff --git a/modules/audio_coding/codecs/isac/fix/source/Android.mk b/modules/audio_coding/codecs/isac/fix/source/Android.mk
deleted file mode 100644
index 200a7ec..0000000
--- a/modules/audio_coding/codecs/isac/fix/source/Android.mk
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-#############################
-# Build the non-neon library.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_isacfix
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- arith_routines.c \
- arith_routines_hist.c \
- arith_routines_logist.c \
- bandwidth_estimator.c \
- decode.c \
- decode_bwe.c \
- decode_plc.c \
- encode.c \
- entropy_coding.c \
- fft.c \
- filterbank_tables.c \
- filterbanks.c \
- filters.c \
- initialize.c \
- isacfix.c \
- lattice.c \
- lpc_masking_model.c \
- lpc_tables.c \
- pitch_estimator.c \
- pitch_filter.c \
- pitch_gain_tables.c \
- pitch_lag_tables.c \
- spectrum_ar_model_tables.c \
- transform.c
-
-ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
-# Using .S (instead of .s) extention is to include a C header file in assembly.
-LOCAL_SRC_FILES += \
- lattice_armv7.S \
- pitch_filter_armv6.S
-else
-LOCAL_SRC_FILES += \
- lattice_c.c
-endif
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include
-
-LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-#########################
-# Build the neon library.
-ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_isacfix_neon
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- filterbanks_neon.S \
- filters_neon.S \
- lattice_neon.S \
- lpc_masking_model_neon.S \
- transform_neon.S
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- -mfpu=neon \
- -mfloat-abi=softfp \
- -flax-vector-conversions
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include
-
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
-###########################
-# isac test app
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= ../test/kenny.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../../../..
-
-LOCAL_STATIC_LIBRARIES := \
- libwebrtc_isacfix \
- libwebrtc_spl \
- libwebrtc_system_wrappers \
- libwebrtc_test_support
-
-ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-LOCAL_STATIC_LIBRARIES += \
- libwebrtc_isacfix_neon
-endif
-
-LOCAL_SHARED_LIBRARIES := \
- libutils
-
-LOCAL_MODULE:= webrtc_isac_test
-
-ifdef NDK_ROOT
-include $(BUILD_EXECUTABLE)
-else
-include $(BUILD_NATIVE_TEST)
-endif
diff --git a/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c b/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c
index c66be2e..5311b39 100644
--- a/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c
+++ b/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c
@@ -195,7 +195,7 @@
for ( ;; )
{
W_tmp = WEBRTC_SPL_UMUL_32_16(W_upper_MSB, *cdfPtr);
- W_tmp += WEBRTC_SPL_UMUL_32_16_RSFT16(W_upper_LSB, *cdfPtr);
+ W_tmp += (W_upper_LSB * (*cdfPtr)) >> 16;
sizeTmp = WEBRTC_SPL_RSHIFT_W16(sizeTmp, 1);
if (sizeTmp == 0) {
break;
@@ -325,7 +325,7 @@
/* start at the specified table entry */
cdfPtr = *cdf + (*initIndex++);
W_tmp = WEBRTC_SPL_UMUL_32_16(W_upper_MSB, *cdfPtr);
- W_tmp += WEBRTC_SPL_UMUL_32_16_RSFT16(W_upper_LSB, *cdfPtr);
+ W_tmp += (W_upper_LSB * (*cdfPtr)) >> 16;
if (streamval > W_tmp)
{
@@ -339,7 +339,7 @@
}
W_tmp = WEBRTC_SPL_UMUL_32_16(W_upper_MSB, *++cdfPtr);
- W_tmp += WEBRTC_SPL_UMUL_32_16_RSFT16(W_upper_LSB, *cdfPtr);
+ W_tmp += (W_upper_LSB * (*cdfPtr)) >> 16;
if (streamval <= W_tmp) {
break;
@@ -359,7 +359,7 @@
}
W_tmp = WEBRTC_SPL_UMUL_32_16(W_upper_MSB, *cdfPtr);
- W_tmp += WEBRTC_SPL_UMUL_32_16_RSFT16(W_upper_LSB, *cdfPtr);
+ W_tmp += (W_upper_LSB * (*cdfPtr)) >> 16;
if (streamval > W_tmp) {
break;
diff --git a/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c b/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
index 9391fb3..4efdecc 100644
--- a/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
+++ b/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
@@ -150,9 +150,9 @@
W_upper_LSB = (uint16_t)W_upper;
W_upper_MSB = (uint16_t)WEBRTC_SPL_RSHIFT_U32(W_upper, 16);
W_lower = WEBRTC_SPL_UMUL_32_16(cdfLo, W_upper_MSB);
- W_lower += WEBRTC_SPL_UMUL_32_16_RSFT16(cdfLo, W_upper_LSB);
+ W_lower += (cdfLo * W_upper_LSB) >> 16;
W_upper = WEBRTC_SPL_UMUL_32_16(cdfHi, W_upper_MSB);
- W_upper += WEBRTC_SPL_UMUL_32_16_RSFT16(cdfHi, W_upper_LSB);
+ W_upper += (cdfHi * W_upper_LSB) >> 16;
/* shift interval such that it begins at zero */
W_upper -= ++W_lower;
@@ -282,11 +282,11 @@
if (inSqrt < 0)
inSqrt=-inSqrt;
- newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(inSqrt, res) + res, 1);
+ newRes = (inSqrt / res + res) >> 1;
do
{
res = newRes;
- newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(inSqrt, res) + res, 1);
+ newRes = (inSqrt / res + res) >> 1;
} while (newRes != res && i-- > 0);
tmpARSpecQ8 = (uint16_t)newRes;
diff --git a/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c b/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c
index 724a900..d28a6f7 100644
--- a/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c
+++ b/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c
@@ -196,7 +196,7 @@
bweStr->maxBwInv = kInvBandwidth[3];
bweStr->minBwInv = kInvBandwidth[2];
- bweStr->recBwInv = WEBRTC_SPL_UDIV(1073741824, (bweStr->recBw + bweStr->recHeaderRate));
+ bweStr->recBwInv = 1073741824 / (bweStr->recBw + bweStr->recHeaderRate);
}
/* kBitsByteSec is in Q15 */
@@ -211,7 +211,7 @@
bweStr->maxBwInv = kInvBandwidth[1];
bweStr->minBwInv = kInvBandwidth[0];
- bweStr->recBwInv = WEBRTC_SPL_UDIV(1073741824, (bweStr->recBw + bweStr->recHeaderRate));
+ bweStr->recBwInv = 1073741824 / (bweStr->recBw + bweStr->recHeaderRate);
}
/* kBitsByteSec is in Q14 */
@@ -265,7 +265,7 @@
if ((arrivalTime - bweStr->lastUpdate) > FS3) {
/* Calculate expected number of received packets since last update */
- numPktsExpected = WEBRTC_SPL_UDIV(arrivalTime - bweStr->lastUpdate, frameSizeSampl);
+ numPktsExpected = (arrivalTime - bweStr->lastUpdate) / frameSizeSampl;
/* If received number of packets is more than 90% of expected (922 = 0.9 in Q10): */
/* do the update, else not */
@@ -296,9 +296,9 @@
bweStr->recBwInv = WEBRTC_SPL_RSHIFT_W32((int32_t)bweStr->recBwInv, 13);
} else {
- /* recBwInv = 1 / (INIT_BN_EST + INIT_HDR_RATE) in Q26 (Q30??)*/
- bweStr->recBwInv = WEBRTC_SPL_DIV((1073741824 +
- WEBRTC_SPL_LSHIFT_W32(((int32_t)INIT_BN_EST + INIT_HDR_RATE), 1)), INIT_BN_EST + INIT_HDR_RATE);
+ static const uint32_t kInitRate = INIT_BN_EST + INIT_HDR_RATE;
+ /* recBwInv = 1 / kInitRate in Q26 (Q30??)*/
+ bweStr->recBwInv = (1073741824 + kInitRate / 2) / kInitRate;
}
/* reset time-since-update counter */
@@ -417,8 +417,7 @@
and NOT right shifting recBwAvg 5 bits to an integer
At max 13 bits are used
shift to Q5 */
- recBwAvgInv = WEBRTC_SPL_UDIV((uint32_t)(0x80000000 + WEBRTC_SPL_RSHIFT_U32(bweStr->recBwAvg, 1)),
- bweStr->recBwAvg);
+ recBwAvgInv = (0x80000000 + bweStr->recBwAvg / 2) / bweStr->recBwAvg;
/* Calculate Projected arrival time difference */
@@ -513,7 +512,7 @@
bweStr->prevSendTime = sendTime;
/* Replace bweStr->recBw by the new value */
- bweStr->recBw = WEBRTC_SPL_UDIV(1073741824, bweStr->recBwInv) - bweStr->recHeaderRate;
+ bweStr->recBw = 1073741824 / bweStr->recBwInv - bweStr->recHeaderRate;
if (immediateSet) {
/* delay correction factor is in Q10 */
@@ -530,7 +529,7 @@
bweStr->recJitterShortTerm = 0;
- bweStr->recBwInv = WEBRTC_SPL_UDIV(1073741824, bweStr->recBw + bweStr->recHeaderRate);
+ bweStr->recBwInv = 1073741824 / (bweStr->recBw + bweStr->recHeaderRate);
immediateSet = 0;
}
@@ -725,7 +724,7 @@
/* Q18 rec jitter short term abs is in Q13, multiply it by 2^13 to save precision
2^18 then needs to be shifted 13 bits to 2^31 */
- rec_jitter_short_term_abs_inv = WEBRTC_SPL_UDIV(0x80000000, bweStr->recJitterShortTermAbs);
+ rec_jitter_short_term_abs_inv = 0x80000000u / bweStr->recJitterShortTermAbs;
/* Q27 = 9 + 18 */
jitter_sign = WEBRTC_SPL_MUL(WEBRTC_SPL_RSHIFT_W32(bweStr->recJitterShortTerm, 4), (int32_t)rec_jitter_short_term_abs_inv);
@@ -855,13 +854,14 @@
} else {
/* handle burst */
if (State->BurstCounter) {
- if (State->StillBuffered < WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL((512 - WEBRTC_SPL_DIV(512, BURST_LEN)), DelayBuildUp), 9)) {
+ if (State->StillBuffered <
+ (((512 - 512 / BURST_LEN) * DelayBuildUp) >> 9)) {
/* max bps derived from BottleNeck and DelayBuildUp values */
- inv_Q12 = WEBRTC_SPL_DIV(4096, WEBRTC_SPL_MUL(BURST_LEN, FrameSamples));
+ inv_Q12 = 4096 / (BURST_LEN * FrameSamples);
MinRate = WEBRTC_SPL_MUL(512 + WEBRTC_SPL_MUL(SAMPLES_PER_MSEC, WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL(DelayBuildUp, inv_Q12), 3)), BottleNeck);
} else {
/* max bps derived from StillBuffered and DelayBuildUp values */
- inv_Q12 = WEBRTC_SPL_DIV(4096, FrameSamples);
+ inv_Q12 = 4096 / FrameSamples;
if (DelayBuildUp > State->StillBuffered) {
MinRate = WEBRTC_SPL_MUL(512 + WEBRTC_SPL_MUL(SAMPLES_PER_MSEC, WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL(DelayBuildUp - State->StillBuffered, inv_Q12), 3)), BottleNeck);
} else if ((den = WEBRTC_SPL_MUL(SAMPLES_PER_MSEC, (State->StillBuffered - DelayBuildUp))) >= FrameSamples) {
@@ -887,7 +887,7 @@
//round and shift before conversion
MinRate += 256;
MinRate = WEBRTC_SPL_RSHIFT_W32(MinRate, 9);
- MinBytes = (uint16_t)WEBRTC_SPL_UDIV(WEBRTC_SPL_MUL(MinRate, FrameSamples), FS8);
+ MinBytes = MinRate * FrameSamples / FS8;
/* StreamSize will be adjusted if less than MinBytes */
if (StreamSize < MinBytes) {
@@ -896,10 +896,10 @@
/* keep track of when bottle neck was last exceeded by at least 1% */
//517/512 ~ 1.01
- if (WEBRTC_SPL_DIV(WEBRTC_SPL_MUL(StreamSize, FS8), FrameSamples) > (WEBRTC_SPL_MUL(517, BottleNeck) >> 9)) {
+ if ((StreamSize * (int32_t)FS8) / FrameSamples > (517 * BottleNeck) >> 9) {
if (State->PrevExceed) {
/* bottle_neck exceded twice in a row, decrease ExceedAgo */
- State->ExceedAgo -= WEBRTC_SPL_DIV(BURST_INTERVAL, BURST_LEN - 1);
+ State->ExceedAgo -= BURST_INTERVAL / (BURST_LEN - 1);
if (State->ExceedAgo < 0) {
State->ExceedAgo = 0;
}
@@ -923,7 +923,7 @@
/* Update buffer delay */
- TransmissionTime = (int16_t)WEBRTC_SPL_DIV(WEBRTC_SPL_MUL(StreamSize, 8000), BottleNeck); /* ms */
+ TransmissionTime = (StreamSize * 8000) / BottleNeck; /* ms */
State->StillBuffered += TransmissionTime;
State->StillBuffered -= (int16_t)WEBRTC_SPL_RSHIFT_W16(FrameSamples, 4); //>>4 = SAMPLES_PER_MSEC /* ms */
if (State->StillBuffered < 0) {
@@ -946,13 +946,12 @@
const int16_t FrameSamples, /* samples per frame */
const int16_t BottleNeck) /* bottle neck rate; excl headers (bps) */
{
- int16_t TransmissionTime;
+ const int16_t TransmissionTime = (StreamSize * 8000) / BottleNeck; /* ms */
/* avoid the initial "high-rate" burst */
State->InitCounter = 0;
/* Update buffer delay */
- TransmissionTime = (int16_t)WEBRTC_SPL_DIV(WEBRTC_SPL_MUL(WEBRTC_SPL_MUL(StreamSize, 8), 1000), BottleNeck); /* ms */
State->StillBuffered += TransmissionTime;
State->StillBuffered -= (int16_t)WEBRTC_SPL_RSHIFT_W16(FrameSamples, 4); /* ms */
if (State->StillBuffered < 0) {
diff --git a/modules/audio_coding/codecs/isac/fix/source/codec.h b/modules/audio_coding/codecs/isac/fix/source/codec.h
index 2f64932..a38c6e5 100644
--- a/modules/audio_coding/codecs/isac/fix/source/codec.h
+++ b/modules/audio_coding/codecs/isac/fix/source/codec.h
@@ -101,6 +101,16 @@
int32_t* outre2Q16);
#endif
+#if defined(MIPS32_LE)
+void WebRtcIsacfix_Time2SpecMIPS(int16_t* inre1Q9,
+ int16_t* inre2Q9,
+ int16_t* outre,
+ int16_t* outim);
+void WebRtcIsacfix_Spec2TimeMIPS(int16_t* inreQ7,
+ int16_t* inimQ7,
+ int32_t* outre1Q16,
+ int32_t* outre2Q16);
+#endif
/* filterbank functions */
diff --git a/modules/audio_coding/codecs/isac/fix/source/decode.c b/modules/audio_coding/codecs/isac/fix/source/decode.c
index ae0d687..263f88a 100644
--- a/modules/audio_coding/codecs/isac/fix/source/decode.c
+++ b/modules/audio_coding/codecs/isac/fix/source/decode.c
@@ -59,8 +59,8 @@
int16_t frame_nb; /* counter */
- int16_t frame_mode; /* 0 for 20ms and 30ms, 1 for 60ms */
- int16_t processed_samples;
+ int16_t frame_mode; /* 0 for 30ms, 1 for 60ms */
+ static const int16_t kProcessedSamples = 480; /* 480 (for both 30, 60 ms) */
/* PLC */
int16_t overlapWin[ 240 ];
@@ -76,14 +76,14 @@
if (err<0) // error check
return err;
- frame_mode = (int16_t)WEBRTC_SPL_DIV(*current_framesamples, MAX_FRAMESAMPLES); /* 0, or 1 */
- processed_samples = (int16_t)WEBRTC_SPL_DIV(*current_framesamples, frame_mode+1); /* either 320 (20ms) or 480 (30, 60 ms) */
+ frame_mode = *current_framesamples / MAX_FRAMESAMPLES; /* 0, or 1 */
err = WebRtcIsacfix_DecodeSendBandwidth(&ISACdec_obj->bitstr_obj, &BWno);
if (err<0) // error check
return err;
- /* one loop if it's one frame (20 or 30ms), 2 loops if 2 frames bundled together (60ms) */
+ /* one loop if it's one frame (30ms), two loops if two frames bundled together
+ * (60ms) */
for (frame_nb = 0; frame_nb <= frame_mode; frame_nb++) {
/* decode & dequantize pitch parameters */
@@ -134,7 +134,7 @@
/* ---- Add-overlap ---- */
WebRtcSpl_GetHanningWindow( overlapWin, RECOVERY_OVERLAP );
for( k = 0; k < RECOVERY_OVERLAP; k++ )
- Vector_Word16_1[k] = WEBRTC_SPL_ADD_SAT_W16(
+ Vector_Word16_1[k] = WebRtcSpl_AddSatW16(
(int16_t)WEBRTC_SPL_MUL_16_16_RSFT( (ISACdec_obj->plcstr_obj).overlapLP[k], overlapWin[RECOVERY_OVERLAP - k - 1], 14),
(int16_t)WEBRTC_SPL_MUL_16_16_RSFT( Vector_Word16_1[k], overlapWin[k], 14) );
@@ -210,7 +210,10 @@
Vector_Word16_2[k] = tmp_2;
}
- WebRtcIsacfix_FilterAndCombine1(Vector_Word16_1, Vector_Word16_2, signal_out16 + frame_nb * processed_samples, &ISACdec_obj->postfiltbankstr_obj);
+ WebRtcIsacfix_FilterAndCombine1(Vector_Word16_1,
+ Vector_Word16_2,
+ signal_out16 + frame_nb * kProcessedSamples,
+ &ISACdec_obj->postfiltbankstr_obj);
}
return len;
diff --git a/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c b/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c
index c1221e7..b1f5d10 100644
--- a/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c
+++ b/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c
@@ -53,7 +53,7 @@
err = WebRtcIsacfix_UpdateUplinkBwImpl(
bwest_str,
rtp_seq_number,
- (uint16_t)WEBRTC_SPL_UDIV(WEBRTC_SPL_UMUL(frame_samples,1000), FS),
+ frame_samples * 1000 / FS,
send_ts,
arr_ts,
(int16_t) packet_size, /* in bytes */
diff --git a/modules/audio_coding/codecs/isac/fix/source/decode_plc.c b/modules/audio_coding/codecs/isac/fix/source/decode_plc.c
index 6bd5843..fd30183 100644
--- a/modules/audio_coding/codecs/isac/fix/source/decode_plc.c
+++ b/modules/audio_coding/codecs/isac/fix/source/decode_plc.c
@@ -59,13 +59,13 @@
for (j = 0;j < Blen; j++)
{
- o = WEBRTC_SPL_ADD_SAT_W32( o, WEBRTC_SPL_MUL_16_16( *b_ptr, *x_ptr) );
+ o = WebRtcSpl_AddSatW32(o, WEBRTC_SPL_MUL_16_16(*b_ptr, *x_ptr));
b_ptr++;
x_ptr--;
}
/* to round off correctly */
- o = WEBRTC_SPL_ADD_SAT_W32( o, WEBRTC_SPL_LSHIFT_W32( 1, (rshift-1) ) );
+ o = WebRtcSpl_AddSatW32(o, 1 << (rshift - 1));
/* saturate according to the domain of the filter coefficients */
o = WEBRTC_SPL_SAT((int32_t)lim, o, (int32_t)-lim);
@@ -325,7 +325,7 @@
corr = 0;
for( k = 0; k < lag0; k++ )
{
- corr = WEBRTC_SPL_ADD_SAT_W32( corr, WEBRTC_SPL_ABS_W32(
+ corr = WebRtcSpl_AddSatW32(corr, WEBRTC_SPL_ABS_W32(
WebRtcSpl_SubSatW16(
(ISACdec_obj->plcstr_obj).lastPitchLP[k],
(ISACdec_obj->plcstr_obj).prevPitchInvIn[
@@ -756,10 +756,8 @@
}
/* ------ Sum the noisy and periodic signals ------ */
- Vector_Word16_1[i] = (int16_t)WEBRTC_SPL_ADD_SAT_W16(
- wNoisyLP, wPriodicLP );
- Vector_Word32_2[i] = (int32_t)WEBRTC_SPL_ADD_SAT_W32(
- wNoisyHP, wPriodicHP );
+ Vector_Word16_1[i] = WebRtcSpl_AddSatW16(wNoisyLP, wPriodicLP);
+ Vector_Word32_2[i] = WebRtcSpl_AddSatW32(wNoisyHP, wPriodicHP);
}
}
}
diff --git a/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c
index 8b46d68..27d1c1f 100644
--- a/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c
+++ b/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c
@@ -313,7 +313,7 @@
for (k = 1; k < (AR_ORDER); k += 2) {
for (n = 0; n < FRAMESAMPLES/8; n++)
- summQ16[n] += WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL_32_16(CorrQ11[k+1],WebRtcIsacfix_kCos[k][n]) + 2, 2);
+ summQ16[n] += ((CorrQ11[k + 1] * WebRtcIsacfix_kCos[k][n]) + 2) >> 2;
}
CS_ptrQ9 = WebRtcIsacfix_kCos[0];
@@ -350,11 +350,11 @@
if(in_sqrt<0)
in_sqrt=-in_sqrt;
- newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+ newRes = (in_sqrt / res + res) >> 1;
do
{
res = newRes;
- newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+ newRes = (in_sqrt / res + res) >> 1;
} while (newRes != res && i-- > 0);
CurveQ8[k] = (int16_t)newRes;
@@ -368,11 +368,11 @@
if(in_sqrt<0)
in_sqrt=-in_sqrt;
- newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+ newRes = (in_sqrt / res + res) >> 1;
do
{
res = newRes;
- newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+ newRes = (in_sqrt / res + res) >> 1;
} while (newRes != res && i-- > 0);
CurveQ8[k] = (int16_t)newRes;
diff --git a/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h b/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
index dd85090..efed767 100644
--- a/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
+++ b/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
@@ -166,4 +166,24 @@
const int matrix0_index_step);
#endif
+#if defined(MIPS32_LE)
+void WebRtcIsacfix_MatrixProduct1MIPS(const int16_t matrix0[],
+ const int32_t matrix1[],
+ int32_t matrix_product[],
+ const int matrix1_index_factor1,
+ const int matrix0_index_factor1,
+ const int matrix1_index_init_case,
+ const int matrix1_index_step,
+ const int matrix0_index_step,
+ const int inner_loop_count,
+ const int mid_loop_count,
+ const int shift);
+
+void WebRtcIsacfix_MatrixProduct2MIPS(const int16_t matrix0[],
+ const int32_t matrix1[],
+ int32_t matrix_product[],
+ const int matrix0_index_factor,
+ const int matrix0_index_step);
+#endif
+
#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ENTROPY_CODING_H_
diff --git a/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c b/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c
new file mode 100644
index 0000000..599f8f0
--- /dev/null
+++ b/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
+
+// MIPS optimization of the function WebRtcIsacfix_MatrixProduct1.
+// Bit-exact with the function WebRtcIsacfix_MatrixProduct1C from
+// entropy_coding.c file.
+void WebRtcIsacfix_MatrixProduct1MIPS(const int16_t matrix0[],
+ const int32_t matrix1[],
+ int32_t matrix_product[],
+ const int matrix1_index_factor1,
+ const int matrix0_index_factor1,
+ const int matrix1_index_init_case,
+ const int matrix1_index_step,
+ const int matrix0_index_step,
+ const int inner_loop_count,
+ const int mid_loop_count,
+ const int shift) {
+ if (matrix1_index_init_case != 0) {
+ int j = SUBFRAMES, k = 0, n = 0;
+ int32_t r0, r1, r2, sum32;
+ int32_t* product_start = matrix_product;
+ int32_t* product_ptr;
+ const uint32_t product_step = 4 * mid_loop_count;
+ const uint32_t matrix0_step = 2 * matrix0_index_step;
+ const uint32_t matrix1_step = 4 * matrix1_index_step;
+ const uint32_t matrix0_step2 = 2 * matrix0_index_factor1;
+ const uint32_t matrix1_step2 = 4 * matrix1_index_factor1;
+ const int16_t* matrix0_start = matrix0;
+ const int32_t* matrix1_start = matrix1;
+ int16_t* matrix0_ptr;
+ int32_t* matrix1_ptr;
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "1: \n\t"
+ "addu %[product_ptr], %[product_start], $0 \n\t"
+ "addu %[k], %[product_step], $0 \n\t"
+ "addiu %[j], %[j], -1 \n\t"
+ "addu %[matrix1_start], %[matrix1], $0 \n\t"
+ "2: \n\t"
+ "addu %[matrix1_ptr], %[matrix1_start], $0 \n\t"
+ "addu %[matrix0_ptr], %[matrix0_start], $0 \n\t"
+ "addu %[n], %[inner_loop_count], $0 \n\t"
+ "mul %[sum32], $0, $0 \n\t"
+ "3: \n\t"
+ "lw %[r0], 0(%[matrix1_ptr]) \n\t"
+ "lh %[r1], 0(%[matrix0_ptr]) \n\t"
+ "addu %[matrix1_ptr], %[matrix1_ptr], %[matrix1_step] \n\t"
+ "sllv %[r0], %[r0], %[shift] \n\t"
+ "andi %[r2], %[r0], 0xffff \n\t"
+ "sra %[r2], %[r2], 1 \n\t"
+ "mul %[r2], %[r2], %[r1] \n\t"
+ "sra %[r0], %[r0], 16 \n\t"
+ "mul %[r0], %[r0], %[r1] \n\t"
+ "addu %[matrix0_ptr], %[matrix0_ptr], %[matrix0_step] \n\t"
+ "addiu %[n], %[n], -1 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r2], %[r2], 15 \n\t"
+#else
+ "addiu %[r2], %[r2], 0x4000 \n\t"
+ "sra %[r2], %[r2], 15 \n\t"
+#endif
+ "addu %[sum32], %[sum32], %[r2] \n\t"
+ "bgtz %[n], 3b \n\t"
+ " addu %[sum32], %[sum32], %[r0] \n\t"
+ "addiu %[k], %[k], -4 \n\t"
+ "addu %[matrix1_start], %[matrix1_start], %[matrix1_step2] \n\t"
+ "sw %[sum32], 0(%[product_ptr]) \n\t"
+ "bgtz %[k], 2b \n\t"
+ " addiu %[product_ptr], %[product_ptr], 4 \n\t"
+ "addu %[matrix0_start], %[matrix0_start], %[matrix0_step2] \n\t"
+ "bgtz %[j], 1b \n\t"
+ " addu %[product_start], %[product_start], %[product_step] \n\t"
+ ".set pop \n\t"
+ : [product_ptr] "=&r" (product_ptr), [product_start] "+r" (product_start),
+ [k] "=&r" (k), [j] "+r" (j), [matrix1_start] "=&r"(matrix1_start),
+ [matrix1_ptr] "=&r" (matrix1_ptr), [matrix0_ptr] "=&r" (matrix0_ptr),
+ [matrix0_start] "+r" (matrix0_start), [n] "=&r" (n), [r0] "=&r" (r0),
+ [sum32] "=&r" (sum32), [r1] "=&r" (r1),[r2] "=&r" (r2)
+ : [product_step] "r" (product_step), [matrix1] "r" (matrix1),
+ [inner_loop_count] "r" (inner_loop_count),
+ [matrix1_step] "r" (matrix1_step), [shift] "r" (shift),
+ [matrix0_step] "r" (matrix0_step), [matrix1_step2] "r" (matrix1_step2),
+ [matrix0_step2] "r" (matrix0_step2)
+ : "hi", "lo", "memory"
+ );
+ } else {
+ int j = SUBFRAMES, k = 0, n = 0;
+ int32_t r0, r1, r2, sum32;
+ int32_t* product_start = matrix_product;
+ int32_t* product_ptr;
+ const uint32_t product_step = 4 * mid_loop_count;
+ const uint32_t matrix0_step = 2 * matrix0_index_step;
+ const uint32_t matrix1_step = 4 * matrix1_index_step;
+ const uint32_t matrix0_step2 = 2 * matrix0_index_factor1;
+ const uint32_t matrix1_step2 = 4 * matrix1_index_factor1;
+ const int16_t* matrix0_start = matrix0;
+ const int32_t* matrix1_start = matrix1;
+ int16_t* matrix0_ptr;
+ int32_t* matrix1_ptr;
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "1: \n\t"
+ "addu %[product_ptr], %[product_start], $0 \n\t"
+ "addu %[k], %[product_step], $0 \n\t"
+ "addiu %[j], %[j], -1 \n\t"
+ "addu %[matrix0_start], %[matrix0], $0 \n\t"
+ "2: \n\t"
+ "addu %[matrix1_ptr], %[matrix1_start], $0 \n\t"
+ "addu %[matrix0_ptr], %[matrix0_start], $0 \n\t"
+ "addu %[n], %[inner_loop_count], $0 \n\t"
+ "mul %[sum32], $0, $0 \n\t"
+ "3: \n\t"
+ "lw %[r0], 0(%[matrix1_ptr]) \n\t"
+ "lh %[r1], 0(%[matrix0_ptr]) \n\t"
+ "addu %[matrix1_ptr], %[matrix1_ptr], %[matrix1_step] \n\t"
+ "sllv %[r0], %[r0], %[shift] \n\t"
+ "andi %[r2], %[r0], 0xffff \n\t"
+ "sra %[r2], %[r2], 1 \n\t"
+ "mul %[r2], %[r2], %[r1] \n\t"
+ "sra %[r0], %[r0], 16 \n\t"
+ "mul %[r0], %[r0], %[r1] \n\t"
+ "addu %[matrix0_ptr], %[matrix0_ptr], %[matrix0_step] \n\t"
+ "addiu %[n], %[n], -1 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r2], %[r2], 15 \n\t"
+#else
+ "addiu %[r2], %[r2], 0x4000 \n\t"
+ "sra %[r2], %[r2], 15 \n\t"
+#endif
+ "addu %[sum32], %[sum32], %[r2] \n\t"
+ "bgtz %[n], 3b \n\t"
+ " addu %[sum32], %[sum32], %[r0] \n\t"
+ "addiu %[k], %[k], -4 \n\t"
+ "addu %[matrix0_start], %[matrix0_start], %[matrix0_step2] \n\t"
+ "sw %[sum32], 0(%[product_ptr]) \n\t"
+ "bgtz %[k], 2b \n\t"
+ " addiu %[product_ptr], %[product_ptr], 4 \n\t"
+ "addu %[matrix1_start], %[matrix1_start], %[matrix1_step2] \n\t"
+ "bgtz %[j], 1b \n\t"
+ " addu %[product_start], %[product_start], %[product_step] \n\t"
+ ".set pop \n\t"
+ : [product_ptr] "=&r" (product_ptr), [product_start] "+r" (product_start),
+ [k] "=&r" (k), [j] "+r" (j), [matrix1_start] "+r"(matrix1_start),
+ [matrix1_ptr] "=&r" (matrix1_ptr), [matrix0_ptr] "=&r" (matrix0_ptr),
+ [matrix0_start] "=&r" (matrix0_start), [n] "=&r" (n), [r0] "=&r" (r0),
+ [sum32] "=&r" (sum32), [r1] "=&r" (r1),[r2] "=&r" (r2)
+ : [product_step] "r" (product_step), [matrix0] "r" (matrix0),
+ [inner_loop_count] "r" (inner_loop_count),
+ [matrix1_step] "r" (matrix1_step), [shift] "r" (shift),
+ [matrix0_step] "r" (matrix0_step), [matrix1_step2] "r" (matrix1_step2),
+ [matrix0_step2] "r" (matrix0_step2)
+ : "hi", "lo", "memory"
+ );
+ }
+}
+
+// MIPS optimization of the function WebRtcIsacfix_MatrixProduct2.
+// Bit-exact with the function WebRtcIsacfix_MatrixProduct2C from
+// entropy_coding.c file.
+void WebRtcIsacfix_MatrixProduct2MIPS(const int16_t matrix0[],
+ const int32_t matrix1[],
+ int32_t matrix_product[],
+ const int matrix0_index_factor,
+ const int matrix0_index_step) {
+ int j = 0, n = 0;
+ int loop_count = SUBFRAMES;
+ const int16_t* matrix0_ptr;
+ const int32_t* matrix1_ptr;
+ const int16_t* matrix0_start = matrix0;
+ const int matrix0_step = 2 * matrix0_index_step;
+ const int matrix0_step2 = 2 * matrix0_index_factor;
+ int32_t r0, r1, r2, r3, r4, sum32, sum32_2;
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addu %[j], %[loop_count], $0 \n\t"
+ "addu %[matrix0_start], %[matrix0], $0 \n\t"
+ "1: \n\t"
+ "addu %[matrix1_ptr], %[matrix1], $0 \n\t"
+ "addu %[matrix0_ptr], %[matrix0_start], $0 \n\t"
+ "addu %[n], %[loop_count], $0 \n\t"
+ "mul %[sum32], $0, $0 \n\t"
+ "mul %[sum32_2], $0, $0 \n\t"
+ "2: \n\t"
+ "lw %[r0], 0(%[matrix1_ptr]) \n\t"
+ "lw %[r1], 4(%[matrix1_ptr]) \n\t"
+ "lh %[r2], 0(%[matrix0_ptr]) \n\t"
+ "andi %[r3], %[r0], 0xffff \n\t"
+ "sra %[r3], %[r3], 1 \n\t"
+ "mul %[r3], %[r3], %[r2] \n\t"
+ "andi %[r4], %[r1], 0xffff \n\t"
+ "sra %[r4], %[r4], 1 \n\t"
+ "mul %[r4], %[r4], %[r2] \n\t"
+ "sra %[r0], %[r0], 16 \n\t"
+ "mul %[r0], %[r0], %[r2] \n\t"
+ "sra %[r1], %[r1], 16 \n\t"
+ "mul %[r1], %[r1], %[r2] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r3], %[r3], 15 \n\t"
+ "shra_r.w %[r4], %[r4], 15 \n\t"
+#else
+ "addiu %[r3], %[r3], 0x4000 \n\t"
+ "sra %[r3], %[r3], 15 \n\t"
+ "addiu %[r4], %[r4], 0x4000 \n\t"
+ "sra %[r4], %[r4], 15 \n\t"
+#endif
+ "addiu %[matrix1_ptr], %[matrix1_ptr], 8 \n\t"
+ "addu %[matrix0_ptr], %[matrix0_ptr], %[matrix0_step] \n\t"
+ "addiu %[n], %[n], -1 \n\t"
+ "addu %[sum32], %[sum32], %[r3] \n\t"
+ "addu %[sum32_2], %[sum32_2], %[r4] \n\t"
+ "addu %[sum32], %[sum32], %[r0] \n\t"
+ "bgtz %[n], 2b \n\t"
+ " addu %[sum32_2], %[sum32_2], %[r1] \n\t"
+ "sra %[sum32], %[sum32], 3 \n\t"
+ "sra %[sum32_2], %[sum32_2], 3 \n\t"
+ "addiu %[j], %[j], -1 \n\t"
+ "addu %[matrix0_start], %[matrix0_start], %[matrix0_step2] \n\t"
+ "sw %[sum32], 0(%[matrix_product]) \n\t"
+ "sw %[sum32_2], 4(%[matrix_product]) \n\t"
+ "bgtz %[j], 1b \n\t"
+ " addiu %[matrix_product], %[matrix_product], 8 \n\t"
+ ".set pop \n\t"
+ : [j] "=&r" (j), [matrix0_start] "=&r" (matrix0_start),
+ [matrix1_ptr] "=&r" (matrix1_ptr), [matrix0_ptr] "=&r" (matrix0_ptr),
+ [n] "=&r" (n), [sum32] "=&r" (sum32), [sum32_2] "=&r" (sum32_2),
+ [r0] "=&r" (r0), [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3),
+ [r4] "=&r" (r4), [matrix_product] "+r" (matrix_product)
+ : [loop_count] "r" (loop_count), [matrix0] "r" (matrix0),
+ [matrix1] "r" (matrix1), [matrix0_step] "r" (matrix0_step),
+ [matrix0_step2] "r" (matrix0_step2)
+ : "hi", "lo", "memory"
+ );
+}
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h b/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h
index 3fefc1a..2aa587f 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h
@@ -11,7 +11,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_INTERNAL_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_INTERNAL_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -23,10 +23,23 @@
* coefficient: Input.
* state: Input/output, filter state, in Q4.
*/
-void WebRtcIsacfix_HighpassFilterFixDec32(int16_t *io,
- int16_t len,
- const int16_t *coefficient,
- int32_t *state);
+typedef void (*HighpassFilterFixDec32)(int16_t* io,
+ int16_t len,
+ const int16_t* coefficient,
+ int32_t* state);
+extern HighpassFilterFixDec32 WebRtcIsacfix_HighpassFilterFixDec32;
+
+void WebRtcIsacfix_HighpassFilterFixDec32C(int16_t* io,
+ int16_t len,
+ const int16_t* coefficient,
+ int32_t* state);
+
+#if defined(MIPS_DSP_R1_LE)
+void WebRtcIsacfix_HighpassFilterFixDec32MIPS(int16_t* io,
+ int16_t len,
+ const int16_t* coefficient,
+ int32_t* state);
+#endif
typedef void (*AllpassFilter2FixDec16)(
int16_t *data_ch1, // Input and output in channel 1, in Q0
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h b/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h
index 9a888e4..c96fb05 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h
@@ -19,7 +19,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_TABLES_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbanks.c b/modules/audio_coding/codecs/isac/fix/source/filterbanks.c
index 64557e1..8be427a 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbanks.c
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbanks.c
@@ -51,32 +51,32 @@
in_out = data_ch1[n];
a = WEBRTC_SPL_MUL_16_16(factor_ch1[0], in_out); // Q15 * Q0 = Q15
a <<= 1; // Q15 -> Q16
- b = WEBRTC_SPL_ADD_SAT_W32(a, state0_ch1);
+ b = WebRtcSpl_AddSatW32(a, state0_ch1);
a = WEBRTC_SPL_MUL_16_16(-factor_ch1[0], (int16_t) (b >> 16)); // Q15
- state0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a << 1, (uint32_t)in_out << 16); // Q16
+ state0_ch1 = WebRtcSpl_AddSatW32(a << 1, (uint32_t)in_out << 16); // Q16
in_out = (int16_t) (b >> 16); // Save as Q0
a = WEBRTC_SPL_MUL_16_16(factor_ch1[1], in_out); // Q15 * Q0 = Q15
a <<= 1; // Q15 -> Q16
- b = WEBRTC_SPL_ADD_SAT_W32(a, state1_ch1); // Q16
+ b = WebRtcSpl_AddSatW32(a, state1_ch1); // Q16
a = WEBRTC_SPL_MUL_16_16(-factor_ch1[1], (int16_t) (b >> 16)); // Q15
- state1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a << 1, (uint32_t)in_out << 16); // Q16
+ state1_ch1 = WebRtcSpl_AddSatW32(a << 1, (uint32_t)in_out << 16); // Q16
data_ch1[n] = (int16_t) (b >> 16); // Save as Q0
// Process channel 2:
in_out = data_ch2[n];
a = WEBRTC_SPL_MUL_16_16(factor_ch2[0], in_out); // Q15 * Q0 = Q15
a <<= 1; // Q15 -> Q16
- b = WEBRTC_SPL_ADD_SAT_W32(a, state0_ch2); // Q16
+ b = WebRtcSpl_AddSatW32(a, state0_ch2); // Q16
a = WEBRTC_SPL_MUL_16_16(-factor_ch2[0], (int16_t) (b >> 16)); // Q15
- state0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a << 1, (uint32_t)in_out << 16); // Q16
+ state0_ch2 = WebRtcSpl_AddSatW32(a << 1, (uint32_t)in_out << 16); // Q16
in_out = (int16_t) (b >> 16); // Save as Q0
a = WEBRTC_SPL_MUL_16_16(factor_ch2[1], in_out); // Q15 * Q0 = Q15
a <<= 1; // Q15 -> Q16
- b = WEBRTC_SPL_ADD_SAT_W32(a, state1_ch2); // Q16
+ b = WebRtcSpl_AddSatW32(a, state1_ch2); // Q16
a = WEBRTC_SPL_MUL_16_16(-factor_ch2[1], (int16_t) (b >> 16)); // Q15
- state1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a << 1, (uint32_t)in_out << 16); // Q16
+ state1_ch2 = WebRtcSpl_AddSatW32(a << 1, (uint32_t)in_out << 16); // Q16
data_ch2[n] = (int16_t) (b >> 16); // Save as Q0
}
@@ -86,10 +86,13 @@
filter_state_ch2[1] = state1_ch2;
}
-void WebRtcIsacfix_HighpassFilterFixDec32(int16_t *io,
- int16_t len,
- const int16_t *coefficient,
- int32_t *state)
+// Declare a function pointer.
+HighpassFilterFixDec32 WebRtcIsacfix_HighpassFilterFixDec32;
+
+void WebRtcIsacfix_HighpassFilterFixDec32C(int16_t *io,
+ int16_t len,
+ const int16_t *coefficient,
+ int32_t *state)
{
int k;
int32_t a1 = 0, b1 = 0, c = 0, in = 0;
@@ -126,12 +129,16 @@
}
#else
/* Q35 * Q4 = Q39 ; shift 32 bit => Q7 */
- a1 = WEBRTC_SPL_MUL_32_32_RSFT32(coefficient[5], coefficient[4], state0);
- b1 = WEBRTC_SPL_MUL_32_32_RSFT32(coefficient[7], coefficient[6], state1);
+ a1 = WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[5], state0) +
+ (WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[4], state0) >> 16);
+ b1 = WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[7], state1) +
+ (WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[6], state1) >> 16);
/* Q30 * Q4 = Q34 ; shift 32 bit => Q2 */
- a2 = WEBRTC_SPL_MUL_32_32_RSFT32(coefficient[1], coefficient[0], state0);
- b2 = WEBRTC_SPL_MUL_32_32_RSFT32(coefficient[3], coefficient[2], state1);
+ a2 = WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[1], state0) +
+ (WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[0], state0) >> 16);
+ b2 = WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[3], state1) +
+ (WEBRTC_SPL_MUL_16_32_RSFT16(coefficient[2], state1) >> 16);
#endif
c = ((int32_t)in) + WEBRTC_SPL_RSHIFT_W32(a1+b1, 7); // Q0
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c b/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c
index 1887745..4dd70cf 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c
@@ -10,26 +10,26 @@
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h"
-// WebRtcIsacfix_AllpassFilter2FixDec16 function optimized for MIPSDSP platform
-// Bit-exact with WebRtcIsacfix_AllpassFilter2FixDec16C from filterbanks.c
+// WebRtcIsacfix_AllpassFilter2FixDec16 function optimized for MIPSDSP platform.
+// Bit-exact with WebRtcIsacfix_AllpassFilter2FixDec16C from filterbanks.c.
void WebRtcIsacfix_AllpassFilter2FixDec16MIPS(
- int16_t *data_ch1, // Input and output in channel 1, in Q0
- int16_t *data_ch2, // Input and output in channel 2, in Q0
- const int16_t *factor_ch1, // Scaling factor for channel 1, in Q15
- const int16_t *factor_ch2, // Scaling factor for channel 2, in Q15
- const int length, // Length of the data buffers
- int32_t *filter_state_ch1, // Filter state for channel 1, in Q16
- int32_t *filter_state_ch2) { // Filter state for channel 2, in Q16
+ int16_t* data_ch1, // Input and output in channel 1, in Q0.
+ int16_t* data_ch2, // Input and output in channel 2, in Q0.
+ const int16_t* factor_ch1, // Scaling factor for channel 1, in Q15.
+ const int16_t* factor_ch2, // Scaling factor for channel 2, in Q15.
+ const int length, // Length of the data buffers.
+ int32_t* filter_state_ch1, // Filter state for channel 1, in Q16.
+ int32_t* filter_state_ch2) { // Filter state for channel 2, in Q16.
- int32_t st0_ch1, st1_ch1; // channel1 state variables
- int32_t st0_ch2, st1_ch2; // channel2 state variables
- int32_t f_ch10, f_ch11, f_ch20, f_ch21; // factor variables
- int32_t r0, r1, r2, r3, r4, r5; // temporary ragister variables
+ int32_t st0_ch1, st1_ch1; // channel1 state variables.
+ int32_t st0_ch2, st1_ch2; // channel2 state variables.
+ int32_t f_ch10, f_ch11, f_ch20, f_ch21; // factor variables.
+ int32_t r0, r1, r2, r3, r4, r5; // temporary register variables.
__asm __volatile (
".set push \n\t"
".set noreorder \n\t"
- // Load all the state and factor variables
+ // Load all the state and factor variables.
"lh %[f_ch10], 0(%[factor_ch1]) \n\t"
"lh %[f_ch20], 0(%[factor_ch2]) \n\t"
"lh %[f_ch11], 2(%[factor_ch1]) \n\t"
@@ -38,7 +38,7 @@
"lw %[st1_ch1], 4(%[filter_state_ch1]) \n\t"
"lw %[st0_ch2], 0(%[filter_state_ch2]) \n\t"
"lw %[st1_ch2], 4(%[filter_state_ch2]) \n\t"
- // Allpass filtering loop
+ // Allpass filtering loop.
"1: \n\t"
"lh %[r0], 0(%[data_ch1]) \n\t"
"lh %[r1], 0(%[data_ch2]) \n\t"
@@ -80,7 +80,7 @@
"subq_s.w %[st1_ch2], %[r3], %[r1] \n\t"
"bgtz %[length], 1b \n\t"
" addiu %[data_ch2], %[data_ch2], 2 \n\t"
- // Store channel states
+ // Store channel states.
"sw %[st0_ch1], 0(%[filter_state_ch1]) \n\t"
"sw %[st1_ch1], 4(%[filter_state_ch1]) \n\t"
"sw %[st0_ch2], 0(%[filter_state_ch2]) \n\t"
@@ -100,3 +100,143 @@
: "memory", "hi", "lo"
);
}
+
+// WebRtcIsacfix_HighpassFilterFixDec32 function optimized for MIPSDSP platform.
+// Bit-exact with WebRtcIsacfix_HighpassFilterFixDec32C from filterbanks.c.
+void WebRtcIsacfix_HighpassFilterFixDec32MIPS(int16_t* io,
+ int16_t len,
+ const int16_t* coefficient,
+ int32_t* state) {
+ int k;
+ int32_t a1, a2, b1, b2, in;
+ int32_t state0 = state[0];
+ int32_t state1 = state[1];
+
+ int32_t c0, c1, c2, c3;
+ int32_t c4, c5, c6, c7;
+ int32_t state0_lo, state0_hi;
+ int32_t state1_lo, state1_hi;
+ int32_t t0, t1, t2, t3, t4, t5;
+
+ __asm __volatile (
+ "lh %[c0], 0(%[coeff_ptr]) \n\t"
+ "lh %[c1], 2(%[coeff_ptr]) \n\t"
+ "lh %[c2], 4(%[coeff_ptr]) \n\t"
+ "lh %[c3], 6(%[coeff_ptr]) \n\t"
+ "sra %[state0_hi], %[state0], 16 \n\t"
+ "sra %[state1_hi], %[state1], 16 \n\t"
+ "andi %[state0_lo], %[state0], 0xFFFF \n\t"
+ "andi %[state1_lo], %[state1], 0xFFFF \n\t"
+ "lh %[c4], 8(%[coeff_ptr]) \n\t"
+ "lh %[c5], 10(%[coeff_ptr]) \n\t"
+ "lh %[c6], 12(%[coeff_ptr]) \n\t"
+ "lh %[c7], 14(%[coeff_ptr]) \n\t"
+ "sra %[state0_lo], %[state0_lo], 1 \n\t"
+ "sra %[state1_lo], %[state1_lo], 1 \n\t"
+ : [c0] "=&r" (c0), [c1] "=&r" (c1), [c2] "=&r" (c2), [c3] "=&r" (c3),
+ [c4] "=&r" (c4), [c5] "=&r" (c5), [c6] "=&r" (c6), [c7] "=&r" (c7),
+ [state0_hi] "=&r" (state0_hi), [state0_lo] "=&r" (state0_lo),
+ [state1_hi] "=&r" (state1_hi), [state1_lo] "=&r" (state1_lo)
+ : [coeff_ptr] "r" (coefficient), [state0] "r" (state0),
+ [state1] "r" (state1)
+ : "memory"
+ );
+
+ for (k = 0; k < len; k++) {
+ in = (int32_t)io[k];
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "mul %[t2], %[c4], %[state0_lo] \n\t"
+ "mul %[t0], %[c5], %[state0_lo] \n\t"
+ "mul %[t1], %[c4], %[state0_hi] \n\t"
+ "mul %[a1], %[c5], %[state0_hi] \n\t"
+ "mul %[t5], %[c6], %[state1_lo] \n\t"
+ "mul %[t3], %[c7], %[state1_lo] \n\t"
+ "mul %[t4], %[c6], %[state1_hi] \n\t"
+ "mul %[b1], %[c7], %[state1_hi] \n\t"
+ "shra_r.w %[t2], %[t2], 15 \n\t"
+ "shra_r.w %[t0], %[t0], 15 \n\t"
+ "addu %[t1], %[t1], %[t2] \n\t"
+ "addu %[a1], %[a1], %[t0] \n\t"
+ "sra %[t1], %[t1], 16 \n\t"
+ "addu %[a1], %[a1], %[t1] \n\t"
+ "shra_r.w %[t5], %[t5], 15 \n\t"
+ "shra_r.w %[t3], %[t3], 15 \n\t"
+ "addu %[t4], %[t4], %[t5] \n\t"
+ "addu %[b1], %[b1], %[t3] \n\t"
+ "sra %[t4], %[t4], 16 \n\t"
+ "addu %[b1], %[b1], %[t4] \n\t"
+ "mul %[t2], %[c0], %[state0_lo] \n\t"
+ "mul %[t0], %[c1], %[state0_lo] \n\t"
+ "mul %[t1], %[c0], %[state0_hi] \n\t"
+ "mul %[a2], %[c1], %[state0_hi] \n\t"
+ "mul %[t5], %[c2], %[state1_lo] \n\t"
+ "mul %[t3], %[c3], %[state1_lo] \n\t"
+ "mul %[t4], %[c2], %[state1_hi] \n\t"
+ "mul %[b2], %[c3], %[state1_hi] \n\t"
+ "shra_r.w %[t2], %[t2], 15 \n\t"
+ "shra_r.w %[t0], %[t0], 15 \n\t"
+ "addu %[t1], %[t1], %[t2] \n\t"
+ "addu %[a2], %[a2], %[t0] \n\t"
+ "sra %[t1], %[t1], 16 \n\t"
+ "addu %[a2], %[a2], %[t1] \n\t"
+ "shra_r.w %[t5], %[t5], 15 \n\t"
+ "shra_r.w %[t3], %[t3], 15 \n\t"
+ "addu %[t4], %[t4], %[t5] \n\t"
+ "addu %[b2], %[b2], %[t3] \n\t"
+ "sra %[t4], %[t4], 16 \n\t"
+ "addu %[b2], %[b2], %[t4] \n\t"
+ "addu %[a1], %[a1], %[b1] \n\t"
+ "sra %[a1], %[a1], 7 \n\t"
+ "addu %[a1], %[a1], %[in] \n\t"
+ "sll %[t0], %[in], 2 \n\t"
+ "addu %[a2], %[a2], %[b2] \n\t"
+ "subu %[t0], %[t0], %[a2] \n\t"
+ "shll_s.w %[a1], %[a1], 16 \n\t"
+ "shll_s.w %[t0], %[t0], 2 \n\t"
+ "sra %[a1], %[a1], 16 \n\t"
+ "addu %[state1_hi], %[state0_hi], $0 \n\t"
+ "addu %[state1_lo], %[state0_lo], $0 \n\t"
+ "sra %[state0_hi], %[t0], 16 \n\t"
+ "andi %[state0_lo], %[t0], 0xFFFF \n\t"
+ "sra %[state0_lo], %[state0_lo], 1 \n\t"
+ ".set pop \n\t"
+ : [a1] "=&r" (a1), [b1] "=&r" (b1), [a2] "=&r" (a2), [b2] "=&r" (b2),
+ [state0_hi] "+r" (state0_hi), [state0_lo] "+r" (state0_lo),
+ [state1_hi] "+r" (state1_hi), [state1_lo] "+r" (state1_lo),
+ [t0] "=&r" (t0), [t1] "=&r" (t1), [t2] "=&r" (t2),
+ [t3] "=&r" (t3), [t4] "=&r" (t4), [t5] "=&r" (t5)
+ : [c0] "r" (c0), [c1] "r" (c1), [c2] "r" (c2), [c3] "r" (c3),
+ [c4] "r" (c4), [c5] "r" (c5), [c6] "r" (c6), [c7] "r" (c7),
+ [in] "r" (in)
+ : "hi", "lo"
+ );
+ io[k] = (int16_t)a1;
+ }
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+#if !defined(MIPS_DSP_R2_LE)
+ "sll %[state0_hi], %[state0_hi], 16 \n\t"
+ "sll %[state0_lo], %[state0_lo], 1 \n\t"
+ "sll %[state1_hi], %[state1_hi], 16 \n\t"
+ "sll %[state1_lo], %[state1_lo], 1 \n\t"
+ "or %[state0_hi], %[state0_hi], %[state0_lo] \n\t"
+ "or %[state1_hi], %[state1_hi], %[state1_lo] \n\t"
+#else
+ "sll %[state0_lo], %[state0_lo], 1 \n\t"
+ "sll %[state1_lo], %[state1_lo], 1 \n\t"
+ "precr_sra.ph.w %[state0_hi], %[state0_lo], 0 \n\t"
+ "precr_sra.ph.w %[state1_hi], %[state1_lo], 0 \n\t"
+#endif
+ "sw %[state0_hi], 0(%[state]) \n\t"
+ "sw %[state1_hi], 4(%[state]) \n\t"
+ ".set pop \n\t"
+ : [state0_hi] "+r" (state0_hi), [state0_lo] "+r" (state0_lo),
+ [state1_hi] "+r" (state1_hi), [state1_lo] "+r" (state1_lo)
+ : [state] "r" (state)
+ : "memory"
+ );
+}
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.S b/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.S
index 125a5d1..b473921 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.S
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.S
@@ -147,14 +147,14 @@
@ a0_ch1 = WEBRTC_SPL_MUL_16_16(factor_ch1[0], sample0_ch1) << 1;
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[0], sample0_ch2) << 1;
@
-@ b0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1, state0_ch1);
-@ b0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2, state0_ch2); //Q16+Q16=Q16
+@ b0_ch1 = WebRtcSpl_AddSatW32(a0_ch1, state0_ch1);
+@ b0_ch2 = WebRtcSpl_AddSatW32(a0_ch2, state0_ch2); //Q16+Q16=Q16
@
@ a0_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[0], (int16_t) (b0_ch1 >> 16));
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[0], (int16_t) (b0_ch2 >> 16));
@
-@ state0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1 <<1, (uint32_t)sample0_ch1 << 16);
-@ state0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2 <<1, (uint32_t)sample0_ch2 << 16);
+@ state0_ch1 = WebRtcSpl_AddSatW32(a0_ch1 <<1, (uint32_t)sample0_ch1 << 16);
+@ state0_ch2 = WebRtcSpl_AddSatW32(a0_ch2 <<1, (uint32_t)sample0_ch2 << 16);
@
@ sample1_ch1 = data_ch1[n + 1];
@ sample0_ch1 = (int16_t) (b0_ch1 >> 16); //Save as Q0
@@ -168,20 +168,20 @@
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[0], sample1_ch2 ) << 1;
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[1], sample0_ch2) << 1;
@
-@ b1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1, state0_ch1);
-@ b0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1, state1_ch1); //Q16+Q16=Q16
-@ b1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2, state0_ch2); //Q16+Q16=Q16
-@ b0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2, state1_ch2); //Q16+Q16=Q16
+@ b1_ch1 = WebRtcSpl_AddSatW32(a1_ch1, state0_ch1);
+@ b0_ch1 = WebRtcSpl_AddSatW32(a0_ch1, state1_ch1); //Q16+Q16=Q16
+@ b1_ch2 = WebRtcSpl_AddSatW32(a1_ch2, state0_ch2); //Q16+Q16=Q16
+@ b0_ch2 = WebRtcSpl_AddSatW32(a0_ch2, state1_ch2); //Q16+Q16=Q16
@
@ a1_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[0], (int16_t) (b1_ch1 >> 16));
@ a0_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[1], (int16_t) (b0_ch1 >> 16));
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[0], (int16_t) (b1_ch2 >> 16));
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[1], (int16_t) (b0_ch2 >> 16));
@
-@ state0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1<<1, (uint32_t)sample1_ch1 <<16);
-@ state1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1<<1, (uint32_t)sample0_ch1 <<16);
-@ state0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2<<1, (uint32_t)sample1_ch2 <<16);
-@ state1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2<<1, (uint32_t)sample0_ch2 <<16);
+@ state0_ch1 = WebRtcSpl_AddSatW32(a1_ch1<<1, (uint32_t)sample1_ch1 <<16);
+@ state1_ch1 = WebRtcSpl_AddSatW32(a0_ch1<<1, (uint32_t)sample0_ch1 <<16);
+@ state0_ch2 = WebRtcSpl_AddSatW32(a1_ch2<<1, (uint32_t)sample1_ch2 <<16);
+@ state1_ch2 = WebRtcSpl_AddSatW32(a0_ch2<<1, (uint32_t)sample0_ch2 <<16);
@
@ sample0_ch1 = data_ch1[n + 2];
@ sample1_ch1 = (int16_t) (b1_ch1 >> 16); //Save as Q0
@@ -193,20 +193,20 @@
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[0], sample0_ch2) << 1;
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[1], sample1_ch2 ) << 1;
@
-@ b2_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1, state0_ch1);
-@ b1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1, state1_ch1); //Q16+Q16=Q16
-@ b2_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2, state0_ch2); //Q16+Q16=Q16
-@ b1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2, state1_ch2); //Q16+Q16=Q16
+@ b2_ch1 = WebRtcSpl_AddSatW32(a0_ch1, state0_ch1);
+@ b1_ch1 = WebRtcSpl_AddSatW32(a1_ch1, state1_ch1); //Q16+Q16=Q16
+@ b2_ch2 = WebRtcSpl_AddSatW32(a0_ch2, state0_ch2); //Q16+Q16=Q16
+@ b1_ch2 = WebRtcSpl_AddSatW32(a1_ch2, state1_ch2); //Q16+Q16=Q16
@
@ a0_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[0], (int16_t) (b2_ch1 >> 16));
@ a1_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[1], (int16_t) (b1_ch1 >> 16));
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[0], (int16_t) (b2_ch2 >> 16));
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[1], (int16_t) (b1_ch2 >> 16));
@
-@ state0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1<<1, (uint32_t)sample0_ch1<<16);
-@ state1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1<<1, (uint32_t)sample1_ch1<<16);
-@ state0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2<<1, (uint32_t)sample0_ch2<<16);
-@ state1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2<<1, (uint32_t)sample1_ch2<<16);
+@ state0_ch1 = WebRtcSpl_AddSatW32(a0_ch1<<1, (uint32_t)sample0_ch1<<16);
+@ state1_ch1 = WebRtcSpl_AddSatW32(a1_ch1<<1, (uint32_t)sample1_ch1<<16);
+@ state0_ch2 = WebRtcSpl_AddSatW32(a0_ch2<<1, (uint32_t)sample0_ch2<<16);
+@ state1_ch2 = WebRtcSpl_AddSatW32(a1_ch2<<1, (uint32_t)sample1_ch2<<16);
@
@
@ sample1_ch1 = data_ch1[n + 3];
@@ -227,20 +227,20 @@
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[0], sample1_ch2 ) << 1;
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[1], sample0_ch2) << 1;
@
-@ b1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1, state0_ch1);
-@ b0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1, state1_ch1);
-@ b1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2, state0_ch2);
-@ b0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2, state1_ch2);
+@ b1_ch1 = WebRtcSpl_AddSatW32(a1_ch1, state0_ch1);
+@ b0_ch1 = WebRtcSpl_AddSatW32(a0_ch1, state1_ch1);
+@ b1_ch2 = WebRtcSpl_AddSatW32(a1_ch2, state0_ch2);
+@ b0_ch2 = WebRtcSpl_AddSatW32(a0_ch2, state1_ch2);
@
@ a1_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[0], (int16_t) (b1_ch1 >> 16));
@ a0_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[1], (int16_t) (b0_ch1 >> 16));
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[0], (int16_t) (b1_ch2 >> 16));
@ a0_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[1], (int16_t) (b0_ch2 >> 16));
@
-@ state0_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1<<1, (uint32_t)sample1_ch1 << 16);
-@ state1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a0_ch1<<1, (uint32_t)sample0_ch1 << 16);
-@ state0_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2<<1, (uint32_t)sample1_ch2 << 16);
-@ state1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a0_ch2<<1, (uint32_t)sample0_ch2 << 16);
+@ state0_ch1 = WebRtcSpl_AddSatW32(a1_ch1<<1, (uint32_t)sample1_ch1 << 16);
+@ state1_ch1 = WebRtcSpl_AddSatW32(a0_ch1<<1, (uint32_t)sample0_ch1 << 16);
+@ state0_ch2 = WebRtcSpl_AddSatW32(a1_ch2<<1, (uint32_t)sample1_ch2 << 16);
+@ state1_ch2 = WebRtcSpl_AddSatW32(a0_ch2<<1, (uint32_t)sample0_ch2 << 16);
@
@ data_ch1[n] = (int16_t) (b0_ch1 >> 16); //Save as Q0
@ data_ch2[n] = (int16_t) (b0_ch2 >> 16);
@@ -251,14 +251,14 @@
@ a1_ch1 = WEBRTC_SPL_MUL_16_16(factor_ch1[1], sample1_ch1) << 1;
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(factor_ch2[1], sample1_ch2 ) << 1;
@
-@ b1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1, state1_ch1); //Q16+Q16=Q16
-@ b1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2, state1_ch2); //Q16+Q16=Q16
+@ b1_ch1 = WebRtcSpl_AddSatW32(a1_ch1, state1_ch1); //Q16+Q16=Q16
+@ b1_ch2 = WebRtcSpl_AddSatW32(a1_ch2, state1_ch2); //Q16+Q16=Q16
@
@ a1_ch1 = WEBRTC_SPL_MUL_16_16(-factor_ch1[1], (int16_t) (b1_ch1 >> 16));
@ a1_ch2 = WEBRTC_SPL_MUL_16_16(-factor_ch2[1], (int16_t) (b1_ch2 >> 16));
@
-@ state1_ch1 = WEBRTC_SPL_ADD_SAT_W32(a1_ch1<<1, (uint32_t)sample1_ch1<<16);
-@ state1_ch2 = WEBRTC_SPL_ADD_SAT_W32(a1_ch2<<1, (uint32_t)sample1_ch2<<16);
+@ state1_ch1 = WebRtcSpl_AddSatW32(a1_ch1<<1, (uint32_t)sample1_ch1<<16);
+@ state1_ch2 = WebRtcSpl_AddSatW32(a1_ch2<<1, (uint32_t)sample1_ch2<<16);
@
@ data_ch1[n + 1] = (int16_t) (b1_ch1 >> 16); //Save as Q0
@ data_ch2[n + 1] = (int16_t) (b1_ch2 >> 16);
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc
index d748427..3276331 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h"
@@ -86,6 +86,13 @@
-1280, -8554, -14496, -7561, -23541, -27263, -30560, -32768, -3441, -32768,
25203, -27550, 22419};
#endif
+ HighpassFilterFixDec32 WebRtcIsacfix_HighpassFilterFixDec32;
+#if defined(MIPS_DSP_R1_LE)
+ WebRtcIsacfix_HighpassFilterFixDec32 =
+ WebRtcIsacfix_HighpassFilterFixDec32MIPS;
+#else
+ WebRtcIsacfix_HighpassFilterFixDec32 = WebRtcIsacfix_HighpassFilterFixDec32C;
+#endif
for (int i = 0; i < kSamples; i++) {
in[i] = WEBRTC_SPL_WORD32_MAX / (i + 1);
diff --git a/modules/audio_coding/codecs/isac/fix/source/filters.c b/modules/audio_coding/codecs/isac/fix/source/filters.c
index eb0e87a..cf92a4d 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filters.c
+++ b/modules/audio_coding/codecs/isac/fix/source/filters.c
@@ -75,11 +75,11 @@
for (n=0;n<lengthInOut;n+=2){
a = WEBRTC_SPL_MUL_16_32_RSFT16(InOut16[n], APSectionFactors[j]); //Q0*Q31=Q31 shifted 16 gives Q15
a = WEBRTC_SPL_LSHIFT_W32(a, 1); // Q15 -> Q16
- b = WEBRTC_SPL_ADD_SAT_W32(a, FilterState[j]); //Q16+Q16=Q16
+ b = WebRtcSpl_AddSatW32(a, FilterState[j]); //Q16+Q16=Q16
a = WEBRTC_SPL_MUL_16_32_RSFT16(
(int16_t) WEBRTC_SPL_RSHIFT_W32(b, 16),
-APSectionFactors[j]); //Q0*Q31=Q31 shifted 16 gives Q15
- FilterState[j] = WEBRTC_SPL_ADD_SAT_W32(
+ FilterState[j] = WebRtcSpl_AddSatW32(
WEBRTC_SPL_LSHIFT_W32(a,1),
WEBRTC_SPL_LSHIFT_W32((uint32_t)InOut16[n], 16)); // Q15<<1 + Q0<<16 = Q16 + Q16 = Q16
InOut16[n] = (int16_t) WEBRTC_SPL_RSHIFT_W32(b, 16); //Save as Q0
@@ -111,6 +111,7 @@
AllpassFilterForDec32(data_vec, kApLowerQ15, N, state_in+ALLPASSSECTIONS);
for (n=0;n<N/2;n++) {
- out[n]=WEBRTC_SPL_ADD_SAT_W16(data_vec[WEBRTC_SPL_MUL_16_16(2, n)], data_vec[WEBRTC_SPL_MUL_16_16(2, n)+1]);
+ out[n] = WebRtcSpl_AddSatW16(data_vec[WEBRTC_SPL_MUL_16_16(2, n)],
+ data_vec[WEBRTC_SPL_MUL_16_16(2, n) + 1]);
}
}
diff --git a/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc
index e070789..4ea4dab 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h"
#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
#include "webrtc/typedefs.h"
diff --git a/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/modules/audio_coding/codecs/isac/fix/source/isacfix.c
index 7635908..118fd2f 100644
--- a/modules/audio_coding/codecs/isac/fix/source/isacfix.c
+++ b/modules/audio_coding/codecs/isac/fix/source/isacfix.c
@@ -15,17 +15,18 @@
*
*/
-#include "modules/audio_coding/codecs/isac/fix/interface/isacfix.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h"
+#include <assert.h>
#include <stdlib.h>
-#include "modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h"
-#include "modules/audio_coding/codecs/isac/fix/source/codec.h"
-#include "modules/audio_coding/codecs/isac/fix/source/entropy_coding.h"
-#include "modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h"
-#include "modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h"
-#include "modules/audio_coding/codecs/isac/fix/source/structs.h"
-#include "system_wrappers/interface/cpu_features_wrapper.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h"
+#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
// Declare function pointers.
FilterMaLoopFix WebRtcIsacfix_FilterMaLoopFix;
@@ -209,9 +210,19 @@
static void WebRtcIsacfix_InitMIPS(void) {
WebRtcIsacfix_AutocorrFix = WebRtcIsacfix_AutocorrMIPS;
WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopMIPS;
+ WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeMIPS;
+ WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecMIPS;
+ WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1MIPS;
+ WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2MIPS;
#if defined(MIPS_DSP_R1_LE)
WebRtcIsacfix_AllpassFilter2FixDec16 =
WebRtcIsacfix_AllpassFilter2FixDec16MIPS;
+ WebRtcIsacfix_HighpassFilterFixDec32 =
+ WebRtcIsacfix_HighpassFilterFixDec32MIPS;
+#endif
+#if defined(MIPS_DSP_R2_LE)
+ WebRtcIsacfix_CalculateResidualEnergy =
+ WebRtcIsacfix_CalculateResidualEnergyMIPS;
#endif
}
#endif
@@ -300,10 +311,11 @@
WebRtcIsacfix_CalculateResidualEnergy =
WebRtcIsacfix_CalculateResidualEnergyC;
WebRtcIsacfix_AllpassFilter2FixDec16 = WebRtcIsacfix_AllpassFilter2FixDec16C;
+ WebRtcIsacfix_HighpassFilterFixDec32 = WebRtcIsacfix_HighpassFilterFixDec32C;
WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecC;
WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeC;
WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1C;
- WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2C ;
+ WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2C;
#ifdef WEBRTC_DETECT_ARM_NEON
if ((WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) != 0) {
@@ -344,10 +356,10 @@
int16_t WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
const int16_t *speechIn,
- int16_t *encoded)
+ uint8_t* encoded)
{
ISACFIX_SubStruct *ISAC_inst;
- int16_t stream_len;
+ int16_t stream_len, stream_len_even;
#ifndef WEBRTC_ARCH_BIG_ENDIAN
int k;
#endif
@@ -371,16 +383,24 @@
return -1;
}
+ /* One would think that only even stream lengths would make sense here. We do
+ in fact observe odd lengths, however, and in those cases we copy an extra
+ byte. */
+ stream_len_even = stream_len % 2 == 0 ? stream_len : stream_len + 1;
- /* convert from bytes to int16_t */
#ifndef WEBRTC_ARCH_BIG_ENDIAN
- for (k=0;k<(stream_len+1)>>1;k++) {
- encoded[k] = (int16_t)( ( (uint16_t)(ISAC_inst->ISACenc_obj.bitstr_obj).stream[k] >> 8 )
- | (((ISAC_inst->ISACenc_obj.bitstr_obj).stream[k] & 0x00FF) << 8));
+ /* The encoded data vector is supposesd to be big-endian, but our internal
+ representation is little-endian. So byteswap. */
+ for (k = 0; k < stream_len_even / 2; ++k) {
+ uint16_t s = ISAC_inst->ISACenc_obj.bitstr_obj.stream[k];
+ /* In big-endian, we have... */
+ encoded[2 * k] = s >> 8; /* ...most significant byte at low address... */
+ encoded[2 * k + 1] = s; /* ...least significant byte at high address. */
}
-
#else
- WEBRTC_SPL_MEMCPY_W16(encoded, (ISAC_inst->ISACenc_obj.bitstr_obj).stream, (stream_len + 1)>>1);
+ /* The encoded data vector and our internal representation are both
+ big-endian. */
+ memcpy(encoded, ISAC_inst->ISACenc_obj.bitstr_obj.stream, stream_len_even);
#endif
diff --git a/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi b/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
index a18a803..54ff9df 100644
--- a/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
+++ b/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
@@ -47,12 +47,14 @@
'lpc_masking_model.c',
'lpc_tables.c',
'pitch_estimator.c',
+ 'pitch_estimator_c.c',
'pitch_filter.c',
'pitch_filter_c.c',
'pitch_gain_tables.c',
'pitch_lag_tables.c',
'spectrum_ar_model_tables.c',
'transform.c',
+ 'transform_tables.c',
'arith_routins.h',
'bandwidth_estimator.h',
'codec.h',
@@ -85,13 +87,17 @@
'pitch_filter_c.c',
],
}],
- ['target_arch=="mipsel"', {
+ ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
'sources': [
+ 'entropy_coding_mips.c',
'filters_mips.c',
'lattice_mips.c',
+ 'pitch_estimator_mips.c',
+ 'transform_mips.c',
],
'sources!': [
'lattice_c.c',
+ 'pitch_estimator_c.c',
],
'conditions': [
['mips_dsp_rev>0', {
@@ -101,6 +107,7 @@
}],
['mips_dsp_rev>1', {
'sources': [
+ 'lpc_masking_model_mips.c',
'pitch_filter_mips.c',
],
'sources!': [
@@ -133,6 +140,15 @@
'lpc_masking_model_neon.S',
'transform_neon.S',
],
+ 'conditions': [
+ # Disable LTO in isac_neon target due to compiler bug
+ ['use_lto==1', {
+ 'cflags!': [
+ '-flto',
+ '-ffat-lto-objects',
+ ],
+ }],
+ ],
},
],
}],
diff --git a/modules/audio_coding/codecs/isac/fix/source/lattice_c.c b/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
index d5b2d0e..d7d198c 100644
--- a/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
+++ b/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
@@ -16,7 +16,7 @@
#include "settings.h"
#include "signal_processing_library.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/* Filter ar_g_Q0[] and ar_f_Q0[] through an AR filter with coefficients
* cth_Q15[] and sth_Q15[].
diff --git a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h
index 72e0cfc..1270c14 100644
--- a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h
+++ b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h
@@ -62,6 +62,15 @@
int* q_val_residual_energy);
#endif
+#if defined(MIPS_DSP_R2_LE)
+int32_t WebRtcIsacfix_CalculateResidualEnergyMIPS(int lpc_order,
+ int32_t q_val_corr,
+ int q_val_polynomial,
+ int16_t* a_polynomial,
+ int32_t* corr_coeffs,
+ int* q_val_residual_energy);
+#endif
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_mips.c b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_mips.c
new file mode 100644
index 0000000..55602b9
--- /dev/null
+++ b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_mips.c
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h"
+
+// MIPS DSPR2 optimization for function WebRtcIsacfix_CalculateResidualEnergy
+// Bit-exact with WebRtcIsacfix_CalculateResidualEnergyC from file
+// lpc_masking_model.c
+int32_t WebRtcIsacfix_CalculateResidualEnergyMIPS(int lpc_order,
+ int32_t q_val_corr,
+ int q_val_polynomial,
+ int16_t* a_polynomial,
+ int32_t* corr_coeffs,
+ int* q_val_residual_energy) {
+
+ int i = 0, j = 0;
+ int shift_internal = 0, shift_norm = 0;
+ int32_t tmp32 = 0, word32_high = 0, word32_low = 0, residual_energy = 0;
+ int32_t tmp_corr_c = corr_coeffs[0];
+ int16_t* tmp_a_poly = &a_polynomial[0];
+ int32_t sum64_hi = 0;
+ int32_t sum64_lo = 0;
+
+ for (j = 0; j <= lpc_order; j++) {
+ // For the case of i == 0:
+ // residual_energy +=
+ // a_polynomial[j] * corr_coeffs[i] * a_polynomial[j - i];
+
+ int32_t tmp2, tmp3;
+ int16_t sign_1;
+ int16_t sign_2;
+ int16_t sign_3;
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "lh %[tmp2], 0(%[tmp_a_poly]) \n\t"
+ "mul %[tmp32], %[tmp2], %[tmp2] \n\t"
+ "addiu %[tmp_a_poly], %[tmp_a_poly], 2 \n\t"
+ "sra %[sign_2], %[sum64_hi], 31 \n\t"
+ "mult $ac0, %[tmp32], %[tmp_corr_c] \n\t"
+ "shilov $ac0, %[shift_internal] \n\t"
+ "mfhi %[tmp2], $ac0 \n\t"
+ "mflo %[tmp3], $ac0 \n\t"
+ "sra %[sign_1], %[tmp2], 31 \n\t"
+ "xor %[sign_3], %[sign_1], %[sign_2] \n\t"
+ ".set pop \n\t"
+ : [tmp2] "=&r" (tmp2), [tmp3] "=&r" (tmp3), [tmp32] "=&r" (tmp32),
+ [tmp_a_poly] "+r" (tmp_a_poly), [sign_1] "=&r" (sign_1),
+ [sign_3] "=&r" (sign_3), [sign_2] "=&r" (sign_2),
+ [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ : [tmp_corr_c] "r" (tmp_corr_c), [shift_internal] "r" (shift_internal)
+ : "hi", "lo", "memory"
+ );
+
+ if (sign_3 != 0) {
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addsc %[sum64_lo], %[sum64_lo], %[tmp3] \n\t"
+ "addwc %[sum64_hi], %[sum64_hi], %[tmp2] \n\t"
+ ".set pop \n\t"
+ : [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ : [tmp2] "r" (tmp2), [tmp3] "r" (tmp3)
+ : "hi", "lo", "memory"
+ );
+ } else {
+ if (((!(sign_1 || sign_2)) && (0x7FFFFFFF - sum64_hi < tmp2)) ||
+ ((sign_1 && sign_2) && (sum64_hi + tmp2 > 0))) {
+ // Shift right for overflow.
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[shift_internal], %[shift_internal], 1 \n\t"
+ "prepend %[sum64_lo], %[sum64_hi], 1 \n\t"
+ "sra %[sum64_hi], %[sum64_hi], 1 \n\t"
+ "prepend %[tmp3], %[tmp2], 1 \n\t"
+ "sra %[tmp2], %[tmp2], 1 \n\t"
+ "addsc %[sum64_lo], %[sum64_lo], %[tmp3] \n\t"
+ "addwc %[sum64_hi], %[sum64_hi], %[tmp2] \n\t"
+ ".set pop \n\t"
+ : [tmp2] "+r" (tmp2), [tmp3] "+r" (tmp3),
+ [shift_internal] "+r" (shift_internal),
+ [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ :
+ : "hi", "lo", "memory"
+ );
+ } else {
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addsc %[sum64_lo], %[sum64_lo], %[tmp3] \n\t"
+ "addwc %[sum64_hi], %[sum64_hi], %[tmp2] \n\t"
+ ".set pop \n\t"
+ : [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ : [tmp2] "r" (tmp2), [tmp3] "r" (tmp3)
+ : "hi", "lo", "memory"
+ );
+ }
+ }
+ }
+
+ for (i = 1; i <= lpc_order; i++) {
+ tmp_corr_c = corr_coeffs[i];
+ int16_t* tmp_a_poly_j = &a_polynomial[i];
+ int16_t* tmp_a_poly_j_i = &a_polynomial[0];
+ for (j = i; j <= lpc_order; j++) {
+ // For the case of i = 1 .. lpc_order:
+ // residual_energy +=
+ // a_polynomial[j] * corr_coeffs[i] * a_polynomial[j - i] * 2;
+
+ int32_t tmp2, tmp3;
+ int16_t sign_1;
+ int16_t sign_2;
+ int16_t sign_3;
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "lh %[tmp3], 0(%[tmp_a_poly_j]) \n\t"
+ "lh %[tmp2], 0(%[tmp_a_poly_j_i]) \n\t"
+ "addiu %[tmp_a_poly_j], %[tmp_a_poly_j], 2 \n\t"
+ "addiu %[tmp_a_poly_j_i], %[tmp_a_poly_j_i], 2 \n\t"
+ "mul %[tmp32], %[tmp3], %[tmp2] \n\t"
+ "sll %[tmp32], %[tmp32], 1 \n\t"
+ "mult $ac0, %[tmp32], %[tmp_corr_c] \n\t"
+ "shilov $ac0, %[shift_internal] \n\t"
+ "mfhi %[tmp2], $ac0 \n\t"
+ "mflo %[tmp3], $ac0 \n\t"
+ "sra %[sign_1], %[tmp2], 31 \n\t"
+ "sra %[sign_2], %[sum64_hi], 31 \n\t"
+ "xor %[sign_3], %[sign_1], %[sign_2] \n\t"
+ ".set pop \n\t"
+ : [tmp2] "=&r" (tmp2), [tmp3] "=&r" (tmp3), [tmp32] "=&r" (tmp32),
+ [tmp_a_poly_j] "+r" (tmp_a_poly_j), [sign_1] "=&r" (sign_1),
+ [tmp_a_poly_j_i] "+r" (tmp_a_poly_j_i), [sign_2] "=&r" (sign_2),
+ [sign_3] "=&r" (sign_3), [sum64_hi] "+r" (sum64_hi),
+ [sum64_lo] "+r" (sum64_lo)
+ : [tmp_corr_c] "r" (tmp_corr_c), [shift_internal] "r" (shift_internal)
+ : "hi", "lo", "memory"
+ );
+ if (sign_3 != 0) {
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addsc %[sum64_lo], %[sum64_lo], %[tmp3] \n\t"
+ "addwc %[sum64_hi], %[sum64_hi], %[tmp2] \n\t"
+ ".set pop \n\t"
+ : [tmp2] "+r" (tmp2), [tmp3] "+r" (tmp3), [sum64_hi] "+r" (sum64_hi),
+ [sum64_lo] "+r" (sum64_lo)
+ :
+ :"memory"
+ );
+ } else {
+ // Test overflow and sum the result.
+ if (((!(sign_1 || sign_2)) && (0x7FFFFFFF - sum64_hi < tmp2)) ||
+ ((sign_1 && sign_2) && (sum64_hi + tmp2 > 0))) {
+ // Shift right for overflow.
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[shift_internal], %[shift_internal], 1 \n\t"
+ "prepend %[sum64_lo], %[sum64_hi], 1 \n\t"
+ "sra %[sum64_hi], %[sum64_hi], 1 \n\t"
+ "prepend %[tmp3], %[tmp2], 1 \n\t"
+ "sra %[tmp2], %[tmp2], 1 \n\t"
+ "addsc %[sum64_lo], %[sum64_lo], %[tmp3] \n\t"
+ "addwc %[sum64_hi], %[sum64_hi], %[tmp2] \n\t"
+ ".set pop \n\t"
+ : [tmp2] "+r" (tmp2), [tmp3] "+r" (tmp3),
+ [shift_internal] "+r" (shift_internal),
+ [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ :
+ : "hi", "lo", "memory"
+ );
+ } else {
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addsc %[sum64_lo], %[sum64_lo], %[tmp3] \n\t"
+ "addwc %[sum64_hi], %[sum64_hi], %[tmp2] \n\t"
+ ".set pop \n\t"
+ : [tmp2] "+r" (tmp2), [tmp3] "+r" (tmp3),
+ [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ :
+ : "hi", "lo", "memory"
+ );
+ }
+ }
+ }
+ }
+ word32_high = sum64_hi;
+ word32_low = sum64_lo;
+
+ // Calculate the value of shifting (shift_norm) for the 64-bit sum.
+ if (word32_high != 0) {
+ shift_norm = 32 - WebRtcSpl_NormW32(word32_high);
+ int tmp1;
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "srl %[residual_energy], %[sum64_lo], %[shift_norm] \n\t"
+ "li %[tmp1], 32 \n\t"
+ "subu %[tmp1], %[tmp1], %[shift_norm] \n\t"
+ "sll %[tmp1], %[sum64_hi], %[tmp1] \n\t"
+ "or %[residual_energy], %[residual_energy], %[tmp1] \n\t"
+ ".set pop \n\t"
+ : [residual_energy] "=&r" (residual_energy), [tmp1]"=&r"(tmp1),
+ [sum64_hi] "+r" (sum64_hi), [sum64_lo] "+r" (sum64_lo)
+ : [shift_norm] "r" (shift_norm)
+ : "memory"
+ );
+ } else {
+ if ((word32_low & 0x80000000) != 0) {
+ shift_norm = 1;
+ residual_energy = (uint32_t)word32_low >> 1;
+ } else {
+ shift_norm = WebRtcSpl_NormW32(word32_low);
+ residual_energy = word32_low << shift_norm;
+ shift_norm = -shift_norm;
+ }
+ }
+
+ // Q(q_val_polynomial * 2) * Q(q_val_corr) >> shift_internal >> shift_norm
+ // = Q(q_val_corr - shift_internal - shift_norm + q_val_polynomial * 2)
+ *q_val_residual_energy =
+ q_val_corr - shift_internal - shift_norm + q_val_polynomial * 2;
+
+ return residual_energy;
+}
diff --git a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
index 0852715..aaeff2c 100644
--- a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h"
#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
#include "webrtc/typedefs.h"
diff --git a/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h b/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h
index 587bcd4..7e8121e 100644
--- a/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h
+++ b/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h
@@ -18,8 +18,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_
-#include "typedefs.h"
-
+#include "webrtc/typedefs.h"
/* indices of KLT coefficients used */
extern const uint16_t WebRtcIsacfix_kSelIndGain[12];
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
index 9c4e587..c38cbf6 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
@@ -27,10 +27,7 @@
4096, -3072, 1024
};
-
-
-static __inline int32_t Log2Q8( uint32_t x ) {
-
+int32_t WebRtcIsacfix_Log2Q8(uint32_t x) {
int32_t zeros, lg2;
int16_t frac;
@@ -69,7 +66,7 @@
r32=fx[1]-fx[2];
q32=fx[0]-fx[1];
nom32=q32+r32;
- den32=WEBRTC_SPL_MUL_32_16((q32-r32), 2);
+ den32 = (q32 - r32) * 2;
if (nom32<0)
sign1=-1;
if (den32<0)
@@ -77,7 +74,8 @@
/* t = (q32+r32)/(2*(q32-r32)) = (fx[0]-fx[1] + fx[1]-fx[2])/(2 * fx[0]-fx[1] - (fx[1]-fx[2]))*/
/* (Signs are removed because WebRtcSpl_DivResultInQ31 can't handle negative numbers) */
- t32=WebRtcSpl_DivResultInQ31(WEBRTC_SPL_MUL_32_16(nom32, sign1),WEBRTC_SPL_MUL_32_16(den32, sign2)); /* t in Q31, without signs */
+ /* t in Q31, without signs */
+ t32 = WebRtcSpl_DivResultInQ31(nom32 * sign1, den32 * sign2);
t16=(int16_t)WEBRTC_SPL_RSHIFT_W32(t32, 23); /* Q8 */
t16=t16*sign1*sign2; /* t in Q8 with signs */
@@ -153,109 +151,7 @@
-static void PCorr2Q32(const int16_t *in, int32_t *logcorQ8)
-{
- int16_t scaling,n,k;
- int32_t ysum32,csum32, lys, lcs;
- int32_t oneQ8;
-
-
- const int16_t *x, *inptr;
-
- oneQ8 = WEBRTC_SPL_LSHIFT_W32((int32_t)1, 8); // 1.00 in Q8
-
- x = in + PITCH_MAX_LAG/2 + 2;
- scaling = WebRtcSpl_GetScalingSquare ((int16_t *) in, PITCH_CORR_LEN2, PITCH_CORR_LEN2);
- ysum32 = 1;
- csum32 = 0;
- x = in + PITCH_MAX_LAG/2 + 2;
- for (n = 0; n < PITCH_CORR_LEN2; n++) {
- ysum32 += WEBRTC_SPL_MUL_16_16_RSFT( (int16_t) in[n],(int16_t) in[n], scaling); // Q0
- csum32 += WEBRTC_SPL_MUL_16_16_RSFT((int16_t) x[n],(int16_t) in[n], scaling); // Q0
- }
-
- logcorQ8 += PITCH_LAG_SPAN2 - 1;
-
- lys=Log2Q8((uint32_t) ysum32); // Q8
- lys=WEBRTC_SPL_RSHIFT_W32(lys, 1); //sqrt(ysum);
-
- if (csum32>0) {
-
- lcs=Log2Q8((uint32_t) csum32); // 2log(csum) in Q8
-
- if (lcs>(lys + oneQ8) ){ // csum/sqrt(ysum) > 2 in Q8
- *logcorQ8 = lcs - lys; // log2(csum/sqrt(ysum))
- } else {
- *logcorQ8 = oneQ8; // 1.00
- }
-
- } else {
- *logcorQ8 = 0;
- }
-
-
- for (k = 1; k < PITCH_LAG_SPAN2; k++) {
- inptr = &in[k];
- ysum32 -= WEBRTC_SPL_MUL_16_16_RSFT( (int16_t) in[k-1],(int16_t) in[k-1], scaling);
- ysum32 += WEBRTC_SPL_MUL_16_16_RSFT( (int16_t) in[PITCH_CORR_LEN2 + k - 1],(int16_t) in[PITCH_CORR_LEN2 + k - 1], scaling);
-
-#ifdef WEBRTC_ARCH_ARM_NEON
- {
- int32_t vbuff[4];
- int32x4_t int_32x4_sum = vmovq_n_s32(0);
- // Can't shift a Neon register to right with a non-constant shift value.
- int32x4_t int_32x4_scale = vdupq_n_s32(-scaling);
- // Assert a codition used in loop unrolling at compile-time.
- COMPILE_ASSERT(PITCH_CORR_LEN2 %4 == 0);
-
- for (n = 0; n < PITCH_CORR_LEN2; n += 4) {
- int16x4_t int_16x4_x = vld1_s16(&x[n]);
- int16x4_t int_16x4_in = vld1_s16(&inptr[n]);
- int32x4_t int_32x4 = vmull_s16(int_16x4_x, int_16x4_in);
- int_32x4 = vshlq_s32(int_32x4, int_32x4_scale);
- int_32x4_sum = vaddq_s32(int_32x4_sum, int_32x4);
- }
-
- // Use vector store to avoid long stall from data trasferring
- // from vector to general register.
- vst1q_s32(vbuff, int_32x4_sum);
- csum32 = vbuff[0] + vbuff[1];
- csum32 += vbuff[2];
- csum32 += vbuff[3];
- }
-#else
- csum32 = 0;
- if(scaling == 0) {
- for (n = 0; n < PITCH_CORR_LEN2; n++) {
- csum32 += x[n] * inptr[n];
- }
- } else {
- for (n = 0; n < PITCH_CORR_LEN2; n++) {
- csum32 += (x[n] * inptr[n]) >> scaling;
- }
- }
-#endif
-
- logcorQ8--;
-
- lys=Log2Q8((uint32_t)ysum32); // Q8
- lys=WEBRTC_SPL_RSHIFT_W32(lys, 1); //sqrt(ysum);
-
- if (csum32>0) {
-
- lcs=Log2Q8((uint32_t) csum32); // 2log(csum) in Q8
-
- if (lcs>(lys + oneQ8) ){ // csum/sqrt(ysum) > 2
- *logcorQ8 = lcs - lys; // log2(csum/sqrt(ysum))
- } else {
- *logcorQ8 = oneQ8; // 1.00
- }
-
- } else {
- *logcorQ8 = 0;
- }
- }
-}
+extern void WebRtcIsacfix_PCorr2Q32(const int16_t *in, int32_t *logcorQ8);
@@ -311,12 +207,13 @@
/* compute correlation for first and second half of the frame */
- PCorr2Q32(buf_dec16, crrvecQ8_1);
- PCorr2Q32(buf_dec16 + PITCH_CORR_STEP2, crrvecQ8_2);
+ WebRtcIsacfix_PCorr2Q32(buf_dec16, crrvecQ8_1);
+ WebRtcIsacfix_PCorr2Q32(buf_dec16 + PITCH_CORR_STEP2, crrvecQ8_2);
/* bias towards pitch lag of previous frame */
- tmp32a = Log2Q8((uint32_t) old_lagQ8) - 2304; // log2(0.5*oldlag) in Q8
+ tmp32a = WebRtcIsacfix_Log2Q8((uint32_t) old_lagQ8) - 2304;
+ // log2(0.5*oldlag) in Q8
tmp32b = WEBRTC_SPL_MUL_16_16_RSFT(oldgQ12,oldgQ12, 10); //Q12 & * 4.0;
gain_bias16 = (int16_t) tmp32b; //Q12
if (gain_bias16 > 3276) gain_bias16 = 3276; // 0.8 in Q12
@@ -325,7 +222,7 @@
for (k = 0; k < PITCH_LAG_SPAN2; k++)
{
if (crrvecQ8_1[k]>0) {
- tmp32b = Log2Q8((uint32_t) (k + (PITCH_MIN_LAG/2-2)));
+ tmp32b = WebRtcIsacfix_Log2Q8((uint32_t) (k + (PITCH_MIN_LAG/2-2)));
tmp16a = (int16_t) (tmp32b - tmp32a); // Q8 & fabs(ratio)<4
tmp32c = WEBRTC_SPL_MUL_16_16_RSFT(tmp16a,tmp16a, 6); //Q10
tmp16b = (int16_t) tmp32c; // Q10 & <8
@@ -334,7 +231,8 @@
tmp16d = Exp2Q10((int16_t) -tmp16c); //Q10
tmp32c = WEBRTC_SPL_MUL_16_16_RSFT(gain_bias16,tmp16d,13); // Q10 & * 0.5
bias16 = (int16_t) (1024 + tmp32c); // Q10
- tmp32b = Log2Q8((uint32_t) bias16) - 2560; // Q10 in -> Q8 out with 10*2^8 offset
+ tmp32b = WebRtcIsacfix_Log2Q8((uint32_t)bias16) - 2560;
+ // Q10 in -> Q8 out with 10*2^8 offset
crrvecQ8_1[k] += tmp32b ; // -10*2^8 offset
}
}
@@ -407,7 +305,7 @@
xq[0] = WEBRTC_SPL_LSHIFT_W32(xq[0], 8);
Intrp1DQ8(xq, fxq, yq, fyq);
- tmp32a= Log2Q8((uint32_t) *yq) - 2048; // offset 8*2^8
+ tmp32a= WebRtcIsacfix_Log2Q8((uint32_t) *yq) - 2048; // offset 8*2^8
/* Bias towards short lags */
/* log(pow(0.8, log(2.0 * *y )))/log(2.0) */
tmp32b= WEBRTC_SPL_MUL_16_16_RSFT((int16_t) tmp32a, -42, 8);
@@ -437,10 +335,13 @@
tmp32b = (int32_t) (WEBRTC_SPL_LSHIFT_W32(tmp32a, 1)) - ratq; // Q8
tmp32c = WEBRTC_SPL_MUL_16_16_RSFT((int16_t) tmp32b, (int16_t) tmp32b, 8); // Q8
- tmp32b = (int32_t) tmp32c + (int32_t) WEBRTC_SPL_RSHIFT_W32(ratq, 1); // (k-r)^2 + 0.5 * r Q8
- tmp32c = Log2Q8((uint32_t) tmp32a) - 2048; // offset 8*2^8 , log2(0.5*k) Q8
- tmp32d = Log2Q8((uint32_t) tmp32b) - 2048; // offset 8*2^8 , log2(0.5*k) Q8
- tmp32e = tmp32c -tmp32d;
+ tmp32b = (int32_t)tmp32c + (int32_t)WEBRTC_SPL_RSHIFT_W32(ratq, 1);
+ // (k-r)^2 + 0.5 * r Q8
+ tmp32c = WebRtcIsacfix_Log2Q8((uint32_t)tmp32a) - 2048;
+ // offset 8*2^8 , log2(0.5*k) Q8
+ tmp32d = WebRtcIsacfix_Log2Q8((uint32_t)tmp32b) - 2048;
+ // offset 8*2^8 , log2(0.5*k) Q8
+ tmp32e = tmp32c - tmp32d;
cv2q[k] += WEBRTC_SPL_RSHIFT_W32(tmp32e, 1);
@@ -481,7 +382,7 @@
/* Bias towards short lags */
/* log(pow(0.8, log(2.0f * *y )))/log(2.0f) */
- tmp32a= Log2Q8((uint32_t) *yq) - 2048; // offset 8*2^8
+ tmp32a= WebRtcIsacfix_Log2Q8((uint32_t) *yq) - 2048; // offset 8*2^8
tmp32b= WEBRTC_SPL_MUL_16_16_RSFT((int16_t) tmp32a, -82, 8);
tmp32c= tmp32b + 256;
*fyq += tmp32c;
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h
index 93c81c8..da401e5 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h
@@ -58,4 +58,8 @@
int16_t N, /* number of input samples */
int16_t *out); /* array of size N/2 */
+int32_t WebRtcIsacfix_Log2Q8( uint32_t x );
+
+void WebRtcIsacfix_PCorr2Q32(const int16_t* in, int32_t* logcorQ8);
+
#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_ */
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c
new file mode 100644
index 0000000..82155d2
--- /dev/null
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
+
+#ifdef WEBRTC_ARCH_ARM_NEON
+#include <arm_neon.h>
+#endif
+
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/system_wrappers/interface/compile_assert_c.h"
+
+extern int32_t WebRtcIsacfix_Log2Q8(uint32_t x);
+
+void WebRtcIsacfix_PCorr2Q32(const int16_t* in, int32_t* logcorQ8) {
+ int16_t scaling,n,k;
+ int32_t ysum32,csum32, lys, lcs;
+ int32_t oneQ8;
+ const int16_t* x;
+ const int16_t* inptr;
+
+ oneQ8 = WEBRTC_SPL_LSHIFT_W32((int32_t)1, 8); // 1.00 in Q8
+
+ x = in + PITCH_MAX_LAG / 2 + 2;
+ scaling = WebRtcSpl_GetScalingSquare((int16_t*)in,
+ PITCH_CORR_LEN2,
+ PITCH_CORR_LEN2);
+ ysum32 = 1;
+ csum32 = 0;
+ x = in + PITCH_MAX_LAG / 2 + 2;
+ for (n = 0; n < PITCH_CORR_LEN2; n++) {
+ ysum32 += WEBRTC_SPL_MUL_16_16_RSFT((int16_t)in[n],
+ (int16_t)in[n],
+ scaling); // Q0
+ csum32 += WEBRTC_SPL_MUL_16_16_RSFT((int16_t)x[n],
+ (int16_t)in[n],
+ scaling); // Q0
+ }
+ logcorQ8 += PITCH_LAG_SPAN2 - 1;
+ lys = WebRtcIsacfix_Log2Q8((uint32_t)ysum32); // Q8
+ lys = WEBRTC_SPL_RSHIFT_W32(lys, 1); //sqrt(ysum);
+ if (csum32 > 0) {
+ lcs = WebRtcIsacfix_Log2Q8((uint32_t)csum32); // 2log(csum) in Q8
+ if (lcs > (lys + oneQ8)) { // csum/sqrt(ysum) > 2 in Q8
+ *logcorQ8 = lcs - lys; // log2(csum/sqrt(ysum))
+ } else {
+ *logcorQ8 = oneQ8; // 1.00
+ }
+ } else {
+ *logcorQ8 = 0;
+ }
+
+
+ for (k = 1; k < PITCH_LAG_SPAN2; k++) {
+ inptr = &in[k];
+ ysum32 -= WEBRTC_SPL_MUL_16_16_RSFT((int16_t)in[k - 1],
+ (int16_t)in[k - 1],
+ scaling);
+ ysum32 += WEBRTC_SPL_MUL_16_16_RSFT((int16_t)in[PITCH_CORR_LEN2 + k - 1],
+ (int16_t)in[PITCH_CORR_LEN2 + k - 1],
+ scaling);
+#ifdef WEBRTC_ARCH_ARM_NEON
+ {
+ int32_t vbuff[4];
+ int32x4_t int_32x4_sum = vmovq_n_s32(0);
+ // Can't shift a Neon register to right with a non-constant shift value.
+ int32x4_t int_32x4_scale = vdupq_n_s32(-scaling);
+ // Assert a codition used in loop unrolling at compile-time.
+ COMPILE_ASSERT(PITCH_CORR_LEN2 %4 == 0);
+
+ for (n = 0; n < PITCH_CORR_LEN2; n += 4) {
+ int16x4_t int_16x4_x = vld1_s16(&x[n]);
+ int16x4_t int_16x4_in = vld1_s16(&inptr[n]);
+ int32x4_t int_32x4 = vmull_s16(int_16x4_x, int_16x4_in);
+ int_32x4 = vshlq_s32(int_32x4, int_32x4_scale);
+ int_32x4_sum = vaddq_s32(int_32x4_sum, int_32x4);
+ }
+
+ // Use vector store to avoid long stall from data trasferring
+ // from vector to general register.
+ vst1q_s32(vbuff, int_32x4_sum);
+ csum32 = vbuff[0] + vbuff[1];
+ csum32 += vbuff[2];
+ csum32 += vbuff[3];
+ }
+#else
+ csum32 = 0;
+ if(scaling == 0) {
+ for (n = 0; n < PITCH_CORR_LEN2; n++) {
+ csum32 += x[n] * inptr[n];
+ }
+ } else {
+ for (n = 0; n < PITCH_CORR_LEN2; n++) {
+ csum32 += (x[n] * inptr[n]) >> scaling;
+ }
+ }
+#endif
+
+ logcorQ8--;
+
+ lys = WebRtcIsacfix_Log2Q8((uint32_t)ysum32); // Q8
+ lys = WEBRTC_SPL_RSHIFT_W32(lys, 1); //sqrt(ysum);
+
+ if (csum32 > 0) {
+ lcs = WebRtcIsacfix_Log2Q8((uint32_t)csum32); // 2log(csum) in Q8
+ if (lcs > (lys + oneQ8)) { // csum/sqrt(ysum) > 2
+ *logcorQ8 = lcs - lys; // log2(csum/sqrt(ysum))
+ } else {
+ *logcorQ8 = oneQ8; // 1.00
+ }
+ } else {
+ *logcorQ8 = 0;
+ }
+ }
+}
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_mips.c b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_mips.c
new file mode 100644
index 0000000..fa426e9
--- /dev/null
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_mips.c
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/system_wrappers/interface/compile_assert_c.h"
+
+extern int32_t WebRtcIsacfix_Log2Q8(uint32_t x);
+
+void WebRtcIsacfix_PCorr2Q32(const int16_t* in, int32_t* logcorQ8) {
+ int16_t scaling,n,k;
+ int32_t ysum32,csum32, lys, lcs;
+ int32_t oneQ8;
+ const int16_t* x;
+ const int16_t* inptr;
+
+ oneQ8 = WEBRTC_SPL_LSHIFT_W32((int32_t)1, 8); // 1.00 in Q8
+ x = in + PITCH_MAX_LAG / 2 + 2;
+ scaling = WebRtcSpl_GetScalingSquare((int16_t*)in,
+ PITCH_CORR_LEN2,
+ PITCH_CORR_LEN2);
+ ysum32 = 1;
+ csum32 = 0;
+ x = in + PITCH_MAX_LAG / 2 + 2;
+ {
+ const int16_t* tmp_x = x;
+ const int16_t* tmp_in = in;
+ int32_t tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
+ n = PITCH_CORR_LEN2;
+ COMPILE_ASSERT(PITCH_CORR_LEN2 % 4 == 0);
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "1: \n\t"
+ "lh %[tmp1], 0(%[tmp_in]) \n\t"
+ "lh %[tmp2], 2(%[tmp_in]) \n\t"
+ "lh %[tmp3], 4(%[tmp_in]) \n\t"
+ "lh %[tmp4], 6(%[tmp_in]) \n\t"
+ "lh %[tmp5], 0(%[tmp_x]) \n\t"
+ "lh %[tmp6], 2(%[tmp_x]) \n\t"
+ "lh %[tmp7], 4(%[tmp_x]) \n\t"
+ "lh %[tmp8], 6(%[tmp_x]) \n\t"
+ "mul %[tmp5], %[tmp1], %[tmp5] \n\t"
+ "mul %[tmp1], %[tmp1], %[tmp1] \n\t"
+ "mul %[tmp6], %[tmp2], %[tmp6] \n\t"
+ "mul %[tmp2], %[tmp2], %[tmp2] \n\t"
+ "mul %[tmp7], %[tmp3], %[tmp7] \n\t"
+ "mul %[tmp3], %[tmp3], %[tmp3] \n\t"
+ "mul %[tmp8], %[tmp4], %[tmp8] \n\t"
+ "mul %[tmp4], %[tmp4], %[tmp4] \n\t"
+ "addiu %[n], %[n], -4 \n\t"
+ "srav %[tmp5], %[tmp5], %[scaling] \n\t"
+ "srav %[tmp1], %[tmp1], %[scaling] \n\t"
+ "srav %[tmp6], %[tmp6], %[scaling] \n\t"
+ "srav %[tmp2], %[tmp2], %[scaling] \n\t"
+ "srav %[tmp7], %[tmp7], %[scaling] \n\t"
+ "srav %[tmp3], %[tmp3], %[scaling] \n\t"
+ "srav %[tmp8], %[tmp8], %[scaling] \n\t"
+ "srav %[tmp4], %[tmp4], %[scaling] \n\t"
+ "addu %[ysum32], %[ysum32], %[tmp1] \n\t"
+ "addu %[csum32], %[csum32], %[tmp5] \n\t"
+ "addu %[ysum32], %[ysum32], %[tmp2] \n\t"
+ "addu %[csum32], %[csum32], %[tmp6] \n\t"
+ "addu %[ysum32], %[ysum32], %[tmp3] \n\t"
+ "addu %[csum32], %[csum32], %[tmp7] \n\t"
+ "addu %[ysum32], %[ysum32], %[tmp4] \n\t"
+ "addu %[csum32], %[csum32], %[tmp8] \n\t"
+ "addiu %[tmp_in], %[tmp_in], 8 \n\t"
+ "bgtz %[n], 1b \n\t"
+ " addiu %[tmp_x], %[tmp_x], 8 \n\t"
+ ".set pop \n\t"
+ : [tmp1] "=&r" (tmp1), [tmp2] "=&r" (tmp2), [tmp3] "=&r" (tmp3),
+ [tmp4] "=&r" (tmp4), [tmp5] "=&r" (tmp5), [tmp6] "=&r" (tmp6),
+ [tmp7] "=&r" (tmp7), [tmp8] "=&r" (tmp8), [tmp_in] "+r" (tmp_in),
+ [ysum32] "+r" (ysum32), [tmp_x] "+r" (tmp_x), [csum32] "+r" (csum32),
+ [n] "+r" (n)
+ : [scaling] "r" (scaling)
+ : "memory", "hi", "lo"
+ );
+ }
+ logcorQ8 += PITCH_LAG_SPAN2 - 1;
+ lys = WebRtcIsacfix_Log2Q8((uint32_t)ysum32); // Q8
+ lys = WEBRTC_SPL_RSHIFT_W32(lys, 1); //sqrt(ysum);
+ if (csum32 > 0) {
+ lcs = WebRtcIsacfix_Log2Q8((uint32_t)csum32); // 2log(csum) in Q8
+ if (lcs > (lys + oneQ8)) { // csum/sqrt(ysum) > 2 in Q8
+ *logcorQ8 = lcs - lys; // log2(csum/sqrt(ysum))
+ } else {
+ *logcorQ8 = oneQ8; // 1.00
+ }
+ } else {
+ *logcorQ8 = 0;
+ }
+
+ for (k = 1; k < PITCH_LAG_SPAN2; k++) {
+ inptr = &in[k];
+ const int16_t* tmp_in1 = &in[k - 1];
+ const int16_t* tmp_in2 = &in[PITCH_CORR_LEN2 + k - 1];
+ const int16_t* tmp_x = x;
+ int32_t tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
+ n = PITCH_CORR_LEN2;
+ csum32 = 0;
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "lh %[tmp1], 0(%[tmp_in1]) \n\t"
+ "lh %[tmp2], 0(%[tmp_in2]) \n\t"
+ "mul %[tmp1], %[tmp1], %[tmp1] \n\t"
+ "mul %[tmp2], %[tmp2], %[tmp2] \n\t"
+ "srav %[tmp1], %[tmp1], %[scaling] \n\t"
+ "srav %[tmp2], %[tmp2], %[scaling] \n\t"
+ "subu %[ysum32], %[ysum32], %[tmp1] \n\t"
+ "bnez %[scaling], 2f \n\t"
+ " addu %[ysum32], %[ysum32], %[tmp2] \n\t"
+ "1: \n\t"
+ "lh %[tmp1], 0(%[inptr]) \n\t"
+ "lh %[tmp2], 0(%[tmp_x]) \n\t"
+ "lh %[tmp3], 2(%[inptr]) \n\t"
+ "lh %[tmp4], 2(%[tmp_x]) \n\t"
+ "lh %[tmp5], 4(%[inptr]) \n\t"
+ "lh %[tmp6], 4(%[tmp_x]) \n\t"
+ "lh %[tmp7], 6(%[inptr]) \n\t"
+ "lh %[tmp8], 6(%[tmp_x]) \n\t"
+ "mul %[tmp1], %[tmp1], %[tmp2] \n\t"
+ "mul %[tmp2], %[tmp3], %[tmp4] \n\t"
+ "mul %[tmp3], %[tmp5], %[tmp6] \n\t"
+ "mul %[tmp4], %[tmp7], %[tmp8] \n\t"
+ "addiu %[n], %[n], -4 \n\t"
+ "addiu %[inptr], %[inptr], 8 \n\t"
+ "addiu %[tmp_x], %[tmp_x], 8 \n\t"
+ "addu %[csum32], %[csum32], %[tmp1] \n\t"
+ "addu %[csum32], %[csum32], %[tmp2] \n\t"
+ "addu %[csum32], %[csum32], %[tmp3] \n\t"
+ "bgtz %[n], 1b \n\t"
+ " addu %[csum32], %[csum32], %[tmp4] \n\t"
+ "b 3f \n\t"
+ " nop \n\t"
+ "2: \n\t"
+ "lh %[tmp1], 0(%[inptr]) \n\t"
+ "lh %[tmp2], 0(%[tmp_x]) \n\t"
+ "lh %[tmp3], 2(%[inptr]) \n\t"
+ "lh %[tmp4], 2(%[tmp_x]) \n\t"
+ "lh %[tmp5], 4(%[inptr]) \n\t"
+ "lh %[tmp6], 4(%[tmp_x]) \n\t"
+ "lh %[tmp7], 6(%[inptr]) \n\t"
+ "lh %[tmp8], 6(%[tmp_x]) \n\t"
+ "mul %[tmp1], %[tmp1], %[tmp2] \n\t"
+ "mul %[tmp2], %[tmp3], %[tmp4] \n\t"
+ "mul %[tmp3], %[tmp5], %[tmp6] \n\t"
+ "mul %[tmp4], %[tmp7], %[tmp8] \n\t"
+ "addiu %[n], %[n], -4 \n\t"
+ "addiu %[inptr], %[inptr], 8 \n\t"
+ "addiu %[tmp_x], %[tmp_x], 8 \n\t"
+ "srav %[tmp1], %[tmp1], %[scaling] \n\t"
+ "srav %[tmp2], %[tmp2], %[scaling] \n\t"
+ "srav %[tmp3], %[tmp3], %[scaling] \n\t"
+ "srav %[tmp4], %[tmp4], %[scaling] \n\t"
+ "addu %[csum32], %[csum32], %[tmp1] \n\t"
+ "addu %[csum32], %[csum32], %[tmp2] \n\t"
+ "addu %[csum32], %[csum32], %[tmp3] \n\t"
+ "bgtz %[n], 2b \n\t"
+ " addu %[csum32], %[csum32], %[tmp4] \n\t"
+ "3: \n\t"
+ ".set pop \n\t"
+ : [tmp1] "=&r" (tmp1), [tmp2] "=&r" (tmp2), [tmp3] "=&r" (tmp3),
+ [tmp4] "=&r" (tmp4), [tmp5] "=&r" (tmp5), [tmp6] "=&r" (tmp6),
+ [tmp7] "=&r" (tmp7), [tmp8] "=&r" (tmp8), [inptr] "+r" (inptr),
+ [csum32] "+r" (csum32), [tmp_x] "+r" (tmp_x), [ysum32] "+r" (ysum32),
+ [n] "+r" (n)
+ : [tmp_in1] "r" (tmp_in1), [tmp_in2] "r" (tmp_in2),
+ [scaling] "r" (scaling)
+ : "memory", "hi", "lo"
+ );
+
+ logcorQ8--;
+ lys = WebRtcIsacfix_Log2Q8((uint32_t)ysum32); // Q8
+ lys = WEBRTC_SPL_RSHIFT_W32(lys, 1); //sqrt(ysum);
+ if (csum32 > 0) {
+ lcs = WebRtcIsacfix_Log2Q8((uint32_t)csum32); // 2log(csum) in Q8
+ if (lcs > (lys + oneQ8)) { // csum/sqrt(ysum) > 2
+ *logcorQ8 = lcs - lys; // log2(csum/sqrt(ysum))
+ } else {
+ *logcorQ8 = oneQ8; // 1.00
+ }
+ } else {
+ *logcorQ8 = 0;
+ }
+ }
+}
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c b/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c
index d3c90b3..5b1b3f1 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "common_audio/signal_processing/include/signal_processing_library.h"
-#include "modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
/* Filter coefficicients in Q15. */
static const int16_t kDampFilter[PITCH_DAMPORDER] = {
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h b/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h
index c4e0be5..4aab2b6 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h
@@ -18,8 +18,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_GAIN_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_GAIN_TABLES_H_
-#include "typedefs.h"
-
+#include "webrtc/typedefs.h"
/********************* Pitch Filter Gain Coefficient Tables ************************/
/* cdf for quantized pitch filter gains */
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h b/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h
index bb8b39a..a5478b2 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h
@@ -18,9 +18,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_LAG_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_LAG_TABLES_H_
-
-#include "typedefs.h"
-
+#include "webrtc/typedefs.h"
/********************* Pitch Filter Lag Coefficient Tables ************************/
diff --git a/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h b/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h
index 115509a..5583206 100644
--- a/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h
+++ b/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h
@@ -19,9 +19,8 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_
-#include "typedefs.h"
#include "settings.h"
-
+#include "webrtc/typedefs.h"
/********************* AR Coefficient Tables ************************/
/* cdf for quantized reflection coefficient 1 */
diff --git a/modules/audio_coding/codecs/isac/fix/source/structs.h b/modules/audio_coding/codecs/isac/fix/source/structs.h
index bd20ba0..1777efd 100644
--- a/modules/audio_coding/codecs/isac/fix/source/structs.h
+++ b/modules/audio_coding/codecs/isac/fix/source/structs.h
@@ -19,9 +19,9 @@
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_STRUCTS_H_
-#include "common_audio/signal_processing/include/signal_processing_library.h"
-#include "modules/audio_coding/codecs/isac/fix/source/settings.h"
-#include "typedefs.h"
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
+#include "webrtc/typedefs.h"
/* Bitstream struct for decoder */
typedef struct Bitstreamstruct_dec {
diff --git a/modules/audio_coding/codecs/isac/fix/source/transform.c b/modules/audio_coding/codecs/isac/fix/source/transform.c
index 67e513c..24ccc82 100644
--- a/modules/audio_coding/codecs/isac/fix/source/transform.c
+++ b/modules/audio_coding/codecs/isac/fix/source/transform.c
@@ -19,89 +19,13 @@
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
-#if (defined WEBRTC_DETECT_ARM_NEON || defined WEBRTC_ARCH_ARM_NEON)
-/* Tables are defined in ARM assembly files. */
+/* Tables are defined in transform_tables.c file or ARM assembly files. */
/* Cosine table 1 in Q14 */
extern const int16_t WebRtcIsacfix_kCosTab1[FRAMESAMPLES/2];
/* Sine table 1 in Q14 */
extern const int16_t WebRtcIsacfix_kSinTab1[FRAMESAMPLES/2];
/* Sine table 2 in Q14 */
extern const int16_t WebRtcIsacfix_kSinTab2[FRAMESAMPLES/4];
-#else
-/* Cosine table 1 in Q14 */
-static const int16_t WebRtcIsacfix_kCosTab1[FRAMESAMPLES/2] = {
- 16384, 16383, 16378, 16371, 16362, 16349, 16333, 16315, 16294, 16270,
- 16244, 16214, 16182, 16147, 16110, 16069, 16026, 15980, 15931, 15880,
- 15826, 15769, 15709, 15647, 15582, 15515, 15444, 15371, 15296, 15218,
- 15137, 15053, 14968, 14879, 14788, 14694, 14598, 14500, 14399, 14295,
- 14189, 14081, 13970, 13856, 13741, 13623, 13502, 13380, 13255, 13128,
- 12998, 12867, 12733, 12597, 12458, 12318, 12176, 12031, 11885, 11736,
- 11585, 11433, 11278, 11121, 10963, 10803, 10641, 10477, 10311, 10143,
- 9974, 9803, 9630, 9456, 9280, 9102, 8923, 8743, 8561, 8377,
- 8192, 8006, 7818, 7629, 7438, 7246, 7053, 6859, 6664, 6467,
- 6270, 6071, 5872, 5671, 5469, 5266, 5063, 4859, 4653, 4447,
- 4240, 4033, 3825, 3616, 3406, 3196, 2986, 2775, 2563, 2351,
- 2139, 1926, 1713, 1499, 1285, 1072, 857, 643, 429, 214,
- 0, -214, -429, -643, -857, -1072, -1285, -1499, -1713, -1926,
- -2139, -2351, -2563, -2775, -2986, -3196, -3406, -3616, -3825, -4033,
- -4240, -4447, -4653, -4859, -5063, -5266, -5469, -5671, -5872, -6071,
- -6270, -6467, -6664, -6859, -7053, -7246, -7438, -7629, -7818, -8006,
- -8192, -8377, -8561, -8743, -8923, -9102, -9280, -9456, -9630, -9803,
- -9974, -10143, -10311, -10477, -10641, -10803, -10963, -11121, -11278, -11433,
- -11585, -11736, -11885, -12031, -12176, -12318, -12458, -12597, -12733,
- -12867, -12998, -13128, -13255, -13380, -13502, -13623, -13741, -13856,
- -13970, -14081, -14189, -14295, -14399, -14500, -14598, -14694, -14788,
- -14879, -14968, -15053, -15137, -15218, -15296, -15371, -15444, -15515,
- -15582, -15647, -15709, -15769, -15826, -15880, -15931, -15980, -16026,
- -16069, -16110, -16147, -16182, -16214, -16244, -16270, -16294, -16315,
- -16333, -16349, -16362, -16371, -16378, -16383
-};
-
-/* Sine table 1 in Q14 */
-static const int16_t WebRtcIsacfix_kSinTab1[FRAMESAMPLES/2] = {
- 0, 214, 429, 643, 857, 1072, 1285, 1499, 1713, 1926,
- 2139, 2351, 2563, 2775, 2986, 3196, 3406, 3616, 3825, 4033,
- 4240, 4447, 4653, 4859, 5063, 5266, 5469, 5671, 5872, 6071,
- 6270, 6467, 6664, 6859, 7053, 7246, 7438, 7629, 7818, 8006,
- 8192, 8377, 8561, 8743, 8923, 9102, 9280, 9456, 9630, 9803,
- 9974, 10143, 10311, 10477, 10641, 10803, 10963, 11121, 11278, 11433,
- 11585, 11736, 11885, 12031, 12176, 12318, 12458, 12597, 12733, 12867,
- 12998, 13128, 13255, 13380, 13502, 13623, 13741, 13856, 13970, 14081,
- 14189, 14295, 14399, 14500, 14598, 14694, 14788, 14879, 14968, 15053,
- 15137, 15218, 15296, 15371, 15444, 15515, 15582, 15647, 15709, 15769,
- 15826, 15880, 15931, 15980, 16026, 16069, 16110, 16147, 16182, 16214,
- 16244, 16270, 16294, 16315, 16333, 16349, 16362, 16371, 16378, 16383,
- 16384, 16383, 16378, 16371, 16362, 16349, 16333, 16315, 16294, 16270,
- 16244, 16214, 16182, 16147, 16110, 16069, 16026, 15980, 15931, 15880,
- 15826, 15769, 15709, 15647, 15582, 15515, 15444, 15371, 15296, 15218,
- 15137, 15053, 14968, 14879, 14788, 14694, 14598, 14500, 14399, 14295,
- 14189, 14081, 13970, 13856, 13741, 13623, 13502, 13380, 13255, 13128,
- 12998, 12867, 12733, 12597, 12458, 12318, 12176, 12031, 11885, 11736,
- 11585, 11433, 11278, 11121, 10963, 10803, 10641, 10477, 10311, 10143,
- 9974, 9803, 9630, 9456, 9280, 9102, 8923, 8743, 8561, 8377,
- 8192, 8006, 7818, 7629, 7438, 7246, 7053, 6859, 6664, 6467,
- 6270, 6071, 5872, 5671, 5469, 5266, 5063, 4859, 4653, 4447,
- 4240, 4033, 3825, 3616, 3406, 3196, 2986, 2775, 2563, 2351,
- 2139, 1926, 1713, 1499, 1285, 1072, 857, 643, 429, 214
-};
-
-
-/* Sine table 2 in Q14 */
-static const int16_t WebRtcIsacfix_kSinTab2[FRAMESAMPLES/4] = {
- 16384, -16381, 16375, -16367, 16356, -16342, 16325, -16305, 16283, -16257,
- 16229, -16199, 16165, -16129, 16090, -16048, 16003, -15956, 15906, -15853,
- 15798, -15739, 15679, -15615, 15549, -15480, 15408, -15334, 15257, -15178,
- 15095, -15011, 14924, -14834, 14741, -14647, 14549, -14449, 14347, -14242,
- 14135, -14025, 13913, -13799, 13682, -13563, 13441, -13318, 13192, -13063,
- 12933, -12800, 12665, -12528, 12389, -12247, 12104, -11958, 11810, -11661,
- 11509, -11356, 11200, -11042, 10883, -10722, 10559, -10394, 10227, -10059,
- 9889, -9717, 9543, -9368, 9191, -9013, 8833, -8652, 8469, -8285,
- 8099, -7912, 7723, -7534, 7342, -7150, 6957, -6762, 6566, -6369,
- 6171, -5971, 5771, -5570, 5368, -5165, 4961, -4756, 4550, -4344,
- 4137, -3929, 3720, -3511, 3301, -3091, 2880, -2669, 2457, -2245,
- 2032, -1819, 1606, -1392, 1179, -965, 750, -536, 322, -107
-};
-#endif // WEBRTC_DETECT_ARM_NEON || WEBRTC_ARCH_ARM_NEON
void WebRtcIsacfix_Time2SpecC(int16_t *inre1Q9,
int16_t *inre2Q9,
diff --git a/modules/audio_coding/codecs/isac/fix/source/transform_mips.c b/modules/audio_coding/codecs/isac/fix/source/transform_mips.c
new file mode 100644
index 0000000..bf95ee5
--- /dev/null
+++ b/modules/audio_coding/codecs/isac/fix/source/transform_mips.c
@@ -0,0 +1,1287 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
+
+// The tables are defined in transform_tables.c file.
+extern const int16_t WebRtcIsacfix_kCosTab1[FRAMESAMPLES/2];
+extern const int16_t WebRtcIsacfix_kSinTab1[FRAMESAMPLES/2];
+extern const int16_t WebRtcIsacfix_kCosTab2[FRAMESAMPLES/4];
+extern const int16_t WebRtcIsacfix_kSinTab2[FRAMESAMPLES/4];
+
+// MIPS DSPr2 version of the WebRtcIsacfix_Time2Spec function
+// is not bit-exact with the C version.
+// The accuracy of the MIPS DSPr2 version is same or better.
+void WebRtcIsacfix_Time2SpecMIPS(int16_t* inre1Q9,
+ int16_t* inre2Q9,
+ int16_t* outreQ7,
+ int16_t* outimQ7) {
+ int k = FRAMESAMPLES / 2;
+ int32_t tmpreQ16[FRAMESAMPLES / 2], tmpimQ16[FRAMESAMPLES / 2];
+ int32_t r0, r1, r2, r3, r4, r5, r6, r7, r8, r9;
+ int32_t inre1, inre2, tmpre, tmpim, factor, max, max1;
+ int16_t* cosptr;
+ int16_t* sinptr;
+
+ cosptr = (int16_t*)WebRtcIsacfix_kCosTab1;
+ sinptr = (int16_t*)WebRtcIsacfix_kSinTab1;
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[inre1], %[inre1Q9], 0 \n\t"
+ "addiu %[inre2], %[inre2Q9], 0 \n\t"
+ "addiu %[tmpre], %[tmpreQ16], 0 \n\t"
+ "addiu %[tmpim], %[tmpimQ16], 0 \n\t"
+ "addiu %[factor], $zero, 16921 \n\t"
+ "mul %[max], $zero, $zero \n\t"
+ // Multiply with complex exponentials and combine into one complex vector.
+ // Also, calculate the maximal absolute value in the same loop.
+ "1: \n\t"
+#if defined(MIPS_DSP_R2_LE)
+ "lwl %[r0], 0(%[inre1]) \n\t"
+ "lwl %[r2], 0(%[cosptr]) \n\t"
+ "lwl %[r3], 0(%[sinptr]) \n\t"
+ "lwl %[r1], 0(%[inre2]) \n\t"
+ "lwr %[r0], 0(%[inre1]) \n\t"
+ "lwr %[r2], 0(%[cosptr]) \n\t"
+ "lwr %[r3], 0(%[sinptr]) \n\t"
+ "lwr %[r1], 0(%[inre2]) \n\t"
+ "muleq_s.w.phr %[r4], %[r2], %[r0] \n\t"
+ "muleq_s.w.phr %[r5], %[r3], %[r0] \n\t"
+ "muleq_s.w.phr %[r6], %[r3], %[r1] \n\t"
+ "muleq_s.w.phr %[r7], %[r2], %[r1] \n\t"
+ "muleq_s.w.phl %[r8], %[r2], %[r0] \n\t"
+ "muleq_s.w.phl %[r0], %[r3], %[r0] \n\t"
+ "muleq_s.w.phl %[r3], %[r3], %[r1] \n\t"
+ "muleq_s.w.phl %[r1], %[r2], %[r1] \n\t"
+ "addiu %[k], %[k], -2 \n\t"
+ "addu %[r4], %[r4], %[r6] \n\t"
+ "subu %[r5], %[r7], %[r5] \n\t"
+ "sra %[r4], %[r4], 8 \n\t"
+ "sra %[r5], %[r5], 8 \n\t"
+ "mult $ac0, %[factor], %[r4] \n\t"
+ "mult $ac1, %[factor], %[r5] \n\t"
+ "addu %[r3], %[r8], %[r3] \n\t"
+ "subu %[r0], %[r1], %[r0] \n\t"
+ "sra %[r3], %[r3], 8 \n\t"
+ "sra %[r0], %[r0], 8 \n\t"
+ "mult $ac2, %[factor], %[r3] \n\t"
+ "mult $ac3, %[factor], %[r0] \n\t"
+ "extr_r.w %[r4], $ac0, 16 \n\t"
+ "extr_r.w %[r5], $ac1, 16 \n\t"
+ "addiu %[inre1], %[inre1], 4 \n\t"
+ "addiu %[inre2], %[inre2], 4 \n\t"
+ "extr_r.w %[r6], $ac2, 16 \n\t"
+ "extr_r.w %[r7], $ac3, 16 \n\t"
+ "addiu %[cosptr], %[cosptr], 4 \n\t"
+ "addiu %[sinptr], %[sinptr], 4 \n\t"
+ "shra_r.w %[r4], %[r4], 3 \n\t"
+ "shra_r.w %[r5], %[r5], 3 \n\t"
+ "sw %[r4], 0(%[tmpre]) \n\t"
+ "absq_s.w %[r4], %[r4] \n\t"
+ "sw %[r5], 0(%[tmpim]) \n\t"
+ "absq_s.w %[r5], %[r5] \n\t"
+ "shra_r.w %[r6], %[r6], 3 \n\t"
+ "shra_r.w %[r7], %[r7], 3 \n\t"
+ "sw %[r6], 4(%[tmpre]) \n\t"
+ "absq_s.w %[r6], %[r6] \n\t"
+ "sw %[r7], 4(%[tmpim]) \n\t"
+ "absq_s.w %[r7], %[r7] \n\t"
+ "slt %[r0], %[r4], %[r5] \n\t"
+ "movn %[r4], %[r5], %[r0] \n\t"
+ "slt %[r1], %[r6], %[r7] \n\t"
+ "movn %[r6], %[r7], %[r1] \n\t"
+ "slt %[r0], %[max], %[r4] \n\t"
+ "movn %[max], %[r4], %[r0] \n\t"
+ "slt %[r1], %[max], %[r6] \n\t"
+ "movn %[max], %[r6], %[r1] \n\t"
+ "addiu %[tmpre], %[tmpre], 8 \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[tmpim], %[tmpim], 8 \n\t"
+#else // #if defined(MIPS_DSP_R2_LE)
+ "lh %[r0], 0(%[inre1]) \n\t"
+ "lh %[r1], 0(%[inre2]) \n\t"
+ "lh %[r2], 0(%[cosptr]) \n\t"
+ "lh %[r3], 0(%[sinptr]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "mul %[r4], %[r0], %[r2] \n\t"
+ "mul %[r5], %[r1], %[r3] \n\t"
+ "mul %[r0], %[r0], %[r3] \n\t"
+ "mul %[r2], %[r1], %[r2] \n\t"
+ "addiu %[inre1], %[inre1], 2 \n\t"
+ "addiu %[inre2], %[inre2], 2 \n\t"
+ "addiu %[cosptr], %[cosptr], 2 \n\t"
+ "addiu %[sinptr], %[sinptr], 2 \n\t"
+ "addu %[r1], %[r4], %[r5] \n\t"
+ "sra %[r1], %[r1], 7 \n\t"
+ "sra %[r3], %[r1], 16 \n\t"
+ "andi %[r1], %[r1], 0xFFFF \n\t"
+ "sra %[r1], %[r1], 1 \n\t"
+ "mul %[r1], %[factor], %[r1] \n\t"
+ "mul %[r3], %[factor], %[r3] \n\t"
+ "subu %[r0], %[r2], %[r0] \n\t"
+ "sra %[r0], %[r0], 7 \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "sra %[r0], %[r0], 1 \n\t"
+ "mul %[r0], %[factor], %[r0] \n\t"
+ "mul %[r2], %[factor], %[r2] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r1], %[r1], 15 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r1], %[r1], 0x4000 \n\t"
+ "sra %[r1], %[r1], 15 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r1], %[r3], %[r1] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r1], %[r1], 3 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r1], %[r1], 4 \n\t"
+ "sra %[r1], %[r1], 3 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sw %[r1], 0(%[tmpre]) \n\t"
+ "addiu %[tmpre], %[tmpre], 4 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "absq_s.w %[r1], %[r1] \n\t"
+ "shra_r.w %[r0], %[r0], 15 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "negu %[r4], %[r1] \n\t"
+ "slt %[r3], %[r1], $zero \n\t"
+ "movn %[r1], %[r4], %[r3] \n\t"
+ "addiu %[r0], %[r0], 0x4000 \n\t"
+ "sra %[r0], %[r0], 15 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r2] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r0], %[r0], 3 \n\t"
+ "sw %[r0], 0(%[tmpim]) \n\t"
+ "absq_s.w %[r0], %[r0] \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r0], %[r0], 4 \n\t"
+ "sra %[r0], %[r0], 3 \n\t"
+ "sw %[r0], 0(%[tmpim]) \n\t"
+ "negu %[r2], %[r0] \n\t"
+ "slt %[r3], %[r0], $zero \n\t"
+ "movn %[r0], %[r2], %[r3] \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "slt %[r2], %[max], %[r1] \n\t"
+ "movn %[max], %[r1], %[r2] \n\t"
+ "slt %[r2], %[max], %[r0] \n\t"
+ "movn %[max], %[r0], %[r2] \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[tmpim], %[tmpim], 4 \n\t"
+#endif // #if defined(MIPS_DSP_R2_LE)
+ // Calculate WebRtcSpl_NormW32(max).
+ // If max gets value >=0, we should shift max steps to the left, and the
+ // domain will be Q(16+shift). If max gets value <0, we should shift -max
+ // steps to the right, and the domain will be Q(16+max)
+ "clz %[max], %[max] \n\t"
+ "addiu %[max], %[max], -25 \n\t"
+ ".set pop \n\t"
+ : [k] "+r" (k), [inre1] "=&r" (inre1), [inre2] "=&r" (inre2),
+ [r0] "=&r" (r0), [r1] "=&r" (r1), [r2] "=&r" (r2),
+ [r3] "=&r" (r3), [r4] "=&r" (r4), [tmpre] "=&r" (tmpre),
+ [tmpim] "=&r" (tmpim), [max] "=&r" (max), [factor] "=&r" (factor),
+#if defined(MIPS_DSP_R2_LE)
+ [r6] "=&r" (r6), [r7] "=&r" (r7), [r8] "=&r" (r8),
+#endif // #if defined(MIPS_DSP_R2_LE)
+ [r5] "=&r" (r5)
+ : [inre1Q9] "r" (inre1Q9), [inre2Q9] "r" (inre2Q9),
+ [tmpreQ16] "r" (tmpreQ16), [tmpimQ16] "r" (tmpimQ16),
+ [cosptr] "r" (cosptr), [sinptr] "r" (sinptr)
+ : "hi", "lo", "memory"
+ );
+
+ // "Fastest" vectors
+ k = FRAMESAMPLES / 4;
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[tmpre], %[tmpreQ16], 0 \n\t"
+ "addiu %[tmpim], %[tmpimQ16], 0 \n\t"
+ "addiu %[inre1], %[inre1Q9], 0 \n\t"
+ "addiu %[inre2], %[inre2Q9], 0 \n\t"
+ "blez %[max], 2f \n\t"
+ " subu %[max1], $zero, %[max] \n\t"
+ "1: \n\t"
+ "lw %[r0], 0(%[tmpre]) \n\t"
+ "lw %[r1], 0(%[tmpim]) \n\t"
+ "lw %[r2], 4(%[tmpre]) \n\t"
+ "lw %[r3], 4(%[tmpim]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "sllv %[r0], %[r0], %[max] \n\t"
+ "sllv %[r1], %[r1], %[max] \n\t"
+ "sllv %[r2], %[r2], %[max] \n\t"
+ "sllv %[r3], %[r3], %[max] \n\t"
+ "addiu %[tmpre], %[tmpre], 8 \n\t"
+ "addiu %[tmpim], %[tmpim], 8 \n\t"
+ "sh %[r0], 0(%[inre1]) \n\t"
+ "sh %[r1], 0(%[inre2]) \n\t"
+ "sh %[r2], 2(%[inre1]) \n\t"
+ "sh %[r3], 2(%[inre2]) \n\t"
+ "addiu %[inre1], %[inre1], 4 \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[inre2], %[inre2], 4 \n\t"
+ "b 4f \n\t"
+ " nop \n\t"
+ "2: \n\t"
+#if !defined(MIPS_DSP_R1_LE)
+ "addiu %[r4], %[max1], -1 \n\t"
+ "addiu %[r5], $zero, 1 \n\t"
+ "sllv %[r4], %[r5], %[r4] \n\t"
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ "3: \n\t"
+ "lw %[r0], 0(%[tmpre]) \n\t"
+ "lw %[r1], 0(%[tmpim]) \n\t"
+ "lw %[r2], 4(%[tmpre]) \n\t"
+ "lw %[r3], 4(%[tmpim]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shrav_r.w %[r0], %[r0], %[max1] \n\t"
+ "shrav_r.w %[r1], %[r1], %[max1] \n\t"
+ "shrav_r.w %[r2], %[r2], %[max1] \n\t"
+ "shrav_r.w %[r3], %[r3], %[max1] \n\t"
+#else // #if !defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r4] \n\t"
+ "addu %[r1], %[r1], %[r4] \n\t"
+ "addu %[r2], %[r2], %[r4] \n\t"
+ "addu %[r3], %[r3], %[r4] \n\t"
+ "srav %[r0], %[r0], %[max1] \n\t"
+ "srav %[r1], %[r1], %[max1] \n\t"
+ "srav %[r2], %[r2], %[max1] \n\t"
+ "srav %[r3], %[r3], %[max1] \n\t"
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ "addiu %[tmpre], %[tmpre], 8 \n\t"
+ "addiu %[tmpim], %[tmpim], 8 \n\t"
+ "sh %[r0], 0(%[inre1]) \n\t"
+ "sh %[r1], 0(%[inre2]) \n\t"
+ "sh %[r2], 2(%[inre1]) \n\t"
+ "sh %[r3], 2(%[inre2]) \n\t"
+ "addiu %[inre1], %[inre1], 4 \n\t"
+ "bgtz %[k], 3b \n\t"
+ " addiu %[inre2], %[inre2], 4 \n\t"
+ "4: \n\t"
+ ".set pop \n\t"
+ : [tmpre] "=&r" (tmpre), [tmpim] "=&r" (tmpim), [inre1] "=&r" (inre1),
+ [inre2] "=&r" (inre2), [k] "+r" (k), [max1] "=&r" (max1),
+#if !defined(MIPS_DSP_R1_LE)
+ [r4] "=&r" (r4), [r5] "=&r" (r5),
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ [r0] "=&r" (r0), [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3)
+ : [tmpreQ16] "r" (tmpreQ16), [tmpimQ16] "r" (tmpimQ16),
+ [inre1Q9] "r" (inre1Q9), [inre2Q9] "r" (inre2Q9), [max] "r" (max)
+ : "memory"
+ );
+
+ // Get DFT
+ WebRtcIsacfix_FftRadix16Fastest(inre1Q9, inre2Q9, -1); // real call
+
+ // "Fastest" vectors and
+ // Use symmetry to separate into two complex vectors
+ // and center frames in time around zero
+ // merged into one loop
+ cosptr = (int16_t*)WebRtcIsacfix_kCosTab2;
+ sinptr = (int16_t*)WebRtcIsacfix_kSinTab2;
+ k = FRAMESAMPLES / 4;
+ factor = FRAMESAMPLES - 2; // offset for FRAMESAMPLES / 2 - 1 array member
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[inre1], %[inre1Q9], 0 \n\t"
+ "addiu %[inre2], %[inre2Q9], 0 \n\t"
+ "addiu %[tmpre], %[outreQ7], 0 \n\t"
+ "addiu %[tmpim], %[outimQ7], 0 \n\t"
+ "bltz %[max], 2f \n\t"
+ " subu %[max1], $zero, %[max] \n\t"
+ "1: \n\t"
+#if !defined(MIPS_DSP_R1_LE)
+ "addu %[r4], %[inre1], %[offset] \n\t"
+ "addu %[r5], %[inre2], %[offset] \n\t"
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ "lh %[r0], 0(%[inre1]) \n\t"
+ "lh %[r1], 0(%[inre2]) \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "lhx %[r2], %[offset](%[inre1]) \n\t"
+ "lhx %[r3], %[offset](%[inre2]) \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "lh %[r2], 0(%[r4]) \n\t"
+ "lh %[r3], 0(%[r5]) \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "srav %[r0], %[r0], %[max] \n\t"
+ "srav %[r1], %[r1], %[max] \n\t"
+ "srav %[r2], %[r2], %[max] \n\t"
+ "srav %[r3], %[r3], %[max] \n\t"
+ "addu %[r4], %[r0], %[r2] \n\t"
+ "subu %[r0], %[r2], %[r0] \n\t"
+ "subu %[r2], %[r1], %[r3] \n\t"
+ "addu %[r1], %[r1], %[r3] \n\t"
+ "lh %[r3], 0(%[cosptr]) \n\t"
+ "lh %[r5], 0(%[sinptr]) \n\t"
+ "andi %[r6], %[r4], 0xFFFF \n\t"
+ "sra %[r4], %[r4], 16 \n\t"
+ "mul %[r7], %[r3], %[r6] \n\t"
+ "mul %[r8], %[r3], %[r4] \n\t"
+ "mul %[r6], %[r5], %[r6] \n\t"
+ "mul %[r4], %[r5], %[r4] \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "addiu %[inre1], %[inre1], 2 \n\t"
+ "addiu %[inre2], %[inre2], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r7], %[r7], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r7], %[r7], 0x2000 \n\t"
+ "sra %[r7], %[r7], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r8], %[r8], 2 \n\t"
+ "addu %[r8], %[r8], %[r7] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r6], %[r6], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r6], %[r6], 0x2000 \n\t"
+ "sra %[r6], %[r6], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r4], %[r4], 2 \n\t"
+ "addu %[r4], %[r4], %[r6] \n\t"
+ "andi %[r6], %[r2], 0xFFFF \n\t"
+ "sra %[r2], %[r2], 16 \n\t"
+ "mul %[r7], %[r5], %[r6] \n\t"
+ "mul %[r9], %[r5], %[r2] \n\t"
+ "mul %[r6], %[r3], %[r6] \n\t"
+ "mul %[r2], %[r3], %[r2] \n\t"
+ "addiu %[cosptr], %[cosptr], 2 \n\t"
+ "addiu %[sinptr], %[sinptr], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r7], %[r7], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r7], %[r7], 0x2000 \n\t"
+ "sra %[r7], %[r7], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r9], %[r9], 2 \n\t"
+ "addu %[r9], %[r7], %[r9] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r6], %[r6], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r6], %[r6], 0x2000 \n\t"
+ "sra %[r6], %[r6], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r2], %[r2], 2 \n\t"
+ "addu %[r2], %[r6], %[r2] \n\t"
+ "subu %[r8], %[r8], %[r9] \n\t"
+ "sra %[r8], %[r8], 9 \n\t"
+ "addu %[r2], %[r4], %[r2] \n\t"
+ "sra %[r2], %[r2], 9 \n\t"
+ "sh %[r8], 0(%[tmpre]) \n\t"
+ "sh %[r2], 0(%[tmpim]) \n\t"
+
+ "andi %[r4], %[r1], 0xFFFF \n\t"
+ "sra %[r1], %[r1], 16 \n\t"
+ "andi %[r6], %[r0], 0xFFFF \n\t"
+ "sra %[r0], %[r0], 16 \n\t"
+ "mul %[r7], %[r5], %[r4] \n\t"
+ "mul %[r9], %[r5], %[r1] \n\t"
+ "mul %[r4], %[r3], %[r4] \n\t"
+ "mul %[r1], %[r3], %[r1] \n\t"
+ "mul %[r8], %[r3], %[r0] \n\t"
+ "mul %[r3], %[r3], %[r6] \n\t"
+ "mul %[r6], %[r5], %[r6] \n\t"
+ "mul %[r0], %[r5], %[r0] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r7], %[r7], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r7], %[r7], 0x2000 \n\t"
+ "sra %[r7], %[r7], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r9], %[r9], 2 \n\t"
+ "addu %[r9], %[r9], %[r7] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r4], %[r4], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r4], %[r4], 0x2000 \n\t"
+ "sra %[r4], %[r4], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r1], %[r1], 2 \n\t"
+ "addu %[r1], %[r1], %[r4] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r3], %[r3], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r3], %[r3], 0x2000 \n\t"
+ "sra %[r3], %[r3], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r8], %[r8], 2 \n\t"
+ "addu %[r8], %[r8], %[r3] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r6], %[r6], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r6], %[r6], 0x2000 \n\t"
+ "sra %[r6], %[r6], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r0], %[r0], 2 \n\t"
+ "addu %[r0], %[r0], %[r6] \n\t"
+ "addu %[r3], %[tmpre], %[offset] \n\t"
+ "addu %[r2], %[tmpim], %[offset] \n\t"
+ "addu %[r9], %[r9], %[r8] \n\t"
+ "negu %[r9], %[r9] \n\t"
+ "sra %[r9], %[r9], 9 \n\t"
+ "subu %[r0], %[r0], %[r1] \n\t"
+ "addiu %[offset], %[offset], -4 \n\t"
+ "sh %[r9], 0(%[r3]) \n\t"
+ "sh %[r0], 0(%[r2]) \n\t"
+ "addiu %[tmpre], %[tmpre], 2 \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[tmpim], %[tmpim], 2 \n\t"
+ "b 3f \n\t"
+ " nop \n\t"
+ "2: \n\t"
+#if !defined(MIPS_DSP_R1_LE)
+ "addu %[r4], %[inre1], %[offset] \n\t"
+ "addu %[r5], %[inre2], %[offset] \n\t"
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ "lh %[r0], 0(%[inre1]) \n\t"
+ "lh %[r1], 0(%[inre2]) \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "lhx %[r2], %[offset](%[inre1]) \n\t"
+ "lhx %[r3], %[offset](%[inre2]) \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "lh %[r2], 0(%[r4]) \n\t"
+ "lh %[r3], 0(%[r5]) \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sllv %[r0], %[r0], %[max1] \n\t"
+ "sllv %[r1], %[r1], %[max1] \n\t"
+ "sllv %[r2], %[r2], %[max1] \n\t"
+ "sllv %[r3], %[r3], %[max1] \n\t"
+ "addu %[r4], %[r0], %[r2] \n\t"
+ "subu %[r0], %[r2], %[r0] \n\t"
+ "subu %[r2], %[r1], %[r3] \n\t"
+ "addu %[r1], %[r1], %[r3] \n\t"
+ "lh %[r3], 0(%[cosptr]) \n\t"
+ "lh %[r5], 0(%[sinptr]) \n\t"
+ "andi %[r6], %[r4], 0xFFFF \n\t"
+ "sra %[r4], %[r4], 16 \n\t"
+ "mul %[r7], %[r3], %[r6] \n\t"
+ "mul %[r8], %[r3], %[r4] \n\t"
+ "mul %[r6], %[r5], %[r6] \n\t"
+ "mul %[r4], %[r5], %[r4] \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "addiu %[inre1], %[inre1], 2 \n\t"
+ "addiu %[inre2], %[inre2], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r7], %[r7], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r7], %[r7], 0x2000 \n\t"
+ "sra %[r7], %[r7], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r8], %[r8], 2 \n\t"
+ "addu %[r8], %[r8], %[r7] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r6], %[r6], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r6], %[r6], 0x2000 \n\t"
+ "sra %[r6], %[r6], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r4], %[r4], 2 \n\t"
+ "addu %[r4], %[r4], %[r6] \n\t"
+ "andi %[r6], %[r2], 0xFFFF \n\t"
+ "sra %[r2], %[r2], 16 \n\t"
+ "mul %[r7], %[r5], %[r6] \n\t"
+ "mul %[r9], %[r5], %[r2] \n\t"
+ "mul %[r6], %[r3], %[r6] \n\t"
+ "mul %[r2], %[r3], %[r2] \n\t"
+ "addiu %[cosptr], %[cosptr], 2 \n\t"
+ "addiu %[sinptr], %[sinptr], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r7], %[r7], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r7], %[r7], 0x2000 \n\t"
+ "sra %[r7], %[r7], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r9], %[r9], 2 \n\t"
+ "addu %[r9], %[r7], %[r9] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r6], %[r6], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r6], %[r6], 0x2000 \n\t"
+ "sra %[r6], %[r6], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r2], %[r2], 2 \n\t"
+ "addu %[r2], %[r6], %[r2] \n\t"
+ "subu %[r8], %[r8], %[r9] \n\t"
+ "sra %[r8], %[r8], 9 \n\t"
+ "addu %[r2], %[r4], %[r2] \n\t"
+ "sra %[r2], %[r2], 9 \n\t"
+ "sh %[r8], 0(%[tmpre]) \n\t"
+ "sh %[r2], 0(%[tmpim]) \n\t"
+ "andi %[r4], %[r1], 0xFFFF \n\t"
+ "sra %[r1], %[r1], 16 \n\t"
+ "andi %[r6], %[r0], 0xFFFF \n\t"
+ "sra %[r0], %[r0], 16 \n\t"
+ "mul %[r7], %[r5], %[r4] \n\t"
+ "mul %[r9], %[r5], %[r1] \n\t"
+ "mul %[r4], %[r3], %[r4] \n\t"
+ "mul %[r1], %[r3], %[r1] \n\t"
+ "mul %[r8], %[r3], %[r0] \n\t"
+ "mul %[r3], %[r3], %[r6] \n\t"
+ "mul %[r6], %[r5], %[r6] \n\t"
+ "mul %[r0], %[r5], %[r0] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r7], %[r7], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r7], %[r7], 0x2000 \n\t"
+ "sra %[r7], %[r7], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r9], %[r9], 2 \n\t"
+ "addu %[r9], %[r9], %[r7] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r4], %[r4], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r4], %[r4], 0x2000 \n\t"
+ "sra %[r4], %[r4], 14 \n\t"
+#endif
+ "sll %[r1], %[r1], 2 \n\t"
+ "addu %[r1], %[r1], %[r4] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r3], %[r3], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r3], %[r3], 0x2000 \n\t"
+ "sra %[r3], %[r3], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r8], %[r8], 2 \n\t"
+ "addu %[r8], %[r8], %[r3] \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r6], %[r6], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r6], %[r6], 0x2000 \n\t"
+ "sra %[r6], %[r6], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "sll %[r0], %[r0], 2 \n\t"
+ "addu %[r0], %[r0], %[r6] \n\t"
+ "addu %[r3], %[tmpre], %[offset] \n\t"
+ "addu %[r2], %[tmpim], %[offset] \n\t"
+ "addu %[r9], %[r9], %[r8] \n\t"
+ "negu %[r9], %[r9] \n\t"
+ "sra %[r9], %[r9], 9 \n\t"
+ "subu %[r0], %[r0], %[r1] \n\t"
+ "sra %[r0], %[r0], 9 \n\t"
+ "addiu %[offset], %[offset], -4 \n\t"
+ "sh %[r9], 0(%[r3]) \n\t"
+ "sh %[r0], 0(%[r2]) \n\t"
+ "addiu %[tmpre], %[tmpre], 2 \n\t"
+ "bgtz %[k], 2b \n\t"
+ " addiu %[tmpim], %[tmpim], 2 \n\t"
+ "3: \n\t"
+ ".set pop \n\t"
+ : [inre1] "=&r" (inre1), [inre2] "=&r" (inre2), [tmpre] "=&r" (tmpre),
+ [tmpim] "=&r" (tmpim), [offset] "+r" (factor), [k] "+r" (k),
+ [r0] "=&r" (r0), [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3),
+ [r4] "=&r" (r4), [r5] "=&r" (r5), [r6] "=&r" (r6), [r7] "=&r" (r7),
+ [r8] "=&r" (r8), [r9] "=&r" (r9), [max1] "=&r" (max1)
+ : [inre1Q9] "r" (inre1Q9), [inre2Q9] "r" (inre2Q9),
+ [outreQ7] "r" (outreQ7), [outimQ7] "r" (outimQ7),
+ [max] "r" (max), [cosptr] "r" (cosptr), [sinptr] "r" (sinptr)
+ : "hi", "lo", "memory"
+ );
+}
+
+void WebRtcIsacfix_Spec2TimeMIPS(int16_t *inreQ7,
+ int16_t *inimQ7,
+ int32_t *outre1Q16,
+ int32_t *outre2Q16) {
+ int k = FRAMESAMPLES / 4;
+ int16_t* inre;
+ int16_t* inim;
+ int32_t* outre1;
+ int32_t* outre2;
+ int16_t* cosptr = (int16_t*)WebRtcIsacfix_kCosTab2;
+ int16_t* sinptr = (int16_t*)WebRtcIsacfix_kSinTab2;
+ int32_t r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, max, max1;
+#if defined(MIPS_DSP_R1_LE)
+ int32_t offset = FRAMESAMPLES - 4;
+#else // #if defined(MIPS_DSP_R1_LE)
+ int32_t offset = FRAMESAMPLES - 2;
+#endif // #if defined(MIPS_DSP_R1_LE)
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[inre], %[inreQ7], 0 \n\t"
+ "addiu %[inim] , %[inimQ7], 0 \n\t"
+ "addiu %[outre1], %[outre1Q16], 0 \n\t"
+ "addiu %[outre2], %[outre2Q16], 0 \n\t"
+ "mul %[max], $zero, $zero \n\t"
+ "1: \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ // Process two samples in one iteration avoiding left shift before
+ // multiplication. MaxAbsValueW32 function inlined into the loop.
+ "addu %[r8], %[inre], %[offset] \n\t"
+ "addu %[r9], %[inim], %[offset] \n\t"
+ "lwl %[r4], 0(%[r8]) \n\t"
+ "lwl %[r5], 0(%[r9]) \n\t"
+ "lwl %[r0], 0(%[inre]) \n\t"
+ "lwl %[r1], 0(%[inim]) \n\t"
+ "lwl %[r2], 0(%[cosptr]) \n\t"
+ "lwl %[r3], 0(%[sinptr]) \n\t"
+ "lwr %[r4], 0(%[r8]) \n\t"
+ "lwr %[r5], 0(%[r9]) \n\t"
+ "lwr %[r0], 0(%[inre]) \n\t"
+ "lwr %[r1], 0(%[inim]) \n\t"
+ "lwr %[r2], 0(%[cosptr]) \n\t"
+ "lwr %[r3], 0(%[sinptr]) \n\t"
+ "packrl.ph %[r4], %[r4], %[r4] \n\t"
+ "packrl.ph %[r5], %[r5], %[r5] \n\t"
+ "muleq_s.w.phr %[r6], %[r0], %[r2] \n\t"
+ "muleq_s.w.phr %[r7], %[r1], %[r3] \n\t"
+ "muleq_s.w.phr %[r8], %[r4], %[r2] \n\t"
+ "muleq_s.w.phr %[r9], %[r5], %[r3] \n\t"
+ "addiu %[k], %[k], -2 \n\t"
+ "addiu %[cosptr], %[cosptr], 4 \n\t"
+ "addiu %[sinptr], %[sinptr], 4 \n\t"
+ "addiu %[inre], %[inre], 4 \n\t"
+ "addiu %[inim], %[inim], 4 \n\t"
+ "shra_r.w %[r6], %[r6], 6 \n\t"
+ "shra_r.w %[r7], %[r7], 6 \n\t"
+ "shra_r.w %[r8], %[r8], 6 \n\t"
+ "shra_r.w %[r9], %[r9], 6 \n\t"
+ "addu %[r6], %[r6], %[r7] \n\t"
+ "subu %[r9], %[r9], %[r8] \n\t"
+ "subu %[r7], %[r6], %[r9] \n\t"
+ "addu %[r6], %[r6], %[r9] \n\t"
+ "sll %[r10], %[offset], 1 \n\t"
+ "addu %[r10], %[outre1], %[r10] \n\t"
+ "sw %[r7], 0(%[outre1]) \n\t"
+ "absq_s.w %[r7], %[r7] \n\t"
+ "sw %[r6], 4(%[r10]) \n\t"
+ "absq_s.w %[r6], %[r6] \n\t"
+ "slt %[r8], %[max], %[r7] \n\t"
+ "movn %[max], %[r7], %[r8] \n\t"
+ "slt %[r8], %[max], %[r6] \n\t"
+ "movn %[max], %[r6], %[r8] \n\t"
+ "muleq_s.w.phl %[r6], %[r0], %[r2] \n\t"
+ "muleq_s.w.phl %[r7], %[r1], %[r3] \n\t"
+ "muleq_s.w.phl %[r8], %[r4], %[r2] \n\t"
+ "muleq_s.w.phl %[r9], %[r5], %[r3] \n\t"
+ "shra_r.w %[r6], %[r6], 6 \n\t"
+ "shra_r.w %[r7], %[r7], 6 \n\t"
+ "shra_r.w %[r8], %[r8], 6 \n\t"
+ "shra_r.w %[r9], %[r9], 6 \n\t"
+ "addu %[r6], %[r6], %[r7] \n\t"
+ "subu %[r9], %[r9], %[r8] \n\t"
+ "subu %[r7], %[r6], %[r9] \n\t"
+ "addu %[r6], %[r6], %[r9] \n\t"
+ "sw %[r7], 4(%[outre1]) \n\t"
+ "absq_s.w %[r7], %[r7] \n\t"
+ "sw %[r6], 0(%[r10]) \n\t"
+ "absq_s.w %[r6], %[r6] \n\t"
+ "slt %[r8], %[max], %[r7] \n\t"
+ "movn %[max], %[r7], %[r8] \n\t"
+ "slt %[r8], %[max], %[r6] \n\t"
+ "movn %[max], %[r6], %[r8] \n\t"
+ "muleq_s.w.phr %[r6], %[r1], %[r2] \n\t"
+ "muleq_s.w.phr %[r7], %[r0], %[r3] \n\t"
+ "muleq_s.w.phr %[r8], %[r5], %[r2] \n\t"
+ "muleq_s.w.phr %[r9], %[r4], %[r3] \n\t"
+ "addiu %[outre1], %[outre1], 8 \n\t"
+ "shra_r.w %[r6], %[r6], 6 \n\t"
+ "shra_r.w %[r7], %[r7], 6 \n\t"
+ "shra_r.w %[r8], %[r8], 6 \n\t"
+ "shra_r.w %[r9], %[r9], 6 \n\t"
+ "subu %[r6], %[r6], %[r7] \n\t"
+ "addu %[r9], %[r9], %[r8] \n\t"
+ "subu %[r7], %[r6], %[r9] \n\t"
+ "addu %[r6], %[r9], %[r6] \n\t"
+ "negu %[r6], %[r6] \n\t"
+ "sll %[r10], %[offset], 1 \n\t"
+ "addu %[r10], %[outre2], %[r10] \n\t"
+ "sw %[r7], 0(%[outre2]) \n\t"
+ "absq_s.w %[r7], %[r7] \n\t"
+ "sw %[r6], 4(%[r10]) \n\t"
+ "absq_s.w %[r6], %[r6] \n\t"
+ "slt %[r8], %[max], %[r7] \n\t"
+ "movn %[max], %[r7], %[r8] \n\t"
+ "slt %[r8], %[max], %[r6] \n\t"
+ "movn %[max], %[r6], %[r8] \n\t"
+ "muleq_s.w.phl %[r6], %[r1], %[r2] \n\t"
+ "muleq_s.w.phl %[r7], %[r0], %[r3] \n\t"
+ "muleq_s.w.phl %[r8], %[r5], %[r2] \n\t"
+ "muleq_s.w.phl %[r9], %[r4], %[r3] \n\t"
+ "addiu %[offset], %[offset], -8 \n\t"
+ "shra_r.w %[r6], %[r6], 6 \n\t"
+ "shra_r.w %[r7], %[r7], 6 \n\t"
+ "shra_r.w %[r8], %[r8], 6 \n\t"
+ "shra_r.w %[r9], %[r9], 6 \n\t"
+ "subu %[r6], %[r6], %[r7] \n\t"
+ "addu %[r9], %[r9], %[r8] \n\t"
+ "subu %[r7], %[r6], %[r9] \n\t"
+ "addu %[r6], %[r9], %[r6] \n\t"
+ "negu %[r6], %[r6] \n\t"
+ "sw %[r7], 4(%[outre2]) \n\t"
+ "absq_s.w %[r7], %[r7] \n\t"
+ "sw %[r6], 0(%[r10]) \n\t"
+ "absq_s.w %[r6], %[r6] \n\t"
+ "slt %[r8], %[max], %[r7] \n\t"
+ "movn %[max], %[r7], %[r8] \n\t"
+ "slt %[r8], %[max], %[r6] \n\t"
+ "movn %[max], %[r6], %[r8] \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[outre2], %[outre2], 8 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "lh %[r0], 0(%[inre]) \n\t"
+ "lh %[r1], 0(%[inim]) \n\t"
+ "lh %[r4], 0(%[cosptr]) \n\t"
+ "lh %[r5], 0(%[sinptr]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "mul %[r2], %[r0], %[r4] \n\t"
+ "mul %[r0], %[r0], %[r5] \n\t"
+ "mul %[r3], %[r1], %[r5] \n\t"
+ "mul %[r1], %[r1], %[r4] \n\t"
+ "addiu %[cosptr], %[cosptr], 2 \n\t"
+ "addiu %[sinptr], %[sinptr], 2 \n\t"
+ "addu %[r8], %[inre], %[offset] \n\t"
+ "addu %[r9], %[inim], %[offset] \n\t"
+ "addiu %[r2], %[r2], 16 \n\t"
+ "sra %[r2], %[r2], 5 \n\t"
+ "addiu %[r0], %[r0], 16 \n\t"
+ "sra %[r0], %[r0], 5 \n\t"
+ "addiu %[r3], %[r3], 16 \n\t"
+ "sra %[r3], %[r3], 5 \n\t"
+ "lh %[r6], 0(%[r8]) \n\t"
+ "lh %[r7], 0(%[r9]) \n\t"
+ "addiu %[r1], %[r1], 16 \n\t"
+ "sra %[r1], %[r1], 5 \n\t"
+ "mul %[r8], %[r7], %[r4] \n\t"
+ "mul %[r7], %[r7], %[r5] \n\t"
+ "mul %[r9], %[r6], %[r4] \n\t"
+ "mul %[r6], %[r6], %[r5] \n\t"
+ "addu %[r2], %[r2], %[r3] \n\t"
+ "subu %[r1], %[r1], %[r0] \n\t"
+ "sll %[r0], %[offset], 1 \n\t"
+ "addu %[r4], %[outre1], %[r0] \n\t"
+ "addu %[r5], %[outre2], %[r0] \n\t"
+ "addiu %[r8], %[r8], 16 \n\t"
+ "sra %[r8], %[r8], 5 \n\t"
+ "addiu %[r7], %[r7], 16 \n\t"
+ "sra %[r7], %[r7], 5 \n\t"
+ "addiu %[r6], %[r6], 16 \n\t"
+ "sra %[r6], %[r6], 5 \n\t"
+ "addiu %[r9], %[r9], 16 \n\t"
+ "sra %[r9], %[r9], 5 \n\t"
+ "addu %[r8], %[r8], %[r6] \n\t"
+ "negu %[r8], %[r8] \n\t"
+ "subu %[r7], %[r7], %[r9] \n\t"
+ "subu %[r6], %[r2], %[r7] \n\t"
+ "addu %[r0], %[r2], %[r7] \n\t"
+ "addu %[r3], %[r1], %[r8] \n\t"
+ "subu %[r1], %[r8], %[r1] \n\t"
+ "sw %[r6], 0(%[outre1]) \n\t"
+ "sw %[r0], 0(%[r4]) \n\t"
+ "sw %[r3], 0(%[outre2]) \n\t"
+ "sw %[r1], 0(%[r5]) \n\t"
+ "addiu %[outre1], %[outre1], 4 \n\t"
+ "addiu %[offset], %[offset], -4 \n\t"
+ "addiu %[inre], %[inre], 2 \n\t"
+ "addiu %[inim], %[inim], 2 \n\t"
+ // Inlined WebRtcSpl_MaxAbsValueW32
+ "negu %[r5], %[r6] \n\t"
+ "slt %[r2], %[r6], $zero \n\t"
+ "movn %[r6], %[r5], %[r2] \n\t"
+ "negu %[r5], %[r0] \n\t"
+ "slt %[r2], %[r0], $zero \n\t"
+ "movn %[r0], %[r5], %[r2] \n\t"
+ "negu %[r5], %[r3] \n\t"
+ "slt %[r2], %[r3], $zero \n\t"
+ "movn %[r3], %[r5], %[r2] \n\t"
+ "negu %[r5], %[r1] \n\t"
+ "slt %[r2], %[r1], $zero \n\t"
+ "movn %[r1], %[r5], %[r2] \n\t"
+ "slt %[r2], %[r6], %[r0] \n\t"
+ "slt %[r5], %[r3], %[r1] \n\t"
+ "movn %[r6], %[r0], %[r2] \n\t"
+ "movn %[r3], %[r1], %[r5] \n\t"
+ "slt %[r2], %[r6], %[r3] \n\t"
+ "movn %[r6], %[r3], %[r2] \n\t"
+ "slt %[r2], %[max], %[r6] \n\t"
+ "movn %[max], %[r6], %[r2] \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[outre2], %[outre2], 4 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "clz %[max], %[max] \n\t"
+ "addiu %[max], %[max], -25 \n\t"
+ ".set pop \n\t"
+ : [inre] "=&r" (inre), [inim] "=&r" (inim),
+ [outre1] "=&r" (outre1), [outre2] "=&r" (outre2),
+ [offset] "+r" (offset), [k] "+r" (k), [r0] "=&r" (r0),
+ [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3),
+ [r4] "=&r" (r4), [r5] "=&r" (r5), [r6] "=&r" (r6),
+ [r7] "=&r" (r7), [r10] "=&r" (r10),
+ [r8] "=&r" (r8), [r9] "=&r" (r9), [max] "=&r" (max)
+ : [inreQ7] "r" (inreQ7), [inimQ7] "r" (inimQ7),
+ [cosptr] "r" (cosptr), [sinptr] "r" (sinptr),
+ [outre1Q16] "r" (outre1Q16), [outre2Q16] "r" (outre2Q16)
+ : "hi", "lo", "memory"
+ );
+
+ // "Fastest" vectors
+ k = FRAMESAMPLES / 4;
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[inre], %[inreQ7], 0 \n\t"
+ "addiu %[inim], %[inimQ7], 0 \n\t"
+ "addiu %[outre1], %[outre1Q16], 0 \n\t"
+ "addiu %[outre2], %[outre2Q16], 0 \n\t"
+ "bltz %[max], 2f \n\t"
+ " subu %[max1], $zero, %[max] \n\t"
+ "1: \n\t"
+ "lw %[r0], 0(%[outre1]) \n\t"
+ "lw %[r1], 0(%[outre2]) \n\t"
+ "lw %[r2], 4(%[outre1]) \n\t"
+ "lw %[r3], 4(%[outre2]) \n\t"
+ "sllv %[r0], %[r0], %[max] \n\t"
+ "sllv %[r1], %[r1], %[max] \n\t"
+ "sllv %[r2], %[r2], %[max] \n\t"
+ "sllv %[r3], %[r3], %[max] \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "addiu %[outre1], %[outre1], 8 \n\t"
+ "addiu %[outre2], %[outre2], 8 \n\t"
+ "sh %[r0], 0(%[inre]) \n\t"
+ "sh %[r1], 0(%[inim]) \n\t"
+ "sh %[r2], 2(%[inre]) \n\t"
+ "sh %[r3], 2(%[inim]) \n\t"
+ "addiu %[inre], %[inre], 4 \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[inim], %[inim], 4 \n\t"
+ "b 4f \n\t"
+ " nop \n\t"
+ "2: \n\t"
+#if !defined(MIPS_DSP_R1_LE)
+ "addiu %[r4], $zero, 1 \n\t"
+ "addiu %[r5], %[max1], -1 \n\t"
+ "sllv %[r4], %[r4], %[r5] \n\t"
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ "3: \n\t"
+ "lw %[r0], 0(%[outre1]) \n\t"
+ "lw %[r1], 0(%[outre2]) \n\t"
+ "lw %[r2], 4(%[outre1]) \n\t"
+ "lw %[r3], 4(%[outre2]) \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shrav_r.w %[r0], %[r0], %[max1] \n\t"
+ "shrav_r.w %[r1], %[r1], %[max1] \n\t"
+ "shrav_r.w %[r2], %[r2], %[max1] \n\t"
+ "shrav_r.w %[r3], %[r3], %[max1] \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r4] \n\t"
+ "addu %[r1], %[r1], %[r4] \n\t"
+ "addu %[r2], %[r2], %[r4] \n\t"
+ "addu %[r3], %[r3], %[r4] \n\t"
+ "srav %[r0], %[r0], %[max1] \n\t"
+ "srav %[r1], %[r1], %[max1] \n\t"
+ "srav %[r2], %[r2], %[max1] \n\t"
+ "srav %[r3], %[r3], %[max1] \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[outre1], %[outre1], 8 \n\t"
+ "addiu %[outre2], %[outre2], 8 \n\t"
+ "sh %[r0], 0(%[inre]) \n\t"
+ "sh %[r1], 0(%[inim]) \n\t"
+ "sh %[r2], 2(%[inre]) \n\t"
+ "sh %[r3], 2(%[inim]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "addiu %[inre], %[inre], 4 \n\t"
+ "bgtz %[k], 3b \n\t"
+ " addiu %[inim], %[inim], 4 \n\t"
+ "4: \n\t"
+ ".set pop \n\t"
+ : [k] "+r" (k), [max1] "=&r" (max1), [r0] "=&r" (r0),
+ [inre] "=&r" (inre), [inim] "=&r" (inim),
+ [outre1] "=&r" (outre1), [outre2] "=&r" (outre2),
+#if !defined(MIPS_DSP_R1_LE)
+ [r4] "=&r" (r4), [r5] "=&r" (r5),
+#endif // #if !defined(MIPS_DSP_R1_LE)
+ [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3)
+ : [max] "r" (max), [inreQ7] "r" (inreQ7),
+ [inimQ7] "r" (inimQ7), [outre1Q16] "r" (outre1Q16),
+ [outre2Q16] "r" (outre2Q16)
+ : "memory"
+ );
+
+ WebRtcIsacfix_FftRadix16Fastest(inreQ7, inimQ7, 1); // real call
+
+ // All the remaining processing is done inside a single loop to avoid
+ // unnecessary memory accesses. MIPS DSPr2 version processes two samples
+ // at a time.
+ cosptr = (int16_t*)WebRtcIsacfix_kCosTab1;
+ sinptr = (int16_t*)WebRtcIsacfix_kSinTab1;
+ k = FRAMESAMPLES / 2;
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[inre], %[inreQ7], 0 \n\t"
+ "addiu %[inim], %[inimQ7], 0 \n\t"
+ "addiu %[outre1], %[outre1Q16], 0 \n\t"
+ "addiu %[outre2], %[outre2Q16], 0 \n\t"
+ "addiu %[r4], $zero, 273 \n\t"
+ "addiu %[r5], $zero, 31727 \n\t"
+#if defined(MIPS_DSP_R2_LE)
+ "addiu %[max], %[max], 16 \n\t"
+ "replv.ph %[r4], %[r4] \n\t"
+#endif // #if defined(MIPS_DSP_R2_LE)
+ "bltz %[max], 2f \n\t"
+ " subu %[max1], $zero, %[max] \n\t"
+#if defined(MIPS_DSP_R2_LE)
+ "addiu %[max], %[max], 1 \n\t"
+#endif // #if defined(MIPS_DSP_R2_LE)
+ "1: \n\t"
+#if defined(MIPS_DSP_R2_LE)
+ "lwl %[r0], 0(%[inre]) \n\t"
+ "lwl %[r1], 0(%[inim]) \n\t"
+ "lh %[r2], 0(%[cosptr]) \n\t"
+ "lwr %[r0], 0(%[inre]) \n\t"
+ "lwr %[r1], 0(%[inim]) \n\t"
+ "lh %[r3], 0(%[sinptr]) \n\t"
+ "muleq_s.w.phr %[r6], %[r0], %[r4] \n\t"
+ "muleq_s.w.phr %[r7], %[r1], %[r4] \n\t"
+ "muleq_s.w.phl %[r0], %[r0], %[r4] \n\t"
+ "muleq_s.w.phl %[r1], %[r1], %[r4] \n\t"
+ "addiu %[k], %[k], -2 \n\t"
+ "addiu %[inre], %[inre], 4 \n\t"
+ "addiu %[inim], %[inim], 4 \n\t"
+ "shrav_r.w %[r6], %[r6], %[max] \n\t"
+ "shrav_r.w %[r7], %[r7], %[max] \n\t"
+ "mult $ac0, %[r2], %[r6] \n\t"
+ "mult $ac1, %[r3], %[r7] \n\t"
+ "mult $ac2, %[r2], %[r7] \n\t"
+ "mult $ac3, %[r3], %[r6] \n\t"
+ "lh %[r2], 2(%[cosptr]) \n\t"
+ "lh %[r3], 2(%[sinptr]) \n\t"
+ "extr_r.w %[r6], $ac0, 14 \n\t"
+ "extr_r.w %[r7], $ac1, 14 \n\t"
+ "extr_r.w %[r8], $ac2, 14 \n\t"
+ "extr_r.w %[r9], $ac3, 14 \n\t"
+ "shrav_r.w %[r0], %[r0], %[max] \n\t"
+ "shrav_r.w %[r1], %[r1], %[max] \n\t"
+ "mult $ac0, %[r2], %[r0] \n\t"
+ "mult $ac1, %[r3], %[r1] \n\t"
+ "mult $ac2, %[r2], %[r1] \n\t"
+ "mult $ac3, %[r3], %[r0] \n\t"
+ "addiu %[cosptr], %[cosptr], 4 \n\t"
+ "extr_r.w %[r0], $ac0, 14 \n\t"
+ "extr_r.w %[r1], $ac1, 14 \n\t"
+ "extr_r.w %[r2], $ac2, 14 \n\t"
+ "extr_r.w %[r3], $ac3, 14 \n\t"
+ "subu %[r6], %[r6], %[r7] \n\t"
+ "addu %[r8], %[r8], %[r9] \n\t"
+ "mult $ac0, %[r5], %[r6] \n\t"
+ "mult $ac1, %[r5], %[r8] \n\t"
+ "addiu %[sinptr], %[sinptr], 4 \n\t"
+ "subu %[r0], %[r0], %[r1] \n\t"
+ "addu %[r2], %[r2], %[r3] \n\t"
+ "extr_r.w %[r1], $ac0, 11 \n\t"
+ "extr_r.w %[r3], $ac1, 11 \n\t"
+ "mult $ac2, %[r5], %[r0] \n\t"
+ "mult $ac3, %[r5], %[r2] \n\t"
+ "sw %[r1], 0(%[outre1]) \n\t"
+ "sw %[r3], 0(%[outre2]) \n\t"
+ "addiu %[outre1], %[outre1], 8 \n\t"
+ "extr_r.w %[r0], $ac2, 11 \n\t"
+ "extr_r.w %[r2], $ac3, 11 \n\t"
+ "sw %[r0], -4(%[outre1]) \n\t"
+ "sw %[r2], 4(%[outre2]) \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[outre2], %[outre2], 8 \n\t"
+ "b 3f \n\t"
+#else // #if defined(MIPS_DSP_R2_LE)
+ "lh %[r0], 0(%[inre]) \n\t"
+ "lh %[r1], 0(%[inim]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "srav %[r0], %[r0], %[max] \n\t"
+ "srav %[r1], %[r1], %[max] \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "sra %[r0], %[r0], 1 \n\t"
+ "sra %[r3], %[r1], 16 \n\t"
+ "andi %[r1], %[r1], 0xFFFF \n\t"
+ "sra %[r1], %[r1], 1 \n\t"
+ "mul %[r2], %[r2], %[r4] \n\t"
+ "mul %[r0], %[r0], %[r4] \n\t"
+ "mul %[r3], %[r3], %[r4] \n\t"
+ "mul %[r1], %[r1], %[r4] \n\t"
+ "addiu %[inre], %[inre], 2 \n\t"
+ "addiu %[inim], %[inim], 2 \n\t"
+ "lh %[r6], 0(%[cosptr]) \n\t"
+ "lh %[r7], 0(%[sinptr]) \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r0], %[r0], 15 \n\t"
+ "shra_r.w %[r1], %[r1], 15 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r0], %[r0], 0x4000 \n\t"
+ "addiu %[r1], %[r1], 0x4000 \n\t"
+ "sra %[r0], %[r0], 15 \n\t"
+ "sra %[r1], %[r1], 15 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r2], %[r0] \n\t"
+ "addu %[r1], %[r3], %[r1] \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "mul %[r9], %[r2], %[r6] \n\t"
+ "mul %[r2], %[r2], %[r7] \n\t"
+ "mul %[r8], %[r0], %[r6] \n\t"
+ "mul %[r0], %[r0], %[r7] \n\t"
+ "sra %[r3], %[r3], 16 \n\t"
+ "andi %[r1], %[r1], 0xFFFF \n\t"
+ "sll %[r9], %[r9], 2 \n\t"
+ "sll %[r2], %[r2], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r8], %[r8], 14 \n\t"
+ "shra_r.w %[r0], %[r0], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r8], %[r8], 0x2000 \n\t"
+ "addiu %[r0], %[r0], 0x2000 \n\t"
+ "sra %[r8], %[r8], 14 \n\t"
+ "sra %[r0], %[r0], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r9], %[r9], %[r8] \n\t"
+ "addu %[r2], %[r2], %[r0] \n\t"
+ "mul %[r0], %[r3], %[r6] \n\t"
+ "mul %[r3], %[r3], %[r7] \n\t"
+ "mul %[r8], %[r1], %[r6] \n\t"
+ "mul %[r1], %[r1], %[r8] \n\t"
+ "addiu %[cosptr], %[cosptr], 2 \n\t"
+ "addiu %[sinptr], %[sinptr], 2 \n\t"
+ "sll %[r0], %[r0], 2 \n\t"
+ "sll %[r3], %[r3], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r8], %[r8], 14 \n\t"
+ "shra_r.w %[r1], %[r1], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r8], %[r8], 0x2000 \n\t"
+ "addiu %[r1], %[r1], 0x2000 \n\t"
+ "sra %[r8], %[r8], 14 \n\t"
+ "sra %[r1], %[r1], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r8] \n\t"
+ "addu %[r3], %[r3], %[r1] \n\t"
+ "subu %[r9], %[r9], %[r3] \n\t"
+ "addu %[r0], %[r0], %[r2] \n\t"
+ "sra %[r1], %[r9], 16 \n\t"
+ "andi %[r9], %[r9], 0xFFFF \n\t"
+ "mul %[r1], %[r1], %[r5] \n\t"
+ "mul %[r9], %[r9], %[r5] \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "mul %[r2], %[r2], %[r5] \n\t"
+ "mul %[r0], %[r0], %[r5] \n\t"
+ "sll %[r1], %[r1], 5 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r9], %[r9], 11 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r9], %[r9], 0x400 \n\t"
+ "sra %[r9], %[r9], 11 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r1], %[r1], %[r9] \n\t"
+ "sll %[r2], %[r2], 5 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r0], %[r0], 11 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r0], %[r0], 0x400 \n\t"
+ "sra %[r0], %[r0], 11 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r2] \n\t"
+ "sw %[r1], 0(%[outre1]) \n\t"
+ "addiu %[outre1], %[outre1], 4 \n\t"
+ "sw %[r0], 0(%[outre2]) \n\t"
+ "bgtz %[k], 1b \n\t"
+ " addiu %[outre2], %[outre2], 4 \n\t"
+ "b 3f \n\t"
+ " nop \n\t"
+#endif // #if defined(MIPS_DSP_R2_LE)
+ "2: \n\t"
+#if defined(MIPS_DSP_R2_LE)
+ "addiu %[max1], %[max1], -1 \n\t"
+ "21: \n\t"
+ "lwl %[r0], 0(%[inre]) \n\t"
+ "lwl %[r1], 0(%[inim]) \n\t"
+ "lh %[r2], 0(%[cosptr]) \n\t"
+ "lwr %[r0], 0(%[inre]) \n\t"
+ "lwr %[r1], 0(%[inim]) \n\t"
+ "lh %[r3], 0(%[sinptr]) \n\t"
+ "muleq_s.w.phr %[r6], %[r0], %[r4] \n\t"
+ "muleq_s.w.phr %[r7], %[r1], %[r4] \n\t"
+ "muleq_s.w.phl %[r0], %[r0], %[r4] \n\t"
+ "muleq_s.w.phl %[r1], %[r1], %[r4] \n\t"
+ "addiu %[k], %[k], -2 \n\t"
+ "addiu %[inre], %[inre], 4 \n\t"
+ "addiu %[inim], %[inim], 4 \n\t"
+ "sllv %[r6], %[r6], %[max1] \n\t"
+ "sllv %[r7], %[r7], %[max1] \n\t"
+ "mult $ac0, %[r2], %[r6] \n\t"
+ "mult $ac1, %[r3], %[r7] \n\t"
+ "mult $ac2, %[r2], %[r7] \n\t"
+ "mult $ac3, %[r3], %[r6] \n\t"
+ "lh %[r2], 2(%[cosptr]) \n\t"
+ "lh %[r3], 2(%[sinptr]) \n\t"
+ "extr_r.w %[r6], $ac0, 14 \n\t"
+ "extr_r.w %[r7], $ac1, 14 \n\t"
+ "extr_r.w %[r8], $ac2, 14 \n\t"
+ "extr_r.w %[r9], $ac3, 14 \n\t"
+ "sllv %[r0], %[r0], %[max1] \n\t"
+ "sllv %[r1], %[r1], %[max1] \n\t"
+ "mult $ac0, %[r2], %[r0] \n\t"
+ "mult $ac1, %[r3], %[r1] \n\t"
+ "mult $ac2, %[r2], %[r1] \n\t"
+ "mult $ac3, %[r3], %[r0] \n\t"
+ "addiu %[cosptr], %[cosptr], 4 \n\t"
+ "extr_r.w %[r0], $ac0, 14 \n\t"
+ "extr_r.w %[r1], $ac1, 14 \n\t"
+ "extr_r.w %[r2], $ac2, 14 \n\t"
+ "extr_r.w %[r3], $ac3, 14 \n\t"
+ "subu %[r6], %[r6], %[r7] \n\t"
+ "addu %[r8], %[r8], %[r9] \n\t"
+ "mult $ac0, %[r5], %[r6] \n\t"
+ "mult $ac1, %[r5], %[r8] \n\t"
+ "addiu %[sinptr], %[sinptr], 4 \n\t"
+ "subu %[r0], %[r0], %[r1] \n\t"
+ "addu %[r2], %[r2], %[r3] \n\t"
+ "extr_r.w %[r1], $ac0, 11 \n\t"
+ "extr_r.w %[r3], $ac1, 11 \n\t"
+ "mult $ac2, %[r5], %[r0] \n\t"
+ "mult $ac3, %[r5], %[r2] \n\t"
+ "sw %[r1], 0(%[outre1]) \n\t"
+ "sw %[r3], 0(%[outre2]) \n\t"
+ "addiu %[outre1], %[outre1], 8 \n\t"
+ "extr_r.w %[r0], $ac2, 11 \n\t"
+ "extr_r.w %[r2], $ac3, 11 \n\t"
+ "sw %[r0], -4(%[outre1]) \n\t"
+ "sw %[r2], 4(%[outre2]) \n\t"
+ "bgtz %[k], 21b \n\t"
+ " addiu %[outre2], %[outre2], 8 \n\t"
+ "b 3f \n\t"
+ " nop \n\t"
+#else // #if defined(MIPS_DSP_R2_LE)
+ "lh %[r0], 0(%[inre]) \n\t"
+ "lh %[r1], 0(%[inim]) \n\t"
+ "addiu %[k], %[k], -1 \n\t"
+ "sllv %[r0], %[r0], %[max1] \n\t"
+ "sllv %[r1], %[r1], %[max1] \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "sra %[r0], %[r0], 1 \n\t"
+ "sra %[r3], %[r1], 16 \n\t"
+ "andi %[r1], %[r1], 0xFFFF \n\t"
+ "sra %[r1], %[r1], 1 \n\t"
+ "mul %[r2], %[r2], %[r4] \n\t"
+ "mul %[r0], %[r0], %[r4] \n\t"
+ "mul %[r3], %[r3], %[r4] \n\t"
+ "mul %[r1], %[r1], %[r4] \n\t"
+ "addiu %[inre], %[inre], 2 \n\t"
+ "addiu %[inim], %[inim], 2 \n\t"
+ "lh %[r6], 0(%[cosptr]) \n\t"
+ "lh %[r7], 0(%[sinptr]) \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r0], %[r0], 15 \n\t"
+ "shra_r.w %[r1], %[r1], 15 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r0], %[r0], 0x4000 \n\t"
+ "addiu %[r1], %[r1], 0x4000 \n\t"
+ "sra %[r0], %[r0], 15 \n\t"
+ "sra %[r1], %[r1], 15 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r2], %[r0] \n\t"
+ "addu %[r1], %[r3], %[r1] \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "mul %[r9], %[r2], %[r6] \n\t"
+ "mul %[r2], %[r2], %[r7] \n\t"
+ "mul %[r8], %[r0], %[r6] \n\t"
+ "mul %[r0], %[r0], %[r7] \n\t"
+ "sra %[r3], %[r1], 16 \n\t"
+ "andi %[r1], %[r1], 0xFFFF \n\t"
+ "sll %[r9], %[r9], 2 \n\t"
+ "sll %[r2], %[r2], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r8], %[r8], 14 \n\t"
+ "shra_r.w %[r0], %[r0], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r8], %[r8], 0x2000 \n\t"
+ "addiu %[r0], %[r0], 0x2000 \n\t"
+ "sra %[r8], %[r8], 14 \n\t"
+ "sra %[r0], %[r0], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r9], %[r9], %[r8] \n\t"
+ "addu %[r2], %[r2], %[r0] \n\t"
+ "mul %[r0], %[r3], %[r6] \n\t"
+ "mul %[r3], %[r3], %[r7] \n\t"
+ "mul %[r8], %[r1], %[r6] \n\t"
+ "mul %[r1], %[r1], %[r7] \n\t"
+ "addiu %[cosptr], %[cosptr], 2 \n\t"
+ "addiu %[sinptr], %[sinptr], 2 \n\t"
+ "sll %[r0], %[r0], 2 \n\t"
+ "sll %[r3], %[r3], 2 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r8], %[r8], 14 \n\t"
+ "shra_r.w %[r1], %[r1], 14 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r8], %[r8], 0x2000 \n\t"
+ "addiu %[r1], %[r1], 0x2000 \n\t"
+ "sra %[r8], %[r8], 14 \n\t"
+ "sra %[r1], %[r1], 14 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r8] \n\t"
+ "addu %[r3], %[r3], %[r1] \n\t"
+ "subu %[r9], %[r9], %[r3] \n\t"
+ "addu %[r0], %[r0], %[r2] \n\t"
+ "sra %[r1], %[r9], 16 \n\t"
+ "andi %[r9], %[r9], 0xFFFF \n\t"
+ "mul %[r1], %[r1], %[r5] \n\t"
+ "mul %[r9], %[r9], %[r5] \n\t"
+ "sra %[r2], %[r0], 16 \n\t"
+ "andi %[r0], %[r0], 0xFFFF \n\t"
+ "mul %[r2], %[r2], %[r5] \n\t"
+ "mul %[r0], %[r0], %[r5] \n\t"
+ "sll %[r1], %[r1], 5 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r9], %[r9], 11 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r9], %[r9], 0x400 \n\t"
+ "sra %[r9], %[r9], 11 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r1], %[r1], %[r9] \n\t"
+ "sll %[r2], %[r2], 5 \n\t"
+#if defined(MIPS_DSP_R1_LE)
+ "shra_r.w %[r0], %[r0], 11 \n\t"
+#else // #if defined(MIPS_DSP_R1_LE)
+ "addiu %[r0], %[r0], 0x400 \n\t"
+ "sra %[r0], %[r0], 11 \n\t"
+#endif // #if defined(MIPS_DSP_R1_LE)
+ "addu %[r0], %[r0], %[r2] \n\t"
+ "sw %[r1], 0(%[outre1]) \n\t"
+ "addiu %[outre1], %[outre1], 4 \n\t"
+ "sw %[r0], 0(%[outre2]) \n\t"
+ "bgtz %[k], 2b \n\t"
+ " addiu %[outre2], %[outre2], 4 \n\t"
+#endif // #if defined(MIPS_DSP_R2_LE)
+ "3: \n\t"
+ ".set pop \n\t"
+ : [k] "+r" (k), [r0] "=&r" (r0), [r1] "=&r" (r1),
+ [r2] "=&r" (r2), [r3] "=&r" (r3), [r4] "=&r" (r4),
+ [r5] "=&r" (r5), [r6] "=&r" (r6), [r7] "=&r" (r7),
+ [r8] "=&r" (r8), [r9] "=&r" (r9), [max1] "=&r" (max1),
+ [inre] "=&r" (inre), [inim] "=&r" (inim),
+ [outre1] "=&r" (outre1), [outre2] "=&r" (outre2)
+ : [max] "r" (max), [inreQ7] "r" (inreQ7),
+ [inimQ7] "r" (inimQ7), [cosptr] "r" (cosptr),
+ [sinptr] "r" (sinptr), [outre1Q16] "r" (outre1Q16),
+ [outre2Q16] "r" (outre2Q16)
+ : "hi", "lo", "memory"
+#if defined(MIPS_DSP_R2_LE)
+ , "$ac1hi", "$ac1lo", "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
+#endif // #if defined(MIPS_DSP_R2_LE)
+ );
+}
diff --git a/modules/audio_coding/codecs/isac/fix/source/transform_tables.c b/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
new file mode 100644
index 0000000..ee96b8e
--- /dev/null
+++ b/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+/*
+ * This file contains trigonometric functions look-up tables used in
+ * transform functions WebRtcIsacfix_Time2Spec and WebRtcIsacfix_Spec2Time.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
+#include "webrtc/typedefs.h"
+
+#if !(defined WEBRTC_DETECT_ARM_NEON || defined WEBRTC_ARCH_ARM_NEON)
+/* Cosine table 1 in Q14. */
+const int16_t WebRtcIsacfix_kCosTab1[FRAMESAMPLES/2] = {
+ 16384, 16383, 16378, 16371, 16362, 16349, 16333, 16315, 16294, 16270,
+ 16244, 16214, 16182, 16147, 16110, 16069, 16026, 15980, 15931, 15880,
+ 15826, 15769, 15709, 15647, 15582, 15515, 15444, 15371, 15296, 15218,
+ 15137, 15053, 14968, 14879, 14788, 14694, 14598, 14500, 14399, 14295,
+ 14189, 14081, 13970, 13856, 13741, 13623, 13502, 13380, 13255, 13128,
+ 12998, 12867, 12733, 12597, 12458, 12318, 12176, 12031, 11885, 11736,
+ 11585, 11433, 11278, 11121, 10963, 10803, 10641, 10477, 10311, 10143,
+ 9974, 9803, 9630, 9456, 9280, 9102, 8923, 8743, 8561, 8377,
+ 8192, 8006, 7818, 7629, 7438, 7246, 7053, 6859, 6664, 6467,
+ 6270, 6071, 5872, 5671, 5469, 5266, 5063, 4859, 4653, 4447,
+ 4240, 4033, 3825, 3616, 3406, 3196, 2986, 2775, 2563, 2351,
+ 2139, 1926, 1713, 1499, 1285, 1072, 857, 643, 429, 214,
+ 0, -214, -429, -643, -857, -1072, -1285, -1499, -1713, -1926,
+ -2139, -2351, -2563, -2775, -2986, -3196, -3406, -3616, -3825, -4033,
+ -4240, -4447, -4653, -4859, -5063, -5266, -5469, -5671, -5872, -6071,
+ -6270, -6467, -6664, -6859, -7053, -7246, -7438, -7629, -7818, -8006,
+ -8192, -8377, -8561, -8743, -8923, -9102, -9280, -9456, -9630, -9803,
+ -9974, -10143, -10311, -10477, -10641, -10803, -10963, -11121, -11278, -11433,
+ -11585, -11736, -11885, -12031, -12176, -12318, -12458, -12597, -12733,
+ -12867, -12998, -13128, -13255, -13380, -13502, -13623, -13741, -13856,
+ -13970, -14081, -14189, -14295, -14399, -14500, -14598, -14694, -14788,
+ -14879, -14968, -15053, -15137, -15218, -15296, -15371, -15444, -15515,
+ -15582, -15647, -15709, -15769, -15826, -15880, -15931, -15980, -16026,
+ -16069, -16110, -16147, -16182, -16214, -16244, -16270, -16294, -16315,
+ -16333, -16349, -16362, -16371, -16378, -16383
+};
+
+/* Sine table 1 in Q14. */
+const int16_t WebRtcIsacfix_kSinTab1[FRAMESAMPLES/2] = {
+ 0, 214, 429, 643, 857, 1072, 1285, 1499, 1713, 1926,
+ 2139, 2351, 2563, 2775, 2986, 3196, 3406, 3616, 3825, 4033,
+ 4240, 4447, 4653, 4859, 5063, 5266, 5469, 5671, 5872, 6071,
+ 6270, 6467, 6664, 6859, 7053, 7246, 7438, 7629, 7818, 8006,
+ 8192, 8377, 8561, 8743, 8923, 9102, 9280, 9456, 9630, 9803,
+ 9974, 10143, 10311, 10477, 10641, 10803, 10963, 11121, 11278, 11433,
+ 11585, 11736, 11885, 12031, 12176, 12318, 12458, 12597, 12733, 12867,
+ 12998, 13128, 13255, 13380, 13502, 13623, 13741, 13856, 13970, 14081,
+ 14189, 14295, 14399, 14500, 14598, 14694, 14788, 14879, 14968, 15053,
+ 15137, 15218, 15296, 15371, 15444, 15515, 15582, 15647, 15709, 15769,
+ 15826, 15880, 15931, 15980, 16026, 16069, 16110, 16147, 16182, 16214,
+ 16244, 16270, 16294, 16315, 16333, 16349, 16362, 16371, 16378, 16383,
+ 16384, 16383, 16378, 16371, 16362, 16349, 16333, 16315, 16294, 16270,
+ 16244, 16214, 16182, 16147, 16110, 16069, 16026, 15980, 15931, 15880,
+ 15826, 15769, 15709, 15647, 15582, 15515, 15444, 15371, 15296, 15218,
+ 15137, 15053, 14968, 14879, 14788, 14694, 14598, 14500, 14399, 14295,
+ 14189, 14081, 13970, 13856, 13741, 13623, 13502, 13380, 13255, 13128,
+ 12998, 12867, 12733, 12597, 12458, 12318, 12176, 12031, 11885, 11736,
+ 11585, 11433, 11278, 11121, 10963, 10803, 10641, 10477, 10311, 10143,
+ 9974, 9803, 9630, 9456, 9280, 9102, 8923, 8743, 8561, 8377,
+ 8192, 8006, 7818, 7629, 7438, 7246, 7053, 6859, 6664, 6467,
+ 6270, 6071, 5872, 5671, 5469, 5266, 5063, 4859, 4653, 4447,
+ 4240, 4033, 3825, 3616, 3406, 3196, 2986, 2775, 2563, 2351,
+ 2139, 1926, 1713, 1499, 1285, 1072, 857, 643, 429, 214
+};
+
+
+/* Sine table 2 in Q14. */
+const int16_t WebRtcIsacfix_kSinTab2[FRAMESAMPLES/4] = {
+ 16384, -16381, 16375, -16367, 16356, -16342, 16325, -16305, 16283, -16257,
+ 16229, -16199, 16165, -16129, 16090, -16048, 16003, -15956, 15906, -15853,
+ 15798, -15739, 15679, -15615, 15549, -15480, 15408, -15334, 15257, -15178,
+ 15095, -15011, 14924, -14834, 14741, -14647, 14549, -14449, 14347, -14242,
+ 14135, -14025, 13913, -13799, 13682, -13563, 13441, -13318, 13192, -13063,
+ 12933, -12800, 12665, -12528, 12389, -12247, 12104, -11958, 11810, -11661,
+ 11509, -11356, 11200, -11042, 10883, -10722, 10559, -10394, 10227, -10059,
+ 9889, -9717, 9543, -9368, 9191, -9013, 8833, -8652, 8469, -8285,
+ 8099, -7912, 7723, -7534, 7342, -7150, 6957, -6762, 6566, -6369,
+ 6171, -5971, 5771, -5570, 5368, -5165, 4961, -4756, 4550, -4344,
+ 4137, -3929, 3720, -3511, 3301, -3091, 2880, -2669, 2457, -2245,
+ 2032, -1819, 1606, -1392, 1179, -965, 750, -536, 322, -107
+};
+#endif
+
+#if defined(MIPS32_LE)
+/* Cosine table 2 in Q14. Used only on MIPS platforms. */
+const int16_t WebRtcIsacfix_kCosTab2[FRAMESAMPLES/4] = {
+ 107, -322, 536, -750, 965, -1179, 1392, -1606, 1819, -2032,
+ 2245, -2457, 2669, -2880, 3091, -3301, 3511, -3720, 3929, -4137,
+ 4344, -4550, 4756, -4961, 5165, -5368, 5570, -5771, 5971, -6171,
+ 6369, -6566, 6762, -6957, 7150, -7342, 7534, -7723, 7912, -8099,
+ 8285, -8469, 8652, -8833, 9013, -9191, 9368, -9543, 9717, -9889,
+ 10059, -10227, 10394, -10559, 10722, -10883, 11042, -11200, 11356, -11509,
+ 11661, -11810, 11958, -12104, 12247, -12389, 12528, -12665, 12800, -12933,
+ 13063, -13192, 13318, -13441, 13563, -13682, 13799, -13913, 14025, -14135,
+ 14242, -14347, 14449, -14549, 14647, -14741, 14834, -14924, 15011, -15095,
+ 15178, -15257, 15334, -15408, 15480, -15549, 15615, -15679, 15739, -15798,
+ 15853, -15906, 15956, -16003, 16048, -16090, 16129, -16165, 16199, -16229,
+ 16257, -16283, 16305, -16325, 16342, -16356, 16367, -16375, 16381, -16384
+};
+#endif
diff --git a/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
index 9a624e9..855b5fe 100644
--- a/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h"
#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
diff --git a/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc b/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc
index 4acb09a..207ee8c 100644
--- a/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc
+++ b/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc
@@ -13,8 +13,6 @@
#include "webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h"
using ::std::string;
-using ::std::tr1::make_tuple;
-using ::testing::ValuesIn;
namespace webrtc {
@@ -73,7 +71,7 @@
size_t pointer = 0;
for (int idx = 0; idx < subblocks; idx++, pointer += subblock_length) {
value = WebRtcIsacfix_Encode(ISACFIX_main_inst_, &in_data[pointer],
- reinterpret_cast<int16_t*>(bit_stream));
+ bit_stream);
}
clocks = clock() - clocks;
EXPECT_GT(value, 0);
@@ -101,10 +99,10 @@
}
const coding_param param_set[] =
- {make_tuple(1, 32000, string("audio_coding/speech_mono_16kHz"),
- string("pcm"), true)};
+ {::std::tr1::make_tuple(1, 32000, string("audio_coding/speech_mono_16kHz"),
+ string("pcm"), true)};
INSTANTIATE_TEST_CASE_P(AllTest, IsacSpeedTest,
- ValuesIn(param_set));
+ ::testing::ValuesIn(param_set));
} // namespace webrtc
diff --git a/modules/audio_coding/codecs/isac/fix/test/kenny.cc b/modules/audio_coding/codecs/isac/fix/test/kenny.cc
index c3c6f13..91c4d76 100644
--- a/modules/audio_coding/codecs/isac/fix/test/kenny.cc
+++ b/modules/audio_coding/codecs/isac/fix/test/kenny.cc
@@ -565,7 +565,7 @@
/* Encode */
stream_len = WebRtcIsacfix_Encode(ISAC_main_inst,
shortdata,
- (int16_t*)streamdata);
+ (uint8_t*)streamdata);
/* If packet is ready, and CE testing, call the different API
functions from the internal API. */
diff --git a/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c b/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
index d5682b2..965f2bc 100644
--- a/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
+++ b/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
@@ -439,7 +439,9 @@
/* iSAC encoding */
if (mode==0 || mode ==1) {
- stream_len = WebRtcIsac_Encode(ISAC_main_inst, shortdata, streamdata);
+ stream_len = WebRtcIsac_Encode(ISAC_main_inst,
+ shortdata,
+ (uint8_t*)streamdata);
if (stream_len < 0) {
/* exit if returned with error */
errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst);
@@ -449,7 +451,10 @@
} else if (mode==2 || mode==3) {
/* iSAC encoding */
if (nbTest != 1)
- stream_len = WebRtcIsacfix_Encode(ISACFIX_main_inst, shortdata, streamdata);
+ stream_len = WebRtcIsacfix_Encode(
+ ISACFIX_main_inst,
+ shortdata,
+ (uint8_t*)streamdata);
else
stream_len = WebRtcIsacfix_EncodeNb(ISACFIX_main_inst, shortdata, streamdata);
diff --git a/modules/audio_coding/codecs/isac/main/interface/isac.h b/modules/audio_coding/codecs/isac/main/interface/isac.h
index 76a61e6..4067058 100644
--- a/modules/audio_coding/codecs/isac/main/interface/isac.h
+++ b/modules/audio_coding/codecs/isac/main/interface/isac.h
@@ -147,7 +147,7 @@
int16_t WebRtcIsac_Encode(
ISACStruct* ISAC_main_inst,
const int16_t* speechIn,
- int16_t* encoded);
+ uint8_t* encoded);
/******************************************************************************
diff --git a/modules/audio_coding/codecs/isac/main/source/Android.mk b/modules/audio_coding/codecs/isac/main/source/Android.mk
deleted file mode 100644
index 07b2a31..0000000
--- a/modules/audio_coding/codecs/isac/main/source/Android.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_isac
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- arith_routines.c \
- arith_routines_hist.c \
- arith_routines_logist.c \
- bandwidth_estimator.c \
- crc.c \
- decode.c \
- decode_bwe.c \
- encode.c \
- encode_lpc_swb.c \
- entropy_coding.c \
- fft.c \
- filter_functions.c \
- filterbank_tables.c \
- intialize.c \
- isac.c \
- filterbanks.c \
- pitch_lag_tables.c \
- lattice.c \
- lpc_gain_swb_tables.c \
- lpc_analysis.c \
- lpc_shape_swb12_tables.c \
- lpc_shape_swb16_tables.c \
- lpc_tables.c \
- pitch_estimator.c \
- pitch_filter.c \
- pitch_gain_tables.c \
- spectrum_ar_model_tables.c \
- transform.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding/codecs/isac/main/source/crc.h b/modules/audio_coding/codecs/isac/main/source/crc.h
index dba8749..19d1bf3 100644
--- a/modules/audio_coding/codecs/isac/main/source/crc.h
+++ b/modules/audio_coding/codecs/isac/main/source/crc.h
@@ -18,7 +18,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CRC_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CRC_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/****************************************************************************
* WebRtcIsac_GetCrc(...)
diff --git a/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c b/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c
index 67e77b5..d59f748 100644
--- a/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c
+++ b/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c
@@ -17,16 +17,16 @@
*/
#include "encode_lpc_swb.h"
-#include "typedefs.h"
-#include "settings.h"
-#include "lpc_shape_swb12_tables.h"
-#include "lpc_shape_swb16_tables.h"
-#include "lpc_gain_swb_tables.h"
-
+#include <math.h>
#include <stdio.h>
#include <string.h>
-#include <math.h>
+
+#include "lpc_gain_swb_tables.h"
+#include "lpc_shape_swb12_tables.h"
+#include "lpc_shape_swb16_tables.h"
+#include "settings.h"
+#include "webrtc/typedefs.h"
/******************************************************************************
* WebRtcIsac_RemoveLarMean()
diff --git a/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h b/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h
index eab98c1..3dd2311 100644
--- a/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h
+++ b/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h
@@ -19,10 +19,9 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ENCODE_LPC_SWB_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ENCODE_LPC_SWB_H_
-#include "typedefs.h"
#include "settings.h"
#include "structs.h"
-
+#include "webrtc/typedefs.h"
/******************************************************************************
* WebRtcIsac_RemoveLarMean()
diff --git a/modules/audio_coding/codecs/isac/main/source/filter_functions.c b/modules/audio_coding/codecs/isac/main/source/filter_functions.c
index 33024a3..76a9e75 100644
--- a/modules/audio_coding/codecs/isac/main/source/filter_functions.c
+++ b/modules/audio_coding/codecs/isac/main/source/filter_functions.c
@@ -9,6 +9,7 @@
*/
#include <memory.h>
+#include <string.h>
#ifdef WEBRTC_ANDROID
#include <stdlib.h>
#endif
diff --git a/modules/audio_coding/codecs/isac/main/source/isac.c b/modules/audio_coding/codecs/isac/main/source/isac.c
index fa54a8d..13170a0 100644
--- a/modules/audio_coding/codecs/isac/main/source/isac.c
+++ b/modules/audio_coding/codecs/isac/main/source/isac.c
@@ -496,7 +496,7 @@
*/
int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
const int16_t* speechIn,
- int16_t* encoded) {
+ uint8_t* encoded) {
float inFrame[FRAMESAMPLES_10ms];
int16_t speechInLB[FRAMESAMPLES_10ms];
int16_t speechInUB[FRAMESAMPLES_10ms];
@@ -504,7 +504,6 @@
int16_t streamLenUB = 0;
int16_t streamLen = 0;
int16_t k = 0;
- uint8_t* ptrEncodedUW8 = (uint8_t*)encoded;
int garbageLen = 0;
int32_t bottleneck = 0;
int16_t bottleneckIdx = 0;
@@ -643,23 +642,22 @@
streamLenUB = 0;
}
- memcpy(ptrEncodedUW8, instLB->ISACencLB_obj.bitstr_obj.stream, streamLenLB);
+ memcpy(encoded, instLB->ISACencLB_obj.bitstr_obj.stream, streamLenLB);
streamLen = streamLenLB;
if (streamLenUB > 0) {
- ptrEncodedUW8[streamLenLB] = (uint8_t)(streamLenUB + 1 +
- LEN_CHECK_SUM_WORD8);
- memcpy(&ptrEncodedUW8[streamLenLB + 1],
- instUB->ISACencUB_obj.bitstr_obj.stream, streamLenUB);
- streamLen += ptrEncodedUW8[streamLenLB];
+ encoded[streamLenLB] = streamLenUB + 1 + LEN_CHECK_SUM_WORD8;
+ memcpy(&encoded[streamLenLB + 1],
+ instUB->ISACencUB_obj.bitstr_obj.stream,
+ streamLenUB);
+ streamLen += encoded[streamLenLB];
} else {
- ptrEncodedUW8[streamLenLB] = 0;
+ encoded[streamLenLB] = 0;
}
} else {
if (streamLenLB == 0) {
return 0;
}
- memcpy(ptrEncodedUW8, instLB->ISACencLB_obj.bitstr_obj.stream,
- streamLenLB);
+ memcpy(encoded, instLB->ISACencLB_obj.bitstr_obj.stream, streamLenLB);
streamLenUB = 0;
streamLen = streamLenLB;
}
@@ -697,11 +695,11 @@
* 255 is the max garbage length we can signal using 8 bits. */
if ((instISAC->bandwidthKHz == isac8kHz) ||
(streamLenUB == 0)) {
- ptrGarbage = &ptrEncodedUW8[streamLenLB];
+ ptrGarbage = &encoded[streamLenLB];
limit = streamLen + 255;
} else {
- ptrGarbage = &ptrEncodedUW8[streamLenLB + 1 + streamLenUB];
- limit = streamLen + (255 - ptrEncodedUW8[streamLenLB]);
+ ptrGarbage = &encoded[streamLenLB + 1 + streamLenUB];
+ limit = streamLen + (255 - encoded[streamLenLB]);
}
minBytes = (minBytes > limit) ? limit : minBytes;
@@ -718,13 +716,12 @@
* That is the only way to preserve backward compatibility. */
if ((instISAC->bandwidthKHz == isac8kHz) ||
(streamLenUB == 0)) {
- ptrEncodedUW8[streamLenLB] = (uint8_t)garbageLen;
+ encoded[streamLenLB] = garbageLen;
} else {
- ptrEncodedUW8[streamLenLB] += (uint8_t)garbageLen;
+ encoded[streamLenLB] += garbageLen;
/* Write the length of the garbage at the end of the upper-band
* bit-stream, if exists. This helps for sanity check. */
- ptrEncodedUW8[streamLenLB + 1 + streamLenUB] =
- (uint8_t)garbageLen;
+ encoded[streamLenLB + 1 + streamLenUB] = garbageLen;
}
streamLen += garbageLen;
@@ -741,16 +738,14 @@
if ((instISAC->bandwidthKHz != isac8kHz) && (streamLenUB > 0)) {
uint32_t crc;
- WebRtcIsac_GetCrc((int16_t*)(&(ptrEncodedUW8[streamLenLB + 1])),
+ WebRtcIsac_GetCrc((int16_t*)(&(encoded[streamLenLB + 1])),
streamLenUB + garbageLen, &crc);
#ifndef WEBRTC_ARCH_BIG_ENDIAN
for (k = 0; k < LEN_CHECK_SUM_WORD8; k++) {
- ptrEncodedUW8[streamLen - LEN_CHECK_SUM_WORD8 + k] =
- (uint8_t)((crc >> (24 - k * 8)) & 0xFF);
+ encoded[streamLen - LEN_CHECK_SUM_WORD8 + k] = crc >> (24 - k * 8);
}
#else
- memcpy(&ptrEncodedUW8[streamLenLB + streamLenUB + 1], &crc,
- LEN_CHECK_SUM_WORD8);
+ memcpy(&encoded[streamLenLB + streamLenUB + 1], &crc, LEN_CHECK_SUM_WORD8);
#endif
}
return streamLen;
@@ -2243,8 +2238,6 @@
} else {
ISACUBStruct* instUB = &(instISAC->instUB);
ISACLBStruct* instLB = &(instISAC->instLB);
- double bottleneckLB;
- double bottleneckUB;
int32_t bottleneck = instISAC->bottleneck;
int16_t codingMode = instISAC->codingMode;
int16_t frameSizeMs = instLB->ISACencLB_obj.new_framelength /
@@ -2263,6 +2256,8 @@
instISAC->maxRateBytesPer30Ms = STREAM_SIZE_MAX_30;
} else if ((encoder_operational_rate == kIsacSuperWideband) &&
(instISAC->encoderSamplingRateKHz == kIsacWideband)) {
+ double bottleneckLB = 0;
+ double bottleneckUB = 0;
if (codingMode == 1) {
WebRtcIsac_RateAllocation(bottleneck, &bottleneckLB, &bottleneckUB,
&(instISAC->bandwidthKHz));
diff --git a/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc b/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
index 3c55bd3..1d65373 100644
--- a/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
+++ b/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
@@ -31,7 +31,7 @@
int16_t speech_data_[kIsacNumberOfSamples];
int16_t output_data_[kIsacNumberOfSamples];
- int16_t bitstream_[kMaxBytes / 2];
+ uint8_t bitstream_[kMaxBytes];
uint8_t bitstream_small_[7]; // Simulate sync packets.
};
diff --git a/modules/audio_coding/codecs/isac/main/source/lattice.c b/modules/audio_coding/codecs/isac/main/source/lattice.c
index a46135a..eabe708 100644
--- a/modules/audio_coding/codecs/isac/main/source/lattice.c
+++ b/modules/audio_coding/codecs/isac/main/source/lattice.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <memory.h>
+#include <string.h>
#ifdef WEBRTC_ANDROID
#include <stdlib.h>
#endif
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c b/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c
index 8ce004b..5cc6c11 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c
@@ -18,7 +18,7 @@
#include "lpc_gain_swb_tables.h"
#include "settings.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
const double WebRtcIsac_kQSizeLpcGain = 0.100000;
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h b/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h
index 121d05e..c163f4a 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h
@@ -20,7 +20,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_GAIN_SWB_TABLES_H_
#include "settings.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
extern const double WebRtcIsac_kQSizeLpcGain;
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c
index 2c5698f..599b89d 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c
@@ -18,7 +18,7 @@
#include "lpc_shape_swb12_tables.h"
#include "settings.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/*
* Mean value of LAR
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h
index cef885a..256f1d4 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h
@@ -20,7 +20,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB12_TABLES_H_
#include "settings.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
extern const double WebRtcIsac_kMeanLarUb12[UB_LPC_ORDER];
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c
index 0f567ed..6176d2c 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c
@@ -18,7 +18,7 @@
#include "lpc_shape_swb16_tables.h"
#include "settings.h"
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/*
* Mean value of LAR
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h
index a4b3a59..3e1bdf7 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h
@@ -20,8 +20,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB16_TABLES_H_
#include "settings.h"
-#include "typedefs.h"
-
+#include "webrtc/typedefs.h"
extern const double WebRtcIsac_kMeanLarUb16[UB_LPC_ORDER];
diff --git a/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h b/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h
index 891c67c..2b446e9 100644
--- a/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h
+++ b/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h
@@ -13,7 +13,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_
#include <math.h>
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#if defined(WEBRTC_POSIX)
#define WebRtcIsac_lrint lrint
diff --git a/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c b/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c
index 75525f6..090b94c 100644
--- a/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c
+++ b/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c
@@ -12,6 +12,7 @@
#include <math.h>
#include <memory.h>
+#include <string.h>
#ifdef WEBRTC_ANDROID
#include <stdlib.h>
#endif
diff --git a/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h b/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h
index e7518b1..8d708ce 100644
--- a/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h
+++ b/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h
@@ -18,7 +18,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_GAIN_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_GAIN_TABLES_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/* header file for coding tables for the pitch filter side-info in the entropy coder */
/********************* Pitch Filter Gain Coefficient Tables ************************/
diff --git a/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h b/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h
index 7c72571..01989f0 100644
--- a/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h
+++ b/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h
@@ -18,7 +18,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
/* header file for coding tables for the pitch filter side-info in the entropy coder */
/********************* Pitch Filter Lag Coefficient Tables ************************/
diff --git a/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc b/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
index 5506bd4..8af4e6f 100644
--- a/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
+++ b/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
@@ -49,7 +49,7 @@
int i, errtype, VADusage = 0, packetLossPercent = 0;
int16_t CodingMode;
- int32_t bottleneck;
+ int32_t bottleneck = 0;
int16_t framesize = 30; /* ms */
int cur_framesmpls, err;
@@ -57,7 +57,7 @@
double starttime, runtime, length_file;
int16_t stream_len = 0;
- int16_t declen, lostFrame = 0, declenTC = 0;
+ int16_t declen = 0, lostFrame = 0, declenTC = 0;
int16_t shortdata[SWBFRAMESAMPLES_10ms];
int16_t vaddata[SWBFRAMESAMPLES_10ms*3];
@@ -609,8 +609,8 @@
cout << "\n" << flush;
length_file = 0;
- int16_t bnIdxTC;
- int16_t jitterInfoTC;
+ int16_t bnIdxTC = 0;
+ int16_t jitterInfoTC = 0;
while (endfile == 0)
{
/* Call init functions at random, fault test number 7 */
@@ -662,8 +662,8 @@
if(!(testNum == 3 && framecnt == 0))
{
stream_len = WebRtcIsac_Encode(ISAC_main_inst,
- shortdata,
- (int16_t*)streamdata);
+ shortdata,
+ (uint8_t*)streamdata);
if((payloadSize != 0) && (stream_len > payloadSize))
{
if(testNum == 0)
diff --git a/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc b/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc
index fd70eca..72d3fe8 100644
--- a/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc
+++ b/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc
@@ -283,7 +283,8 @@
streamLen = WebRtcIsac_Encode(codecInstance[senderIdx],
- audioBuff10ms, (short*)bitStream);
+ audioBuff10ms,
+ (uint8_t*)bitStream);
int16_t ggg;
if (streamLen > 0) {
if(( WebRtcIsac_ReadFrameLen(codecInstance[receiverIdx],
diff --git a/modules/audio_coding/codecs/isac/main/test/simpleKenny.c b/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
index 4175890..2df5a84 100644
--- a/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
+++ b/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
@@ -74,7 +74,7 @@
ISACStruct* ISAC_main_inst;
int16_t stream_len = 0;
- int16_t declen;
+ int16_t declen = 0;
int16_t err;
int16_t cur_framesmpls;
int endfile;
@@ -373,8 +373,10 @@
cur_framesmpls += samplesIn10Ms;
//-------- iSAC encoding ---------
- stream_len = WebRtcIsac_Encode(ISAC_main_inst, shortdata,
- (int16_t*)payload);
+ stream_len = WebRtcIsac_Encode(
+ ISAC_main_inst,
+ shortdata,
+ (uint8_t*)payload);
if(stream_len < 0)
{
diff --git a/modules/audio_coding/codecs/opus/interface/opus_interface.h b/modules/audio_coding/codecs/opus/interface/opus_interface.h
index 7998fdb..11c4ac2 100644
--- a/modules/audio_coding/codecs/opus/interface/opus_interface.h
+++ b/modules/audio_coding/codecs/opus/interface/opus_interface.h
@@ -72,6 +72,31 @@
*/
int16_t WebRtcOpus_SetPacketLossRate(OpusEncInst* inst, int32_t loss_rate);
+/****************************************************************************
+ * WebRtcOpus_SetMaxPlaybackRate(...)
+ *
+ * Configures the maximum playback rate for encoding. Due to hardware
+ * limitations, the receiver may render audio up to a playback rate. Opus
+ * encoder can use this information to optimize for network usage and encoding
+ * complexity. This will affect the audio bandwidth in the coded audio. However,
+ * the input/output sample rate is not affected.
+ *
+ * Input:
+ * - inst : Encoder context
+ * - frequency_hz : Maximum playback rate in Hz.
+ * This parameter can take any value. The relation
+ * between the value and the Opus internal mode is
+ * as following:
+ * frequency_hz <= 8000 narrow band
+ * 8000 < frequency_hz <= 12000 medium band
+ * 12000 < frequency_hz <= 16000 wide band
+ * 16000 < frequency_hz <= 24000 super wide band
+ * frequency_hz > 24000 full band
+ * Return value : 0 - Success
+ * -1 - Error
+ */
+int16_t WebRtcOpus_SetMaxPlaybackRate(OpusEncInst* inst, int32_t frequency_hz);
+
/* TODO(minyue): Check whether an API to check the FEC and the packet loss rate
* is needed. It might not be very useful since there are not many use cases and
* the caller can always maintain the states. */
diff --git a/modules/audio_coding/codecs/opus/opus.gypi b/modules/audio_coding/codecs/opus/opus.gypi
index b1dedd7..89f0a54 100644
--- a/modules/audio_coding/codecs/opus/opus.gypi
+++ b/modules/audio_coding/codecs/opus/opus.gypi
@@ -28,6 +28,7 @@
],
'sources': [
'interface/opus_interface.h',
+ 'opus_inst.h',
'opus_interface.c',
],
},
diff --git a/modules/audio_coding/codecs/opus/opus_fec_test.cc b/modules/audio_coding/codecs/opus/opus_fec_test.cc
index fb4cb04..57d8343 100644
--- a/modules/audio_coding/codecs/opus/opus_fec_test.cc
+++ b/modules/audio_coding/codecs/opus/opus_fec_test.cc
@@ -15,10 +15,8 @@
using ::std::string;
using ::std::tr1::tuple;
-using ::std::tr1::make_tuple;
using ::std::tr1::get;
using ::testing::TestWithParam;
-using ::testing::ValuesIn;
namespace webrtc {
@@ -32,8 +30,7 @@
};
const int kOpusBlockDurationMs = 20;
-const int kOpusInputSamplingKhz = 48;
-const int kOpusOutputSamplingKhz = 32;
+const int kOpusSamplingKhz = 48;
class OpusFecTest : public TestWithParam<coding_param> {
protected:
@@ -47,14 +44,8 @@
virtual void DecodeABlock(bool lost_previous, bool lost_current);
int block_duration_ms_;
- int input_sampling_khz_;
- int output_sampling_khz_;
-
- // Number of samples-per-channel in a frame.
- int input_length_sample_;
-
- // Expected output number of samples-per-channel in a frame.
- int output_length_sample_;
+ int sampling_khz_;
+ int block_length_sample_;
int channels_;
int bit_rate_;
@@ -91,7 +82,7 @@
// Allocate memory to contain the whole file.
in_data_.reset(new int16_t[loop_length_samples_ +
- input_length_sample_ * channels_]);
+ block_length_sample_ * channels_]);
// Copy the file into the buffer.
ASSERT_EQ(fread(&in_data_[0], sizeof(int16_t), loop_length_samples_, fp),
@@ -104,12 +95,12 @@
// beginning of the array. Audio frames cross the end of the excerpt always
// appear as a continuum of memory.
memcpy(&in_data_[loop_length_samples_], &in_data_[0],
- input_length_sample_ * channels_ * sizeof(int16_t));
+ block_length_sample_ * channels_ * sizeof(int16_t));
// Maximum number of bytes in output bitstream.
- max_bytes_ = input_length_sample_ * channels_ * sizeof(int16_t);
+ max_bytes_ = block_length_sample_ * channels_ * sizeof(int16_t);
- out_data_.reset(new int16_t[2 * output_length_sample_ * channels_]);
+ out_data_.reset(new int16_t[2 * block_length_sample_ * channels_]);
bit_stream_.reset(new uint8_t[max_bytes_]);
// Create encoder memory.
@@ -127,10 +118,8 @@
OpusFecTest::OpusFecTest()
: block_duration_ms_(kOpusBlockDurationMs),
- input_sampling_khz_(kOpusInputSamplingKhz),
- output_sampling_khz_(kOpusOutputSamplingKhz),
- input_length_sample_(block_duration_ms_ * input_sampling_khz_),
- output_length_sample_(block_duration_ms_ * output_sampling_khz_),
+ sampling_khz_(kOpusSamplingKhz),
+ block_length_sample_(block_duration_ms_ * sampling_khz_),
data_pointer_(0),
max_bytes_(0),
encoded_bytes_(0),
@@ -141,7 +130,7 @@
void OpusFecTest::EncodeABlock() {
int16_t value = WebRtcOpus_Encode(opus_encoder_,
&in_data_[data_pointer_],
- input_length_sample_,
+ block_length_sample_,
max_bytes_, &bit_stream_[0]);
EXPECT_GT(value, 0);
@@ -162,7 +151,7 @@
} else {
value_1 = WebRtcOpus_DecodePlc(opus_decoder_, &out_data_[0], 1);
}
- EXPECT_EQ(output_length_sample_, value_1);
+ EXPECT_EQ(block_length_sample_, value_1);
}
if (!lost_current) {
@@ -171,7 +160,7 @@
encoded_bytes_,
&out_data_[value_1 * channels_],
&audio_type);
- EXPECT_EQ(output_length_sample_, value_2);
+ EXPECT_EQ(block_length_sample_, value_2);
}
}
@@ -224,7 +213,7 @@
// |data_pointer_| is incremented and wrapped across
// |loop_length_samples_|.
- data_pointer_ = (data_pointer_ + input_length_sample_ * channels_) %
+ data_pointer_ = (data_pointer_ + block_length_sample_ * channels_) %
loop_length_samples_;
}
if (mode_set[i].fec) {
@@ -235,15 +224,15 @@
}
const coding_param param_set[] =
- {make_tuple(1, 64000, string("audio_coding/testfile32kHz"),
- string("pcm")),
- make_tuple(1, 32000, string("audio_coding/testfile32kHz"),
- string("pcm")),
- make_tuple(2, 64000, string("audio_coding/teststereo32kHz"),
- string("pcm"))};
+ {::std::tr1::make_tuple(1, 64000, string("audio_coding/testfile32kHz"),
+ string("pcm")),
+ ::std::tr1::make_tuple(1, 32000, string("audio_coding/testfile32kHz"),
+ string("pcm")),
+ ::std::tr1::make_tuple(2, 64000, string("audio_coding/teststereo32kHz"),
+ string("pcm"))};
// 64 kbps, stereo
INSTANTIATE_TEST_CASE_P(AllTest, OpusFecTest,
- ValuesIn(param_set));
+ ::testing::ValuesIn(param_set));
} // namespace webrtc
diff --git a/modules/audio_coding/codecs/opus/opus_inst.h b/modules/audio_coding/codecs/opus/opus_inst.h
new file mode 100644
index 0000000..50caf83
--- /dev/null
+++ b/modules/audio_coding/codecs/opus/opus_inst.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
+
+#include "opus.h"
+
+struct WebRtcOpusEncInst {
+ OpusEncoder* encoder;
+};
+
+struct WebRtcOpusDecInst {
+ OpusDecoder* decoder_left;
+ OpusDecoder* decoder_right;
+ int prev_decoded_samples;
+ int channels;
+};
+
+
+#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
diff --git a/modules/audio_coding/codecs/opus/opus_interface.c b/modules/audio_coding/codecs/opus/opus_interface.c
index 24fc4fc..af581aa 100644
--- a/modules/audio_coding/codecs/opus/opus_interface.c
+++ b/modules/audio_coding/codecs/opus/opus_interface.c
@@ -9,15 +9,11 @@
*/
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
+#include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h"
#include <stdlib.h>
#include <string.h>
-#include "opus.h"
-
-#include "webrtc/common_audio/signal_processing/resample_by_2_internal.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-
enum {
/* Maximum supported frame size in WebRTC is 60 ms. */
kWebRtcOpusMaxEncodeFrameSizeMs = 60,
@@ -31,25 +27,10 @@
* milliseconds. */
kWebRtcOpusMaxFrameSizePerChannel = 48 * kWebRtcOpusMaxDecodeFrameSizeMs,
- /* Maximum sample count per frame is 48 kHz * maximum frame size in
- * milliseconds * maximum number of channels. */
- kWebRtcOpusMaxFrameSize = kWebRtcOpusMaxFrameSizePerChannel * 2,
-
- /* Maximum sample count per channel for output resampled to 32 kHz,
- * 32 kHz * maximum frame size in milliseconds. */
- kWebRtcOpusMaxFrameSizePerChannel32kHz = 32 * kWebRtcOpusMaxDecodeFrameSizeMs,
-
- /* Number of samples in resampler state. */
- kWebRtcOpusStateSize = 7,
-
/* Default frame size, 20 ms @ 48 kHz, in samples (for one channel). */
kWebRtcOpusDefaultFrameSize = 960,
};
-struct WebRtcOpusEncInst {
- OpusEncoder* encoder;
-};
-
int16_t WebRtcOpus_EncoderCreate(OpusEncInst** inst, int32_t channels) {
OpusEncInst* state;
if (inst != NULL) {
@@ -118,6 +99,27 @@
}
}
+int16_t WebRtcOpus_SetMaxPlaybackRate(OpusEncInst* inst, int32_t frequency_hz) {
+ opus_int32 set_bandwidth;
+
+ if (!inst)
+ return -1;
+
+ if (frequency_hz <= 8000) {
+ set_bandwidth = OPUS_BANDWIDTH_NARROWBAND;
+ } else if (frequency_hz <= 12000) {
+ set_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;
+ } else if (frequency_hz <= 16000) {
+ set_bandwidth = OPUS_BANDWIDTH_WIDEBAND;
+ } else if (frequency_hz <= 24000) {
+ set_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND;
+ } else {
+ set_bandwidth = OPUS_BANDWIDTH_FULLBAND;
+ }
+ return opus_encoder_ctl(inst->encoder,
+ OPUS_SET_MAX_BANDWIDTH(set_bandwidth));
+}
+
int16_t WebRtcOpus_EnableFec(OpusEncInst* inst) {
if (inst) {
return opus_encoder_ctl(inst->encoder, OPUS_SET_INBAND_FEC(1));
@@ -142,15 +144,6 @@
}
}
-struct WebRtcOpusDecInst {
- int16_t state_48_32_left[8];
- int16_t state_48_32_right[8];
- OpusDecoder* decoder_left;
- OpusDecoder* decoder_right;
- int prev_decoded_samples;
- int channels;
-};
-
int16_t WebRtcOpus_DecoderCreate(OpusDecInst** inst, int channels) {
int error_l;
int error_r;
@@ -205,8 +198,6 @@
int16_t WebRtcOpus_DecoderInitNew(OpusDecInst* inst) {
int error = opus_decoder_ctl(inst->decoder_left, OPUS_RESET_STATE);
if (error == OPUS_OK) {
- memset(inst->state_48_32_left, 0, sizeof(inst->state_48_32_left));
- memset(inst->state_48_32_right, 0, sizeof(inst->state_48_32_right));
return 0;
}
return -1;
@@ -215,7 +206,6 @@
int16_t WebRtcOpus_DecoderInit(OpusDecInst* inst) {
int error = opus_decoder_ctl(inst->decoder_left, OPUS_RESET_STATE);
if (error == OPUS_OK) {
- memset(inst->state_48_32_left, 0, sizeof(inst->state_48_32_left));
return 0;
}
return -1;
@@ -224,7 +214,6 @@
int16_t WebRtcOpus_DecoderInitSlave(OpusDecInst* inst) {
int error = opus_decoder_ctl(inst->decoder_right, OPUS_RESET_STATE);
if (error == OPUS_OK) {
- memset(inst->state_48_32_right, 0, sizeof(inst->state_48_32_right));
return 0;
}
return -1;
@@ -267,124 +256,29 @@
return -1;
}
-/* Resample from 48 to 32 kHz. Length of state is assumed to be
- * kWebRtcOpusStateSize (7).
- */
-static int WebRtcOpus_Resample48to32(const int16_t* samples_in, int length,
- int16_t* state, int16_t* samples_out) {
- int i;
- int blocks;
- int16_t output_samples;
- int32_t buffer32[kWebRtcOpusMaxFrameSizePerChannel + kWebRtcOpusStateSize];
-
- /* Resample from 48 kHz to 32 kHz. */
- for (i = 0; i < kWebRtcOpusStateSize; i++) {
- buffer32[i] = state[i];
- state[i] = samples_in[length - kWebRtcOpusStateSize + i];
- }
- for (i = 0; i < length; i++) {
- buffer32[kWebRtcOpusStateSize + i] = samples_in[i];
- }
- /* Resampling 3 samples to 2. Function divides the input in |blocks| number
- * of 3-sample groups, and output is |blocks| number of 2-sample groups.
- * When this is removed, the compensation in WebRtcOpus_DurationEst should be
- * removed too. */
- blocks = length / 3;
- WebRtcSpl_Resample48khzTo32khz(buffer32, buffer32, blocks);
- output_samples = (int16_t) (blocks * 2);
- WebRtcSpl_VectorBitShiftW32ToW16(samples_out, output_samples, buffer32, 15);
-
- return output_samples;
-}
-
-static int WebRtcOpus_DeInterleaveResample(OpusDecInst* inst, int16_t* input,
- int sample_pairs, int16_t* output) {
- int i;
- int16_t buffer_left[kWebRtcOpusMaxFrameSizePerChannel];
- int16_t buffer_right[kWebRtcOpusMaxFrameSizePerChannel];
- int16_t buffer_out[kWebRtcOpusMaxFrameSizePerChannel32kHz];
- int resampled_samples;
-
- /* De-interleave the signal in left and right channel. */
- for (i = 0; i < sample_pairs; i++) {
- /* Take every second sample, starting at the first sample. */
- buffer_left[i] = input[i * 2];
- buffer_right[i] = input[i * 2 + 1];
- }
-
- /* Resample from 48 kHz to 32 kHz for left channel. */
- resampled_samples = WebRtcOpus_Resample48to32(
- buffer_left, sample_pairs, inst->state_48_32_left, buffer_out);
-
- /* Add samples interleaved to output vector. */
- for (i = 0; i < resampled_samples; i++) {
- output[i * 2] = buffer_out[i];
- }
-
- /* Resample from 48 kHz to 32 kHz for right channel. */
- resampled_samples = WebRtcOpus_Resample48to32(
- buffer_right, sample_pairs, inst->state_48_32_right, buffer_out);
-
- /* Add samples interleaved to output vector. */
- for (i = 0; i < resampled_samples; i++) {
- output[i * 2 + 1] = buffer_out[i];
- }
-
- return resampled_samples;
-}
-
int16_t WebRtcOpus_DecodeNew(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
- /* |buffer| is big enough for 120 ms (the largest Opus packet size) of stereo
- * audio at 48 kHz. */
- int16_t buffer[kWebRtcOpusMaxFrameSize];
int16_t* coded = (int16_t*)encoded;
int decoded_samples;
- int resampled_samples;
- /* If mono case, just do a regular call to the decoder.
- * If stereo, we need to de-interleave the stereo output into blocks with
- * left and right channel. Each block is resampled to 32 kHz, and then
- * interleaved again. */
-
- /* Decode to a temporary buffer. */
decoded_samples = DecodeNative(inst->decoder_left, coded, encoded_bytes,
kWebRtcOpusMaxFrameSizePerChannel,
- buffer, audio_type);
+ decoded, audio_type);
if (decoded_samples < 0) {
return -1;
}
- if (inst->channels == 2) {
- /* De-interleave and resample. */
- resampled_samples = WebRtcOpus_DeInterleaveResample(inst,
- buffer,
- decoded_samples,
- decoded);
- } else {
- /* Resample from 48 kHz to 32 kHz. Filter state memory for left channel is
- * used for mono signals. */
- resampled_samples = WebRtcOpus_Resample48to32(buffer,
- decoded_samples,
- inst->state_48_32_left,
- decoded);
- }
-
/* Update decoded sample memory, to be used by the PLC in case of losses. */
inst->prev_decoded_samples = decoded_samples;
- return resampled_samples;
+ return decoded_samples;
}
int16_t WebRtcOpus_Decode(OpusDecInst* inst, const int16_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
- /* |buffer16| is big enough for 120 ms (the largestOpus packet size) of
- * stereo audio at 48 kHz. */
- int16_t buffer16[kWebRtcOpusMaxFrameSize];
int decoded_samples;
- int16_t output_samples;
int i;
/* If mono case, just do a regular call to the decoder.
@@ -393,120 +287,82 @@
* This is to make stereo work with the current setup of NetEQ, which
* requires two calls to the decoder to produce stereo. */
- /* Decode to a temporary buffer. */
decoded_samples = DecodeNative(inst->decoder_left, encoded, encoded_bytes,
- kWebRtcOpusMaxFrameSizePerChannel, buffer16,
+ kWebRtcOpusMaxFrameSizePerChannel, decoded,
audio_type);
if (decoded_samples < 0) {
return -1;
}
if (inst->channels == 2) {
/* The parameter |decoded_samples| holds the number of samples pairs, in
- * case of stereo. Number of samples in |buffer16| equals |decoded_samples|
+ * case of stereo. Number of samples in |decoded| equals |decoded_samples|
* times 2. */
for (i = 0; i < decoded_samples; i++) {
/* Take every second sample, starting at the first sample. This gives
* the left channel. */
- buffer16[i] = buffer16[i * 2];
+ decoded[i] = decoded[i * 2];
}
}
- /* Resample from 48 kHz to 32 kHz. */
- output_samples = WebRtcOpus_Resample48to32(buffer16, decoded_samples,
- inst->state_48_32_left, decoded);
-
/* Update decoded sample memory, to be used by the PLC in case of losses. */
inst->prev_decoded_samples = decoded_samples;
- return output_samples;
+ return decoded_samples;
}
int16_t WebRtcOpus_DecodeSlave(OpusDecInst* inst, const int16_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
- /* |buffer16| is big enough for 120 ms (the largestOpus packet size) of
- * stereo audio at 48 kHz. */
- int16_t buffer16[kWebRtcOpusMaxFrameSize];
int decoded_samples;
- int16_t output_samples;
int i;
- /* Decode to a temporary buffer. */
decoded_samples = DecodeNative(inst->decoder_right, encoded, encoded_bytes,
- kWebRtcOpusMaxFrameSizePerChannel, buffer16,
+ kWebRtcOpusMaxFrameSizePerChannel, decoded,
audio_type);
if (decoded_samples < 0) {
return -1;
}
if (inst->channels == 2) {
/* The parameter |decoded_samples| holds the number of samples pairs, in
- * case of stereo. Number of samples in |buffer16| equals |decoded_samples|
+ * case of stereo. Number of samples in |decoded| equals |decoded_samples|
* times 2. */
for (i = 0; i < decoded_samples; i++) {
/* Take every second sample, starting at the second sample. This gives
* the right channel. */
- buffer16[i] = buffer16[i * 2 + 1];
+ decoded[i] = decoded[i * 2 + 1];
}
} else {
/* Decode slave should never be called for mono packets. */
return -1;
}
- /* Resample from 48 kHz to 32 kHz. */
- output_samples = WebRtcOpus_Resample48to32(buffer16, decoded_samples,
- inst->state_48_32_right, decoded);
- return output_samples;
+ return decoded_samples;
}
int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
int16_t number_of_lost_frames) {
- int16_t buffer[kWebRtcOpusMaxFrameSize];
int16_t audio_type = 0;
int decoded_samples;
- int resampled_samples;
int plc_samples;
- /* If mono case, just do a regular call to the plc function, before
- * resampling.
- * If stereo, we need to de-interleave the stereo output into blocks with
- * left and right channel. Each block is resampled to 32 kHz, and then
- * interleaved again. */
-
- /* Decode to a temporary buffer. The number of samples we ask for is
- * |number_of_lost_frames| times |prev_decoded_samples_|. Limit the number
- * of samples to maximum |kWebRtcOpusMaxFrameSizePerChannel|. */
+ /* The number of samples we ask for is |number_of_lost_frames| times
+ * |prev_decoded_samples_|. Limit the number of samples to maximum
+ * |kWebRtcOpusMaxFrameSizePerChannel|. */
plc_samples = number_of_lost_frames * inst->prev_decoded_samples;
plc_samples = (plc_samples <= kWebRtcOpusMaxFrameSizePerChannel) ?
plc_samples : kWebRtcOpusMaxFrameSizePerChannel;
decoded_samples = DecodeNative(inst->decoder_left, NULL, 0, plc_samples,
- buffer, &audio_type);
+ decoded, &audio_type);
if (decoded_samples < 0) {
return -1;
}
- if (inst->channels == 2) {
- /* De-interleave and resample. */
- resampled_samples = WebRtcOpus_DeInterleaveResample(inst,
- buffer,
- decoded_samples,
- decoded);
- } else {
- /* Resample from 48 kHz to 32 kHz. Filter state memory for left channel is
- * used for mono signals. */
- resampled_samples = WebRtcOpus_Resample48to32(buffer,
- decoded_samples,
- inst->state_48_32_left,
- decoded);
- }
-
- return resampled_samples;
+ return decoded_samples;
}
int16_t WebRtcOpus_DecodePlcMaster(OpusDecInst* inst, int16_t* decoded,
int16_t number_of_lost_frames) {
- int16_t buffer[kWebRtcOpusMaxFrameSize];
int decoded_samples;
- int resampled_samples;
int16_t audio_type = 0;
int plc_samples;
int i;
@@ -517,42 +373,35 @@
* output. This is to make stereo work with the current setup of NetEQ, which
* requires two calls to the decoder to produce stereo. */
- /* Decode to a temporary buffer. The number of samples we ask for is
- * |number_of_lost_frames| times |prev_decoded_samples_|. Limit the number
- * of samples to maximum |kWebRtcOpusMaxFrameSizePerChannel|. */
+ /* The number of samples we ask for is |number_of_lost_frames| times
+ * |prev_decoded_samples_|. Limit the number of samples to maximum
+ * |kWebRtcOpusMaxFrameSizePerChannel|. */
plc_samples = number_of_lost_frames * inst->prev_decoded_samples;
plc_samples = (plc_samples <= kWebRtcOpusMaxFrameSizePerChannel) ?
plc_samples : kWebRtcOpusMaxFrameSizePerChannel;
decoded_samples = DecodeNative(inst->decoder_left, NULL, 0, plc_samples,
- buffer, &audio_type);
+ decoded, &audio_type);
if (decoded_samples < 0) {
return -1;
}
if (inst->channels == 2) {
/* The parameter |decoded_samples| holds the number of sample pairs, in
- * case of stereo. The original number of samples in |buffer| equals
+ * case of stereo. The original number of samples in |decoded| equals
* |decoded_samples| times 2. */
for (i = 0; i < decoded_samples; i++) {
/* Take every second sample, starting at the first sample. This gives
* the left channel. */
- buffer[i] = buffer[i * 2];
+ decoded[i] = decoded[i * 2];
}
}
- /* Resample from 48 kHz to 32 kHz for left channel. */
- resampled_samples = WebRtcOpus_Resample48to32(buffer,
- decoded_samples,
- inst->state_48_32_left,
- decoded);
- return resampled_samples;
+ return decoded_samples;
}
int16_t WebRtcOpus_DecodePlcSlave(OpusDecInst* inst, int16_t* decoded,
int16_t number_of_lost_frames) {
- int16_t buffer[kWebRtcOpusMaxFrameSize];
int decoded_samples;
- int resampled_samples;
int16_t audio_type = 0;
int plc_samples;
int i;
@@ -563,44 +412,35 @@
return -1;
}
- /* Decode to a temporary buffer. The number of samples we ask for is
- * |number_of_lost_frames| times |prev_decoded_samples_|. Limit the number
- * of samples to maximum |kWebRtcOpusMaxFrameSizePerChannel|. */
+ /* The number of samples we ask for is |number_of_lost_frames| times
+ * |prev_decoded_samples_|. Limit the number of samples to maximum
+ * |kWebRtcOpusMaxFrameSizePerChannel|. */
plc_samples = number_of_lost_frames * inst->prev_decoded_samples;
plc_samples = (plc_samples <= kWebRtcOpusMaxFrameSizePerChannel)
? plc_samples : kWebRtcOpusMaxFrameSizePerChannel;
decoded_samples = DecodeNative(inst->decoder_right, NULL, 0, plc_samples,
- buffer, &audio_type);
+ decoded, &audio_type);
if (decoded_samples < 0) {
return -1;
}
/* The parameter |decoded_samples| holds the number of sample pairs,
- * The original number of samples in |buffer| equals |decoded_samples|
+ * The original number of samples in |decoded| equals |decoded_samples|
* times 2. */
for (i = 0; i < decoded_samples; i++) {
/* Take every second sample, starting at the second sample. This gives
* the right channel. */
- buffer[i] = buffer[i * 2 + 1];
+ decoded[i] = decoded[i * 2 + 1];
}
- /* Resample from 48 kHz to 32 kHz for left channel. */
- resampled_samples = WebRtcOpus_Resample48to32(buffer,
- decoded_samples,
- inst->state_48_32_right,
- decoded);
- return resampled_samples;
+ return decoded_samples;
}
int16_t WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
- /* |buffer| is big enough for 120 ms (the largest Opus packet size) of stereo
- * audio at 48 kHz. */
- int16_t buffer[kWebRtcOpusMaxFrameSize];
int16_t* coded = (int16_t*)encoded;
int decoded_samples;
- int resampled_samples;
int fec_samples;
if (WebRtcOpus_PacketHasFec(encoded, encoded_bytes) != 1) {
@@ -609,33 +449,13 @@
fec_samples = opus_packet_get_samples_per_frame(encoded, 48000);
- /* Decode to a temporary buffer. */
decoded_samples = DecodeFec(inst->decoder_left, coded, encoded_bytes,
- fec_samples, buffer, audio_type);
+ fec_samples, decoded, audio_type);
if (decoded_samples < 0) {
return -1;
}
- /* If mono case, just do a regular call to the decoder.
- * If stereo, we need to de-interleave the stereo output into blocks with
- * left and right channel. Each block is resampled to 32 kHz, and then
- * interleaved again. */
- if (inst->channels == 2) {
- /* De-interleave and resample. */
- resampled_samples = WebRtcOpus_DeInterleaveResample(inst,
- buffer,
- decoded_samples,
- decoded);
- } else {
- /* Resample from 48 kHz to 32 kHz. Filter state memory for left channel is
- * used for mono signals. */
- resampled_samples = WebRtcOpus_Resample48to32(buffer,
- decoded_samples,
- inst->state_48_32_left,
- decoded);
- }
-
- return resampled_samples;
+ return decoded_samples;
}
int WebRtcOpus_DurationEst(OpusDecInst* inst,
@@ -652,10 +472,6 @@
/* Invalid payload duration. */
return 0;
}
- /* Compensate for the down-sampling from 48 kHz to 32 kHz.
- * This should be removed when the resampling in WebRtcOpus_Decode is
- * removed. */
- samples = samples * 2 / 3;
return samples;
}
@@ -671,10 +487,6 @@
/* Invalid payload duration. */
return 0;
}
- /* Compensate for the down-sampling from 48 kHz to 32 kHz.
- * This should be removed when the resampling in WebRtcOpus_Decode is
- * removed. */
- samples = samples * 2 / 3;
return samples;
}
diff --git a/modules/audio_coding/codecs/opus/opus_speed_test.cc b/modules/audio_coding/codecs/opus/opus_speed_test.cc
index 16099c6..afbaee3 100644
--- a/modules/audio_coding/codecs/opus/opus_speed_test.cc
+++ b/modules/audio_coding/codecs/opus/opus_speed_test.cc
@@ -12,14 +12,11 @@
#include "webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h"
using ::std::string;
-using ::std::tr1::make_tuple;
-using ::testing::ValuesIn;
namespace webrtc {
static const int kOpusBlockDurationMs = 20;
-static const int kOpusInputSamplingKhz = 48;
-static const int kOpustOutputSamplingKhz = 32;
+static const int kOpusSamplingKhz = 48;
class OpusSpeedTest : public AudioCodecSpeedTest {
protected:
@@ -36,8 +33,8 @@
OpusSpeedTest::OpusSpeedTest()
: AudioCodecSpeedTest(kOpusBlockDurationMs,
- kOpusInputSamplingKhz,
- kOpustOutputSamplingKhz),
+ kOpusSamplingKhz,
+ kOpusSamplingKhz),
opus_encoder_(NULL),
opus_decoder_(NULL) {
}
@@ -106,14 +103,17 @@
// List all test cases: (channel, bit rat, filename, extension).
const coding_param param_set[] =
- {make_tuple(1, 64000, string("audio_coding/speech_mono_32_48kHz"),
- string("pcm"), true),
- make_tuple(1, 32000, string("audio_coding/speech_mono_32_48kHz"),
- string("pcm"), true),
- make_tuple(2, 64000, string("audio_coding/music_stereo_48kHz"),
- string("pcm"), true)};
+ {::std::tr1::make_tuple(1, 64000,
+ string("audio_coding/speech_mono_32_48kHz"),
+ string("pcm"), true),
+ ::std::tr1::make_tuple(1, 32000,
+ string("audio_coding/speech_mono_32_48kHz"),
+ string("pcm"), true),
+ ::std::tr1::make_tuple(2, 64000,
+ string("audio_coding/music_stereo_48kHz"),
+ string("pcm"), true)};
INSTANTIATE_TEST_CASE_P(AllTest, OpusSpeedTest,
- ValuesIn(param_set));
+ ::testing::ValuesIn(param_set));
} // namespace webrtc
diff --git a/modules/audio_coding/codecs/opus/opus_unittest.cc b/modules/audio_coding/codecs/opus/opus_unittest.cc
index ed876cd..4a0d49f 100644
--- a/modules/audio_coding/codecs/opus/opus_unittest.cc
+++ b/modules/audio_coding/codecs/opus/opus_unittest.cc
@@ -11,23 +11,27 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
+#include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h"
#include "webrtc/test/testsupport/fileutils.h"
-struct WebRtcOpusEncInst;
-struct WebRtcOpusDecInst;
-
namespace webrtc {
// Number of samples in a 60 ms stereo frame, sampled at 48 kHz.
-const int kOpusNumberOfSamples = 480 * 6 * 2;
+const int kOpusMaxFrameSamples = 48 * 60 * 2;
// Maximum number of bytes in output bitstream.
const size_t kMaxBytes = 1000;
+// Number of samples-per-channel in a 20 ms frame, sampled at 48 kHz.
+const int kOpus20msFrameSamples = 48 * 20;
+// Number of samples-per-channel in a 10 ms frame, sampled at 48 kHz.
+const int kOpus10msFrameSamples = 48 * 10;
class OpusTest : public ::testing::Test {
protected:
OpusTest();
virtual void SetUp();
+ void TestSetMaxPlaybackRate(opus_int32 expect, int32_t set);
+
WebRtcOpusEncInst* opus_mono_encoder_;
WebRtcOpusEncInst* opus_stereo_encoder_;
WebRtcOpusDecInst* opus_mono_decoder_;
@@ -35,8 +39,8 @@
WebRtcOpusDecInst* opus_stereo_decoder_;
WebRtcOpusDecInst* opus_stereo_decoder_new_;
- int16_t speech_data_[kOpusNumberOfSamples];
- int16_t output_data_[kOpusNumberOfSamples];
+ int16_t speech_data_[kOpusMaxFrameSamples];
+ int16_t output_data_[kOpusMaxFrameSamples];
uint8_t bitstream_[kMaxBytes];
};
@@ -50,21 +54,32 @@
}
void OpusTest::SetUp() {
- // Read some samples from a speech file, to be used in the encode test.
- // In this test we do not care that the sampling frequency of the file is
- // really 32000 Hz. We pretend that it is 48000 Hz.
FILE* input_file;
const std::string file_name =
- webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
+ webrtc::test::ResourcePath("audio_coding/speech_mono_32_48kHz", "pcm");
input_file = fopen(file_name.c_str(), "rb");
ASSERT_TRUE(input_file != NULL);
- ASSERT_EQ(kOpusNumberOfSamples,
+ ASSERT_EQ(kOpusMaxFrameSamples,
static_cast<int32_t>(fread(speech_data_, sizeof(int16_t),
- kOpusNumberOfSamples, input_file)));
+ kOpusMaxFrameSamples, input_file)));
fclose(input_file);
input_file = NULL;
}
+void OpusTest::TestSetMaxPlaybackRate(opus_int32 expect, int32_t set) {
+ opus_int32 bandwidth;
+ // Test mono encoder.
+ EXPECT_EQ(0, WebRtcOpus_SetMaxPlaybackRate(opus_mono_encoder_, set));
+ opus_encoder_ctl(opus_mono_encoder_->encoder,
+ OPUS_GET_MAX_BANDWIDTH(&bandwidth));
+ EXPECT_EQ(expect, bandwidth);
+ // Test stereo encoder.
+ EXPECT_EQ(0, WebRtcOpus_SetMaxPlaybackRate(opus_stereo_encoder_, set));
+ opus_encoder_ctl(opus_stereo_encoder_->encoder,
+ OPUS_GET_MAX_BANDWIDTH(&bandwidth));
+ EXPECT_EQ(expect, bandwidth);
+}
+
// Test failing Create.
TEST_F(OpusTest, OpusCreateFail) {
// Test to see that an invalid pointer is caught.
@@ -114,21 +129,24 @@
// Encode & decode.
int16_t encoded_bytes;
int16_t audio_type;
- int16_t output_data_decode_new[kOpusNumberOfSamples];
- int16_t output_data_decode[kOpusNumberOfSamples];
+ int16_t output_data_decode_new[kOpusMaxFrameSamples];
+ int16_t output_data_decode[kOpusMaxFrameSamples];
int16_t* coded = reinterpret_cast<int16_t*>(bitstream_);
- encoded_bytes = WebRtcOpus_Encode(opus_mono_encoder_, speech_data_, 960,
- kMaxBytes, bitstream_);
- EXPECT_EQ(640, WebRtcOpus_DecodeNew(opus_mono_decoder_new_, bitstream_,
- encoded_bytes, output_data_decode_new,
- &audio_type));
- EXPECT_EQ(640, WebRtcOpus_Decode(opus_mono_decoder_, coded,
- encoded_bytes, output_data_decode,
- &audio_type));
+ encoded_bytes = WebRtcOpus_Encode(opus_mono_encoder_, speech_data_,
+ kOpus20msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeNew(opus_mono_decoder_new_, bitstream_,
+ encoded_bytes, output_data_decode_new,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_Decode(opus_mono_decoder_, coded,
+ encoded_bytes, output_data_decode,
+ &audio_type));
// Data in |output_data_decode_new| should be the same as in
// |output_data_decode|.
- for (int i = 0; i < 640; i++) {
+ for (int i = 0; i < kOpus20msFrameSamples; i++) {
EXPECT_EQ(output_data_decode_new[i], output_data_decode[i]);
}
@@ -154,26 +172,30 @@
// Encode & decode.
int16_t encoded_bytes;
int16_t audio_type;
- int16_t output_data_decode_new[kOpusNumberOfSamples];
- int16_t output_data_decode[kOpusNumberOfSamples];
- int16_t output_data_decode_slave[kOpusNumberOfSamples];
+ int16_t output_data_decode_new[kOpusMaxFrameSamples];
+ int16_t output_data_decode[kOpusMaxFrameSamples];
+ int16_t output_data_decode_slave[kOpusMaxFrameSamples];
int16_t* coded = reinterpret_cast<int16_t*>(bitstream_);
- encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_, 960,
- kMaxBytes, bitstream_);
- EXPECT_EQ(640, WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
- encoded_bytes, output_data_decode_new,
- &audio_type));
- EXPECT_EQ(640, WebRtcOpus_Decode(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode,
+ encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_,
+ kOpus20msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
+ encoded_bytes, output_data_decode_new,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_Decode(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode_slave,
&audio_type));
- EXPECT_EQ(640, WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode_slave,
- &audio_type));
// Data in |output_data_decode_new| should be the same as in
// |output_data_decode| and |output_data_decode_slave| interleaved to a
// stereo signal.
- for (int i = 0; i < 640; i++) {
+ for (int i = 0; i < kOpus20msFrameSamples; i++) {
EXPECT_EQ(output_data_decode_new[i * 2], output_data_decode[i]);
EXPECT_EQ(output_data_decode_new[i * 2 + 1], output_data_decode_slave[i]);
}
@@ -234,26 +256,30 @@
// Encode & decode.
int16_t encoded_bytes;
int16_t audio_type;
- int16_t output_data_decode_new[kOpusNumberOfSamples];
- int16_t output_data_decode[kOpusNumberOfSamples];
- int16_t output_data_decode_slave[kOpusNumberOfSamples];
+ int16_t output_data_decode_new[kOpusMaxFrameSamples];
+ int16_t output_data_decode[kOpusMaxFrameSamples];
+ int16_t output_data_decode_slave[kOpusMaxFrameSamples];
int16_t* coded = reinterpret_cast<int16_t*>(bitstream_);
- encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_, 960,
- kMaxBytes, bitstream_);
- EXPECT_EQ(640, WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
- encoded_bytes, output_data_decode_new,
- &audio_type));
- EXPECT_EQ(640, WebRtcOpus_Decode(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode,
+ encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_,
+ kOpus20msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
+ encoded_bytes, output_data_decode_new,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_Decode(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode_slave,
&audio_type));
- EXPECT_EQ(640, WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode_slave,
- &audio_type));
// Data in |output_data_decode_new| should be the same as in
// |output_data_decode| and |output_data_decode_slave| interleaved to a
// stereo signal.
- for (int i = 0; i < 640; i++) {
+ for (int i = 0; i < kOpus20msFrameSamples; i++) {
EXPECT_EQ(output_data_decode_new[i * 2], output_data_decode[i]);
EXPECT_EQ(output_data_decode_new[i * 2 + 1], output_data_decode_slave[i]);
}
@@ -262,20 +288,23 @@
EXPECT_EQ(0, WebRtcOpus_DecoderInit(opus_stereo_decoder_));
EXPECT_EQ(0, WebRtcOpus_DecoderInitSlave(opus_stereo_decoder_));
- EXPECT_EQ(640, WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
- encoded_bytes, output_data_decode_new,
- &audio_type));
- EXPECT_EQ(640, WebRtcOpus_Decode(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode,
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
+ encoded_bytes, output_data_decode_new,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_Decode(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode_slave,
&audio_type));
- EXPECT_EQ(640, WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode_slave,
- &audio_type));
// Data in |output_data_decode_new| should be the same as in
// |output_data_decode| and |output_data_decode_slave| interleaved to a
// stereo signal.
- for (int i = 0; i < 640; i++) {
+ for (int i = 0; i < kOpus20msFrameSamples; i++) {
EXPECT_EQ(output_data_decode_new[i * 2], output_data_decode[i]);
EXPECT_EQ(output_data_decode_new[i * 2 + 1], output_data_decode_slave[i]);
}
@@ -326,6 +355,30 @@
EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_stereo_encoder_));
}
+TEST_F(OpusTest, OpusSetMaxPlaybackRate) {
+ // Test without creating encoder memory.
+ EXPECT_EQ(-1, WebRtcOpus_SetMaxPlaybackRate(opus_mono_encoder_, 20000));
+ EXPECT_EQ(-1, WebRtcOpus_SetMaxPlaybackRate(opus_stereo_encoder_, 20000));
+
+ // Create encoder memory, try with different bitrates.
+ EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_mono_encoder_, 1));
+ EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_stereo_encoder_, 2));
+
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_FULLBAND, 48000);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_FULLBAND, 24001);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_SUPERWIDEBAND, 24000);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_SUPERWIDEBAND, 16001);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_WIDEBAND, 16000);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_WIDEBAND, 12001);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_MEDIUMBAND, 12000);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_MEDIUMBAND, 8001);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_NARROWBAND, 8000);
+ TestSetMaxPlaybackRate(OPUS_BANDWIDTH_NARROWBAND, 4000);
+
+ // Free memory.
+ EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_mono_encoder_));
+ EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_stereo_encoder_));
+}
// PLC in mono mode.
TEST_F(OpusTest, OpusDecodePlcMono) {
@@ -344,27 +397,31 @@
// Encode & decode.
int16_t encoded_bytes;
int16_t audio_type;
- int16_t output_data_decode_new[kOpusNumberOfSamples];
- int16_t output_data_decode[kOpusNumberOfSamples];
+ int16_t output_data_decode_new[kOpusMaxFrameSamples];
+ int16_t output_data_decode[kOpusMaxFrameSamples];
int16_t* coded = reinterpret_cast<int16_t*>(bitstream_);
- encoded_bytes = WebRtcOpus_Encode(opus_mono_encoder_, speech_data_, 960,
- kMaxBytes, bitstream_);
- EXPECT_EQ(640, WebRtcOpus_DecodeNew(opus_mono_decoder_new_, bitstream_,
- encoded_bytes, output_data_decode_new,
- &audio_type));
- EXPECT_EQ(640, WebRtcOpus_Decode(opus_mono_decoder_, coded,
- encoded_bytes, output_data_decode,
- &audio_type));
+ encoded_bytes = WebRtcOpus_Encode(opus_mono_encoder_, speech_data_,
+ kOpus20msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeNew(opus_mono_decoder_new_, bitstream_,
+ encoded_bytes, output_data_decode_new,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_Decode(opus_mono_decoder_, coded,
+ encoded_bytes, output_data_decode,
+ &audio_type));
// Call decoder PLC for both versions of the decoder.
- int16_t plc_buffer[kOpusNumberOfSamples];
- int16_t plc_buffer_new[kOpusNumberOfSamples];
- EXPECT_EQ(640, WebRtcOpus_DecodePlcMaster(opus_mono_decoder_, plc_buffer, 1));
- EXPECT_EQ(640, WebRtcOpus_DecodePlc(opus_mono_decoder_new_,
- plc_buffer_new, 1));
+ int16_t plc_buffer[kOpusMaxFrameSamples];
+ int16_t plc_buffer_new[kOpusMaxFrameSamples];
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodePlcMaster(opus_mono_decoder_, plc_buffer, 1));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodePlc(opus_mono_decoder_new_, plc_buffer_new, 1));
// Data in |plc_buffer| should be the same as in |plc_buffer_new|.
- for (int i = 0; i < 640; i++) {
+ for (int i = 0; i < kOpus20msFrameSamples; i++) {
EXPECT_EQ(plc_buffer[i], plc_buffer_new[i]);
}
@@ -391,36 +448,42 @@
// Encode & decode.
int16_t encoded_bytes;
int16_t audio_type;
- int16_t output_data_decode_new[kOpusNumberOfSamples];
- int16_t output_data_decode[kOpusNumberOfSamples];
- int16_t output_data_decode_slave[kOpusNumberOfSamples];
+ int16_t output_data_decode_new[kOpusMaxFrameSamples];
+ int16_t output_data_decode[kOpusMaxFrameSamples];
+ int16_t output_data_decode_slave[kOpusMaxFrameSamples];
int16_t* coded = reinterpret_cast<int16_t*>(bitstream_);
- encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_, 960,
- kMaxBytes, bitstream_);
- EXPECT_EQ(640, WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
- encoded_bytes, output_data_decode_new,
- &audio_type));
- EXPECT_EQ(640, WebRtcOpus_Decode(opus_stereo_decoder_, coded,
- encoded_bytes, output_data_decode,
+ encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_,
+ kOpus20msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeNew(opus_stereo_decoder_new_, bitstream_,
+ encoded_bytes, output_data_decode_new,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_Decode(opus_stereo_decoder_, coded,
+ encoded_bytes, output_data_decode,
+ &audio_type));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
+ encoded_bytes,
+ output_data_decode_slave,
&audio_type));
- EXPECT_EQ(640, WebRtcOpus_DecodeSlave(opus_stereo_decoder_, coded,
- encoded_bytes,
- output_data_decode_slave,
- &audio_type));
// Call decoder PLC for both versions of the decoder.
- int16_t plc_buffer_left[kOpusNumberOfSamples];
- int16_t plc_buffer_right[kOpusNumberOfSamples];
- int16_t plc_buffer_new[kOpusNumberOfSamples];
- EXPECT_EQ(640, WebRtcOpus_DecodePlcMaster(opus_stereo_decoder_,
- plc_buffer_left, 1));
- EXPECT_EQ(640, WebRtcOpus_DecodePlcSlave(opus_stereo_decoder_,
- plc_buffer_right, 1));
- EXPECT_EQ(640, WebRtcOpus_DecodePlc(opus_stereo_decoder_new_, plc_buffer_new,
- 1));
+ int16_t plc_buffer_left[kOpusMaxFrameSamples];
+ int16_t plc_buffer_right[kOpusMaxFrameSamples];
+ int16_t plc_buffer_new[kOpusMaxFrameSamples];
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodePlcMaster(opus_stereo_decoder_,
+ plc_buffer_left, 1));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodePlcSlave(opus_stereo_decoder_,
+ plc_buffer_right, 1));
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DecodePlc(opus_stereo_decoder_new_, plc_buffer_new, 1));
// Data in |plc_buffer_left| and |plc_buffer_right|should be the same as the
// interleaved samples in |plc_buffer_new|.
- for (int i = 0, j = 0; i < 640; i++) {
+ for (int i = 0, j = 0; i < kOpus20msFrameSamples; i++) {
EXPECT_EQ(plc_buffer_left[i], plc_buffer_new[j++]);
EXPECT_EQ(plc_buffer_right[i], plc_buffer_new[j++]);
}
@@ -437,21 +500,23 @@
EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_stereo_encoder_, 2));
EXPECT_EQ(0, WebRtcOpus_DecoderCreate(&opus_stereo_decoder_, 2));
- // Encode with different packet sizes (input 48 kHz, output in 32 kHz).
int16_t encoded_bytes;
// 10 ms.
- encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_, 480,
- kMaxBytes, bitstream_);
- EXPECT_EQ(320, WebRtcOpus_DurationEst(opus_stereo_decoder_, bitstream_,
- encoded_bytes));
+ encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_,
+ kOpus10msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus10msFrameSamples,
+ WebRtcOpus_DurationEst(opus_stereo_decoder_, bitstream_,
+ encoded_bytes));
// 20 ms
- encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_, 960,
- kMaxBytes, bitstream_);
- EXPECT_EQ(640, WebRtcOpus_DurationEst(opus_stereo_decoder_, bitstream_,
- encoded_bytes));
-
+ encoded_bytes = WebRtcOpus_Encode(opus_stereo_encoder_, speech_data_,
+ kOpus20msFrameSamples, kMaxBytes,
+ bitstream_);
+ EXPECT_EQ(kOpus20msFrameSamples,
+ WebRtcOpus_DurationEst(opus_stereo_decoder_, bitstream_,
+ encoded_bytes));
// Free memory.
EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_stereo_encoder_));
diff --git a/modules/audio_coding/codecs/pcm16b/Android.mk b/modules/audio_coding/codecs/pcm16b/Android.mk
deleted file mode 100644
index 2e88fa6..0000000
--- a/modules/audio_coding/codecs/pcm16b/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_pcm16b
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := pcm16b.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../../..
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding/codecs/pcm16b/include/pcm16b.h b/modules/audio_coding/codecs/pcm16b/include/pcm16b.h
index 76ba2ff..9c96b83 100644
--- a/modules/audio_coding/codecs/pcm16b/include/pcm16b.h
+++ b/modules/audio_coding/codecs/pcm16b/include/pcm16b.h
@@ -14,7 +14,7 @@
* Define the fixpoint numeric formats
*/
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#ifdef __cplusplus
extern "C" {
@@ -26,18 +26,18 @@
* "Encode" a sample vector to 16 bit linear (Encoded standard is big endian)
*
* Input:
- * - speechIn16b : Input speech vector
- * - len : Number of samples in speech vector
+ * - speechIn16b : Input speech vector
+ * - length_samples : Number of samples in speech vector
*
* Output:
- * - speechOut16b : Encoded data vector (big endian 16 bit)
+ * - speechOut16b : Encoded data vector (big endian 16 bit)
*
- * Returned value : Size in bytes of speechOut16b
+ * Returned value : Size in bytes of speechOut16b
*/
-int16_t WebRtcPcm16b_EncodeW16(int16_t *speechIn16b,
- int16_t len,
- int16_t *speechOut16b);
+int16_t WebRtcPcm16b_EncodeW16(const int16_t* speechIn16b,
+ int16_t length_samples,
+ int16_t* speechOut16b);
/****************************************************************************
* WebRtcPcm16b_Encode(...)
@@ -64,18 +64,18 @@
* "Decode" a vector to 16 bit linear (Encoded standard is big endian)
*
* Input:
- * - speechIn16b : Encoded data vector (big endian 16 bit)
- * - len : Number of bytes in speechIn16b
+ * - speechIn16b : Encoded data vector (big endian 16 bit)
+ * - length_bytes : Number of bytes in speechIn16b
*
* Output:
- * - speechOut16b : Decoded speech vector
+ * - speechOut16b : Decoded speech vector
*
- * Returned value : Samples in speechOut16b
+ * Returned value : Samples in speechOut16b
*/
int16_t WebRtcPcm16b_DecodeW16(void *inst,
int16_t *speechIn16b,
- int16_t len,
+ int16_t length_bytes,
int16_t *speechOut16b,
int16_t* speechType);
diff --git a/modules/audio_coding/codecs/pcm16b/pcm16b.c b/modules/audio_coding/codecs/pcm16b/pcm16b.c
index 34aadc3..af6720f 100644
--- a/modules/audio_coding/codecs/pcm16b/pcm16b.c
+++ b/modules/audio_coding/codecs/pcm16b/pcm16b.c
@@ -12,32 +12,31 @@
#include "pcm16b.h"
#include <stdlib.h>
-
-#include "typedefs.h"
-
#ifdef WEBRTC_ARCH_BIG_ENDIAN
-#include "signal_processing_library.h"
+#include <string.h>
#endif
+#include "webrtc/typedefs.h"
+
#define HIGHEND 0xFF00
#define LOWEND 0xFF
/* Encoder with int16_t Output */
-int16_t WebRtcPcm16b_EncodeW16(int16_t *speechIn16b,
- int16_t len,
- int16_t *speechOut16b)
+int16_t WebRtcPcm16b_EncodeW16(const int16_t* speechIn16b,
+ int16_t length_samples,
+ int16_t* speechOut16b)
{
#ifdef WEBRTC_ARCH_BIG_ENDIAN
- WEBRTC_SPL_MEMCPY_W16(speechOut16b, speechIn16b, len);
+ memcpy(speechOut16b, speechIn16b, length_samples * sizeof(int16_t));
#else
int i;
- for (i=0;i<len;i++) {
+ for (i = 0; i < length_samples; i++) {
speechOut16b[i]=(((uint16_t)speechIn16b[i])>>8)|((((uint16_t)speechIn16b[i])<<8)&0xFF00);
}
#endif
- return(len<<1);
+ return length_samples << 1;
}
@@ -64,15 +63,15 @@
/* Decoder with int16_t Input instead of char when the int16_t Encoder is used */
int16_t WebRtcPcm16b_DecodeW16(void *inst,
int16_t *speechIn16b,
- int16_t len,
+ int16_t length_bytes,
int16_t *speechOut16b,
int16_t* speechType)
{
#ifdef WEBRTC_ARCH_BIG_ENDIAN
- WEBRTC_SPL_MEMCPY_W8(speechOut16b, speechIn16b, ((len*sizeof(int16_t)+1)>>1));
+ memcpy(speechOut16b, speechIn16b, length_bytes);
#else
int i;
- int samples=len>>1;
+ int samples = length_bytes >> 1;
for (i=0;i<samples;i++) {
speechOut16b[i]=(((uint16_t)speechIn16b[i])>>8)|(((uint16_t)(speechIn16b[i]&0xFF))<<8);
@@ -84,7 +83,7 @@
// Avoid warning.
(void)(inst = NULL);
- return(len>>1);
+ return length_bytes >> 1;
}
/* "old" version of the decoder that uses char as input (not used in NetEq any more) */
diff --git a/modules/audio_coding/codecs/tools/audio_codec_speed_tests.gypi b/modules/audio_coding/codecs/tools/audio_codec_speed_tests.gypi
index 4d675e1..6503a51 100644
--- a/modules/audio_coding/codecs/tools/audio_codec_speed_tests.gypi
+++ b/modules/audio_coding/codecs/tools/audio_codec_speed_tests.gypi
@@ -26,9 +26,7 @@
'<(webrtc_root)/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -36,9 +34,7 @@
],
}],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'audio_codec_speed_tests_apk_target',
diff --git a/modules/audio_coding/main/acm2/acm_amr.cc b/modules/audio_coding/main/acm2/acm_amr.cc
index 64e323c..6c958a5 100644
--- a/modules/audio_coding/main/acm2/acm_amr.cc
+++ b/modules/audio_coding/main/acm2/acm_amr.cc
@@ -77,8 +77,6 @@
int16_t ACMAMR::SetBitRateSafe(const int32_t /* rate */) { return -1; }
-void ACMAMR::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
int16_t ACMAMR::SetAMREncoderPackingFormat(
ACMAMRPackingFormat /* packing_format */) {
return -1;
@@ -268,14 +266,6 @@
return 0;
}
-void ACMAMR::InternalDestructEncoderInst(void* ptr_inst) {
- // Free the memory where ptr_inst is pointing to
- if (ptr_inst != NULL) {
- WebRtcAmr_FreeEnc(static_cast<AMR_encinst_t_*>(ptr_inst));
- }
- return;
-}
-
int16_t ACMAMR::SetAMREncoderPackingFormat(ACMAMRPackingFormat packing_format) {
if ((packing_format != AMRBandwidthEfficient) &&
(packing_format != AMROctetAlligned) &&
diff --git a/modules/audio_coding/main/acm2/acm_amr.h b/modules/audio_coding/main/acm2/acm_amr.h
index efa5687..ab22300 100644
--- a/modules/audio_coding/main/acm2/acm_amr.h
+++ b/modules/audio_coding/main/acm2/acm_amr.h
@@ -48,8 +48,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t SetBitRateSafe(const int32_t rate);
int16_t EnableDTX();
diff --git a/modules/audio_coding/main/acm2/acm_amrwb.cc b/modules/audio_coding/main/acm2/acm_amrwb.cc
index 4dd4e97..5c9540f 100644
--- a/modules/audio_coding/main/acm2/acm_amrwb.cc
+++ b/modules/audio_coding/main/acm2/acm_amrwb.cc
@@ -73,8 +73,6 @@
int16_t ACMAMRwb::SetBitRateSafe(const int32_t /* rate */) { return -1; }
-void ACMAMRwb::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
int16_t ACMAMRwb::SetAMRwbEncoderPackingFormat(
ACMAMRPackingFormat /* packing_format */) {
return -1;
@@ -273,13 +271,6 @@
return 0;
}
-void ACMAMRwb::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcAmrWb_FreeEnc(static_cast<AMRWB_encinst_t_*>(ptr_inst));
- }
- return;
-}
-
int16_t ACMAMRwb::SetAMRwbEncoderPackingFormat(
ACMAMRPackingFormat packing_format) {
if ((packing_format != AMRBandwidthEfficient) &&
diff --git a/modules/audio_coding/main/acm2/acm_amrwb.h b/modules/audio_coding/main/acm2/acm_amrwb.h
index c8db659..5b90e0b 100644
--- a/modules/audio_coding/main/acm2/acm_amrwb.h
+++ b/modules/audio_coding/main/acm2/acm_amrwb.h
@@ -48,8 +48,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t SetBitRateSafe(const int32_t rate);
int16_t EnableDTX();
diff --git a/modules/audio_coding/main/acm2/acm_celt.cc b/modules/audio_coding/main/acm2/acm_celt.cc
index 3cd6e84..70cd0a8 100644
--- a/modules/audio_coding/main/acm2/acm_celt.cc
+++ b/modules/audio_coding/main/acm2/acm_celt.cc
@@ -57,10 +57,6 @@
return;
}
-void ACMCELT::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
int16_t ACMCELT::SetBitRateSafe(const int32_t /*rate*/) {
return -1;
}
@@ -159,13 +155,6 @@
}
}
-void ACMCELT::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcCelt_FreeEnc(static_cast<CELT_encinst_t*>(ptr_inst));
- }
- return;
-}
-
int16_t ACMCELT::SetBitRateSafe(const int32_t rate) {
// Check that rate is in the valid range.
if ((rate >= 48000) && (rate <= 128000)) {
diff --git a/modules/audio_coding/main/acm2/acm_celt.h b/modules/audio_coding/main/acm2/acm_celt.h
index dc8d3ee..b7325da 100644
--- a/modules/audio_coding/main/acm2/acm_celt.h
+++ b/modules/audio_coding/main/acm2/acm_celt.h
@@ -37,8 +37,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t SetBitRateSafe(const int32_t rate);
CELT_encinst_t_* enc_inst_ptr_;
diff --git a/modules/audio_coding/main/acm2/acm_cng.cc b/modules/audio_coding/main/acm2/acm_cng.cc
index 7f0adf8..8fef66e 100644
--- a/modules/audio_coding/main/acm2/acm_cng.cc
+++ b/modules/audio_coding/main/acm2/acm_cng.cc
@@ -71,13 +71,6 @@
encoder_initialized_ = false;
}
-void ACMCNG::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcCng_FreeEnc(static_cast<CNG_enc_inst*>(ptr_inst));
- }
- return;
-}
-
} // namespace acm2
} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_cng.h b/modules/audio_coding/main/acm2/acm_cng.h
index a0c1c55..d3a8bd3 100644
--- a/modules/audio_coding/main/acm2/acm_cng.h
+++ b/modules/audio_coding/main/acm2/acm_cng.h
@@ -35,12 +35,11 @@
int16_t InternalInitEncoder(WebRtcACMCodecParams *codec_params);
protected:
- void DestructEncoderSafe();
+ void DestructEncoderSafe() OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t EnableDTX() {
return -1;
}
diff --git a/modules/audio_coding/main/acm2/acm_dtmf_playout.cc b/modules/audio_coding/main/acm2/acm_dtmf_playout.cc
index 07bab65..c9f4ded 100644
--- a/modules/audio_coding/main/acm2/acm_dtmf_playout.cc
+++ b/modules/audio_coding/main/acm2/acm_dtmf_playout.cc
@@ -40,10 +40,6 @@
int16_t ACMDTMFPlayout::InternalCreateEncoder() { return -1; }
-void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
void ACMDTMFPlayout::DestructEncoderSafe() {
return;
}
@@ -73,11 +69,6 @@
return 0;
}
-void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) {
- // DTMFPlayout has no instance
- return;
-}
-
void ACMDTMFPlayout::DestructEncoderSafe() {
// DTMFPlayout has no instance
return;
diff --git a/modules/audio_coding/main/acm2/acm_dtmf_playout.h b/modules/audio_coding/main/acm2/acm_dtmf_playout.h
index 5adb0dd..dd87df4 100644
--- a/modules/audio_coding/main/acm2/acm_dtmf_playout.h
+++ b/modules/audio_coding/main/acm2/acm_dtmf_playout.h
@@ -33,8 +33,6 @@
void DestructEncoderSafe();
int16_t InternalCreateEncoder();
-
- void InternalDestructEncoderInst(void* ptr_inst);
};
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_g722.cc b/modules/audio_coding/main/acm2/acm_g722.cc
index 8d45772..e0a756d 100644
--- a/modules/audio_coding/main/acm2/acm_g722.cc
+++ b/modules/audio_coding/main/acm2/acm_g722.cc
@@ -52,8 +52,6 @@
void ACMG722::DestructEncoderSafe() { return; }
-void ACMG722::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
#else //===================== Actual Implementation =======================
// Encoder and decoder memory
@@ -187,13 +185,6 @@
encoder_initialized_ = false;
}
-void ACMG722::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcG722_FreeEncoder(static_cast<G722EncInst*>(ptr_inst));
- }
- return;
-}
-
#endif
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_g722.h b/modules/audio_coding/main/acm2/acm_g722.h
index 6197a9d..dd3b766 100644
--- a/modules/audio_coding/main/acm2/acm_g722.h
+++ b/modules/audio_coding/main/acm2/acm_g722.h
@@ -11,8 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G722_H_
#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G722_H_
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
typedef struct WebRtcG722EncInst G722EncInst;
typedef struct WebRtcG722DecInst G722DecInst;
@@ -33,7 +33,9 @@
// For FEC.
ACMGenericCodec* CreateInstance(void);
- int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
+ int16_t InternalEncode(uint8_t* bitstream,
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
@@ -44,12 +46,11 @@
const uint8_t audio_channel)
EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
- void DestructEncoderSafe();
+ void DestructEncoderSafe() OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
ACMG722EncStr* ptr_enc_str_;
G722EncInst* encoder_inst_ptr_;
diff --git a/modules/audio_coding/main/acm2/acm_g7221.cc b/modules/audio_coding/main/acm2/acm_g7221.cc
index 3609f07..5739dd3 100644
--- a/modules/audio_coding/main/acm2/acm_g7221.cc
+++ b/modules/audio_coding/main/acm2/acm_g7221.cc
@@ -115,8 +115,6 @@
void ACMG722_1::DestructEncoderSafe() { return; }
-void ACMG722_1::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
#else //===================== Actual Implementation =======================
ACMG722_1::ACMG722_1(int16_t codec_id)
: encoder_inst_ptr_(NULL),
@@ -316,13 +314,6 @@
encoder_inst32_ptr_ = NULL;
}
-void ACMG722_1::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- delete ptr_inst;
- }
- return;
-}
-
#endif
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_g7221.h b/modules/audio_coding/main/acm2/acm_g7221.h
index 74d9b27..3935798 100644
--- a/modules/audio_coding/main/acm2/acm_g7221.h
+++ b/modules/audio_coding/main/acm2/acm_g7221.h
@@ -43,8 +43,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int32_t operational_rate_;
G722_1_Inst_t_* encoder_inst_ptr_;
diff --git a/modules/audio_coding/main/acm2/acm_g7221c.cc b/modules/audio_coding/main/acm2/acm_g7221c.cc
index f6555f5..996eaf8 100644
--- a/modules/audio_coding/main/acm2/acm_g7221c.cc
+++ b/modules/audio_coding/main/acm2/acm_g7221c.cc
@@ -115,8 +115,6 @@
void ACMG722_1C::DestructEncoderSafe() { return; }
-void ACMG722_1C::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
#else //===================== Actual Implementation =======================
ACMG722_1C::ACMG722_1C(int16_t codec_id)
: encoder_inst_ptr_(NULL),
@@ -322,13 +320,6 @@
encoder_inst48_ptr_ = NULL;
}
-void ACMG722_1C::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- delete ptr_inst;
- }
- return;
-}
-
#endif
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_g7221c.h b/modules/audio_coding/main/acm2/acm_g7221c.h
index 66b0f54..52a0db9 100644
--- a/modules/audio_coding/main/acm2/acm_g7221c.h
+++ b/modules/audio_coding/main/acm2/acm_g7221c.h
@@ -43,8 +43,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int32_t operational_rate_;
G722_1_Inst_t_* encoder_inst_ptr_;
diff --git a/modules/audio_coding/main/acm2/acm_g729.cc b/modules/audio_coding/main/acm2/acm_g729.cc
index 6f95f36..de1af6e 100644
--- a/modules/audio_coding/main/acm2/acm_g729.cc
+++ b/modules/audio_coding/main/acm2/acm_g729.cc
@@ -57,8 +57,6 @@
void ACMG729::DestructEncoderSafe() { return; }
-void ACMG729::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
#else //===================== Actual Implementation =======================
ACMG729::ACMG729(int16_t codec_id)
: codec_id_(codec_id),
@@ -245,13 +243,6 @@
}
}
-void ACMG729::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcG729_FreeEnc(static_cast<G729_encinst_t_*>(ptr_inst));
- }
- return;
-}
-
#endif
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_g729.h b/modules/audio_coding/main/acm2/acm_g729.h
index 88b1bf7..be48c6e 100644
--- a/modules/audio_coding/main/acm2/acm_g729.h
+++ b/modules/audio_coding/main/acm2/acm_g729.h
@@ -38,8 +38,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t EnableDTX();
int16_t DisableDTX();
diff --git a/modules/audio_coding/main/acm2/acm_g7291.cc b/modules/audio_coding/main/acm2/acm_g7291.cc
index 3cf9f22..e50d027 100644
--- a/modules/audio_coding/main/acm2/acm_g7291.cc
+++ b/modules/audio_coding/main/acm2/acm_g7291.cc
@@ -51,8 +51,6 @@
void ACMG729_1::DestructEncoderSafe() { return; }
-void ACMG729_1::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
int16_t ACMG729_1::SetBitRateSafe(const int32_t /*rate*/) { return -1; }
#else //===================== Actual Implementation =======================
@@ -159,13 +157,6 @@
}
}
-void ACMG729_1::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- // WebRtcG7291_Free((G729_1_inst_t*)ptrInst);
- }
- return;
-}
-
int16_t ACMG729_1::SetBitRateSafe(const int32_t rate) {
// allowed rates: { 8000, 12000, 14000, 16000, 18000, 20000,
// 22000, 24000, 26000, 28000, 30000, 32000};
diff --git a/modules/audio_coding/main/acm2/acm_g7291.h b/modules/audio_coding/main/acm2/acm_g7291.h
index 38c8fe1..8387dcf 100644
--- a/modules/audio_coding/main/acm2/acm_g7291.h
+++ b/modules/audio_coding/main/acm2/acm_g7291.h
@@ -38,8 +38,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t SetBitRateSafe(const int32_t rate);
G729_1_inst_t_* encoder_inst_ptr_;
diff --git a/modules/audio_coding/main/acm2/acm_generic_codec.cc b/modules/audio_coding/main/acm2/acm_generic_codec.cc
index a4808c0..29dccd2 100644
--- a/modules/audio_coding/main/acm2/acm_generic_codec.cc
+++ b/modules/audio_coding/main/acm2/acm_generic_codec.cc
@@ -60,7 +60,6 @@
sent_cn_previous_(false),
prev_frame_cng_(0),
has_internal_fec_(false),
- neteq_decode_lock_(NULL),
codec_wrapper_lock_(*RWLockWrapper::CreateRWLock()),
last_timestamp_(0xD87F3F9F),
unique_id_(0) {
@@ -210,7 +209,6 @@
return 0;
}
WriteLockScoped lockCodec(codec_wrapper_lock_);
- ReadLockScoped lockNetEq(*neteq_decode_lock_);
// Not all codecs accept the whole frame to be pushed into encoder at once.
// Some codecs needs to be feed with a specific number of samples different
@@ -394,7 +392,6 @@
int16_t ACMGenericCodec::ResetEncoder() {
WriteLockScoped lockCodec(codec_wrapper_lock_);
- ReadLockScoped lockNetEq(*neteq_decode_lock_);
return ResetEncoderSafe();
}
@@ -443,7 +440,6 @@
int16_t ACMGenericCodec::InitEncoder(WebRtcACMCodecParams* codec_params,
bool force_initialization) {
WriteLockScoped lockCodec(codec_wrapper_lock_);
- ReadLockScoped lockNetEq(*neteq_decode_lock_);
return InitEncoderSafe(codec_params, force_initialization);
}
@@ -626,14 +622,6 @@
return status;
}
-void ACMGenericCodec::DestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WriteLockScoped lockCodec(codec_wrapper_lock_);
- ReadLockScoped lockNetEq(*neteq_decode_lock_);
- InternalDestructEncoderInst(ptr_inst);
- }
-}
-
uint32_t ACMGenericCodec::EarliestTimestamp() const {
ReadLockScoped cs(codec_wrapper_lock_);
return in_timestamp_[0];
@@ -843,7 +831,7 @@
// Calculate number of samples in 10 ms blocks, and number ms in one frame.
int16_t samples_in_10ms = static_cast<int16_t>(freq_hz / 100);
int32_t frame_len_ms = static_cast<int32_t>(frame_len_smpl_) * 1000 / freq_hz;
- int16_t status;
+ int16_t status = -1;
// Vector for storing maximum 30 ms of mono audio at 48 kHz.
int16_t audio[1440];
@@ -1005,6 +993,12 @@
return -1;
}
+int ACMGenericCodec::SetOpusMaxPlaybackRate(int /* frequency_hz */) {
+ WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceAudioCoding, unique_id_,
+ "The send-codec is not Opus, failed to set maximum playback rate.");
+ return -1;
+}
+
} // namespace acm2
} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_generic_codec.h b/modules/audio_coding/main/acm2/acm_generic_codec.h
index fa21ca0..ad6f412 100644
--- a/modules/audio_coding/main/acm2/acm_generic_codec.h
+++ b/modules/audio_coding/main/acm2/acm_generic_codec.h
@@ -11,12 +11,12 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_GENERIC_CODEC_H_
#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_GENERIC_CODEC_H_
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
#include "webrtc/modules/audio_coding/neteq/interface/audio_decoder.h"
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/system_wrappers/interface/trace.h"
#define MAX_FRAME_SIZE_10MSEC 6
@@ -213,18 +213,6 @@
int16_t SetBitRate(const int32_t bitrate_bps);
///////////////////////////////////////////////////////////////////////////
- // DestructEncoderInst()
- // This API is used in conferencing. It will free the memory that is pointed
- // by |ptr_inst|. |ptr_inst| is a pointer to encoder instance, created and
- // filled up by calling EncoderInst(...).
- //
- // Inputs:
- // -ptr_inst : pointer to an encoder instance to be deleted.
- //
- //
- void DestructEncoderInst(void* ptr_inst);
-
- ///////////////////////////////////////////////////////////////////////////
// uint32_t EarliestTimestamp()
// Returns the timestamp of the first 10 ms in audio buffer. This is used
// to identify if a synchronization of two encoders is required.
@@ -294,17 +282,6 @@
int32_t IsInternalDTXReplaced(bool* internal_dtx_replaced);
///////////////////////////////////////////////////////////////////////////
- // void SetNetEqDecodeLock()
- // Passes the NetEq lock to the codec.
- //
- // Input:
- // -neteq_decode_lock : pointer to the lock associated with NetEQ of ACM.
- //
- void SetNetEqDecodeLock(RWLockWrapper* neteq_decode_lock) {
- neteq_decode_lock_ = neteq_decode_lock;
- }
-
- ///////////////////////////////////////////////////////////////////////////
// bool HasInternalDTX()
// Used to check if the codec has internal DTX.
//
@@ -312,7 +289,10 @@
// true if the codec has an internal DTX, e.g. G729,
// false otherwise.
//
- bool HasInternalDTX() const { return has_internal_dtx_; }
+ bool HasInternalDTX() const {
+ ReadLockScoped rl(codec_wrapper_lock_);
+ return has_internal_dtx_;
+ }
///////////////////////////////////////////////////////////////////////////
// int32_t GetEstimatedBandwidth()
@@ -436,7 +416,8 @@
// -1 if failed, or if this is meaningless for the given codec.
// 0 if succeeded.
//
- virtual int16_t UpdateEncoderSampFreq(uint16_t samp_freq_hz);
+ virtual int16_t UpdateEncoderSampFreq(uint16_t samp_freq_hz)
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// EncoderSampFreq()
@@ -450,7 +431,8 @@
// -1 if failed to output sampling rate.
// 0 if the sample rate is returned successfully.
//
- virtual int16_t EncoderSampFreq(uint16_t* samp_freq_hz);
+ virtual int16_t EncoderSampFreq(uint16_t* samp_freq_hz)
+ SHARED_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// int32_t ConfigISACBandwidthEstimator()
@@ -515,8 +497,6 @@
//
virtual int32_t SetISACMaxRate(const uint32_t max_rate_bps);
- int32_t FrameSize() { return frame_len_smpl_; }
-
///////////////////////////////////////////////////////////////////////////
// REDPayloadISAC()
// This is an iSAC-specific function. The function is called to get RED
@@ -546,6 +526,22 @@
int16_t* payload_len_bytes);
///////////////////////////////////////////////////////////////////////////
+ // int SetOpusMaxPlaybackRate()
+ // Sets maximum playback rate the receiver will render, if the codec is Opus.
+ // This is to tell Opus that it is enough to code the input audio up to a
+ // bandwidth. Opus can take this information to optimize the bit rate and
+ // increase the computation efficiency.
+ //
+ // Input:
+ // -frequency_hz : maximum playback rate in Hz.
+ //
+ // Return value:
+ // -1 if failed or on codecs other than Opus
+ // 0 if succeeded.
+ //
+ virtual int SetOpusMaxPlaybackRate(int /* frequency_hz */);
+
+ ///////////////////////////////////////////////////////////////////////////
// HasFrameToEncode()
// Returns true if there is enough audio buffered for encoding, such that
// calling Encode() will return a payload.
@@ -569,7 +565,10 @@
// true if the codec has an internal FEC, e.g. Opus.
// false otherwise.
//
- bool HasInternalFEC() const { return has_internal_fec_; }
+ bool HasInternalFEC() const {
+ ReadLockScoped rl(codec_wrapper_lock_);
+ return has_internal_fec_;
+ }
///////////////////////////////////////////////////////////////////////////
// int SetFEC();
@@ -624,7 +623,8 @@
// See EncoderParam() for the description of function, input(s)/output(s)
// and return value.
//
- int16_t EncoderParamsSafe(WebRtcACMCodecParams* enc_params);
+ int16_t EncoderParamsSafe(WebRtcACMCodecParams* enc_params)
+ SHARED_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// See ResetEncoder() for the description of function, input(s)/output(s)
@@ -651,7 +651,8 @@
// See DestructEncoder() for the description of function,
// input(s)/output(s) and return value.
//
- virtual void DestructEncoderSafe() = 0;
+ virtual void DestructEncoderSafe()
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_) = 0;
///////////////////////////////////////////////////////////////////////////
// See SetBitRate() for the description of function, input(s)/output(s)
@@ -659,7 +660,8 @@
//
// Any codec that can change the bit-rate has to implement this.
//
- virtual int16_t SetBitRateSafe(const int32_t bitrate_bps);
+ virtual int16_t SetBitRateSafe(const int32_t bitrate_bps)
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// See GetEstimatedBandwidth() for the description of function,
@@ -707,7 +709,7 @@
// -1 if failed,
// 0 if succeeded.
//
- int16_t CreateEncoder();
+ int16_t CreateEncoder() EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// int16_t EnableVAD();
@@ -773,7 +775,8 @@
// otherwise the length of the bit-stream is returned.
//
virtual int16_t InternalEncode(uint8_t* bitstream,
- int16_t* bitstream_len_byte) = 0;
+ int16_t* bitstream_len_byte)
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_) = 0;
///////////////////////////////////////////////////////////////////////////
// int16_t InternalInitEncoder()
@@ -794,7 +797,8 @@
// -1 if failed,
// 0 if succeeded.
//
- virtual int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params) = 0;
+ virtual int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params)
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_) = 0;
///////////////////////////////////////////////////////////////////////////
// void IncreaseNoMissedSamples()
@@ -805,7 +809,8 @@
// -num_samples : the number of overwritten samples is incremented
// by this value.
//
- void IncreaseNoMissedSamples(const int16_t num_samples);
+ void IncreaseNoMissedSamples(const int16_t num_samples)
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// int16_t InternalCreateEncoder()
@@ -820,23 +825,6 @@
virtual int16_t InternalCreateEncoder() = 0;
///////////////////////////////////////////////////////////////////////////
- // void InternalDestructEncoderInst()
- // This is a codec-specific method, used in conferencing, called from
- // DestructEncoderInst(). The input argument is pointer to encoder instance
- // (codec instance for codecs that encoder and decoder share the same
- // instance). This method is called to free the memory that |ptr_inst| is
- // pointing to.
- //
- // Input:
- // -ptr_inst : pointer to encoder instance.
- //
- // Return value:
- // -1 if failed,
- // 0 if succeeded.
- //
- virtual void InternalDestructEncoderInst(void* ptr_inst) = 0;
-
- ///////////////////////////////////////////////////////////////////////////
// int16_t InternalResetEncoder()
// This method is called to reset the states of encoder. However, the
// current parameters, e.g. frame-length, should remain as they are. For
@@ -849,7 +837,8 @@
// -1 if failed,
// 0 if succeeded.
//
- virtual int16_t InternalResetEncoder();
+ virtual int16_t InternalResetEncoder()
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
///////////////////////////////////////////////////////////////////////////
// int16_t ProcessFrameVADDTX()
@@ -900,41 +889,42 @@
// &in_audio_[in_audio_ix_write_] always point to where new audio can be
// written to
- int16_t in_audio_ix_write_;
+ int16_t in_audio_ix_write_ GUARDED_BY(codec_wrapper_lock_);
// &in_audio_[in_audio_ix_read_] points to where audio has to be read from
- int16_t in_audio_ix_read_;
+ int16_t in_audio_ix_read_ GUARDED_BY(codec_wrapper_lock_);
- int16_t in_timestamp_ix_write_;
+ int16_t in_timestamp_ix_write_ GUARDED_BY(codec_wrapper_lock_);
// Where the audio is stored before encoding,
// To save memory the following buffer can be allocated
// dynamically for 80 ms depending on the sampling frequency
// of the codec.
- int16_t* in_audio_;
- uint32_t* in_timestamp_;
+ int16_t* in_audio_ GUARDED_BY(codec_wrapper_lock_);
+ uint32_t* in_timestamp_ GUARDED_BY(codec_wrapper_lock_);
- int16_t frame_len_smpl_;
- uint16_t num_channels_;
+ int16_t frame_len_smpl_ GUARDED_BY(codec_wrapper_lock_);
+ uint16_t num_channels_ GUARDED_BY(codec_wrapper_lock_);
// This will point to a static database of the supported codecs
- int16_t codec_id_;
+ int16_t codec_id_ GUARDED_BY(codec_wrapper_lock_);
// This will account for the number of samples were not encoded
// the case is rare, either samples are missed due to overwrite
// at input buffer or due to encoding error
- uint32_t num_missed_samples_;
+ uint32_t num_missed_samples_ GUARDED_BY(codec_wrapper_lock_);
// True if the encoder instance created
- bool encoder_exist_;
+ bool encoder_exist_ GUARDED_BY(codec_wrapper_lock_);
// True if the encoder instance initialized
- bool encoder_initialized_;
+ bool encoder_initialized_ GUARDED_BY(codec_wrapper_lock_);
- const bool registered_in_neteq_; // TODO(henrik.lundin) Remove?
+ const bool registered_in_neteq_
+ GUARDED_BY(codec_wrapper_lock_); // TODO(henrik.lundin) Remove?
// VAD/DTX
- bool has_internal_dtx_;
+ bool has_internal_dtx_ GUARDED_BY(codec_wrapper_lock_);
WebRtcVadInst* ptr_vad_inst_ GUARDED_BY(codec_wrapper_lock_);
bool vad_enabled_ GUARDED_BY(codec_wrapper_lock_);
ACMVADMode vad_mode_ GUARDED_BY(codec_wrapper_lock_);
@@ -947,13 +937,9 @@
int16_t prev_frame_cng_ GUARDED_BY(codec_wrapper_lock_);
// FEC.
- bool has_internal_fec_;
+ bool has_internal_fec_ GUARDED_BY(codec_wrapper_lock_);
- WebRtcACMCodecParams encoder_params_;
-
- // Used as a global lock for all available decoders
- // so that no decoder is used when NetEQ decodes.
- RWLockWrapper* neteq_decode_lock_;
+ WebRtcACMCodecParams encoder_params_ GUARDED_BY(codec_wrapper_lock_);
// Used to lock wrapper internal data
// such as buffers and state variables.
diff --git a/modules/audio_coding/main/acm2/acm_gsmfr.cc b/modules/audio_coding/main/acm2/acm_gsmfr.cc
index 90f9fce..1c37a1e 100644
--- a/modules/audio_coding/main/acm2/acm_gsmfr.cc
+++ b/modules/audio_coding/main/acm2/acm_gsmfr.cc
@@ -49,10 +49,6 @@
void ACMGSMFR::DestructEncoderSafe() { return; }
-void ACMGSMFR::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
#else //===================== Actual Implementation =======================
ACMGSMFR::ACMGSMFR(int16_t codec_id)
@@ -147,13 +143,6 @@
encoder_initialized_ = false;
}
-void ACMGSMFR::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcGSMFR_FreeEnc(static_cast<GSMFR_encinst_t_*>(ptr_inst));
- }
- return;
-}
-
#endif
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_gsmfr.h b/modules/audio_coding/main/acm2/acm_gsmfr.h
index 79c3a18..2cf954b 100644
--- a/modules/audio_coding/main/acm2/acm_gsmfr.h
+++ b/modules/audio_coding/main/acm2/acm_gsmfr.h
@@ -38,8 +38,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t EnableDTX();
int16_t DisableDTX();
diff --git a/modules/audio_coding/main/acm2/acm_ilbc.cc b/modules/audio_coding/main/acm2/acm_ilbc.cc
index eaa079c..d23ec6e 100644
--- a/modules/audio_coding/main/acm2/acm_ilbc.cc
+++ b/modules/audio_coding/main/acm2/acm_ilbc.cc
@@ -40,8 +40,6 @@
void ACMILBC::DestructEncoderSafe() { return; }
-void ACMILBC::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
int16_t ACMILBC::SetBitRateSafe(const int32_t /* rate */) { return -1; }
#else //===================== Actual Implementation =======================
@@ -117,13 +115,6 @@
}
}
-void ACMILBC::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcIlbcfix_EncoderFree(static_cast<iLBC_encinst_t_*>(ptr_inst));
- }
- return;
-}
-
int16_t ACMILBC::SetBitRateSafe(const int32_t rate) {
// Check that rate is valid. No need to store the value
if (rate == 13300) {
diff --git a/modules/audio_coding/main/acm2/acm_ilbc.h b/modules/audio_coding/main/acm2/acm_ilbc.h
index fd6e853..3cf2c73 100644
--- a/modules/audio_coding/main/acm2/acm_ilbc.h
+++ b/modules/audio_coding/main/acm2/acm_ilbc.h
@@ -29,19 +29,21 @@
// for FEC
ACMGenericCodec* CreateInstance(void);
- int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
+ int16_t InternalEncode(uint8_t* bitstream,
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
protected:
- int16_t SetBitRateSafe(const int32_t rate);
+ int16_t SetBitRateSafe(const int32_t rate) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
- void DestructEncoderSafe();
+ void DestructEncoderSafe() OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
iLBC_encinst_t_* encoder_inst_ptr_;
};
diff --git a/modules/audio_coding/main/acm2/acm_isac.cc b/modules/audio_coding/main/acm2/acm_isac.cc
index 9fbcdd4..f3682f1 100644
--- a/modules/audio_coding/main/acm2/acm_isac.cc
+++ b/modules/audio_coding/main/acm2/acm_isac.cc
@@ -93,8 +93,6 @@
void ACMISAC::DestructEncoderSafe() { return; }
-void ACMISAC::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
int16_t ACMISAC::Transcode(uint8_t* /* bitstream */,
int16_t* /* bitstream_len_byte */,
int16_t /* q_bwe */,
@@ -349,8 +347,9 @@
return -1;
}
*bitstream_len_byte = ACM_ISAC_ENCODE(
- codec_inst_ptr_->inst, &in_audio_[in_audio_ix_read_],
- reinterpret_cast<int16_t*>(bitstream));
+ codec_inst_ptr_->inst,
+ &in_audio_[in_audio_ix_read_],
+ bitstream);
// increment the read index this tell the caller that how far
// we have gone forward in reading the audio buffer
in_audio_ix_read_ += samples_in_10ms_audio_;
@@ -461,13 +460,6 @@
return;
}
-void ACMISAC::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- ACM_ISAC_FREE(static_cast<ACM_ISAC_STRUCT *>(ptr_inst));
- }
- return;
-}
-
int16_t ACMISAC::SetBitRateSafe(int32_t bit_rate) {
CriticalSectionScoped lock(codec_inst_crit_sect_.get());
if (codec_inst_ptr_ == NULL) {
@@ -694,7 +686,10 @@
"Couldn't config iSAC BWE.");
return -1;
}
- UpdateFrameLen();
+ {
+ WriteLockScoped wl(codec_wrapper_lock_);
+ UpdateFrameLen();
+ }
CriticalSectionScoped lock(codec_inst_crit_sect_.get());
ACM_ISAC_GETSENDBITRATE(codec_inst_ptr_->inst, &isac_current_bn_);
return 0;
@@ -733,7 +728,7 @@
size_t encoded_len,
int16_t* decoded,
SpeechType* speech_type) {
- int16_t temp_type;
+ int16_t temp_type = 1; // Default is speech.
CriticalSectionScoped lock(codec_inst_crit_sect_.get());
int ret =
ACM_ISAC_DECODE_B(static_cast<ACM_ISAC_STRUCT*>(codec_inst_ptr_->inst),
@@ -792,6 +787,7 @@
AudioDecoder* ACMISAC::Decoder(int codec_id) {
// Create iSAC instance if it does not exist.
+ WriteLockScoped wl(codec_wrapper_lock_);
if (!encoder_exist_) {
CriticalSectionScoped lock(codec_inst_crit_sect_.get());
assert(codec_inst_ptr_->inst == NULL);
diff --git a/modules/audio_coding/main/acm2/acm_isac.h b/modules/audio_coding/main/acm2/acm_isac.h
index 3249526..486313a 100644
--- a/modules/audio_coding/main/acm2/acm_isac.h
+++ b/modules/audio_coding/main/acm2/acm_isac.h
@@ -11,10 +11,10 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ISAC_H_
#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ISAC_H_
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h"
#include "webrtc/modules/audio_coding/neteq/interface/audio_decoder.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
namespace webrtc {
@@ -34,19 +34,23 @@
explicit ACMISAC(int16_t codec_id);
~ACMISAC();
- int16_t InternalInitDecoder(WebRtcACMCodecParams* codec_params);
+ int16_t InternalInitDecoder(WebRtcACMCodecParams* codec_params)
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
// Methods below are inherited from ACMGenericCodec.
ACMGenericCodec* CreateInstance(void) OVERRIDE;
int16_t InternalEncode(uint8_t* bitstream,
- int16_t* bitstream_len_byte) OVERRIDE;
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
- int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params) OVERRIDE;
+ int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t UpdateDecoderSampFreq(int16_t codec_id) OVERRIDE;
- int16_t UpdateEncoderSampFreq(uint16_t samp_freq_hz) OVERRIDE;
+ int16_t UpdateEncoderSampFreq(uint16_t samp_freq_hz) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t EncoderSampFreq(uint16_t* samp_freq_hz) OVERRIDE;
@@ -95,12 +99,14 @@
int32_t rate,
bool is_red);
- void UpdateFrameLen();
+ void UpdateFrameLen() EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
// Methods below are inherited from ACMGenericCodec.
- void DestructEncoderSafe() OVERRIDE;
+ void DestructEncoderSafe() OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
- int16_t SetBitRateSafe(const int32_t bit_rate) OVERRIDE;
+ int16_t SetBitRateSafe(const int32_t bit_rate) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int32_t GetEstimatedBandwidthSafe() OVERRIDE;
@@ -111,8 +117,6 @@
int16_t InternalCreateEncoder() OVERRIDE;
- void InternalDestructEncoderInst(void* ptr_inst) OVERRIDE;
-
void CurrentRate(int32_t* rate_bit_per_sec) OVERRIDE;
virtual AudioDecoder* Decoder(int codec_id) OVERRIDE;
diff --git a/modules/audio_coding/main/acm2/acm_opus.cc b/modules/audio_coding/main/acm2/acm_opus.cc
index 544c932..8991dae 100644
--- a/modules/audio_coding/main/acm2/acm_opus.cc
+++ b/modules/audio_coding/main/acm2/acm_opus.cc
@@ -27,7 +27,8 @@
: encoder_inst_ptr_(NULL),
sample_freq_(0),
bitrate_(0),
- channels_(1) {
+ channels_(1),
+ packet_loss_rate_(0) {
return;
}
@@ -56,10 +57,6 @@
return;
}
-void ACMOpus::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
int16_t ACMOpus::SetBitRateSafe(const int32_t /*rate*/) {
return -1;
}
@@ -70,7 +67,8 @@
: encoder_inst_ptr_(NULL),
sample_freq_(32000), // Default sampling frequency.
bitrate_(20000), // Default bit-rate.
- channels_(1) { // Default mono
+ channels_(1), // Default mono.
+ packet_loss_rate_(0) { // Initial packet loss rate.
codec_id_ = codec_id;
// Opus has internal DTX, but we dont use it for now.
has_internal_dtx_ = false;
@@ -80,7 +78,7 @@
if (codec_id_ != ACMCodecDB::kOpus) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, unique_id_,
"Wrong codec id for Opus.");
- sample_freq_ = -1;
+ sample_freq_ = 0xFFFF;
bitrate_ = -1;
}
return;
@@ -175,13 +173,6 @@
}
}
-void ACMOpus::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcOpus_EncoderFree(static_cast<OpusEncInst*>(ptr_inst));
- }
- return;
-}
-
int16_t ACMOpus::SetBitRateSafe(const int32_t rate) {
if (rate < 6000 || rate > 510000) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, unique_id_,
@@ -203,28 +194,63 @@
int ACMOpus::SetFEC(bool enable_fec) {
// Ask the encoder to enable FEC.
if (enable_fec) {
- if (WebRtcOpus_EnableFec(encoder_inst_ptr_) == 0) {
- fec_enabled_ = true;
+ if (WebRtcOpus_EnableFec(encoder_inst_ptr_) == 0)
return 0;
- }
} else {
- if (WebRtcOpus_DisableFec(encoder_inst_ptr_) == 0) {
- fec_enabled_ = false;
+ if (WebRtcOpus_DisableFec(encoder_inst_ptr_) == 0)
return 0;
- }
}
return -1;
}
int ACMOpus::SetPacketLossRate(int loss_rate) {
- // Ask the encoder to change the target packet loss rate.
- if (WebRtcOpus_SetPacketLossRate(encoder_inst_ptr_, loss_rate) == 0) {
- packet_loss_rate_ = loss_rate;
+ // Optimize the loss rate to configure Opus. Basically, optimized loss rate is
+ // the input loss rate rounded down to various levels, because a robustly good
+ // audio quality is achieved by lowering the packet loss down.
+ // Additionally, to prevent toggling, margins are used, i.e., when jumping to
+ // a loss rate from below, a higher threshold is used than jumping to the same
+ // level from above.
+ const int kPacketLossRate20 = 20;
+ const int kPacketLossRate10 = 10;
+ const int kPacketLossRate5 = 5;
+ const int kPacketLossRate1 = 1;
+ const int kLossRate20Margin = 2;
+ const int kLossRate10Margin = 1;
+ const int kLossRate5Margin = 1;
+ int opt_loss_rate;
+ if (loss_rate >= kPacketLossRate20 + kLossRate20Margin *
+ (kPacketLossRate20 - packet_loss_rate_ > 0 ? 1 : -1)) {
+ opt_loss_rate = kPacketLossRate20;
+ } else if (loss_rate >= kPacketLossRate10 + kLossRate10Margin *
+ (kPacketLossRate10 - packet_loss_rate_ > 0 ? 1 : -1)) {
+ opt_loss_rate = kPacketLossRate10;
+ } else if (loss_rate >= kPacketLossRate5 + kLossRate5Margin *
+ (kPacketLossRate5 - packet_loss_rate_ > 0 ? 1 : -1)) {
+ opt_loss_rate = kPacketLossRate5;
+ } else if (loss_rate >= kPacketLossRate1) {
+ opt_loss_rate = kPacketLossRate1;
+ } else {
+ opt_loss_rate = 0;
+ }
+
+ if (packet_loss_rate_ == opt_loss_rate) {
return 0;
}
+
+ // Ask the encoder to change the target packet loss rate.
+ if (WebRtcOpus_SetPacketLossRate(encoder_inst_ptr_, opt_loss_rate) == 0) {
+ packet_loss_rate_ = opt_loss_rate;
+ return 0;
+ }
+
return -1;
}
+int ACMOpus::SetOpusMaxPlaybackRate(int frequency_hz) {
+ // Informs Opus encoder of the maximum playback rate the receiver will render.
+ return WebRtcOpus_SetMaxPlaybackRate(encoder_inst_ptr_, frequency_hz);
+}
+
#endif // WEBRTC_CODEC_OPUS
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_opus.h b/modules/audio_coding/main/acm2/acm_opus.h
index 07ce072..8ef6406 100644
--- a/modules/audio_coding/main/acm2/acm_opus.h
+++ b/modules/audio_coding/main/acm2/acm_opus.h
@@ -28,7 +28,9 @@
ACMGenericCodec* CreateInstance(void);
- int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
+ int16_t InternalEncode(uint8_t* bitstream,
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalInitEncoder(WebRtcACMCodecParams *codec_params);
@@ -36,21 +38,21 @@
virtual int SetPacketLossRate(int loss_rate) OVERRIDE;
+ virtual int SetOpusMaxPlaybackRate(int frequency_hz) OVERRIDE;
+
protected:
void DestructEncoderSafe();
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
- int16_t SetBitRateSafe(const int32_t rate);
+ int16_t SetBitRateSafe(const int32_t rate) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
WebRtcOpusEncInst* encoder_inst_ptr_;
uint16_t sample_freq_;
int32_t bitrate_;
int channels_;
- bool fec_enabled_;
int packet_loss_rate_;
};
diff --git a/modules/audio_coding/main/acm2/acm_opus_unittest.cc b/modules/audio_coding/main/acm2/acm_opus_unittest.cc
new file mode 100644
index 0000000..e33c9d3
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_opus_unittest.cc
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/main/acm2/acm_opus.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
+
+namespace webrtc {
+
+namespace acm2 {
+
+namespace {
+ const CodecInst kOpusCodecInst = {105, "opus", 48000, 960, 1, 32000};
+ // These constants correspond to those used in ACMOpus::SetPacketLossRate().
+ const int kPacketLossRate20 = 20;
+ const int kPacketLossRate10 = 10;
+ const int kPacketLossRate5 = 5;
+ const int kPacketLossRate1 = 1;
+ const int kLossRate20Margin = 2;
+ const int kLossRate10Margin = 1;
+ const int kLossRate5Margin = 1;
+} // namespace
+
+class AcmOpusTest : public ACMOpus {
+ public:
+ explicit AcmOpusTest(int16_t codec_id)
+ : ACMOpus(codec_id) {}
+ ~AcmOpusTest() {}
+ int packet_loss_rate() { return packet_loss_rate_; }
+
+ void TestSetPacketLossRate(int from, int to, int expected_return);
+};
+
+#ifdef WEBRTC_CODEC_OPUS
+void AcmOpusTest::TestSetPacketLossRate(int from, int to, int expected_return) {
+ for (int loss = from; loss <= to; (to >= from) ? ++loss : --loss) {
+ EXPECT_EQ(0, SetPacketLossRate(loss));
+ EXPECT_EQ(expected_return, packet_loss_rate());
+ }
+}
+
+TEST(AcmOpusTest, PacketLossRateOptimized) {
+ AcmOpusTest opus(ACMCodecDB::kOpus);
+ WebRtcACMCodecParams params;
+ memcpy(&(params.codec_inst), &kOpusCodecInst, sizeof(CodecInst));
+ EXPECT_EQ(0, opus.InitEncoder(¶ms, true));
+ EXPECT_EQ(0, opus.SetFEC(true));
+
+ // Note that the order of the following calls is critical.
+ opus.TestSetPacketLossRate(0, 0, 0);
+ opus.TestSetPacketLossRate(kPacketLossRate1,
+ kPacketLossRate5 + kLossRate5Margin - 1,
+ kPacketLossRate1);
+ opus.TestSetPacketLossRate(kPacketLossRate5 + kLossRate5Margin,
+ kPacketLossRate10 + kLossRate10Margin - 1,
+ kPacketLossRate5);
+ opus.TestSetPacketLossRate(kPacketLossRate10 + kLossRate10Margin,
+ kPacketLossRate20 + kLossRate20Margin - 1,
+ kPacketLossRate10);
+ opus.TestSetPacketLossRate(kPacketLossRate20 + kLossRate20Margin,
+ 100,
+ kPacketLossRate20);
+ opus.TestSetPacketLossRate(kPacketLossRate20 + kLossRate20Margin,
+ kPacketLossRate20 - kLossRate20Margin,
+ kPacketLossRate20);
+ opus.TestSetPacketLossRate(kPacketLossRate20 - kLossRate20Margin - 1,
+ kPacketLossRate10 - kLossRate10Margin,
+ kPacketLossRate10);
+ opus.TestSetPacketLossRate(kPacketLossRate10 - kLossRate10Margin - 1,
+ kPacketLossRate5 - kLossRate5Margin,
+ kPacketLossRate5);
+ opus.TestSetPacketLossRate(kPacketLossRate5 - kLossRate5Margin - 1,
+ kPacketLossRate1,
+ kPacketLossRate1);
+ opus.TestSetPacketLossRate(0, 0, 0);
+}
+#else
+void AcmOpusTest:TestSetPacketLossRate(int /* from */, int /* to */,
+ int /* expected_return */) {
+ return;
+}
+#endif // WEBRTC_CODEC_OPUS
+
+} // namespace acm2
+
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_pcm16b.cc b/modules/audio_coding/main/acm2/acm_pcm16b.cc
index 89688a8..54c7860 100644
--- a/modules/audio_coding/main/acm2/acm_pcm16b.cc
+++ b/modules/audio_coding/main/acm2/acm_pcm16b.cc
@@ -41,8 +41,6 @@
int16_t ACMPCM16B::InternalCreateEncoder() { return -1; }
-void ACMPCM16B::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
void ACMPCM16B::DestructEncoderSafe() { return; }
#else //===================== Actual Implementation =======================
@@ -77,11 +75,6 @@
return 0;
}
-void ACMPCM16B::InternalDestructEncoderInst(void* /* ptr_inst */) {
- // PCM has no instance.
- return;
-}
-
void ACMPCM16B::DestructEncoderSafe() {
// PCM has no instance.
encoder_exist_ = false;
diff --git a/modules/audio_coding/main/acm2/acm_pcm16b.h b/modules/audio_coding/main/acm2/acm_pcm16b.h
index 23b8c12..0811a17 100644
--- a/modules/audio_coding/main/acm2/acm_pcm16b.h
+++ b/modules/audio_coding/main/acm2/acm_pcm16b.h
@@ -25,17 +25,18 @@
// For FEC.
ACMGenericCodec* CreateInstance(void);
- int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
+ int16_t InternalEncode(uint8_t* bitstream,
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
protected:
- void DestructEncoderSafe();
+ void DestructEncoderSafe() OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int32_t sampling_freq_hz_;
};
diff --git a/modules/audio_coding/main/acm2/acm_pcma.cc b/modules/audio_coding/main/acm2/acm_pcma.cc
index 1dd6e48..548e8fd 100644
--- a/modules/audio_coding/main/acm2/acm_pcma.cc
+++ b/modules/audio_coding/main/acm2/acm_pcma.cc
@@ -47,11 +47,6 @@
return 0;
}
-void ACMPCMA::InternalDestructEncoderInst(void* /* ptr_inst */) {
- // PCM has no instance.
- return;
-}
-
void ACMPCMA::DestructEncoderSafe() {
// PCM has no instance.
return;
diff --git a/modules/audio_coding/main/acm2/acm_pcma.h b/modules/audio_coding/main/acm2/acm_pcma.h
index 2da873c..d7d00b4 100644
--- a/modules/audio_coding/main/acm2/acm_pcma.h
+++ b/modules/audio_coding/main/acm2/acm_pcma.h
@@ -25,7 +25,9 @@
// For FEC.
ACMGenericCodec* CreateInstance(void);
- int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
+ int16_t InternalEncode(uint8_t* bitstream,
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
@@ -33,8 +35,6 @@
void DestructEncoderSafe();
int16_t InternalCreateEncoder();
-
- void InternalDestructEncoderInst(void* ptr_inst);
};
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_pcmu.cc b/modules/audio_coding/main/acm2/acm_pcmu.cc
index 7d2536f..5c03236 100644
--- a/modules/audio_coding/main/acm2/acm_pcmu.cc
+++ b/modules/audio_coding/main/acm2/acm_pcmu.cc
@@ -48,10 +48,6 @@
return 0;
}
-void ACMPCMU::InternalDestructEncoderInst(void* /* ptr_inst */) {
- // PCM has no instance.
-}
-
void ACMPCMU::DestructEncoderSafe() {
// PCM has no instance.
encoder_exist_ = false;
diff --git a/modules/audio_coding/main/acm2/acm_pcmu.h b/modules/audio_coding/main/acm2/acm_pcmu.h
index 18d8279..dccfffd 100644
--- a/modules/audio_coding/main/acm2/acm_pcmu.h
+++ b/modules/audio_coding/main/acm2/acm_pcmu.h
@@ -25,16 +25,17 @@
// For FEC.
ACMGenericCodec* CreateInstance(void);
- int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
+ int16_t InternalEncode(uint8_t* bitstream,
+ int16_t* bitstream_len_byte) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
protected:
- void DestructEncoderSafe();
+ void DestructEncoderSafe() OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
int16_t InternalCreateEncoder();
-
- void InternalDestructEncoderInst(void* ptr_inst);
};
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_receive_test.cc b/modules/audio_coding/main/acm2/acm_receive_test.cc
new file mode 100644
index 0000000..7e41328
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_receive_test.cc
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/main/acm2/acm_receive_test.h"
+
+#include <assert.h>
+#include <stdio.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
+
+namespace webrtc {
+namespace test {
+
+AcmReceiveTest::AcmReceiveTest(PacketSource* packet_source,
+ AudioSink* audio_sink,
+ int output_freq_hz,
+ NumOutputChannels exptected_output_channels)
+ : clock_(0),
+ packet_source_(packet_source),
+ audio_sink_(audio_sink),
+ output_freq_hz_(output_freq_hz),
+ exptected_output_channels_(exptected_output_channels) {
+ webrtc::AudioCoding::Config config;
+ config.clock = &clock_;
+ config.playout_frequency_hz = output_freq_hz_;
+ acm_.reset(webrtc::AudioCoding::Create(config));
+}
+
+void AcmReceiveTest::RegisterDefaultCodecs() {
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kOpus, 120));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISAC, 103));
+#ifndef WEBRTC_ANDROID
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISACSWB, 104));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISACFB, 105));
+#endif
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16B, 107));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16Bwb, 108));
+ ASSERT_TRUE(
+ acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16Bswb32kHz, 109));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16B_2ch, 111));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16Bwb_2ch, 112));
+ ASSERT_TRUE(
+ acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16Bswb32kHz_2ch, 113));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCMU, 0));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCMA, 8));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCMU_2ch, 110));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCMA_2ch, 118));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kILBC, 102));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kG722, 9));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kG722_2ch, 119));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kCNNB, 13));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kCNWB, 98));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kCNSWB, 99));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kRED, 127));
+}
+
+void AcmReceiveTest::RegisterNetEqTestCodecs() {
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISAC, 103));
+#ifndef WEBRTC_ANDROID
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISACSWB, 104));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISACFB, 124));
+#endif
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16B, 93));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16Bwb, 94));
+ ASSERT_TRUE(
+ acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCM16Bswb32kHz, 95));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCMU, 0));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kPCMA, 8));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kILBC, 102));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kG722, 9));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kCNNB, 13));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kCNWB, 98));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kCNSWB, 99));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kRED, 117));
+}
+
+void AcmReceiveTest::Run() {
+ for (scoped_ptr<Packet> packet(packet_source_->NextPacket()); packet;
+ packet.reset(packet_source_->NextPacket())) {
+ // Pull audio until time to insert packet.
+ while (clock_.TimeInMilliseconds() < packet->time_ms()) {
+ AudioFrame output_frame;
+ EXPECT_TRUE(acm_->Get10MsAudio(&output_frame));
+ EXPECT_EQ(output_freq_hz_, output_frame.sample_rate_hz_);
+ const int samples_per_block = output_freq_hz_ * 10 / 1000;
+ EXPECT_EQ(samples_per_block, output_frame.samples_per_channel_);
+ if (exptected_output_channels_ != kArbitraryChannels) {
+ if (output_frame.speech_type_ == webrtc::AudioFrame::kPLC) {
+ // Don't check number of channels for PLC output, since each test run
+ // usually starts with a short period of mono PLC before decoding the
+ // first packet.
+ } else {
+ EXPECT_EQ(exptected_output_channels_, output_frame.num_channels_);
+ }
+ }
+ ASSERT_TRUE(audio_sink_->WriteAudioFrame(output_frame));
+ clock_.AdvanceTimeMilliseconds(10);
+ }
+
+ // Insert packet after converting from RTPHeader to WebRtcRTPHeader.
+ WebRtcRTPHeader header;
+ header.header = packet->header();
+ header.frameType = kAudioFrameSpeech;
+ memset(&header.type.Audio, 0, sizeof(RTPAudioHeader));
+ EXPECT_TRUE(
+ acm_->InsertPacket(packet->payload(),
+ static_cast<int32_t>(packet->payload_length_bytes()),
+ header))
+ << "Failure when inserting packet:" << std::endl
+ << " PT = " << static_cast<int>(header.header.payloadType) << std::endl
+ << " TS = " << header.header.timestamp << std::endl
+ << " SN = " << header.header.sequenceNumber;
+ }
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_receive_test.h b/modules/audio_coding/main/acm2/acm_receive_test.h
new file mode 100644
index 0000000..19fe4c5
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_receive_test.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+
+namespace webrtc {
+class AudioCoding;
+struct CodecInst;
+
+namespace test {
+class AudioSink;
+class PacketSource;
+
+class AcmReceiveTest {
+ public:
+ enum NumOutputChannels {
+ kArbitraryChannels = 0,
+ kMonoOutput = 1,
+ kStereoOutput = 2
+ };
+
+ AcmReceiveTest(
+ PacketSource* packet_source,
+ AudioSink* audio_sink,
+ int output_freq_hz,
+ NumOutputChannels exptected_output_channels);
+ virtual ~AcmReceiveTest() {}
+
+ // Registers the codecs with default parameters from ACM.
+ void RegisterDefaultCodecs();
+
+ // Registers codecs with payload types matching the pre-encoded NetEq test
+ // files.
+ void RegisterNetEqTestCodecs();
+
+ // Runs the test and returns true if successful.
+ void Run();
+
+ private:
+ SimulatedClock clock_;
+ scoped_ptr<AudioCoding> acm_;
+ PacketSource* packet_source_;
+ AudioSink* audio_sink_;
+ const int output_freq_hz_;
+ NumOutputChannels exptected_output_channels_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcmReceiveTest);
+};
+
+} // namespace test
+} // namespace webrtc
+#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
diff --git a/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc b/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
new file mode 100644
index 0000000..b0c9af1
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h"
+
+#include <assert.h>
+#include <stdio.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
+
+namespace webrtc {
+namespace test {
+
+namespace {
+// Returns true if the codec should be registered, otherwise false. Changes
+// the number of channels for the Opus codec to always be 1.
+bool ModifyAndUseThisCodec(CodecInst* codec_param) {
+ if (STR_CASE_CMP(codec_param->plname, "CN") == 0 &&
+ codec_param->plfreq == 48000)
+ return false; // Skip 48 kHz comfort noise.
+
+ if (STR_CASE_CMP(codec_param->plname, "telephone-event") == 0)
+ return false; // Skip DTFM.
+
+ return true;
+}
+
+// Remaps payload types from ACM's default to those used in the resource file
+// neteq_universal_new.rtp. Returns true if the codec should be registered,
+// otherwise false. The payload types are set as follows (all are mono codecs):
+// PCMu = 0;
+// PCMa = 8;
+// Comfort noise 8 kHz = 13
+// Comfort noise 16 kHz = 98
+// Comfort noise 32 kHz = 99
+// iLBC = 102
+// iSAC wideband = 103
+// iSAC super-wideband = 104
+// iSAC fullband = 124
+// AVT/DTMF = 106
+// RED = 117
+// PCM16b 8 kHz = 93
+// PCM16b 16 kHz = 94
+// PCM16b 32 kHz = 95
+// G.722 = 94
+bool RemapPltypeAndUseThisCodec(const char* plname,
+ int plfreq,
+ int channels,
+ int* pltype) {
+ if (channels != 1)
+ return false; // Don't use non-mono codecs.
+
+ // Re-map pltypes to those used in the NetEq test files.
+ if (STR_CASE_CMP(plname, "PCMU") == 0 && plfreq == 8000) {
+ *pltype = 0;
+ } else if (STR_CASE_CMP(plname, "PCMA") == 0 && plfreq == 8000) {
+ *pltype = 8;
+ } else if (STR_CASE_CMP(plname, "CN") == 0 && plfreq == 8000) {
+ *pltype = 13;
+ } else if (STR_CASE_CMP(plname, "CN") == 0 && plfreq == 16000) {
+ *pltype = 98;
+ } else if (STR_CASE_CMP(plname, "CN") == 0 && plfreq == 32000) {
+ *pltype = 99;
+ } else if (STR_CASE_CMP(plname, "ILBC") == 0) {
+ *pltype = 102;
+ } else if (STR_CASE_CMP(plname, "ISAC") == 0 && plfreq == 16000) {
+ *pltype = 103;
+ } else if (STR_CASE_CMP(plname, "ISAC") == 0 && plfreq == 32000) {
+ *pltype = 104;
+ } else if (STR_CASE_CMP(plname, "ISAC") == 0 && plfreq == 48000) {
+ *pltype = 124;
+ } else if (STR_CASE_CMP(plname, "telephone-event") == 0) {
+ *pltype = 106;
+ } else if (STR_CASE_CMP(plname, "red") == 0) {
+ *pltype = 117;
+ } else if (STR_CASE_CMP(plname, "L16") == 0 && plfreq == 8000) {
+ *pltype = 93;
+ } else if (STR_CASE_CMP(plname, "L16") == 0 && plfreq == 16000) {
+ *pltype = 94;
+ } else if (STR_CASE_CMP(plname, "L16") == 0 && plfreq == 32000) {
+ *pltype = 95;
+ } else if (STR_CASE_CMP(plname, "G722") == 0) {
+ *pltype = 9;
+ } else {
+ // Don't use any other codecs.
+ return false;
+ }
+ return true;
+}
+} // namespace
+
+AcmReceiveTestOldApi::AcmReceiveTestOldApi(
+ PacketSource* packet_source,
+ AudioSink* audio_sink,
+ int output_freq_hz,
+ NumOutputChannels exptected_output_channels)
+ : clock_(0),
+ acm_(webrtc::AudioCodingModule::Create(0, &clock_)),
+ packet_source_(packet_source),
+ audio_sink_(audio_sink),
+ output_freq_hz_(output_freq_hz),
+ exptected_output_channels_(exptected_output_channels) {
+}
+
+void AcmReceiveTestOldApi::RegisterDefaultCodecs() {
+ CodecInst my_codec_param;
+ for (int n = 0; n < acm_->NumberOfCodecs(); n++) {
+ ASSERT_EQ(0, acm_->Codec(n, &my_codec_param)) << "Failed to get codec.";
+ if (ModifyAndUseThisCodec(&my_codec_param)) {
+ ASSERT_EQ(0, acm_->RegisterReceiveCodec(my_codec_param))
+ << "Couldn't register receive codec.\n";
+ }
+ }
+}
+
+void AcmReceiveTestOldApi::RegisterNetEqTestCodecs() {
+ CodecInst my_codec_param;
+ for (int n = 0; n < acm_->NumberOfCodecs(); n++) {
+ ASSERT_EQ(0, acm_->Codec(n, &my_codec_param)) << "Failed to get codec.";
+ if (!ModifyAndUseThisCodec(&my_codec_param)) {
+ // Skip this codec.
+ continue;
+ }
+
+ if (RemapPltypeAndUseThisCodec(my_codec_param.plname,
+ my_codec_param.plfreq,
+ my_codec_param.channels,
+ &my_codec_param.pltype)) {
+ ASSERT_EQ(0, acm_->RegisterReceiveCodec(my_codec_param))
+ << "Couldn't register receive codec.\n";
+ }
+ }
+}
+
+void AcmReceiveTestOldApi::Run() {
+ for (scoped_ptr<Packet> packet(packet_source_->NextPacket()); packet;
+ packet.reset(packet_source_->NextPacket())) {
+ // Pull audio until time to insert packet.
+ while (clock_.TimeInMilliseconds() < packet->time_ms()) {
+ AudioFrame output_frame;
+ EXPECT_EQ(0, acm_->PlayoutData10Ms(output_freq_hz_, &output_frame));
+ EXPECT_EQ(output_freq_hz_, output_frame.sample_rate_hz_);
+ const int samples_per_block = output_freq_hz_ * 10 / 1000;
+ EXPECT_EQ(samples_per_block, output_frame.samples_per_channel_);
+ if (exptected_output_channels_ != kArbitraryChannels) {
+ if (output_frame.speech_type_ == webrtc::AudioFrame::kPLC) {
+ // Don't check number of channels for PLC output, since each test run
+ // usually starts with a short period of mono PLC before decoding the
+ // first packet.
+ } else {
+ EXPECT_EQ(exptected_output_channels_, output_frame.num_channels_);
+ }
+ }
+ ASSERT_TRUE(audio_sink_->WriteAudioFrame(output_frame));
+ clock_.AdvanceTimeMilliseconds(10);
+ }
+
+ // Insert packet after converting from RTPHeader to WebRtcRTPHeader.
+ WebRtcRTPHeader header;
+ header.header = packet->header();
+ header.frameType = kAudioFrameSpeech;
+ memset(&header.type.Audio, 0, sizeof(RTPAudioHeader));
+ EXPECT_EQ(0,
+ acm_->IncomingPacket(
+ packet->payload(),
+ static_cast<int32_t>(packet->payload_length_bytes()),
+ header))
+ << "Failure when inserting packet:" << std::endl
+ << " PT = " << static_cast<int>(header.header.payloadType) << std::endl
+ << " TS = " << header.header.timestamp << std::endl
+ << " SN = " << header.header.sequenceNumber;
+ }
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h b/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
new file mode 100644
index 0000000..795893c
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+
+namespace webrtc {
+class AudioCodingModule;
+struct CodecInst;
+
+namespace test {
+class AudioSink;
+class PacketSource;
+
+class AcmReceiveTestOldApi {
+ public:
+ enum NumOutputChannels {
+ kArbitraryChannels = 0,
+ kMonoOutput = 1,
+ kStereoOutput = 2
+ };
+
+ AcmReceiveTestOldApi(PacketSource* packet_source,
+ AudioSink* audio_sink,
+ int output_freq_hz,
+ NumOutputChannels exptected_output_channels);
+ virtual ~AcmReceiveTestOldApi() {}
+
+ // Registers the codecs with default parameters from ACM.
+ void RegisterDefaultCodecs();
+
+ // Registers codecs with payload types matching the pre-encoded NetEq test
+ // files.
+ void RegisterNetEqTestCodecs();
+
+ // Runs the test and returns true if successful.
+ void Run();
+
+ private:
+ SimulatedClock clock_;
+ scoped_ptr<AudioCodingModule> acm_;
+ PacketSource* packet_source_;
+ AudioSink* audio_sink_;
+ const int output_freq_hz_;
+ NumOutputChannels exptected_output_channels_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi);
+};
+
+} // namespace test
+} // namespace webrtc
+#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
diff --git a/modules/audio_coding/main/acm2/acm_receiver.cc b/modules/audio_coding/main/acm2/acm_receiver.cc
index cb7c418..0c7e6c7 100644
--- a/modules/audio_coding/main/acm2/acm_receiver.cc
+++ b/modules/audio_coding/main/acm2/acm_receiver.cc
@@ -26,7 +26,6 @@
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
#include "webrtc/system_wrappers/interface/trace.h"
@@ -126,7 +125,6 @@
nack_(),
nack_enabled_(false),
neteq_(NetEq::Create(config.neteq_config)),
- decode_lock_(RWLockWrapper::CreateRWLock()),
vad_enabled_(true),
clock_(config.clock),
av_sync_(false),
@@ -149,7 +147,6 @@
AcmReceiver::~AcmReceiver() {
delete neteq_;
- delete decode_lock_;
}
int AcmReceiver::SetMinimumDelay(int delay_ms) {
@@ -213,29 +210,25 @@
// TODO(turajs): use one set of enumerators, e.g. the one defined in
// common_types.h
+// TODO(henrik.lundin): This method is not used any longer. The call hierarchy
+// stops in voe::Channel::SetNetEQPlayoutMode(). Remove it.
void AcmReceiver::SetPlayoutMode(AudioPlayoutMode mode) {
enum NetEqPlayoutMode playout_mode = kPlayoutOn;
- enum NetEqBackgroundNoiseMode bgn_mode = kBgnOn;
switch (mode) {
case voice:
playout_mode = kPlayoutOn;
- bgn_mode = kBgnOn;
break;
case fax: // No change to background noise mode.
playout_mode = kPlayoutFax;
- bgn_mode = neteq_->BackgroundNoiseMode();
break;
case streaming:
playout_mode = kPlayoutStreaming;
- bgn_mode = kBgnOff;
break;
case off:
playout_mode = kPlayoutOff;
- bgn_mode = kBgnOff;
break;
}
neteq_->SetPlayoutMode(playout_mode);
- neteq_->SetBackgroundNoiseMode(bgn_mode);
}
AudioPlayoutMode AcmReceiver::PlayoutMode() const {
@@ -331,22 +324,18 @@
}
} // |crit_sect_| is released.
- {
- WriteLockScoped lock_codecs(*decode_lock_); // Lock to prevent an encoding.
+ // If |missing_packets_sync_stream_| is allocated then we are in AV-sync and
+ // we may need to insert sync-packets. We don't check |av_sync_| as we are
+ // outside AcmReceiver's critical section.
+ if (missing_packets_sync_stream_.get()) {
+ InsertStreamOfSyncPackets(missing_packets_sync_stream_.get());
+ }
- // If |missing_packets_sync_stream_| is allocated then we are in AV-sync and
- // we may need to insert sync-packets. We don't check |av_sync_| as we are
- // outside AcmReceiver's critical section.
- if (missing_packets_sync_stream_.get()) {
- InsertStreamOfSyncPackets(missing_packets_sync_stream_.get());
- }
-
- if (neteq_->InsertPacket(rtp_header, incoming_payload, length_payload,
- receive_timestamp) < 0) {
- LOG_FERR1(LS_ERROR, "AcmReceiver::InsertPacket", header->payloadType) <<
- " Failed to insert packet";
- return -1;
- }
+ if (neteq_->InsertPacket(rtp_header, incoming_payload, length_payload,
+ receive_timestamp) < 0) {
+ LOG_FERR1(LS_ERROR, "AcmReceiver::InsertPacket", header->payloadType) <<
+ " Failed to insert packet";
+ return -1;
}
return 0;
}
@@ -384,24 +373,20 @@
}
}
- {
- WriteLockScoped lock_codecs(*decode_lock_); // Lock to prevent an encoding.
+ // If |late_packets_sync_stream_| is allocated then we have been in AV-sync
+ // mode and we might have to insert sync-packets.
+ if (late_packets_sync_stream_.get()) {
+ InsertStreamOfSyncPackets(late_packets_sync_stream_.get());
+ if (return_silence) // Silence generated, don't pull from NetEq.
+ return 0;
+ }
- // If |late_packets_sync_stream_| is allocated then we have been in AV-sync
- // mode and we might have to insert sync-packets.
- if (late_packets_sync_stream_.get()) {
- InsertStreamOfSyncPackets(late_packets_sync_stream_.get());
- if (return_silence) // Silence generated, don't pull from NetEq.
- return 0;
- }
-
- if (neteq_->GetAudio(AudioFrame::kMaxDataSizeSamples,
- ptr_audio_buffer,
- &samples_per_channel,
- &num_channels, &type) != NetEq::kOK) {
- LOG_FERR0(LS_ERROR, "AcmReceiver::GetAudio") << "NetEq Failed.";
- return -1;
- }
+ if (neteq_->GetAudio(AudioFrame::kMaxDataSizeSamples,
+ ptr_audio_buffer,
+ &samples_per_channel,
+ &num_channels, &type) != NetEq::kOK) {
+ LOG_FERR0(LS_ERROR, "AcmReceiver::GetAudio") << "NetEq Failed.";
+ return -1;
}
// Accessing members, take the lock.
@@ -811,10 +796,6 @@
return true;
}
-NetEqBackgroundNoiseMode AcmReceiver::BackgroundNoiseModeForTest() const {
- return neteq_->BackgroundNoiseMode();
-}
-
int AcmReceiver::RtpHeaderToCodecIndex(
const RTPHeader &rtp_header, const uint8_t* payload) const {
uint8_t payload_type = rtp_header.payloadType;
diff --git a/modules/audio_coding/main/acm2/acm_receiver.h b/modules/audio_coding/main/acm2/acm_receiver.h
index b6898f7..94ea5b0 100644
--- a/modules/audio_coding/main/acm2/acm_receiver.h
+++ b/modules/audio_coding/main/acm2/acm_receiver.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_audio/vad/include/webrtc_vad.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
@@ -23,14 +24,12 @@
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
namespace webrtc {
struct CodecInst;
class CriticalSectionWrapper;
-class RWLockWrapper;
class NetEq;
namespace acm2 {
@@ -210,13 +209,6 @@
bool vad_enabled() const { return vad_enabled_; }
//
- // Get the decode lock used to protect decoder instances while decoding.
- //
- // Return value : Pointer to the decode lock.
- //
- RWLockWrapper* DecodeLock() const { return decode_lock_; }
-
- //
// Flushes the NetEq packet and speech buffers.
//
void FlushBuffers();
@@ -316,12 +308,6 @@
std::vector<uint16_t> GetNackList(int round_trip_time_ms) const;
//
- // Returns the background noise mode. This is only for testing and ACM is not
- // calling this function. Used in acm_receiver_unittest.cc.
- //
- NetEqBackgroundNoiseMode BackgroundNoiseModeForTest() const;
-
- //
// Get statistics of calls to GetAudio().
void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const;
@@ -354,7 +340,6 @@
CallStatistics call_stats_ GUARDED_BY(crit_sect_);
NetEq* neteq_;
Decoder decoders_[ACMCodecDB::kMaxNumCodecs];
- RWLockWrapper* decode_lock_;
bool vad_enabled_;
Clock* clock_; // TODO(henrik.lundin) Make const if possible.
diff --git a/modules/audio_coding/main/acm2/acm_receiver_unittest.cc b/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
index 4234f14..9cfef3a 100644
--- a/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
+++ b/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
@@ -12,7 +12,7 @@
#include <algorithm> // std::min
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
@@ -47,24 +47,21 @@
packet_sent_(false),
last_packet_send_timestamp_(timestamp_),
last_frame_type_(kFrameEmpty) {
- AudioCodingModule::Config config;
- acm_.reset(new AudioCodingModuleImpl(config));
- receiver_.reset(new AcmReceiver(config));
+ AudioCoding::Config config;
+ config.transport = this;
+ acm_.reset(new AudioCodingImpl(config));
+ receiver_.reset(new AcmReceiver(config.ToOldConfig()));
}
~AcmReceiverTest() {}
- void SetUp() {
+ virtual void SetUp() OVERRIDE {
ASSERT_TRUE(receiver_.get() != NULL);
ASSERT_TRUE(acm_.get() != NULL);
for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
ASSERT_EQ(0, ACMCodecDB::Codec(n, &codecs_[n]));
}
- acm_->InitializeReceiver();
- acm_->InitializeSender();
- acm_->RegisterTransportCallback(this);
-
rtp_header_.header.sequenceNumber = 0;
rtp_header_.header.timestamp = 0;
rtp_header_.header.markerBit = false;
@@ -75,19 +72,19 @@
rtp_header_.type.Audio.isCNG = false;
}
- void TearDown() {
+ virtual void TearDown() OVERRIDE {
}
void InsertOnePacketOfSilence(int codec_id) {
CodecInst codec;
ACMCodecDB::Codec(codec_id, &codec);
if (timestamp_ == 0) { // This is the first time inserting audio.
- ASSERT_EQ(0, acm_->RegisterSendCodec(codec));
+ ASSERT_TRUE(acm_->RegisterSendCodec(codec_id, codec.pltype));
} else {
- CodecInst current_codec;
- ASSERT_EQ(0, acm_->SendCodec(¤t_codec));
- if (!CodecsEqual(codec, current_codec))
- ASSERT_EQ(0, acm_->RegisterSendCodec(codec));
+ const CodecInst* current_codec = acm_->GetSenderCodecInst();
+ ASSERT_TRUE(current_codec);
+ if (!CodecsEqual(codec, *current_codec))
+ ASSERT_TRUE(acm_->RegisterSendCodec(codec_id, codec.pltype));
}
AudioFrame frame;
// Frame setup according to the codec.
@@ -102,8 +99,7 @@
while (num_bytes == 0) {
frame.timestamp_ = timestamp_;
timestamp_ += frame.samples_per_channel_;
- ASSERT_EQ(0, acm_->Add10MsData(frame));
- num_bytes = acm_->Process();
+ num_bytes = acm_->Add10MsAudio(frame);
ASSERT_GE(num_bytes, 0);
}
ASSERT_TRUE(packet_sent_); // Sanity check.
@@ -125,7 +121,7 @@
uint32_t timestamp,
const uint8_t* payload_data,
uint16_t payload_len_bytes,
- const RTPFragmentationHeader* fragmentation) {
+ const RTPFragmentationHeader* fragmentation) OVERRIDE {
if (frame_type == kFrameEmpty)
return 0;
@@ -151,7 +147,7 @@
scoped_ptr<AcmReceiver> receiver_;
CodecInst codecs_[ACMCodecDB::kMaxNumCodecs];
- scoped_ptr<AudioCodingModule> acm_;
+ scoped_ptr<AudioCoding> acm_;
WebRtcRTPHeader rtp_header_;
uint32_t timestamp_;
bool packet_sent_; // Set when SendData is called reset when inserting audio.
@@ -247,34 +243,19 @@
}
}
-// Changing playout mode to FAX should not change the background noise mode.
-TEST_F(AcmReceiverTest,
- DISABLED_ON_ANDROID(PlayoutModeAndBackgroundNoiseMode)) {
- EXPECT_EQ(kBgnOn, receiver_->BackgroundNoiseModeForTest()); // Default
-
+// Verify that the playout mode is set correctly.
+TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(PlayoutMode)) {
receiver_->SetPlayoutMode(voice);
EXPECT_EQ(voice, receiver_->PlayoutMode());
- EXPECT_EQ(kBgnOn, receiver_->BackgroundNoiseModeForTest());
receiver_->SetPlayoutMode(streaming);
EXPECT_EQ(streaming, receiver_->PlayoutMode());
- EXPECT_EQ(kBgnOff, receiver_->BackgroundNoiseModeForTest());
receiver_->SetPlayoutMode(fax);
EXPECT_EQ(fax, receiver_->PlayoutMode());
- EXPECT_EQ(kBgnOff, receiver_->BackgroundNoiseModeForTest());
receiver_->SetPlayoutMode(off);
EXPECT_EQ(off, receiver_->PlayoutMode());
- EXPECT_EQ(kBgnOff, receiver_->BackgroundNoiseModeForTest());
-
- // Change to voice then to FAX.
- receiver_->SetPlayoutMode(voice);
- EXPECT_EQ(voice, receiver_->PlayoutMode());
- EXPECT_EQ(kBgnOn, receiver_->BackgroundNoiseModeForTest());
- receiver_->SetPlayoutMode(fax);
- EXPECT_EQ(fax, receiver_->PlayoutMode());
- EXPECT_EQ(kBgnOn, receiver_->BackgroundNoiseModeForTest());
}
TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(PostdecodingVad)) {
@@ -322,7 +303,7 @@
// Register CNG at sender side.
int n = 0;
while (kCngId[n] > 0) {
- ASSERT_EQ(0, acm_->RegisterSendCodec(codecs_[kCngId[n]]));
+ ASSERT_TRUE(acm_->RegisterSendCodec(kCngId[n], codecs_[kCngId[n]].pltype));
++n;
}
@@ -331,7 +312,7 @@
EXPECT_EQ(-1, receiver_->LastAudioCodec(&codec));
// Start with sending DTX.
- ASSERT_EQ(0, acm_->SetVAD(true, true, VADVeryAggr));
+ ASSERT_TRUE(acm_->SetVad(true, true, VADVeryAggr));
packet_sent_ = false;
InsertOnePacketOfSilence(kCodecId[0]); // Enough to test with one codec.
ASSERT_TRUE(packet_sent_);
@@ -345,7 +326,7 @@
n = 0;
while (kCodecId[n] >= 0) { // Loop over codecs.
// Set DTX off to send audio payload.
- acm_->SetVAD(false, false, VADAggr);
+ acm_->SetVad(false, false, VADAggr);
packet_sent_ = false;
InsertOnePacketOfSilence(kCodecId[n]);
@@ -357,7 +338,7 @@
// Set VAD on to send DTX. Then check if the "Last Audio codec" returns
// the expected codec.
- acm_->SetVAD(true, true, VADAggr);
+ acm_->SetVad(true, true, VADAggr);
// Do as many encoding until a DTX is sent.
while (last_frame_type_ != kAudioFrameCN) {
diff --git a/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc b/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
new file mode 100644
index 0000000..ef890ec
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
@@ -0,0 +1,364 @@
+/*
+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
+
+#include <algorithm> // std::min
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
+#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/test/test_suite.h"
+#include "webrtc/test/testsupport/fileutils.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
+
+namespace webrtc {
+
+namespace acm2 {
+namespace {
+
+bool CodecsEqual(const CodecInst& codec_a, const CodecInst& codec_b) {
+ if (strcmp(codec_a.plname, codec_b.plname) != 0 ||
+ codec_a.plfreq != codec_b.plfreq ||
+ codec_a.pltype != codec_b.pltype ||
+ codec_b.channels != codec_a.channels)
+ return false;
+ return true;
+}
+
+} // namespace
+
+class AcmReceiverTestOldApi : public AudioPacketizationCallback,
+ public ::testing::Test {
+ protected:
+ AcmReceiverTestOldApi()
+ : timestamp_(0),
+ packet_sent_(false),
+ last_packet_send_timestamp_(timestamp_),
+ last_frame_type_(kFrameEmpty) {
+ AudioCodingModule::Config config;
+ acm_.reset(new AudioCodingModuleImpl(config));
+ receiver_.reset(new AcmReceiver(config));
+ }
+
+ ~AcmReceiverTestOldApi() {}
+
+ virtual void SetUp() OVERRIDE {
+ ASSERT_TRUE(receiver_.get() != NULL);
+ ASSERT_TRUE(acm_.get() != NULL);
+ for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
+ ASSERT_EQ(0, ACMCodecDB::Codec(n, &codecs_[n]));
+ }
+
+ acm_->InitializeReceiver();
+ acm_->InitializeSender();
+ acm_->RegisterTransportCallback(this);
+
+ rtp_header_.header.sequenceNumber = 0;
+ rtp_header_.header.timestamp = 0;
+ rtp_header_.header.markerBit = false;
+ rtp_header_.header.ssrc = 0x12345678; // Arbitrary.
+ rtp_header_.header.numCSRCs = 0;
+ rtp_header_.header.payloadType = 0;
+ rtp_header_.frameType = kAudioFrameSpeech;
+ rtp_header_.type.Audio.isCNG = false;
+ }
+
+ virtual void TearDown() OVERRIDE {
+ }
+
+ void InsertOnePacketOfSilence(int codec_id) {
+ CodecInst codec;
+ ACMCodecDB::Codec(codec_id, &codec);
+ if (timestamp_ == 0) { // This is the first time inserting audio.
+ ASSERT_EQ(0, acm_->RegisterSendCodec(codec));
+ } else {
+ CodecInst current_codec;
+ ASSERT_EQ(0, acm_->SendCodec(¤t_codec));
+ if (!CodecsEqual(codec, current_codec))
+ ASSERT_EQ(0, acm_->RegisterSendCodec(codec));
+ }
+ AudioFrame frame;
+ // Frame setup according to the codec.
+ frame.sample_rate_hz_ = codec.plfreq;
+ frame.samples_per_channel_ = codec.plfreq / 100; // 10 ms.
+ frame.num_channels_ = codec.channels;
+ memset(frame.data_, 0, frame.samples_per_channel_ * frame.num_channels_ *
+ sizeof(int16_t));
+ int num_bytes = 0;
+ packet_sent_ = false;
+ last_packet_send_timestamp_ = timestamp_;
+ while (num_bytes == 0) {
+ frame.timestamp_ = timestamp_;
+ timestamp_ += frame.samples_per_channel_;
+ ASSERT_EQ(0, acm_->Add10MsData(frame));
+ num_bytes = acm_->Process();
+ ASSERT_GE(num_bytes, 0);
+ }
+ ASSERT_TRUE(packet_sent_); // Sanity check.
+ }
+
+ // Last element of id should be negative.
+ void AddSetOfCodecs(const int* id) {
+ int n = 0;
+ while (id[n] >= 0) {
+ ASSERT_EQ(0, receiver_->AddCodec(id[n], codecs_[id[n]].pltype,
+ codecs_[id[n]].channels, NULL));
+ ++n;
+ }
+ }
+
+ virtual int SendData(
+ FrameType frame_type,
+ uint8_t payload_type,
+ uint32_t timestamp,
+ const uint8_t* payload_data,
+ uint16_t payload_len_bytes,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE {
+ if (frame_type == kFrameEmpty)
+ return 0;
+
+ rtp_header_.header.payloadType = payload_type;
+ rtp_header_.frameType = frame_type;
+ if (frame_type == kAudioFrameSpeech)
+ rtp_header_.type.Audio.isCNG = false;
+ else
+ rtp_header_.type.Audio.isCNG = true;
+ rtp_header_.header.timestamp = timestamp;
+
+ int ret_val = receiver_->InsertPacket(rtp_header_, payload_data,
+ payload_len_bytes);
+ if (ret_val < 0) {
+ assert(false);
+ return -1;
+ }
+ rtp_header_.header.sequenceNumber++;
+ packet_sent_ = true;
+ last_frame_type_ = frame_type;
+ return 0;
+ }
+
+ scoped_ptr<AcmReceiver> receiver_;
+ CodecInst codecs_[ACMCodecDB::kMaxNumCodecs];
+ scoped_ptr<AudioCodingModule> acm_;
+ WebRtcRTPHeader rtp_header_;
+ uint32_t timestamp_;
+ bool packet_sent_; // Set when SendData is called reset when inserting audio.
+ uint32_t last_packet_send_timestamp_;
+ FrameType last_frame_type_;
+};
+
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecGetCodec)) {
+ // Add codec.
+ for (int n = 0; n < ACMCodecDB::kNumCodecs; ++n) {
+ if (n & 0x1) // Just add codecs with odd index.
+ EXPECT_EQ(0, receiver_->AddCodec(n, codecs_[n].pltype,
+ codecs_[n].channels, NULL));
+ }
+ // Get codec and compare.
+ for (int n = 0; n < ACMCodecDB::kNumCodecs; ++n) {
+ CodecInst my_codec;
+ if (n & 0x1) {
+ // Codecs with odd index should match the reference.
+ EXPECT_EQ(0, receiver_->DecoderByPayloadType(codecs_[n].pltype,
+ &my_codec));
+ EXPECT_TRUE(CodecsEqual(codecs_[n], my_codec));
+ } else {
+ // Codecs with even index are not registered.
+ EXPECT_EQ(-1, receiver_->DecoderByPayloadType(codecs_[n].pltype,
+ &my_codec));
+ }
+ }
+}
+
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecChangePayloadType)) {
+ CodecInst ref_codec;
+ const int codec_id = ACMCodecDB::kPCMA;
+ EXPECT_EQ(0, ACMCodecDB::Codec(codec_id, &ref_codec));
+ const int payload_type = ref_codec.pltype;
+ EXPECT_EQ(0, receiver_->AddCodec(codec_id, ref_codec.pltype,
+ ref_codec.channels, NULL));
+ CodecInst test_codec;
+ EXPECT_EQ(0, receiver_->DecoderByPayloadType(payload_type, &test_codec));
+ EXPECT_EQ(true, CodecsEqual(ref_codec, test_codec));
+
+ // Re-register the same codec with different payload.
+ ref_codec.pltype = payload_type + 1;
+ EXPECT_EQ(0, receiver_->AddCodec(codec_id, ref_codec.pltype,
+ ref_codec.channels, NULL));
+
+ // Payload type |payload_type| should not exist.
+ EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &test_codec));
+
+ // Payload type |payload_type + 1| should exist.
+ EXPECT_EQ(0, receiver_->DecoderByPayloadType(payload_type + 1, &test_codec));
+ EXPECT_TRUE(CodecsEqual(test_codec, ref_codec));
+}
+
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecRemoveCodec)) {
+ CodecInst codec;
+ const int codec_id = ACMCodecDB::kPCMA;
+ EXPECT_EQ(0, ACMCodecDB::Codec(codec_id, &codec));
+ const int payload_type = codec.pltype;
+ EXPECT_EQ(0, receiver_->AddCodec(codec_id, codec.pltype,
+ codec.channels, NULL));
+
+ // Remove non-existing codec should not fail. ACM1 legacy.
+ EXPECT_EQ(0, receiver_->RemoveCodec(payload_type + 1));
+
+ // Remove an existing codec.
+ EXPECT_EQ(0, receiver_->RemoveCodec(payload_type));
+
+ // Ask for the removed codec, must fail.
+ EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &codec));
+}
+
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(SampleRate)) {
+ const int kCodecId[] = {
+ ACMCodecDB::kISAC, ACMCodecDB::kISACSWB, ACMCodecDB::kISACFB,
+ -1 // Terminator.
+ };
+ AddSetOfCodecs(kCodecId);
+
+ AudioFrame frame;
+ const int kOutSampleRateHz = 8000; // Different than codec sample rate.
+ int n = 0;
+ while (kCodecId[n] >= 0) {
+ const int num_10ms_frames = codecs_[kCodecId[n]].pacsize /
+ (codecs_[kCodecId[n]].plfreq / 100);
+ InsertOnePacketOfSilence(kCodecId[n]);
+ for (int k = 0; k < num_10ms_frames; ++k) {
+ EXPECT_EQ(0, receiver_->GetAudio(kOutSampleRateHz, &frame));
+ }
+ EXPECT_EQ(std::min(32000, codecs_[kCodecId[n]].plfreq),
+ receiver_->current_sample_rate_hz());
+ ++n;
+ }
+}
+
+// Verify that the playout mode is set correctly.
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(PlayoutMode)) {
+ receiver_->SetPlayoutMode(voice);
+ EXPECT_EQ(voice, receiver_->PlayoutMode());
+
+ receiver_->SetPlayoutMode(streaming);
+ EXPECT_EQ(streaming, receiver_->PlayoutMode());
+
+ receiver_->SetPlayoutMode(fax);
+ EXPECT_EQ(fax, receiver_->PlayoutMode());
+
+ receiver_->SetPlayoutMode(off);
+ EXPECT_EQ(off, receiver_->PlayoutMode());
+}
+
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(PostdecodingVad)) {
+ receiver_->EnableVad();
+ EXPECT_TRUE(receiver_->vad_enabled());
+
+ const int id = ACMCodecDB::kPCM16Bwb;
+ ASSERT_EQ(0, receiver_->AddCodec(id, codecs_[id].pltype, codecs_[id].channels,
+ NULL));
+ const int kNumPackets = 5;
+ const int num_10ms_frames = codecs_[id].pacsize / (codecs_[id].plfreq / 100);
+ AudioFrame frame;
+ for (int n = 0; n < kNumPackets; ++n) {
+ InsertOnePacketOfSilence(id);
+ for (int k = 0; k < num_10ms_frames; ++k)
+ ASSERT_EQ(0, receiver_->GetAudio(codecs_[id].plfreq, &frame));
+ }
+ EXPECT_EQ(AudioFrame::kVadPassive, frame.vad_activity_);
+
+ receiver_->DisableVad();
+ EXPECT_FALSE(receiver_->vad_enabled());
+
+ for (int n = 0; n < kNumPackets; ++n) {
+ InsertOnePacketOfSilence(id);
+ for (int k = 0; k < num_10ms_frames; ++k)
+ ASSERT_EQ(0, receiver_->GetAudio(codecs_[id].plfreq, &frame));
+ }
+ EXPECT_EQ(AudioFrame::kVadUnknown, frame.vad_activity_);
+}
+
+TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(LastAudioCodec)) {
+ const int kCodecId[] = {
+ ACMCodecDB::kISAC, ACMCodecDB::kPCMA, ACMCodecDB::kISACSWB,
+ ACMCodecDB::kPCM16Bswb32kHz, ACMCodecDB::kG722_1C_48,
+ -1 // Terminator.
+ };
+ AddSetOfCodecs(kCodecId);
+
+ const int kCngId[] = { // Not including full-band.
+ ACMCodecDB::kCNNB, ACMCodecDB::kCNWB, ACMCodecDB::kCNSWB,
+ -1 // Terminator.
+ };
+ AddSetOfCodecs(kCngId);
+
+ // Register CNG at sender side.
+ int n = 0;
+ while (kCngId[n] > 0) {
+ ASSERT_EQ(0, acm_->RegisterSendCodec(codecs_[kCngId[n]]));
+ ++n;
+ }
+
+ CodecInst codec;
+ // No audio payload is received.
+ EXPECT_EQ(-1, receiver_->LastAudioCodec(&codec));
+
+ // Start with sending DTX.
+ ASSERT_EQ(0, acm_->SetVAD(true, true, VADVeryAggr));
+ packet_sent_ = false;
+ InsertOnePacketOfSilence(kCodecId[0]); // Enough to test with one codec.
+ ASSERT_TRUE(packet_sent_);
+ EXPECT_EQ(kAudioFrameCN, last_frame_type_);
+
+ // Has received, only, DTX. Last Audio codec is undefined.
+ EXPECT_EQ(-1, receiver_->LastAudioCodec(&codec));
+ EXPECT_EQ(-1, receiver_->last_audio_codec_id());
+ EXPECT_EQ(-1, receiver_->last_audio_payload_type());
+
+ n = 0;
+ while (kCodecId[n] >= 0) { // Loop over codecs.
+ // Set DTX off to send audio payload.
+ acm_->SetVAD(false, false, VADAggr);
+ packet_sent_ = false;
+ InsertOnePacketOfSilence(kCodecId[n]);
+
+ // Sanity check if Actually an audio payload received, and it should be
+ // of type "speech."
+ ASSERT_TRUE(packet_sent_);
+ ASSERT_EQ(kAudioFrameSpeech, last_frame_type_);
+ EXPECT_EQ(kCodecId[n], receiver_->last_audio_codec_id());
+
+ // Set VAD on to send DTX. Then check if the "Last Audio codec" returns
+ // the expected codec.
+ acm_->SetVAD(true, true, VADAggr);
+
+ // Do as many encoding until a DTX is sent.
+ while (last_frame_type_ != kAudioFrameCN) {
+ packet_sent_ = false;
+ InsertOnePacketOfSilence(kCodecId[n]);
+ ASSERT_TRUE(packet_sent_);
+ }
+ EXPECT_EQ(kCodecId[n], receiver_->last_audio_codec_id());
+ EXPECT_EQ(codecs_[kCodecId[n]].pltype,
+ receiver_->last_audio_payload_type());
+ EXPECT_EQ(0, receiver_->LastAudioCodec(&codec));
+ EXPECT_TRUE(CodecsEqual(codecs_[kCodecId[n]], codec));
+ ++n;
+ }
+}
+
+} // namespace acm2
+
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_red.cc b/modules/audio_coding/main/acm2/acm_red.cc
index 4f2c70c..05996e5 100644
--- a/modules/audio_coding/main/acm2/acm_red.cc
+++ b/modules/audio_coding/main/acm2/acm_red.cc
@@ -41,10 +41,6 @@
return 0;
}
-void ACMRED::InternalDestructEncoderInst(void* /* ptr_inst */) {
- // RED has no instance
-}
-
void ACMRED::DestructEncoderSafe() {
// RED has no instance
}
diff --git a/modules/audio_coding/main/acm2/acm_red.h b/modules/audio_coding/main/acm2/acm_red.h
index ac38170..73f904a 100644
--- a/modules/audio_coding/main/acm2/acm_red.h
+++ b/modules/audio_coding/main/acm2/acm_red.h
@@ -33,8 +33,6 @@
void DestructEncoderSafe();
int16_t InternalCreateEncoder();
-
- void InternalDestructEncoderInst(void* ptr_inst);
};
} // namespace acm2
diff --git a/modules/audio_coding/main/acm2/acm_send_test.cc b/modules/audio_coding/main/acm2/acm_send_test.cc
new file mode 100644
index 0000000..ec3c254
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_send_test.cc
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/main/acm2/acm_send_test.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/checks.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+
+namespace webrtc {
+namespace test {
+
+AcmSendTest::AcmSendTest(InputAudioFile* audio_source,
+ int source_rate_hz,
+ int test_duration_ms)
+ : clock_(0),
+ audio_source_(audio_source),
+ source_rate_hz_(source_rate_hz),
+ input_block_size_samples_(source_rate_hz_ * kBlockSizeMs / 1000),
+ codec_registered_(false),
+ test_duration_ms_(test_duration_ms),
+ frame_type_(kAudioFrameSpeech),
+ payload_type_(0),
+ timestamp_(0),
+ sequence_number_(0) {
+ webrtc::AudioCoding::Config config;
+ config.clock = &clock_;
+ config.transport = this;
+ acm_.reset(webrtc::AudioCoding::Create(config));
+ input_frame_.sample_rate_hz_ = source_rate_hz_;
+ input_frame_.num_channels_ = 1;
+ input_frame_.samples_per_channel_ = input_block_size_samples_;
+ assert(input_block_size_samples_ * input_frame_.num_channels_ <=
+ AudioFrame::kMaxDataSizeSamples);
+}
+
+bool AcmSendTest::RegisterCodec(int codec_type,
+ int channels,
+ int payload_type,
+ int frame_size_samples) {
+ codec_registered_ =
+ acm_->RegisterSendCodec(codec_type, payload_type, frame_size_samples);
+ input_frame_.num_channels_ = channels;
+ assert(input_block_size_samples_ * input_frame_.num_channels_ <=
+ AudioFrame::kMaxDataSizeSamples);
+ return codec_registered_;
+}
+
+Packet* AcmSendTest::NextPacket() {
+ assert(codec_registered_);
+ if (filter_.test(payload_type_)) {
+ // This payload type should be filtered out. Since the payload type is the
+ // same throughout the whole test run, no packet at all will be delivered.
+ // We can just as well signal that the test is over by returning NULL.
+ return NULL;
+ }
+ // Insert audio and process until one packet is produced.
+ while (clock_.TimeInMilliseconds() < test_duration_ms_) {
+ clock_.AdvanceTimeMilliseconds(kBlockSizeMs);
+ CHECK(audio_source_->Read(input_block_size_samples_, input_frame_.data_));
+ if (input_frame_.num_channels_ > 1) {
+ InputAudioFile::DuplicateInterleaved(input_frame_.data_,
+ input_block_size_samples_,
+ input_frame_.num_channels_,
+ input_frame_.data_);
+ }
+ int32_t encoded_bytes = acm_->Add10MsAudio(input_frame_);
+ EXPECT_GE(encoded_bytes, 0);
+ input_frame_.timestamp_ += input_block_size_samples_;
+ if (encoded_bytes > 0) {
+ // Encoded packet received.
+ return CreatePacket();
+ }
+ }
+ // Test ended.
+ return NULL;
+}
+
+// This method receives the callback from ACM when a new packet is produced.
+int32_t AcmSendTest::SendData(FrameType frame_type,
+ uint8_t payload_type,
+ uint32_t timestamp,
+ const uint8_t* payload_data,
+ uint16_t payload_len_bytes,
+ const RTPFragmentationHeader* fragmentation) {
+ // Store the packet locally.
+ frame_type_ = frame_type;
+ payload_type_ = payload_type;
+ timestamp_ = timestamp;
+ last_payload_vec_.assign(payload_data, payload_data + payload_len_bytes);
+ assert(last_payload_vec_.size() == payload_len_bytes);
+ return 0;
+}
+
+Packet* AcmSendTest::CreatePacket() {
+ const size_t kRtpHeaderSize = 12;
+ size_t allocated_bytes = last_payload_vec_.size() + kRtpHeaderSize;
+ uint8_t* packet_memory = new uint8_t[allocated_bytes];
+ // Populate the header bytes.
+ packet_memory[0] = 0x80;
+ packet_memory[1] = payload_type_;
+ packet_memory[2] = (sequence_number_ >> 8) & 0xFF;
+ packet_memory[3] = (sequence_number_) & 0xFF;
+ packet_memory[4] = (timestamp_ >> 24) & 0xFF;
+ packet_memory[5] = (timestamp_ >> 16) & 0xFF;
+ packet_memory[6] = (timestamp_ >> 8) & 0xFF;
+ packet_memory[7] = timestamp_ & 0xFF;
+ // Set SSRC to 0x12345678.
+ packet_memory[8] = 0x12;
+ packet_memory[9] = 0x34;
+ packet_memory[10] = 0x56;
+ packet_memory[11] = 0x78;
+
+ ++sequence_number_;
+
+ // Copy the payload data.
+ memcpy(packet_memory + kRtpHeaderSize,
+ &last_payload_vec_[0],
+ last_payload_vec_.size());
+ Packet* packet =
+ new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds());
+ assert(packet);
+ assert(packet->valid_header());
+ return packet;
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_send_test.h b/modules/audio_coding/main/acm2/acm_send_test.h
new file mode 100644
index 0000000..8bc0cde
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_send_test.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
+
+#include <vector>
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+
+namespace webrtc {
+
+namespace test {
+class InputAudioFile;
+class Packet;
+
+class AcmSendTest : public AudioPacketizationCallback, public PacketSource {
+ public:
+ AcmSendTest(InputAudioFile* audio_source,
+ int source_rate_hz,
+ int test_duration_ms);
+ virtual ~AcmSendTest() {}
+
+ // Registers the send codec. Returns true on success, false otherwise.
+ bool RegisterCodec(int codec_type,
+ int channels,
+ int payload_type,
+ int frame_size_samples);
+
+ // Returns the next encoded packet. Returns NULL if the test duration was
+ // exceeded. Ownership of the packet is handed over to the caller.
+ // Inherited from PacketSource.
+ virtual Packet* NextPacket() OVERRIDE;
+
+ // Inherited from AudioPacketizationCallback.
+ virtual int32_t SendData(
+ FrameType frame_type,
+ uint8_t payload_type,
+ uint32_t timestamp,
+ const uint8_t* payload_data,
+ uint16_t payload_len_bytes,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
+
+ private:
+ static const int kBlockSizeMs = 10;
+
+ // Creates a Packet object from the last packet produced by ACM (and received
+ // through the SendData method as a callback). Ownership of the new Packet
+ // object is transferred to the caller.
+ Packet* CreatePacket();
+
+ SimulatedClock clock_;
+ scoped_ptr<AudioCoding> acm_;
+ InputAudioFile* audio_source_;
+ int source_rate_hz_;
+ const int input_block_size_samples_;
+ AudioFrame input_frame_;
+ bool codec_registered_;
+ int test_duration_ms_;
+ // The following member variables are set whenever SendData() is called.
+ FrameType frame_type_;
+ int payload_type_;
+ uint32_t timestamp_;
+ uint16_t sequence_number_;
+ std::vector<uint8_t> last_payload_vec_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcmSendTest);
+};
+
+} // namespace test
+} // namespace webrtc
+#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
diff --git a/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc b/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc
new file mode 100644
index 0000000..2f5178e
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/checks.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+
+namespace webrtc {
+namespace test {
+
+AcmSendTestOldApi::AcmSendTestOldApi(InputAudioFile* audio_source,
+ int source_rate_hz,
+ int test_duration_ms)
+ : clock_(0),
+ acm_(webrtc::AudioCodingModule::Create(0, &clock_)),
+ audio_source_(audio_source),
+ source_rate_hz_(source_rate_hz),
+ input_block_size_samples_(source_rate_hz_ * kBlockSizeMs / 1000),
+ codec_registered_(false),
+ test_duration_ms_(test_duration_ms),
+ frame_type_(kAudioFrameSpeech),
+ payload_type_(0),
+ timestamp_(0),
+ sequence_number_(0) {
+ input_frame_.sample_rate_hz_ = source_rate_hz_;
+ input_frame_.num_channels_ = 1;
+ input_frame_.samples_per_channel_ = input_block_size_samples_;
+ assert(input_block_size_samples_ * input_frame_.num_channels_ <=
+ AudioFrame::kMaxDataSizeSamples);
+ acm_->RegisterTransportCallback(this);
+}
+
+bool AcmSendTestOldApi::RegisterCodec(const char* payload_name,
+ int sampling_freq_hz,
+ int channels,
+ int payload_type,
+ int frame_size_samples) {
+ CHECK_EQ(0,
+ AudioCodingModule::Codec(
+ payload_name, &codec_, sampling_freq_hz, channels));
+ codec_.pltype = payload_type;
+ codec_.pacsize = frame_size_samples;
+ codec_registered_ = (acm_->RegisterSendCodec(codec_) == 0);
+ input_frame_.num_channels_ = channels;
+ assert(input_block_size_samples_ * input_frame_.num_channels_ <=
+ AudioFrame::kMaxDataSizeSamples);
+ return codec_registered_;
+}
+
+Packet* AcmSendTestOldApi::NextPacket() {
+ assert(codec_registered_);
+ if (filter_.test(payload_type_)) {
+ // This payload type should be filtered out. Since the payload type is the
+ // same throughout the whole test run, no packet at all will be delivered.
+ // We can just as well signal that the test is over by returning NULL.
+ return NULL;
+ }
+ // Insert audio and process until one packet is produced.
+ while (clock_.TimeInMilliseconds() < test_duration_ms_) {
+ clock_.AdvanceTimeMilliseconds(kBlockSizeMs);
+ CHECK(audio_source_->Read(input_block_size_samples_, input_frame_.data_));
+ if (input_frame_.num_channels_ > 1) {
+ InputAudioFile::DuplicateInterleaved(input_frame_.data_,
+ input_block_size_samples_,
+ input_frame_.num_channels_,
+ input_frame_.data_);
+ }
+ CHECK_EQ(0, acm_->Add10MsData(input_frame_));
+ input_frame_.timestamp_ += input_block_size_samples_;
+ int32_t encoded_bytes = acm_->Process();
+ if (encoded_bytes > 0) {
+ // Encoded packet received.
+ return CreatePacket();
+ }
+ }
+ // Test ended.
+ return NULL;
+}
+
+// This method receives the callback from ACM when a new packet is produced.
+int32_t AcmSendTestOldApi::SendData(
+ FrameType frame_type,
+ uint8_t payload_type,
+ uint32_t timestamp,
+ const uint8_t* payload_data,
+ uint16_t payload_len_bytes,
+ const RTPFragmentationHeader* fragmentation) {
+ // Store the packet locally.
+ frame_type_ = frame_type;
+ payload_type_ = payload_type;
+ timestamp_ = timestamp;
+ last_payload_vec_.assign(payload_data, payload_data + payload_len_bytes);
+ assert(last_payload_vec_.size() == payload_len_bytes);
+ return 0;
+}
+
+Packet* AcmSendTestOldApi::CreatePacket() {
+ const size_t kRtpHeaderSize = 12;
+ size_t allocated_bytes = last_payload_vec_.size() + kRtpHeaderSize;
+ uint8_t* packet_memory = new uint8_t[allocated_bytes];
+ // Populate the header bytes.
+ packet_memory[0] = 0x80;
+ packet_memory[1] = payload_type_;
+ packet_memory[2] = (sequence_number_ >> 8) & 0xFF;
+ packet_memory[3] = (sequence_number_) & 0xFF;
+ packet_memory[4] = (timestamp_ >> 24) & 0xFF;
+ packet_memory[5] = (timestamp_ >> 16) & 0xFF;
+ packet_memory[6] = (timestamp_ >> 8) & 0xFF;
+ packet_memory[7] = timestamp_ & 0xFF;
+ // Set SSRC to 0x12345678.
+ packet_memory[8] = 0x12;
+ packet_memory[9] = 0x34;
+ packet_memory[10] = 0x56;
+ packet_memory[11] = 0x78;
+
+ ++sequence_number_;
+
+ // Copy the payload data.
+ memcpy(packet_memory + kRtpHeaderSize,
+ &last_payload_vec_[0],
+ last_payload_vec_.size());
+ Packet* packet =
+ new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds());
+ assert(packet);
+ assert(packet->valid_header());
+ return packet;
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/acm_send_test_oldapi.h b/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
new file mode 100644
index 0000000..ff229a0
--- /dev/null
+++ b/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
+
+#include <vector>
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+
+namespace webrtc {
+
+namespace test {
+class InputAudioFile;
+class Packet;
+
+class AcmSendTestOldApi : public AudioPacketizationCallback,
+ public PacketSource {
+ public:
+ AcmSendTestOldApi(InputAudioFile* audio_source,
+ int source_rate_hz,
+ int test_duration_ms);
+ virtual ~AcmSendTestOldApi() {}
+
+ // Registers the send codec. Returns true on success, false otherwise.
+ bool RegisterCodec(const char* payload_name,
+ int sampling_freq_hz,
+ int channels,
+ int payload_type,
+ int frame_size_samples);
+
+ // Returns the next encoded packet. Returns NULL if the test duration was
+ // exceeded. Ownership of the packet is handed over to the caller.
+ // Inherited from PacketSource.
+ Packet* NextPacket();
+
+ // Inherited from AudioPacketizationCallback.
+ virtual int32_t SendData(
+ FrameType frame_type,
+ uint8_t payload_type,
+ uint32_t timestamp,
+ const uint8_t* payload_data,
+ uint16_t payload_len_bytes,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
+
+ private:
+ static const int kBlockSizeMs = 10;
+
+ // Creates a Packet object from the last packet produced by ACM (and received
+ // through the SendData method as a callback). Ownership of the new Packet
+ // object is transferred to the caller.
+ Packet* CreatePacket();
+
+ SimulatedClock clock_;
+ scoped_ptr<AudioCodingModule> acm_;
+ InputAudioFile* audio_source_;
+ int source_rate_hz_;
+ const int input_block_size_samples_;
+ AudioFrame input_frame_;
+ CodecInst codec_;
+ bool codec_registered_;
+ int test_duration_ms_;
+ // The following member variables are set whenever SendData() is called.
+ FrameType frame_type_;
+ int payload_type_;
+ uint32_t timestamp_;
+ uint16_t sequence_number_;
+ std::vector<uint8_t> last_payload_vec_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi);
+};
+
+} // namespace test
+} // namespace webrtc
+#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
diff --git a/modules/audio_coding/main/acm2/acm_speex.cc b/modules/audio_coding/main/acm2/acm_speex.cc
index 84a0592..85ead39 100644
--- a/modules/audio_coding/main/acm2/acm_speex.cc
+++ b/modules/audio_coding/main/acm2/acm_speex.cc
@@ -30,7 +30,7 @@
vbr_enabled_(false),
encoding_rate_(-1),
sampling_frequency_(-1),
- samples_in_20ms_audio_(-1) {
+ samples_in_20ms_audio_(0xFFFF) {
return;
}
@@ -58,8 +58,6 @@
int16_t ACMSPEEX::SetBitRateSafe(const int32_t /* rate */) { return -1; }
-void ACMSPEEX::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
#ifdef UNUSEDSPEEX
int16_t ACMSPEEX::EnableVBR() { return -1; }
@@ -250,13 +248,6 @@
return 0;
}
-void ACMSPEEX::InternalDestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WebRtcSpeex_FreeEnc(static_cast<SPEEX_encinst_t_*>(ptr_inst));
- }
- return;
-}
-
#ifdef UNUSEDSPEEX
// This API is currently not in use. If requested to be able to enable/disable
diff --git a/modules/audio_coding/main/acm2/acm_speex.h b/modules/audio_coding/main/acm2/acm_speex.h
index f9cf787..931e3a9 100644
--- a/modules/audio_coding/main/acm2/acm_speex.h
+++ b/modules/audio_coding/main/acm2/acm_speex.h
@@ -38,8 +38,6 @@
int16_t InternalCreateEncoder();
- void InternalDestructEncoderInst(void* ptr_inst);
-
int16_t SetBitRateSafe(const int32_t rate);
int16_t EnableDTX();
diff --git a/modules/audio_coding/main/acm2/audio_coding_module.cc b/modules/audio_coding/main/acm2/audio_coding_module.cc
index eca909c..9b61d33 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module.cc
+++ b/modules/audio_coding/main/acm2/audio_coding_module.cc
@@ -94,4 +94,8 @@
}
}
+AudioCoding* AudioCoding::Create(const Config& config) {
+ return new AudioCodingImpl(config);
+}
+
} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/audio_coding_module.gypi b/modules/audio_coding/main/acm2/audio_coding_module.gypi
index 90dad6c..d746a80 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module.gypi
+++ b/modules/audio_coding/main/acm2/audio_coding_module.gypi
@@ -117,6 +117,44 @@
['include_tests==1', {
'targets': [
{
+ 'target_name': 'acm_receive_test',
+ 'type': 'static_library',
+ 'defines': [
+ '<@(audio_coding_defines)',
+ ],
+ 'dependencies': [
+ '<@(audio_coding_dependencies)',
+ 'audio_coding_module',
+ 'neteq_unittest_tools',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'acm_receive_test.cc',
+ 'acm_receive_test.h',
+ 'acm_receive_test_oldapi.cc',
+ 'acm_receive_test_oldapi.h',
+ ],
+ }, # acm_receive_test
+ {
+ 'target_name': 'acm_send_test',
+ 'type': 'static_library',
+ 'defines': [
+ '<@(audio_coding_defines)',
+ ],
+ 'dependencies': [
+ '<@(audio_coding_dependencies)',
+ 'audio_coding_module',
+ 'neteq_unittest_tools',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'acm_send_test.cc',
+ 'acm_send_test.h',
+ 'acm_send_test_oldapi.cc',
+ 'acm_send_test_oldapi.h',
+ ],
+ }, # acm_send_test
+ {
'target_name': 'delay_test',
'type': 'executable',
'dependencies': [
diff --git a/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
index a07e854..687c5b8 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <vector>
+#include "webrtc/base/checks.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
@@ -749,7 +750,6 @@
return my_codec;
}
my_codec->SetUniqueID(id_);
- my_codec->SetNetEqDecodeLock(receiver_.DecodeLock());
return my_codec;
}
@@ -1203,6 +1203,7 @@
// Set available bandwidth, inform the encoder about the estimated bandwidth
// received from the remote party.
int AudioCodingModuleImpl::SetReceivedEstimatedBandwidth(int bw) {
+ CriticalSectionScoped lock(acm_crit_sect_);
return codecs_[current_send_codec_idx_]->SetEstimatedBandwidth(bw);
}
@@ -1452,6 +1453,7 @@
//
bool AudioCodingModuleImpl::CodecFEC() const {
+ CriticalSectionScoped lock(acm_crit_sect_);
return codec_fec_enabled_;
}
@@ -1476,6 +1478,7 @@
}
int AudioCodingModuleImpl::SetPacketLossRate(int loss_rate) {
+ CriticalSectionScoped lock(acm_crit_sect_);
if (HaveValidEncoder("SetPacketLossRate") &&
codecs_[current_send_codec_idx_]->SetPacketLossRate(loss_rate) < 0) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_,
@@ -1616,14 +1619,8 @@
int codec_id = receiver_.last_audio_codec_id();
- int sample_rate_hz;
- if (codec_id < 0)
- sample_rate_hz = receiver_.current_sample_rate_hz();
- else
- sample_rate_hz = ACMCodecDB::database_[codec_id].plfreq;
-
- // TODO(tlegrand): Remove this option when we have full 48 kHz support.
- return (sample_rate_hz > 32000) ? 32000 : sample_rate_hz;
+ return codec_id < 0 ? receiver_.current_sample_rate_hz() :
+ ACMCodecDB::database_[codec_id].plfreq;
}
// Get current playout frequency.
@@ -1790,15 +1787,6 @@
return 0;
}
-void AudioCodingModuleImpl::DestructEncoderInst(void* inst) {
- CriticalSectionScoped lock(acm_crit_sect_);
- WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceAudioCoding, id_,
- "DestructEncoderInst()");
- if (!HaveValidEncoder("DestructEncoderInst"))
- return;
- codecs_[current_send_codec_idx_]->DestructEncoderInst(inst);
-}
-
int AudioCodingModuleImpl::RegisterVADCallback(ACMVADCallback* vad_callback) {
WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceAudioCoding, id_,
"RegisterVADCallback()");
@@ -1915,6 +1903,15 @@
frame_size_ms, rate_bit_per_sec, enforce_frame_size);
}
+// Informs Opus encoder of the maximum playback rate the receiver will render.
+int AudioCodingModuleImpl::SetOpusMaxPlaybackRate(int frequency_hz) {
+ CriticalSectionScoped lock(acm_crit_sect_);
+ if (!HaveValidEncoder("SetOpusMaxPlaybackRate")) {
+ return -1;
+ }
+ return codecs_[current_send_codec_idx_]->SetOpusMaxPlaybackRate(frequency_hz);
+}
+
int AudioCodingModuleImpl::PlayoutTimestamp(uint32_t* timestamp) {
return receiver_.GetPlayoutTimestamp(timestamp) ? 0 : -1;
}
@@ -1950,6 +1947,7 @@
int isac_bw_estimate,
uint8_t* payload,
int16_t* length_bytes) {
+ CriticalSectionScoped lock(acm_crit_sect_);
if (!HaveValidEncoder("EncodeData")) {
return -1;
}
@@ -2047,4 +2045,268 @@
} // namespace acm2
+bool AudioCodingImpl::RegisterSendCodec(AudioEncoder* send_codec) {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::RegisterSendCodec(int encoder_type,
+ uint8_t payload_type,
+ int frame_size_samples) {
+ std::string codec_name;
+ int sample_rate_hz;
+ int channels;
+ if (!MapCodecTypeToParameters(
+ encoder_type, &codec_name, &sample_rate_hz, &channels)) {
+ return false;
+ }
+ webrtc::CodecInst codec;
+ AudioCodingModule::Codec(
+ codec_name.c_str(), &codec, sample_rate_hz, channels);
+ codec.pltype = payload_type;
+ if (frame_size_samples > 0) {
+ codec.pacsize = frame_size_samples;
+ }
+ return acm_old_->RegisterSendCodec(codec) == 0;
+}
+
+const AudioEncoder* AudioCodingImpl::GetSenderInfo() const {
+ FATAL() << "Not implemented yet.";
+}
+
+const CodecInst* AudioCodingImpl::GetSenderCodecInst() {
+ if (acm_old_->SendCodec(¤t_send_codec_) != 0) {
+ return NULL;
+ }
+ return ¤t_send_codec_;
+}
+
+int AudioCodingImpl::Add10MsAudio(const AudioFrame& audio_frame) {
+ if (acm_old_->Add10MsData(audio_frame) != 0) {
+ return -1;
+ }
+ return acm_old_->Process();
+}
+
+const ReceiverInfo* AudioCodingImpl::GetReceiverInfo() const {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::RegisterReceiveCodec(AudioDecoder* receive_codec) {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::RegisterReceiveCodec(int decoder_type,
+ uint8_t payload_type) {
+ std::string codec_name;
+ int sample_rate_hz;
+ int channels;
+ if (!MapCodecTypeToParameters(
+ decoder_type, &codec_name, &sample_rate_hz, &channels)) {
+ return false;
+ }
+ webrtc::CodecInst codec;
+ AudioCodingModule::Codec(
+ codec_name.c_str(), &codec, sample_rate_hz, channels);
+ codec.pltype = payload_type;
+ return acm_old_->RegisterReceiveCodec(codec) == 0;
+}
+
+bool AudioCodingImpl::InsertPacket(const uint8_t* incoming_payload,
+ int32_t payload_len_bytes,
+ const WebRtcRTPHeader& rtp_info) {
+ return acm_old_->IncomingPacket(
+ incoming_payload, payload_len_bytes, rtp_info) == 0;
+}
+
+bool AudioCodingImpl::InsertPayload(const uint8_t* incoming_payload,
+ int32_t payload_len_byte,
+ uint8_t payload_type,
+ uint32_t timestamp) {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::SetMinimumPlayoutDelay(int time_ms) {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::SetMaximumPlayoutDelay(int time_ms) {
+ FATAL() << "Not implemented yet.";
+}
+
+int AudioCodingImpl::LeastRequiredDelayMs() const {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::PlayoutTimestamp(uint32_t* timestamp) {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::Get10MsAudio(AudioFrame* audio_frame) {
+ return acm_old_->PlayoutData10Ms(playout_frequency_hz_, audio_frame) == 0;
+}
+
+bool AudioCodingImpl::NetworkStatistics(
+ ACMNetworkStatistics* network_statistics) {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::EnableNack(size_t max_nack_list_size) {
+ FATAL() << "Not implemented yet.";
+}
+
+void AudioCodingImpl::DisableNack() {
+ FATAL() << "Not implemented yet.";
+}
+
+bool AudioCodingImpl::SetVad(bool enable_dtx,
+ bool enable_vad,
+ ACMVADMode vad_mode) {
+ return acm_old_->SetVAD(enable_dtx, enable_vad, vad_mode) == 0;
+}
+
+std::vector<uint16_t> AudioCodingImpl::GetNackList(
+ int round_trip_time_ms) const {
+ return acm_old_->GetNackList(round_trip_time_ms);
+}
+
+void AudioCodingImpl::GetDecodingCallStatistics(
+ AudioDecodingCallStats* call_stats) const {
+ acm_old_->GetDecodingCallStatistics(call_stats);
+}
+
+bool AudioCodingImpl::MapCodecTypeToParameters(int codec_type,
+ std::string* codec_name,
+ int* sample_rate_hz,
+ int* channels) {
+ switch (codec_type) {
+#ifdef WEBRTC_CODEC_PCM16
+ case acm2::ACMCodecDB::kPCM16B:
+ *codec_name = "L16";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kPCM16Bwb:
+ *codec_name = "L16";
+ *sample_rate_hz = 16000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kPCM16Bswb32kHz:
+ *codec_name = "L16";
+ *sample_rate_hz = 32000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kPCM16B_2ch:
+ *codec_name = "L16";
+ *sample_rate_hz = 8000;
+ *channels = 2;
+ break;
+ case acm2::ACMCodecDB::kPCM16Bwb_2ch:
+ *codec_name = "L16";
+ *sample_rate_hz = 16000;
+ *channels = 2;
+ break;
+ case acm2::ACMCodecDB::kPCM16Bswb32kHz_2ch:
+ *codec_name = "L16";
+ *sample_rate_hz = 32000;
+ *channels = 2;
+ break;
+#endif
+#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX))
+ case acm2::ACMCodecDB::kISAC:
+ *codec_name = "ISAC";
+ *sample_rate_hz = 16000;
+ *channels = 1;
+ break;
+#endif
+#ifdef WEBRTC_CODEC_ISAC
+ case acm2::ACMCodecDB::kISACSWB:
+ *codec_name = "ISAC";
+ *sample_rate_hz = 32000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kISACFB:
+ *codec_name = "ISAC";
+ *sample_rate_hz = 48000;
+ *channels = 1;
+ break;
+#endif
+#ifdef WEBRTC_CODEC_ILBC
+ case acm2::ACMCodecDB::kILBC:
+ *codec_name = "ILBC";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+#endif
+ case acm2::ACMCodecDB::kPCMA:
+ *codec_name = "PCMA";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kPCMA_2ch:
+ *codec_name = "PCMA";
+ *sample_rate_hz = 8000;
+ *channels = 2;
+ break;
+ case acm2::ACMCodecDB::kPCMU:
+ *codec_name = "PCMU";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kPCMU_2ch:
+ *codec_name = "PCMU";
+ *sample_rate_hz = 8000;
+ *channels = 2;
+ break;
+#ifdef WEBRTC_CODEC_G722
+ case acm2::ACMCodecDB::kG722:
+ *codec_name = "G722";
+ *sample_rate_hz = 16000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kG722_2ch:
+ *codec_name = "G722";
+ *sample_rate_hz = 16000;
+ *channels = 2;
+ break;
+#endif
+#ifdef WEBRTC_CODEC_OPUS
+ case acm2::ACMCodecDB::kOpus:
+ *codec_name = "opus";
+ *sample_rate_hz = 48000;
+ *channels = 2;
+ break;
+#endif
+ case acm2::ACMCodecDB::kCNNB:
+ *codec_name = "CN";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kCNWB:
+ *codec_name = "CN";
+ *sample_rate_hz = 16000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kCNSWB:
+ *codec_name = "CN";
+ *sample_rate_hz = 32000;
+ *channels = 1;
+ break;
+ case acm2::ACMCodecDB::kRED:
+ *codec_name = "red";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+#ifdef WEBRTC_CODEC_AVT
+ case acm2::ACMCodecDB::kAVT:
+ *codec_name = "telephone-event";
+ *sample_rate_hz = 8000;
+ *channels = 1;
+ break;
+#endif
+ default:
+ FATAL() << "Codec type " << codec_type << " not supported.";
+ }
+ return true;
+}
+
} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/audio_coding_module_impl.h b/modules/audio_coding/main/acm2/audio_coding_module_impl.h
index e54202b..b8d128f 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module_impl.h
+++ b/modules/audio_coding/main/acm2/audio_coding_module_impl.h
@@ -13,13 +13,13 @@
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
namespace webrtc {
@@ -36,83 +36,84 @@
~AudioCodingModuleImpl();
// Change the unique identifier of this object.
- virtual int32_t ChangeUniqueId(const int32_t id);
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
// Returns the number of milliseconds until the module want a worker thread
// to call Process.
- int32_t TimeUntilNextProcess();
+ virtual int32_t TimeUntilNextProcess() OVERRIDE;
// Process any pending tasks such as timeouts.
- int32_t Process();
+ virtual int32_t Process() OVERRIDE;
/////////////////////////////////////////
// Sender
//
// Initialize send codec.
- int InitializeSender();
+ virtual int InitializeSender() OVERRIDE;
// Reset send codec.
- int ResetEncoder();
+ virtual int ResetEncoder() OVERRIDE;
// Can be called multiple times for Codec, CNG, RED.
- int RegisterSendCodec(const CodecInst& send_codec);
+ virtual int RegisterSendCodec(const CodecInst& send_codec) OVERRIDE;
// Register Secondary codec for dual-streaming. Dual-streaming is activated
// right after the secondary codec is registered.
- int RegisterSecondarySendCodec(const CodecInst& send_codec);
+ virtual int RegisterSecondarySendCodec(const CodecInst& send_codec) OVERRIDE;
// Unregister the secondary codec. Dual-streaming is deactivated right after
// deregistering secondary codec.
- void UnregisterSecondarySendCodec();
+ virtual void UnregisterSecondarySendCodec() OVERRIDE;
// Get the secondary codec.
- int SecondarySendCodec(CodecInst* secondary_codec) const;
+ virtual int SecondarySendCodec(CodecInst* secondary_codec) const OVERRIDE;
// Get current send codec.
- int SendCodec(CodecInst* current_codec) const;
+ virtual int SendCodec(CodecInst* current_codec) const OVERRIDE;
// Get current send frequency.
- int SendFrequency() const;
+ virtual int SendFrequency() const OVERRIDE;
// Get encode bit-rate.
// Adaptive rate codecs return their current encode target rate, while other
// codecs return there long-term average or their fixed rate.
- int SendBitrate() const;
+ virtual int SendBitrate() const OVERRIDE;
// Set available bandwidth, inform the encoder about the
// estimated bandwidth received from the remote party.
- virtual int SetReceivedEstimatedBandwidth(int bw);
+ virtual int SetReceivedEstimatedBandwidth(int bw) OVERRIDE;
// Register a transport callback which will be
// called to deliver the encoded buffers.
- int RegisterTransportCallback(AudioPacketizationCallback* transport);
+ virtual int RegisterTransportCallback(
+ AudioPacketizationCallback* transport) OVERRIDE;
// Add 10 ms of raw (PCM) audio data to the encoder.
- int Add10MsData(const AudioFrame& audio_frame);
+ virtual int Add10MsData(const AudioFrame& audio_frame) OVERRIDE;
/////////////////////////////////////////
// (RED) Redundant Coding
//
// Configure RED status i.e. on/off.
- int SetREDStatus(bool enable_red);
+ virtual int SetREDStatus(bool enable_red) OVERRIDE;
// Get RED status.
- bool REDStatus() const;
+ virtual bool REDStatus() const OVERRIDE;
/////////////////////////////////////////
// (FEC) Forward Error Correction (codec internal)
//
// Configure FEC status i.e. on/off.
- int SetCodecFEC(bool enabled_codec_fec);
+ virtual int SetCodecFEC(bool enabled_codec_fec) OVERRIDE;
// Get FEC status.
- bool CodecFEC() const;
+ virtual bool CodecFEC() const OVERRIDE;
// Set target packet loss rate
- int SetPacketLossRate(int loss_rate);
+ virtual int SetPacketLossRate(int loss_rate) OVERRIDE;
/////////////////////////////////////////
// (VAD) Voice Activity Detection
@@ -120,126 +121,135 @@
// (CNG) Comfort Noise Generation
//
- int SetVAD(bool enable_dtx = true,
- bool enable_vad = false,
- ACMVADMode mode = VADNormal);
+ virtual int SetVAD(bool enable_dtx = true,
+ bool enable_vad = false,
+ ACMVADMode mode = VADNormal) OVERRIDE;
- int VAD(bool* dtx_enabled, bool* vad_enabled, ACMVADMode* mode) const;
+ virtual int VAD(bool* dtx_enabled,
+ bool* vad_enabled,
+ ACMVADMode* mode) const OVERRIDE;
- int RegisterVADCallback(ACMVADCallback* vad_callback);
+ virtual int RegisterVADCallback(ACMVADCallback* vad_callback) OVERRIDE;
/////////////////////////////////////////
// Receiver
//
// Initialize receiver, resets codec database etc.
- int InitializeReceiver();
+ virtual int InitializeReceiver() OVERRIDE;
// Reset the decoder state.
- int ResetDecoder();
+ virtual int ResetDecoder() OVERRIDE;
// Get current receive frequency.
- int ReceiveFrequency() const;
+ virtual int ReceiveFrequency() const OVERRIDE;
// Get current playout frequency.
- int PlayoutFrequency() const;
+ virtual int PlayoutFrequency() const OVERRIDE;
// Register possible receive codecs, can be called multiple times,
// for codecs, CNG, DTMF, RED.
- int RegisterReceiveCodec(const CodecInst& receive_codec);
+ virtual int RegisterReceiveCodec(const CodecInst& receive_codec) OVERRIDE;
// Get current received codec.
- int ReceiveCodec(CodecInst* current_codec) const;
+ virtual int ReceiveCodec(CodecInst* current_codec) const OVERRIDE;
// Incoming packet from network parsed and ready for decode.
- int IncomingPacket(const uint8_t* incoming_payload,
- int payload_length,
- const WebRtcRTPHeader& rtp_info);
+ virtual int IncomingPacket(const uint8_t* incoming_payload,
+ int payload_length,
+ const WebRtcRTPHeader& rtp_info) OVERRIDE;
// Incoming payloads, without rtp-info, the rtp-info will be created in ACM.
// One usage for this API is when pre-encoded files are pushed in ACM.
- int IncomingPayload(const uint8_t* incoming_payload,
- int payload_length,
- uint8_t payload_type,
- uint32_t timestamp);
+ virtual int IncomingPayload(const uint8_t* incoming_payload,
+ int payload_length,
+ uint8_t payload_type,
+ uint32_t timestamp) OVERRIDE;
// Minimum playout delay.
- int SetMinimumPlayoutDelay(int time_ms);
+ virtual int SetMinimumPlayoutDelay(int time_ms) OVERRIDE;
// Maximum playout delay.
- int SetMaximumPlayoutDelay(int time_ms);
+ virtual int SetMaximumPlayoutDelay(int time_ms) OVERRIDE;
// Smallest latency NetEq will maintain.
- int LeastRequiredDelayMs() const;
+ virtual int LeastRequiredDelayMs() const OVERRIDE;
// Impose an initial delay on playout. ACM plays silence until |delay_ms|
// audio is accumulated in NetEq buffer, then starts decoding payloads.
- int SetInitialPlayoutDelay(int delay_ms);
+ virtual int SetInitialPlayoutDelay(int delay_ms) OVERRIDE;
// TODO(turajs): DTMF playout is always activated in NetEq these APIs should
// be removed, as well as all VoE related APIs and methods.
//
// Configure Dtmf playout status i.e on/off playout the incoming outband Dtmf
// tone.
- int SetDtmfPlayoutStatus(bool enable) { return 0; }
+ virtual int SetDtmfPlayoutStatus(bool enable) OVERRIDE { return 0; }
// Get Dtmf playout status.
- bool DtmfPlayoutStatus() const { return true; }
+ virtual bool DtmfPlayoutStatus() const OVERRIDE { return true; }
// Estimate the Bandwidth based on the incoming stream, needed
// for one way audio where the RTCP send the BW estimate.
// This is also done in the RTP module .
- int DecoderEstimatedBandwidth() const;
+ virtual int DecoderEstimatedBandwidth() const OVERRIDE;
// Set playout mode voice, fax.
- int SetPlayoutMode(AudioPlayoutMode mode);
+ virtual int SetPlayoutMode(AudioPlayoutMode mode) OVERRIDE;
// Get playout mode voice, fax.
- AudioPlayoutMode PlayoutMode() const;
+ virtual AudioPlayoutMode PlayoutMode() const OVERRIDE;
// Get playout timestamp.
- int PlayoutTimestamp(uint32_t* timestamp);
+ virtual int PlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
// Get 10 milliseconds of raw audio data to play out, and
// automatic resample to the requested frequency if > 0.
- int PlayoutData10Ms(int desired_freq_hz, AudioFrame* audio_frame);
+ virtual int PlayoutData10Ms(int desired_freq_hz,
+ AudioFrame* audio_frame) OVERRIDE;
/////////////////////////////////////////
// Statistics
//
- int NetworkStatistics(ACMNetworkStatistics* statistics);
-
- void DestructEncoderInst(void* inst);
+ virtual int NetworkStatistics(ACMNetworkStatistics* statistics) OVERRIDE;
// GET RED payload for iSAC. The method id called when 'this' ACM is
// the default ACM.
+ // TODO(henrik.lundin) Not used. Remove?
int REDPayloadISAC(int isac_rate,
int isac_bw_estimate,
uint8_t* payload,
int16_t* length_bytes);
- int ReplaceInternalDTXWithWebRtc(bool use_webrtc_dtx);
+ virtual int ReplaceInternalDTXWithWebRtc(bool use_webrtc_dtx) OVERRIDE;
- int IsInternalDTXReplacedWithWebRtc(bool* uses_webrtc_dtx);
+ virtual int IsInternalDTXReplacedWithWebRtc(bool* uses_webrtc_dtx) OVERRIDE;
- int SetISACMaxRate(int max_bit_per_sec);
+ virtual int SetISACMaxRate(int max_bit_per_sec) OVERRIDE;
- int SetISACMaxPayloadSize(int max_size_bytes);
+ virtual int SetISACMaxPayloadSize(int max_size_bytes) OVERRIDE;
- int ConfigISACBandwidthEstimator(int frame_size_ms,
- int rate_bit_per_sec,
- bool enforce_frame_size = false);
+ virtual int ConfigISACBandwidthEstimator(
+ int frame_size_ms,
+ int rate_bit_per_sec,
+ bool enforce_frame_size = false) OVERRIDE;
- int UnregisterReceiveCodec(uint8_t payload_type);
+ // If current send codec is Opus, informs it about the maximum playback rate
+ // the receiver will render.
+ virtual int SetOpusMaxPlaybackRate(int frequency_hz) OVERRIDE;
- int EnableNack(size_t max_nack_list_size);
+ virtual int UnregisterReceiveCodec(uint8_t payload_type) OVERRIDE;
- void DisableNack();
+ virtual int EnableNack(size_t max_nack_list_size) OVERRIDE;
- std::vector<uint16_t> GetNackList(int round_trip_time_ms) const;
+ virtual void DisableNack() OVERRIDE;
- void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const;
+ virtual std::vector<uint16_t> GetNackList(
+ int round_trip_time_ms) const OVERRIDE;
+
+ virtual void GetDecodingCallStatistics(
+ AudioDecodingCallStats* stats) const OVERRIDE;
private:
int UnregisterReceiveCodecSafe(int payload_type);
@@ -248,7 +258,8 @@
int InitializeReceiverSafe() EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_);
- bool HaveValidEncoder(const char* caller_name) const;
+ bool HaveValidEncoder(const char* caller_name) const
+ EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_);
// Set VAD/DTX status. This function does not acquire a lock, and it is
// created to be called only from inside a critical section.
@@ -303,7 +314,8 @@
// codec owns the decoder-instance. For such codecs |*decoder| should be a
// valid pointer, otherwise it will be NULL.
int GetAudioDecoder(const CodecInst& codec, int codec_id,
- int mirror_id, AudioDecoder** decoder);
+ int mirror_id, AudioDecoder** decoder)
+ EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_);
CriticalSectionWrapper* acm_crit_sect_;
int id_; // TODO(henrik.lundin) Make const.
@@ -320,13 +332,14 @@
bool vad_enabled_ GUARDED_BY(acm_crit_sect_);
bool dtx_enabled_ GUARDED_BY(acm_crit_sect_);
ACMVADMode vad_mode_ GUARDED_BY(acm_crit_sect_);
- ACMGenericCodec* codecs_[ACMCodecDB::kMaxNumCodecs];
- int mirror_codec_idx_[ACMCodecDB::kMaxNumCodecs];
+ ACMGenericCodec* codecs_[ACMCodecDB::kMaxNumCodecs]
+ GUARDED_BY(acm_crit_sect_);
+ int mirror_codec_idx_[ACMCodecDB::kMaxNumCodecs] GUARDED_BY(acm_crit_sect_);
bool stereo_send_ GUARDED_BY(acm_crit_sect_);
- int current_send_codec_idx_;
- bool send_codec_registered_;
+ int current_send_codec_idx_ GUARDED_BY(acm_crit_sect_);
+ bool send_codec_registered_ GUARDED_BY(acm_crit_sect_);
ACMResampler resampler_ GUARDED_BY(acm_crit_sect_);
- AcmReceiver receiver_;
+ AcmReceiver receiver_; // AcmReceiver has it's own internal lock.
// RED.
bool is_first_red_ GUARDED_BY(acm_crit_sect_);
@@ -345,7 +358,7 @@
uint32_t last_red_timestamp_ GUARDED_BY(acm_crit_sect_);
// Codec internal FEC
- bool codec_fec_enabled_;
+ bool codec_fec_enabled_ GUARDED_BY(acm_crit_sect_);
// This is to keep track of CN instances where we can send DTMFs.
uint8_t previous_pltype_ GUARDED_BY(acm_crit_sect_);
@@ -374,6 +387,94 @@
} // namespace acm2
+class AudioCodingImpl : public AudioCoding {
+ public:
+ AudioCodingImpl(const Config& config) {
+ AudioCodingModule::Config config_old = config.ToOldConfig();
+ acm_old_.reset(new acm2::AudioCodingModuleImpl(config_old));
+ acm_old_->RegisterTransportCallback(config.transport);
+ acm_old_->RegisterVADCallback(config.vad_callback);
+ acm_old_->SetDtmfPlayoutStatus(config.play_dtmf);
+ if (config.initial_playout_delay_ms > 0) {
+ acm_old_->SetInitialPlayoutDelay(config.initial_playout_delay_ms);
+ }
+ playout_frequency_hz_ = config.playout_frequency_hz;
+ }
+
+ virtual ~AudioCodingImpl() OVERRIDE {};
+
+ virtual bool RegisterSendCodec(AudioEncoder* send_codec) OVERRIDE;
+
+ virtual bool RegisterSendCodec(int encoder_type,
+ uint8_t payload_type,
+ int frame_size_samples = 0) OVERRIDE;
+
+ virtual const AudioEncoder* GetSenderInfo() const OVERRIDE;
+
+ virtual const CodecInst* GetSenderCodecInst() OVERRIDE;
+
+ virtual int Add10MsAudio(const AudioFrame& audio_frame) OVERRIDE;
+
+ virtual const ReceiverInfo* GetReceiverInfo() const OVERRIDE;
+
+ virtual bool RegisterReceiveCodec(AudioDecoder* receive_codec) OVERRIDE;
+
+ virtual bool RegisterReceiveCodec(int decoder_type,
+ uint8_t payload_type) OVERRIDE;
+
+ virtual bool InsertPacket(const uint8_t* incoming_payload,
+ int32_t payload_len_bytes,
+ const WebRtcRTPHeader& rtp_info) OVERRIDE;
+
+ virtual bool InsertPayload(const uint8_t* incoming_payload,
+ int32_t payload_len_byte,
+ uint8_t payload_type,
+ uint32_t timestamp) OVERRIDE;
+
+ virtual bool SetMinimumPlayoutDelay(int time_ms) OVERRIDE;
+
+ virtual bool SetMaximumPlayoutDelay(int time_ms) OVERRIDE;
+
+ virtual int LeastRequiredDelayMs() const OVERRIDE;
+
+ virtual bool PlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
+
+ virtual bool Get10MsAudio(AudioFrame* audio_frame) OVERRIDE;
+
+ virtual bool NetworkStatistics(
+ ACMNetworkStatistics* network_statistics) OVERRIDE;
+
+ virtual bool EnableNack(size_t max_nack_list_size) OVERRIDE;
+
+ virtual void DisableNack() OVERRIDE;
+
+ virtual bool SetVad(bool enable_dtx,
+ bool enable_vad,
+ ACMVADMode vad_mode) OVERRIDE;
+
+ virtual std::vector<uint16_t> GetNackList(
+ int round_trip_time_ms) const OVERRIDE;
+
+ virtual void GetDecodingCallStatistics(
+ AudioDecodingCallStats* call_stats) const OVERRIDE;
+
+ private:
+ // Temporary method to be used during redesign phase.
+ // Maps |codec_type| (a value from the anonymous enum in acm2::ACMCodecDB) to
+ // |codec_name|, |sample_rate_hz|, and |channels|.
+ // TODO(henrik.lundin) Remove this when no longer needed.
+ static bool MapCodecTypeToParameters(int codec_type,
+ std::string* codec_name,
+ int* sample_rate_hz,
+ int* channels);
+
+ int playout_frequency_hz_;
+ // TODO(henrik.lundin): All members below this line are temporary and should
+ // be removed after refactoring is completed.
+ scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_;
+ CodecInst current_send_codec_;
+};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
diff --git a/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
index 37cd70e..828b772 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
@@ -12,9 +12,19 @@
#include <vector>
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/checks.h"
+#include "webrtc/base/md5digest.h"
+#include "webrtc/base/thread_annotations.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_receive_test.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_send_test.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_checksum.h"
#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
+#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/output_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/compile_assert.h"
@@ -22,7 +32,6 @@
#include "webrtc/system_wrappers/interface/event_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/system_wrappers/interface/sleep.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/test/testsupport/gtest_disable.h"
@@ -110,19 +119,15 @@
class AudioCodingModuleTest : public ::testing::Test {
protected:
AudioCodingModuleTest()
- : id_(1),
- rtp_utility_(new RtpUtility(kFrameSizeSamples, kPayloadType)),
- clock_(Clock::GetRealTimeClock()) {}
+ : rtp_utility_(new RtpUtility(kFrameSizeSamples, kPayloadType)) {
+ config_.transport = &packet_cb_;
+ }
~AudioCodingModuleTest() {}
- void TearDown() {}
+ void TearDown() OVERRIDE {}
- void SetUp() {
- acm_.reset(AudioCodingModule::Create(id_, clock_));
-
- RegisterCodec();
-
+ void SetUp() OVERRIDE {
rtp_utility_->Populate(&rtp_header_);
input_frame_.sample_rate_hz_ = kSampleRateHz;
@@ -133,17 +138,32 @@
memset(input_frame_.data_,
0,
input_frame_.samples_per_channel_ * sizeof(input_frame_.data_[0]));
+ }
- ASSERT_EQ(0, acm_->RegisterTransportCallback(&packet_cb_));
+ void CreateAcm() {
+ acm_.reset(AudioCoding::Create(config_));
+ ASSERT_TRUE(acm_.get() != NULL);
+ RegisterCodec();
}
virtual void RegisterCodec() {
- AudioCodingModule::Codec("L16", &codec_, kSampleRateHz, 1);
- codec_.pltype = kPayloadType;
-
// Register L16 codec in ACM.
- ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
- ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+ int codec_type = acm2::ACMCodecDB::kNone;
+ switch (kSampleRateHz) {
+ case 8000:
+ codec_type = acm2::ACMCodecDB::kPCM16B;
+ break;
+ case 16000:
+ codec_type = acm2::ACMCodecDB::kPCM16Bwb;
+ break;
+ case 32000:
+ codec_type = acm2::ACMCodecDB::kPCM16Bswb32kHz;
+ break;
+ default:
+ FATAL() << "Sample rate not supported in this test.";
+ }
+ ASSERT_TRUE(acm_->RegisterSendCodec(codec_type, kPayloadType));
+ ASSERT_TRUE(acm_->RegisterReceiveCodec(codec_type, kPayloadType));
}
virtual void InsertPacketAndPullAudio() {
@@ -153,41 +173,33 @@
virtual void InsertPacket() {
const uint8_t kPayload[kPayloadSizeBytes] = {0};
- ASSERT_EQ(0,
- acm_->IncomingPacket(kPayload, kPayloadSizeBytes, rtp_header_));
+ ASSERT_TRUE(acm_->InsertPacket(kPayload, kPayloadSizeBytes, rtp_header_));
rtp_utility_->Forward(&rtp_header_);
}
virtual void PullAudio() {
AudioFrame audio_frame;
- ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &audio_frame));
+ ASSERT_TRUE(acm_->Get10MsAudio(&audio_frame));
}
virtual void InsertAudio() {
- ASSERT_EQ(0, acm_->Add10MsData(input_frame_));
+ int encoded_bytes = acm_->Add10MsAudio(input_frame_);
+ ASSERT_GE(encoded_bytes, 0);
input_frame_.timestamp_ += kNumSamples10ms;
}
- virtual void Encode() {
- int32_t encoded_bytes = acm_->Process();
- // Expect to get one packet with two bytes per sample, or no packet at all,
- // depending on how many 10 ms blocks go into |codec_.pacsize|.
- EXPECT_TRUE(encoded_bytes == 2 * codec_.pacsize || encoded_bytes == 0);
- }
-
- const int id_;
+ AudioCoding::Config config_;
scoped_ptr<RtpUtility> rtp_utility_;
- scoped_ptr<AudioCodingModule> acm_;
+ scoped_ptr<AudioCoding> acm_;
PacketizationCallbackStub packet_cb_;
WebRtcRTPHeader rtp_header_;
AudioFrame input_frame_;
- CodecInst codec_;
- Clock* clock_;
};
// Check if the statistics are initialized correctly. Before any call to ACM
// all fields have to be zero.
TEST_F(AudioCodingModuleTest, DISABLED_ON_ANDROID(InitializedToZero)) {
+ CreateAcm();
AudioDecodingCallStats stats;
acm_->GetDecodingCallStatistics(&stats);
EXPECT_EQ(0, stats.calls_to_neteq);
@@ -201,10 +213,10 @@
// Apply an initial playout delay. Calls to AudioCodingModule::PlayoutData10ms()
// should result in generating silence, check the associated field.
TEST_F(AudioCodingModuleTest, DISABLED_ON_ANDROID(SilenceGeneratorCalled)) {
- AudioDecodingCallStats stats;
const int kInitialDelay = 100;
-
- acm_->SetInitialPlayoutDelay(kInitialDelay);
+ config_.initial_playout_delay_ms = kInitialDelay;
+ CreateAcm();
+ AudioDecodingCallStats stats;
int num_calls = 0;
for (int time_ms = 0; time_ms < kInitialDelay;
@@ -224,6 +236,7 @@
// simulate packet loss and check if PLC and PLC-to-CNG statistics are
// correctly updated.
TEST_F(AudioCodingModuleTest, DISABLED_ON_ANDROID(NetEqCalls)) {
+ CreateAcm();
AudioDecodingCallStats stats;
const int kNumNormalCalls = 10;
@@ -255,21 +268,16 @@
}
TEST_F(AudioCodingModuleTest, VerifyOutputFrame) {
+ CreateAcm();
AudioFrame audio_frame;
const int kSampleRateHz = 32000;
- EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame));
- EXPECT_EQ(id_, audio_frame.id_);
+ EXPECT_TRUE(acm_->Get10MsAudio(&audio_frame));
EXPECT_EQ(0u, audio_frame.timestamp_);
EXPECT_GT(audio_frame.num_channels_, 0);
EXPECT_EQ(kSampleRateHz / 100, audio_frame.samples_per_channel_);
EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_);
}
-TEST_F(AudioCodingModuleTest, FailOnZeroDesiredFrequency) {
- AudioFrame audio_frame;
- EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame));
-}
-
// A multi-threaded test for ACM. This base class is using the PCM16b 16 kHz
// codec, while the derive class AcmIsacMtTest is using iSAC.
class AudioCodingModuleMtTest : public AudioCodingModuleTest {
@@ -298,11 +306,12 @@
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
next_insert_packet_time_ms_(0),
fake_clock_(new SimulatedClock(0)) {
- clock_ = fake_clock_.get();
+ config_.clock = fake_clock_.get();
}
- void SetUp() {
+ virtual void SetUp() OVERRIDE {
AudioCodingModuleTest::SetUp();
+ CreateAcm();
StartThreads();
}
@@ -313,7 +322,7 @@
ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
}
- void TearDown() {
+ virtual void TearDown() OVERRIDE {
AudioCodingModuleTest::TearDown();
pull_audio_thread_->Stop();
send_thread_->Stop();
@@ -349,7 +358,6 @@
}
++send_count_;
InsertAudio();
- Encode();
if (TestDone()) {
test_complete_->Set();
}
@@ -365,7 +373,7 @@
SleepMs(1);
{
CriticalSectionScoped lock(crit_sect_.get());
- if (clock_->TimeInMilliseconds() < next_insert_packet_time_ms_) {
+ if (fake_clock_->TimeInMilliseconds() < next_insert_packet_time_ms_) {
return true;
}
next_insert_packet_time_ms_ += 10;
@@ -386,7 +394,7 @@
{
CriticalSectionScoped lock(crit_sect_.get());
// Don't let the insert thread fall behind.
- if (next_insert_packet_time_ms_ < clock_->TimeInMilliseconds()) {
+ if (next_insert_packet_time_ms_ < fake_clock_->TimeInMilliseconds()) {
return true;
}
++pull_audio_count_;
@@ -429,8 +437,9 @@
~AcmIsacMtTest() {}
- void SetUp() {
+ virtual void SetUp() OVERRIDE {
AudioCodingModuleTest::SetUp();
+ CreateAcm();
// Set up input audio source to read from specified file, loop after 5
// seconds, and deliver blocks of 10 ms.
@@ -442,7 +451,6 @@
int loop_counter = 0;
while (packet_cb_.last_payload_len_bytes() == 0) {
InsertAudio();
- Encode();
ASSERT_LT(loop_counter++, 10);
}
// Set |last_packet_number_| to one less that |num_calls| so that the packet
@@ -452,18 +460,17 @@
StartThreads();
}
- virtual void RegisterCodec() {
+ virtual void RegisterCodec() OVERRIDE {
COMPILE_ASSERT(kSampleRateHz == 16000, test_designed_for_isac_16khz);
- AudioCodingModule::Codec("ISAC", &codec_, kSampleRateHz, 1);
- codec_.pltype = kPayloadType;
// Register iSAC codec in ACM, effectively unregistering the PCM16B codec
// registered in AudioCodingModuleTest::SetUp();
- ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
- ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+ ASSERT_TRUE(acm_->RegisterSendCodec(acm2::ACMCodecDB::kISAC, kPayloadType));
+ ASSERT_TRUE(
+ acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISAC, kPayloadType));
}
- void InsertPacket() {
+ virtual void InsertPacket() OVERRIDE {
int num_calls = packet_cb_.num_calls(); // Store locally for thread safety.
if (num_calls > last_packet_number_) {
// Get the new payload out from the callback handler.
@@ -476,22 +483,18 @@
last_packet_number_ = num_calls;
}
ASSERT_GT(last_payload_vec_.size(), 0u);
- ASSERT_EQ(
- 0,
- acm_->IncomingPacket(
- &last_payload_vec_[0], last_payload_vec_.size(), rtp_header_));
+ ASSERT_TRUE(acm_->InsertPacket(
+ &last_payload_vec_[0], last_payload_vec_.size(), rtp_header_));
}
- void InsertAudio() {
+ virtual void InsertAudio() OVERRIDE {
memcpy(input_frame_.data_, audio_loop_.GetNextBlock(), kNumSamples10ms);
AudioCodingModuleTest::InsertAudio();
}
- void Encode() { ASSERT_GE(acm_->Process(), 0); }
-
// This method is the same as AudioCodingModuleMtTest::TestDone(), but here
// it is using the constants defined in this class (i.e., shorter test run).
- virtual bool TestDone() {
+ virtual bool TestDone() OVERRIDE {
if (packet_cb_.num_calls() > kNumPackets) {
CriticalSectionScoped lock(crit_sect_.get());
if (pull_audio_count_ > kNumPullCalls) {
@@ -511,4 +514,419 @@
EXPECT_EQ(kEventSignaled, RunTest());
}
+class AcmReceiverBitExactness : public ::testing::Test {
+ public:
+ static std::string PlatformChecksum(std::string win64,
+ std::string android,
+ std::string others) {
+#if defined(_WIN32) && defined(WEBRTC_ARCH_64_BITS)
+ return win64;
+#elif defined(WEBRTC_ANDROID)
+ return android;
+#else
+ return others;
+#endif
+ }
+
+ protected:
+ void Run(int output_freq_hz, const std::string& checksum_ref) {
+ const std::string input_file_name =
+ webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
+ scoped_ptr<test::RtpFileSource> packet_source(
+ test::RtpFileSource::Create(input_file_name));
+#ifdef WEBRTC_ANDROID
+ // Filter out iLBC and iSAC-swb since they are not supported on Android.
+ packet_source->FilterOutPayloadType(102); // iLBC.
+ packet_source->FilterOutPayloadType(104); // iSAC-swb.
+#endif
+
+ test::AudioChecksum checksum;
+ const std::string output_file_name =
+ webrtc::test::OutputPath() +
+ ::testing::UnitTest::GetInstance()
+ ->current_test_info()
+ ->test_case_name() +
+ "_" + ::testing::UnitTest::GetInstance()->current_test_info()->name() +
+ "_output.pcm";
+ test::OutputAudioFile output_file(output_file_name);
+ test::AudioSinkFork output(&checksum, &output_file);
+
+ test::AcmReceiveTest test(packet_source.get(), &output, output_freq_hz,
+ test::AcmReceiveTest::kArbitraryChannels);
+ ASSERT_NO_FATAL_FAILURE(test.RegisterNetEqTestCodecs());
+ test.Run();
+
+ std::string checksum_string = checksum.Finish();
+ EXPECT_EQ(checksum_ref, checksum_string);
+ }
+};
+
+TEST_F(AcmReceiverBitExactness, 8kHzOutput) {
+ Run(8000,
+ PlatformChecksum("bd6f8d9602cd82444ea2539e674df747",
+ "6ac89c7145072c26bfeba602cd661afb",
+ "8a8440f5511eb729221b9aac25cda3a0"));
+}
+
+TEST_F(AcmReceiverBitExactness, 16kHzOutput) {
+ Run(16000,
+ PlatformChecksum("a39bc6ee0c4eb15f3ad2f43cebcc571d",
+ "3e888eb04f57db2c6ef952fe64f17fe6",
+ "7be583092c5adbcb0f6cd66eca20ea63"));
+}
+
+TEST_F(AcmReceiverBitExactness, 32kHzOutput) {
+ Run(32000,
+ PlatformChecksum("80964572aaa2dc92f9e34896dd3802b3",
+ "aeca37e963310f5b6552b7edea23c2f1",
+ "3a84188abe9fca25fedd6034760f3e22"));
+}
+
+TEST_F(AcmReceiverBitExactness, 48kHzOutput) {
+ Run(48000,
+ PlatformChecksum("8aacde91f390e0d5a9c2ed571a25fd37",
+ "76b9e99e0a3998aa28355e7a2bd836f7",
+ "89b4b19bdb4de40f1d88302ef8cb9f9b"));
+}
+
+// This test verifies bit exactness for the send-side of ACM. The test setup is
+// a chain of three different test classes:
+//
+// test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest
+//
+// The receiver side is driving the test by requesting new packets from
+// AcmSenderBitExactness::NextPacket(). This method, in turn, asks for the
+// packet from test::AcmSendTest::NextPacket, which inserts audio from the
+// input file until one packet is produced. (The input file loops indefinitely.)
+// Before passing the packet to the receiver, this test class verifies the
+// packet header and updates a payload checksum with the new payload. The
+// decoded output from the receiver is also verified with a (separate) checksum.
+class AcmSenderBitExactness : public ::testing::Test,
+ public test::PacketSource {
+ protected:
+ static const int kTestDurationMs = 1000;
+
+ AcmSenderBitExactness()
+ : frame_size_rtp_timestamps_(0),
+ packet_count_(0),
+ payload_type_(0),
+ last_sequence_number_(0),
+ last_timestamp_(0) {}
+
+ // Sets up the test::AcmSendTest object. Returns true on success, otherwise
+ // false.
+ bool SetUpSender() {
+ const std::string input_file_name =
+ webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
+ // Note that |audio_source_| will loop forever. The test duration is set
+ // explicitly by |kTestDurationMs|.
+ audio_source_.reset(new test::InputAudioFile(input_file_name));
+ static const int kSourceRateHz = 32000;
+ send_test_.reset(new test::AcmSendTest(
+ audio_source_.get(), kSourceRateHz, kTestDurationMs));
+ return send_test_.get() != NULL;
+ }
+
+ // Registers a send codec in the test::AcmSendTest object. Returns true on
+ // success, false on failure.
+ bool RegisterSendCodec(int codec_type,
+ int channels,
+ int payload_type,
+ int frame_size_samples,
+ int frame_size_rtp_timestamps) {
+ payload_type_ = payload_type;
+ frame_size_rtp_timestamps_ = frame_size_rtp_timestamps;
+ return send_test_->RegisterCodec(
+ codec_type, channels, payload_type, frame_size_samples);
+ }
+
+ // Runs the test. SetUpSender() and RegisterSendCodec() must have been called
+ // before calling this method.
+ void Run(const std::string& audio_checksum_ref,
+ const std::string& payload_checksum_ref,
+ int expected_packets,
+ test::AcmReceiveTest::NumOutputChannels expected_channels) {
+ // Set up the receiver used to decode the packets and verify the decoded
+ // output.
+ test::AudioChecksum audio_checksum;
+ const std::string output_file_name =
+ webrtc::test::OutputPath() +
+ ::testing::UnitTest::GetInstance()
+ ->current_test_info()
+ ->test_case_name() +
+ "_" +
+ ::testing::UnitTest::GetInstance()->current_test_info()->name() +
+ "_output.pcm";
+ test::OutputAudioFile output_file(output_file_name);
+ // Have the output audio sent both to file and to the checksum calculator.
+ test::AudioSinkFork output(&audio_checksum, &output_file);
+ const int kOutputFreqHz = 8000;
+ test::AcmReceiveTest receive_test(
+ this, &output, kOutputFreqHz, expected_channels);
+ ASSERT_NO_FATAL_FAILURE(receive_test.RegisterDefaultCodecs());
+
+ // This is where the actual test is executed.
+ receive_test.Run();
+
+ // Extract and verify the audio checksum.
+ std::string checksum_string = audio_checksum.Finish();
+ EXPECT_EQ(audio_checksum_ref, checksum_string);
+
+ // Extract and verify the payload checksum.
+ char checksum_result[rtc::Md5Digest::kSize];
+ payload_checksum_.Finish(checksum_result, rtc::Md5Digest::kSize);
+ checksum_string = rtc::hex_encode(checksum_result, rtc::Md5Digest::kSize);
+ EXPECT_EQ(payload_checksum_ref, checksum_string);
+
+ // Verify number of packets produced.
+ EXPECT_EQ(expected_packets, packet_count_);
+ }
+
+ // Returns a pointer to the next packet. Returns NULL if the source is
+ // depleted (i.e., the test duration is exceeded), or if an error occurred.
+ // Inherited from test::PacketSource.
+ virtual test::Packet* NextPacket() OVERRIDE {
+ // Get the next packet from AcmSendTest. Ownership of |packet| is
+ // transferred to this method.
+ test::Packet* packet = send_test_->NextPacket();
+ if (!packet)
+ return NULL;
+
+ VerifyPacket(packet);
+ // TODO(henrik.lundin) Save the packet to file as well.
+
+ // Pass it on to the caller. The caller becomes the owner of |packet|.
+ return packet;
+ }
+
+ // Verifies the packet.
+ void VerifyPacket(const test::Packet* packet) {
+ EXPECT_TRUE(packet->valid_header());
+ // (We can check the header fields even if valid_header() is false.)
+ EXPECT_EQ(payload_type_, packet->header().payloadType);
+ if (packet_count_ > 0) {
+ // This is not the first packet.
+ uint16_t sequence_number_diff =
+ packet->header().sequenceNumber - last_sequence_number_;
+ EXPECT_EQ(1, sequence_number_diff);
+ uint32_t timestamp_diff = packet->header().timestamp - last_timestamp_;
+ EXPECT_EQ(frame_size_rtp_timestamps_, timestamp_diff);
+ }
+ ++packet_count_;
+ last_sequence_number_ = packet->header().sequenceNumber;
+ last_timestamp_ = packet->header().timestamp;
+ // Update the checksum.
+ payload_checksum_.Update(packet->payload(), packet->payload_length_bytes());
+ }
+
+ void SetUpTest(int codec_type,
+ int channels,
+ int payload_type,
+ int codec_frame_size_samples,
+ int codec_frame_size_rtp_timestamps) {
+ ASSERT_TRUE(SetUpSender());
+ ASSERT_TRUE(RegisterSendCodec(codec_type,
+ channels,
+ payload_type,
+ codec_frame_size_samples,
+ codec_frame_size_rtp_timestamps));
+ }
+
+ scoped_ptr<test::AcmSendTest> send_test_;
+ scoped_ptr<test::InputAudioFile> audio_source_;
+ uint32_t frame_size_rtp_timestamps_;
+ int packet_count_;
+ uint8_t payload_type_;
+ uint16_t last_sequence_number_;
+ uint32_t last_timestamp_;
+ rtc::Md5Digest payload_checksum_;
+};
+
+TEST_F(AcmSenderBitExactness, IsacWb30ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kISAC, 1, 103, 480, 480));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "c7e5bdadfa2871df95639fcc297cf23d",
+ "0499ca260390769b3172136faad925b9",
+ "0b58f9eeee43d5891f5f6c75e77984a3"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "d42cb5195463da26c8129bbfe73a22e6",
+ "83de248aea9c3c2bd680b6952401b4ca",
+ "3c79f16f34218271f3dca4e2b1dfe1bb"),
+ 33,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, IsacWb60ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kISAC, 1, 103, 960, 960));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "14d63c5f08127d280e722e3191b73bdd",
+ "8da003e16c5371af2dc2be79a50f9076",
+ "1ad29139a04782a33daad8c2b9b35875"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "ebe04a819d3a9d83a83a17f271e1139a",
+ "97aeef98553b5a4b5a68f8b716e8eaf0",
+ "9e0a0ab743ad987b55b8e14802769c56"),
+ 16,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, DISABLED_ON_ANDROID(IsacSwb30ms)) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kISACSWB, 1, 104, 960, 960));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "98d960600eb4ddb3fcbe11f5057ddfd7",
+ "",
+ "2f6dfe142f735f1d96f6bd86d2526f42"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "cc9d2d86a71d6f99f97680a5c27e2762",
+ "",
+ "7b214fc3a5e33d68bf30e77969371f31"),
+ 33,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcm16_8000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kPCM16B, 1, 107, 80, 80));
+ Run("de4a98e1406f8b798d99cd0704e862e2",
+ "c1edd36339ce0326cc4550041ad719a0",
+ 100,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcm16_16000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCM16Bwb, 1, 108, 160, 160));
+ Run("ae646d7b68384a1269cc080dd4501916",
+ "ad786526383178b08d80d6eee06e9bad",
+ 100,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcm16_32000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCM16Bswb32kHz, 1, 109, 320, 320));
+ Run("7fe325e8fbaf755e3c5df0b11a4774fb",
+ "5ef82ea885e922263606c6fdbc49f651",
+ 100,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcm16_stereo_8000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCM16B_2ch, 2, 111, 80, 80));
+ Run("fb263b74e7ac3de915474d77e4744ceb",
+ "62ce5adb0d4965d0a52ec98ae7f98974",
+ 100,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcm16_stereo_16000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCM16Bwb_2ch, 2, 112, 160, 160));
+ Run("d09e9239553649d7ac93e19d304281fd",
+ "41ca8edac4b8c71cd54fd9f25ec14870",
+ 100,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcm16_stereo_32000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCM16Bswb32kHz_2ch, 2, 113, 320, 320));
+ Run("5f025d4f390982cc26b3d92fe02e3044",
+ "50e58502fb04421bf5b857dda4c96879",
+ 100,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcmu_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kPCMU, 1, 0, 160, 160));
+ Run("81a9d4c0bb72e9becc43aef124c981e9",
+ "8f9b8750bd80fe26b6cbf6659b89f0f9",
+ 50,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcma_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kPCMA, 1, 8, 160, 160));
+ Run("39611f798969053925a49dc06d08de29",
+ "6ad745e55aa48981bfc790d0eeef2dd1",
+ 50,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcmu_stereo_20ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCMU_2ch, 2, 110, 160, 160));
+ Run("437bec032fdc5cbaa0d5175430af7b18",
+ "60b6f25e8d1e74cb679cfe756dd9bca5",
+ 50,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Pcma_stereo_20ms) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kPCMA_2ch, 2, 118, 160, 160));
+ Run("a5c6d83c5b7cedbeff734238220a4b0c",
+ "92b282c83efd20e7eeef52ba40842cf7",
+ 50,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, DISABLED_ON_ANDROID(Ilbc_30ms)) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kILBC, 1, 102, 240, 240));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "7b6ec10910debd9af08011d3ed5249f7",
+ "android_audio",
+ "7b6ec10910debd9af08011d3ed5249f7"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "cfae2e9f6aba96e145f2bcdd5050ce78",
+ "android_payload",
+ "cfae2e9f6aba96e145f2bcdd5050ce78"),
+ 33,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, DISABLED_ON_ANDROID(G722_20ms)) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kG722, 1, 9, 320, 160));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "7d759436f2533582950d148b5161a36c",
+ "android_audio",
+ "7d759436f2533582950d148b5161a36c"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "fc68a87e1380614e658087cb35d5ca10",
+ "android_payload",
+ "fc68a87e1380614e658087cb35d5ca10"),
+ 50,
+ test::AcmReceiveTest::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, DISABLED_ON_ANDROID(G722_stereo_20ms)) {
+ ASSERT_NO_FATAL_FAILURE(
+ SetUpTest(acm2::ACMCodecDB::kG722_2ch, 2, 119, 320, 160));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "7190ee718ab3d80eca181e5f7140c210",
+ "android_audio",
+ "7190ee718ab3d80eca181e5f7140c210"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "66516152eeaa1e650ad94ff85f668dac",
+ "android_payload",
+ "66516152eeaa1e650ad94ff85f668dac"),
+ 50,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactness, Opus_stereo_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kOpus, 2, 120, 960, 960));
+ Run(AcmReceiverBitExactness::PlatformChecksum(
+ "855041f2490b887302bce9d544731849",
+ "1e1a0fce893fef2d66886a7f09e2ebce",
+ "855041f2490b887302bce9d544731849"),
+ AcmReceiverBitExactness::PlatformChecksum(
+ "d781cce1ab986b618d0da87226cdde30",
+ "1a1fe04dd12e755949987c8d729fb3e0",
+ "d781cce1ab986b618d0da87226cdde30"),
+ 50,
+ test::AcmReceiveTest::kStereoOutput);
+}
+
} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc b/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
new file mode 100644
index 0000000..0e9d273
--- /dev/null
+++ b/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
@@ -0,0 +1,938 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <string.h>
+#include <vector>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/md5digest.h"
+#include "webrtc/base/thread_annotations.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_checksum.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
+#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/output_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
+#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/compile_assert.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/interface/event_wrapper.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/system_wrappers/interface/sleep.h"
+#include "webrtc/system_wrappers/interface/thread_wrapper.h"
+#include "webrtc/test/testsupport/fileutils.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
+
+namespace webrtc {
+
+const int kSampleRateHz = 16000;
+const int kNumSamples10ms = kSampleRateHz / 100;
+const int kFrameSizeMs = 10; // Multiple of 10.
+const int kFrameSizeSamples = kFrameSizeMs / 10 * kNumSamples10ms;
+const int kPayloadSizeBytes = kFrameSizeSamples * sizeof(int16_t);
+const uint8_t kPayloadType = 111;
+
+class RtpUtility {
+ public:
+ RtpUtility(int samples_per_packet, uint8_t payload_type)
+ : samples_per_packet_(samples_per_packet), payload_type_(payload_type) {}
+
+ virtual ~RtpUtility() {}
+
+ void Populate(WebRtcRTPHeader* rtp_header) {
+ rtp_header->header.sequenceNumber = 0xABCD;
+ rtp_header->header.timestamp = 0xABCDEF01;
+ rtp_header->header.payloadType = payload_type_;
+ rtp_header->header.markerBit = false;
+ rtp_header->header.ssrc = 0x1234;
+ rtp_header->header.numCSRCs = 0;
+ rtp_header->frameType = kAudioFrameSpeech;
+
+ rtp_header->header.payload_type_frequency = kSampleRateHz;
+ rtp_header->type.Audio.channel = 1;
+ rtp_header->type.Audio.isCNG = false;
+ }
+
+ void Forward(WebRtcRTPHeader* rtp_header) {
+ ++rtp_header->header.sequenceNumber;
+ rtp_header->header.timestamp += samples_per_packet_;
+ }
+
+ private:
+ int samples_per_packet_;
+ uint8_t payload_type_;
+};
+
+class PacketizationCallbackStub : public AudioPacketizationCallback {
+ public:
+ PacketizationCallbackStub()
+ : num_calls_(0),
+ crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {}
+
+ virtual int32_t SendData(
+ FrameType frame_type,
+ uint8_t payload_type,
+ uint32_t timestamp,
+ const uint8_t* payload_data,
+ uint16_t payload_len_bytes,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE {
+ CriticalSectionScoped lock(crit_sect_.get());
+ ++num_calls_;
+ last_payload_vec_.assign(payload_data, payload_data + payload_len_bytes);
+ return 0;
+ }
+
+ int num_calls() const {
+ CriticalSectionScoped lock(crit_sect_.get());
+ return num_calls_;
+ }
+
+ int last_payload_len_bytes() const {
+ CriticalSectionScoped lock(crit_sect_.get());
+ return last_payload_vec_.size();
+ }
+
+ void SwapBuffers(std::vector<uint8_t>* payload) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ last_payload_vec_.swap(*payload);
+ }
+
+ private:
+ int num_calls_ GUARDED_BY(crit_sect_);
+ std::vector<uint8_t> last_payload_vec_ GUARDED_BY(crit_sect_);
+ const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+};
+
+class AudioCodingModuleTestOldApi : public ::testing::Test {
+ protected:
+ AudioCodingModuleTestOldApi()
+ : id_(1),
+ rtp_utility_(new RtpUtility(kFrameSizeSamples, kPayloadType)),
+ clock_(Clock::GetRealTimeClock()) {}
+
+ ~AudioCodingModuleTestOldApi() {}
+
+ void TearDown() {}
+
+ void SetUp() {
+ acm_.reset(AudioCodingModule::Create(id_, clock_));
+
+ RegisterCodec();
+
+ rtp_utility_->Populate(&rtp_header_);
+
+ input_frame_.sample_rate_hz_ = kSampleRateHz;
+ input_frame_.num_channels_ = 1;
+ input_frame_.samples_per_channel_ = kSampleRateHz * 10 / 1000; // 10 ms.
+ COMPILE_ASSERT(kSampleRateHz * 10 / 1000 <= AudioFrame::kMaxDataSizeSamples,
+ audio_frame_too_small);
+ memset(input_frame_.data_,
+ 0,
+ input_frame_.samples_per_channel_ * sizeof(input_frame_.data_[0]));
+
+ ASSERT_EQ(0, acm_->RegisterTransportCallback(&packet_cb_));
+ }
+
+ virtual void RegisterCodec() {
+ AudioCodingModule::Codec("L16", &codec_, kSampleRateHz, 1);
+ codec_.pltype = kPayloadType;
+
+ // Register L16 codec in ACM.
+ ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
+ ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+ }
+
+ virtual void InsertPacketAndPullAudio() {
+ InsertPacket();
+ PullAudio();
+ }
+
+ virtual void InsertPacket() {
+ const uint8_t kPayload[kPayloadSizeBytes] = {0};
+ ASSERT_EQ(0,
+ acm_->IncomingPacket(kPayload, kPayloadSizeBytes, rtp_header_));
+ rtp_utility_->Forward(&rtp_header_);
+ }
+
+ virtual void PullAudio() {
+ AudioFrame audio_frame;
+ ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &audio_frame));
+ }
+
+ virtual void InsertAudio() {
+ ASSERT_EQ(0, acm_->Add10MsData(input_frame_));
+ input_frame_.timestamp_ += kNumSamples10ms;
+ }
+
+ virtual void Encode() {
+ int32_t encoded_bytes = acm_->Process();
+ // Expect to get one packet with two bytes per sample, or no packet at all,
+ // depending on how many 10 ms blocks go into |codec_.pacsize|.
+ EXPECT_TRUE(encoded_bytes == 2 * codec_.pacsize || encoded_bytes == 0);
+ }
+
+ const int id_;
+ scoped_ptr<RtpUtility> rtp_utility_;
+ scoped_ptr<AudioCodingModule> acm_;
+ PacketizationCallbackStub packet_cb_;
+ WebRtcRTPHeader rtp_header_;
+ AudioFrame input_frame_;
+ CodecInst codec_;
+ Clock* clock_;
+};
+
+// Check if the statistics are initialized correctly. Before any call to ACM
+// all fields have to be zero.
+TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) {
+ AudioDecodingCallStats stats;
+ acm_->GetDecodingCallStatistics(&stats);
+ EXPECT_EQ(0, stats.calls_to_neteq);
+ EXPECT_EQ(0, stats.calls_to_silence_generator);
+ EXPECT_EQ(0, stats.decoded_normal);
+ EXPECT_EQ(0, stats.decoded_cng);
+ EXPECT_EQ(0, stats.decoded_plc);
+ EXPECT_EQ(0, stats.decoded_plc_cng);
+}
+
+// Apply an initial playout delay. Calls to AudioCodingModule::PlayoutData10ms()
+// should result in generating silence, check the associated field.
+TEST_F(AudioCodingModuleTestOldApi,
+ DISABLED_ON_ANDROID(SilenceGeneratorCalled)) {
+ AudioDecodingCallStats stats;
+ const int kInitialDelay = 100;
+
+ acm_->SetInitialPlayoutDelay(kInitialDelay);
+
+ int num_calls = 0;
+ for (int time_ms = 0; time_ms < kInitialDelay;
+ time_ms += kFrameSizeMs, ++num_calls) {
+ InsertPacketAndPullAudio();
+ }
+ acm_->GetDecodingCallStatistics(&stats);
+ EXPECT_EQ(0, stats.calls_to_neteq);
+ EXPECT_EQ(num_calls, stats.calls_to_silence_generator);
+ EXPECT_EQ(0, stats.decoded_normal);
+ EXPECT_EQ(0, stats.decoded_cng);
+ EXPECT_EQ(0, stats.decoded_plc);
+ EXPECT_EQ(0, stats.decoded_plc_cng);
+}
+
+// Insert some packets and pull audio. Check statistics are valid. Then,
+// simulate packet loss and check if PLC and PLC-to-CNG statistics are
+// correctly updated.
+TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(NetEqCalls)) {
+ AudioDecodingCallStats stats;
+ const int kNumNormalCalls = 10;
+
+ for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) {
+ InsertPacketAndPullAudio();
+ }
+ acm_->GetDecodingCallStatistics(&stats);
+ EXPECT_EQ(kNumNormalCalls, stats.calls_to_neteq);
+ EXPECT_EQ(0, stats.calls_to_silence_generator);
+ EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
+ EXPECT_EQ(0, stats.decoded_cng);
+ EXPECT_EQ(0, stats.decoded_plc);
+ EXPECT_EQ(0, stats.decoded_plc_cng);
+
+ const int kNumPlc = 3;
+ const int kNumPlcCng = 5;
+
+ // Simulate packet-loss. NetEq first performs PLC then PLC fades to CNG.
+ for (int n = 0; n < kNumPlc + kNumPlcCng; ++n) {
+ PullAudio();
+ }
+ acm_->GetDecodingCallStatistics(&stats);
+ EXPECT_EQ(kNumNormalCalls + kNumPlc + kNumPlcCng, stats.calls_to_neteq);
+ EXPECT_EQ(0, stats.calls_to_silence_generator);
+ EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
+ EXPECT_EQ(0, stats.decoded_cng);
+ EXPECT_EQ(kNumPlc, stats.decoded_plc);
+ EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
+}
+
+TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) {
+ AudioFrame audio_frame;
+ const int kSampleRateHz = 32000;
+ EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame));
+ EXPECT_EQ(id_, audio_frame.id_);
+ EXPECT_EQ(0u, audio_frame.timestamp_);
+ EXPECT_GT(audio_frame.num_channels_, 0);
+ EXPECT_EQ(kSampleRateHz / 100, audio_frame.samples_per_channel_);
+ EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_);
+}
+
+TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) {
+ AudioFrame audio_frame;
+ EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame));
+}
+
+// A multi-threaded test for ACM. This base class is using the PCM16b 16 kHz
+// codec, while the derive class AcmIsacMtTest is using iSAC.
+class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
+ protected:
+ static const int kNumPackets = 500;
+ static const int kNumPullCalls = 500;
+
+ AudioCodingModuleMtTestOldApi()
+ : AudioCodingModuleTestOldApi(),
+ send_thread_(ThreadWrapper::CreateThread(CbSendThread,
+ this,
+ kRealtimePriority,
+ "send")),
+ insert_packet_thread_(ThreadWrapper::CreateThread(CbInsertPacketThread,
+ this,
+ kRealtimePriority,
+ "insert_packet")),
+ pull_audio_thread_(ThreadWrapper::CreateThread(CbPullAudioThread,
+ this,
+ kRealtimePriority,
+ "pull_audio")),
+ test_complete_(EventWrapper::Create()),
+ send_count_(0),
+ insert_packet_count_(0),
+ pull_audio_count_(0),
+ crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
+ next_insert_packet_time_ms_(0),
+ fake_clock_(new SimulatedClock(0)) {
+ clock_ = fake_clock_.get();
+ }
+
+ void SetUp() {
+ AudioCodingModuleTestOldApi::SetUp();
+ StartThreads();
+ }
+
+ void StartThreads() {
+ unsigned int thread_id = 0;
+ ASSERT_TRUE(send_thread_->Start(thread_id));
+ ASSERT_TRUE(insert_packet_thread_->Start(thread_id));
+ ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
+ }
+
+ void TearDown() {
+ AudioCodingModuleTestOldApi::TearDown();
+ pull_audio_thread_->Stop();
+ send_thread_->Stop();
+ insert_packet_thread_->Stop();
+ }
+
+ EventTypeWrapper RunTest() {
+ return test_complete_->Wait(10 * 60 * 1000); // 10 minutes' timeout.
+ }
+
+ virtual bool TestDone() {
+ if (packet_cb_.num_calls() > kNumPackets) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ if (pull_audio_count_ > kNumPullCalls) {
+ // Both conditions for completion are met. End the test.
+ return true;
+ }
+ }
+ return false;
+ }
+
+ static bool CbSendThread(void* context) {
+ return reinterpret_cast<AudioCodingModuleMtTestOldApi*>(context)
+ ->CbSendImpl();
+ }
+
+ // The send thread doesn't have to care about the current simulated time,
+ // since only the AcmReceiver is using the clock.
+ bool CbSendImpl() {
+ SleepMs(1);
+ if (HasFatalFailure()) {
+ // End the test early if a fatal failure (ASSERT_*) has occurred.
+ test_complete_->Set();
+ }
+ ++send_count_;
+ InsertAudio();
+ Encode();
+ if (TestDone()) {
+ test_complete_->Set();
+ }
+ return true;
+ }
+
+ static bool CbInsertPacketThread(void* context) {
+ return reinterpret_cast<AudioCodingModuleMtTestOldApi*>(context)
+ ->CbInsertPacketImpl();
+ }
+
+ bool CbInsertPacketImpl() {
+ SleepMs(1);
+ {
+ CriticalSectionScoped lock(crit_sect_.get());
+ if (clock_->TimeInMilliseconds() < next_insert_packet_time_ms_) {
+ return true;
+ }
+ next_insert_packet_time_ms_ += 10;
+ }
+ // Now we're not holding the crit sect when calling ACM.
+ ++insert_packet_count_;
+ InsertPacket();
+ return true;
+ }
+
+ static bool CbPullAudioThread(void* context) {
+ return reinterpret_cast<AudioCodingModuleMtTestOldApi*>(context)
+ ->CbPullAudioImpl();
+ }
+
+ bool CbPullAudioImpl() {
+ SleepMs(1);
+ {
+ CriticalSectionScoped lock(crit_sect_.get());
+ // Don't let the insert thread fall behind.
+ if (next_insert_packet_time_ms_ < clock_->TimeInMilliseconds()) {
+ return true;
+ }
+ ++pull_audio_count_;
+ }
+ // Now we're not holding the crit sect when calling ACM.
+ PullAudio();
+ fake_clock_->AdvanceTimeMilliseconds(10);
+ return true;
+ }
+
+ scoped_ptr<ThreadWrapper> send_thread_;
+ scoped_ptr<ThreadWrapper> insert_packet_thread_;
+ scoped_ptr<ThreadWrapper> pull_audio_thread_;
+ const scoped_ptr<EventWrapper> test_complete_;
+ int send_count_;
+ int insert_packet_count_;
+ int pull_audio_count_ GUARDED_BY(crit_sect_);
+ const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+ int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
+ scoped_ptr<SimulatedClock> fake_clock_;
+};
+
+TEST_F(AudioCodingModuleMtTestOldApi, DoTest) {
+ EXPECT_EQ(kEventSignaled, RunTest());
+}
+
+// This is a multi-threaded ACM test using iSAC. The test encodes audio
+// from a PCM file. The most recent encoded frame is used as input to the
+// receiving part. Depending on timing, it may happen that the same RTP packet
+// is inserted into the receiver multiple times, but this is a valid use-case,
+// and simplifies the test code a lot.
+class AcmIsacMtTestOldApi : public AudioCodingModuleMtTestOldApi {
+ protected:
+ static const int kNumPackets = 500;
+ static const int kNumPullCalls = 500;
+
+ AcmIsacMtTestOldApi()
+ : AudioCodingModuleMtTestOldApi(), last_packet_number_(0) {}
+
+ ~AcmIsacMtTestOldApi() {}
+
+ void SetUp() {
+ AudioCodingModuleTestOldApi::SetUp();
+
+ // Set up input audio source to read from specified file, loop after 5
+ // seconds, and deliver blocks of 10 ms.
+ const std::string input_file_name =
+ webrtc::test::ResourcePath("audio_coding/speech_mono_16kHz", "pcm");
+ audio_loop_.Init(input_file_name, 5 * kSampleRateHz, kNumSamples10ms);
+
+ // Generate one packet to have something to insert.
+ int loop_counter = 0;
+ while (packet_cb_.last_payload_len_bytes() == 0) {
+ InsertAudio();
+ Encode();
+ ASSERT_LT(loop_counter++, 10);
+ }
+ // Set |last_packet_number_| to one less that |num_calls| so that the packet
+ // will be fetched in the next InsertPacket() call.
+ last_packet_number_ = packet_cb_.num_calls() - 1;
+
+ StartThreads();
+ }
+
+ virtual void RegisterCodec() {
+ COMPILE_ASSERT(kSampleRateHz == 16000, test_designed_for_isac_16khz);
+ AudioCodingModule::Codec("ISAC", &codec_, kSampleRateHz, 1);
+ codec_.pltype = kPayloadType;
+
+ // Register iSAC codec in ACM, effectively unregistering the PCM16B codec
+ // registered in AudioCodingModuleTestOldApi::SetUp();
+ ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
+ ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+ }
+
+ void InsertPacket() {
+ int num_calls = packet_cb_.num_calls(); // Store locally for thread safety.
+ if (num_calls > last_packet_number_) {
+ // Get the new payload out from the callback handler.
+ // Note that since we swap buffers here instead of directly inserting
+ // a pointer to the data in |packet_cb_|, we avoid locking the callback
+ // for the duration of the IncomingPacket() call.
+ packet_cb_.SwapBuffers(&last_payload_vec_);
+ ASSERT_GT(last_payload_vec_.size(), 0u);
+ rtp_utility_->Forward(&rtp_header_);
+ last_packet_number_ = num_calls;
+ }
+ ASSERT_GT(last_payload_vec_.size(), 0u);
+ ASSERT_EQ(
+ 0,
+ acm_->IncomingPacket(
+ &last_payload_vec_[0], last_payload_vec_.size(), rtp_header_));
+ }
+
+ void InsertAudio() {
+ memcpy(input_frame_.data_, audio_loop_.GetNextBlock(), kNumSamples10ms);
+ AudioCodingModuleTestOldApi::InsertAudio();
+ }
+
+ void Encode() { ASSERT_GE(acm_->Process(), 0); }
+
+ // This method is the same as AudioCodingModuleMtTestOldApi::TestDone(), but
+ // here it is using the constants defined in this class (i.e., shorter test
+ // run).
+ virtual bool TestDone() {
+ if (packet_cb_.num_calls() > kNumPackets) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ if (pull_audio_count_ > kNumPullCalls) {
+ // Both conditions for completion are met. End the test.
+ return true;
+ }
+ }
+ return false;
+ }
+
+ int last_packet_number_;
+ std::vector<uint8_t> last_payload_vec_;
+ test::AudioLoop audio_loop_;
+};
+
+TEST_F(AcmIsacMtTestOldApi, DoTest) {
+ EXPECT_EQ(kEventSignaled, RunTest());
+}
+
+class AcmReceiverBitExactnessOldApi : public ::testing::Test {
+ public:
+ static std::string PlatformChecksum(std::string win64,
+ std::string android,
+ std::string others) {
+#if defined(_WIN32) && defined(WEBRTC_ARCH_64_BITS)
+ return win64;
+#elif defined(WEBRTC_ANDROID)
+ return android;
+#else
+ return others;
+#endif
+ }
+
+ protected:
+ void Run(int output_freq_hz, const std::string& checksum_ref) {
+ const std::string input_file_name =
+ webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
+ scoped_ptr<test::RtpFileSource> packet_source(
+ test::RtpFileSource::Create(input_file_name));
+#ifdef WEBRTC_ANDROID
+ // Filter out iLBC and iSAC-swb since they are not supported on Android.
+ packet_source->FilterOutPayloadType(102); // iLBC.
+ packet_source->FilterOutPayloadType(104); // iSAC-swb.
+#endif
+
+ test::AudioChecksum checksum;
+ const std::string output_file_name =
+ webrtc::test::OutputPath() +
+ ::testing::UnitTest::GetInstance()
+ ->current_test_info()
+ ->test_case_name() +
+ "_" + ::testing::UnitTest::GetInstance()->current_test_info()->name() +
+ "_output.pcm";
+ test::OutputAudioFile output_file(output_file_name);
+ test::AudioSinkFork output(&checksum, &output_file);
+
+ test::AcmReceiveTestOldApi test(
+ packet_source.get(),
+ &output,
+ output_freq_hz,
+ test::AcmReceiveTestOldApi::kArbitraryChannels);
+ ASSERT_NO_FATAL_FAILURE(test.RegisterNetEqTestCodecs());
+ test.Run();
+
+ std::string checksum_string = checksum.Finish();
+ EXPECT_EQ(checksum_ref, checksum_string);
+ }
+};
+
+TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
+ Run(8000,
+ PlatformChecksum("bd6f8d9602cd82444ea2539e674df747",
+ "6ac89c7145072c26bfeba602cd661afb",
+ "8a8440f5511eb729221b9aac25cda3a0"));
+}
+
+TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) {
+ Run(16000,
+ PlatformChecksum("a39bc6ee0c4eb15f3ad2f43cebcc571d",
+ "3e888eb04f57db2c6ef952fe64f17fe6",
+ "7be583092c5adbcb0f6cd66eca20ea63"));
+}
+
+TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) {
+ Run(32000,
+ PlatformChecksum("80964572aaa2dc92f9e34896dd3802b3",
+ "aeca37e963310f5b6552b7edea23c2f1",
+ "3a84188abe9fca25fedd6034760f3e22"));
+}
+
+TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) {
+ Run(48000,
+ PlatformChecksum("8aacde91f390e0d5a9c2ed571a25fd37",
+ "76b9e99e0a3998aa28355e7a2bd836f7",
+ "89b4b19bdb4de40f1d88302ef8cb9f9b"));
+}
+
+// This test verifies bit exactness for the send-side of ACM. The test setup is
+// a chain of three different test classes:
+//
+// test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest
+//
+// The receiver side is driving the test by requesting new packets from
+// AcmSenderBitExactness::NextPacket(). This method, in turn, asks for the
+// packet from test::AcmSendTest::NextPacket, which inserts audio from the
+// input file until one packet is produced. (The input file loops indefinitely.)
+// Before passing the packet to the receiver, this test class verifies the
+// packet header and updates a payload checksum with the new payload. The
+// decoded output from the receiver is also verified with a (separate) checksum.
+class AcmSenderBitExactnessOldApi : public ::testing::Test,
+ public test::PacketSource {
+ protected:
+ static const int kTestDurationMs = 1000;
+
+ AcmSenderBitExactnessOldApi()
+ : frame_size_rtp_timestamps_(0),
+ packet_count_(0),
+ payload_type_(0),
+ last_sequence_number_(0),
+ last_timestamp_(0) {}
+
+ // Sets up the test::AcmSendTest object. Returns true on success, otherwise
+ // false.
+ bool SetUpSender() {
+ const std::string input_file_name =
+ webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
+ // Note that |audio_source_| will loop forever. The test duration is set
+ // explicitly by |kTestDurationMs|.
+ audio_source_.reset(new test::InputAudioFile(input_file_name));
+ static const int kSourceRateHz = 32000;
+ send_test_.reset(new test::AcmSendTestOldApi(
+ audio_source_.get(), kSourceRateHz, kTestDurationMs));
+ return send_test_.get() != NULL;
+ }
+
+ // Registers a send codec in the test::AcmSendTest object. Returns true on
+ // success, false on failure.
+ bool RegisterSendCodec(const char* payload_name,
+ int sampling_freq_hz,
+ int channels,
+ int payload_type,
+ int frame_size_samples,
+ int frame_size_rtp_timestamps) {
+ payload_type_ = payload_type;
+ frame_size_rtp_timestamps_ = frame_size_rtp_timestamps;
+ return send_test_->RegisterCodec(payload_name,
+ sampling_freq_hz,
+ channels,
+ payload_type,
+ frame_size_samples);
+ }
+
+ // Runs the test. SetUpSender() and RegisterSendCodec() must have been called
+ // before calling this method.
+ void Run(const std::string& audio_checksum_ref,
+ const std::string& payload_checksum_ref,
+ int expected_packets,
+ test::AcmReceiveTestOldApi::NumOutputChannels expected_channels) {
+ // Set up the receiver used to decode the packets and verify the decoded
+ // output.
+ test::AudioChecksum audio_checksum;
+ const std::string output_file_name =
+ webrtc::test::OutputPath() +
+ ::testing::UnitTest::GetInstance()
+ ->current_test_info()
+ ->test_case_name() +
+ "_" + ::testing::UnitTest::GetInstance()->current_test_info()->name() +
+ "_output.pcm";
+ test::OutputAudioFile output_file(output_file_name);
+ // Have the output audio sent both to file and to the checksum calculator.
+ test::AudioSinkFork output(&audio_checksum, &output_file);
+ const int kOutputFreqHz = 8000;
+ test::AcmReceiveTestOldApi receive_test(
+ this, &output, kOutputFreqHz, expected_channels);
+ ASSERT_NO_FATAL_FAILURE(receive_test.RegisterDefaultCodecs());
+
+ // This is where the actual test is executed.
+ receive_test.Run();
+
+ // Extract and verify the audio checksum.
+ std::string checksum_string = audio_checksum.Finish();
+ EXPECT_EQ(audio_checksum_ref, checksum_string);
+
+ // Extract and verify the payload checksum.
+ char checksum_result[rtc::Md5Digest::kSize];
+ payload_checksum_.Finish(checksum_result, rtc::Md5Digest::kSize);
+ checksum_string = rtc::hex_encode(checksum_result, rtc::Md5Digest::kSize);
+ EXPECT_EQ(payload_checksum_ref, checksum_string);
+
+ // Verify number of packets produced.
+ EXPECT_EQ(expected_packets, packet_count_);
+ }
+
+ // Returns a pointer to the next packet. Returns NULL if the source is
+ // depleted (i.e., the test duration is exceeded), or if an error occurred.
+ // Inherited from test::PacketSource.
+ test::Packet* NextPacket() OVERRIDE {
+ // Get the next packet from AcmSendTest. Ownership of |packet| is
+ // transferred to this method.
+ test::Packet* packet = send_test_->NextPacket();
+ if (!packet)
+ return NULL;
+
+ VerifyPacket(packet);
+ // TODO(henrik.lundin) Save the packet to file as well.
+
+ // Pass it on to the caller. The caller becomes the owner of |packet|.
+ return packet;
+ }
+
+ // Verifies the packet.
+ void VerifyPacket(const test::Packet* packet) {
+ EXPECT_TRUE(packet->valid_header());
+ // (We can check the header fields even if valid_header() is false.)
+ EXPECT_EQ(payload_type_, packet->header().payloadType);
+ if (packet_count_ > 0) {
+ // This is not the first packet.
+ uint16_t sequence_number_diff =
+ packet->header().sequenceNumber - last_sequence_number_;
+ EXPECT_EQ(1, sequence_number_diff);
+ uint32_t timestamp_diff = packet->header().timestamp - last_timestamp_;
+ EXPECT_EQ(frame_size_rtp_timestamps_, timestamp_diff);
+ }
+ ++packet_count_;
+ last_sequence_number_ = packet->header().sequenceNumber;
+ last_timestamp_ = packet->header().timestamp;
+ // Update the checksum.
+ payload_checksum_.Update(packet->payload(), packet->payload_length_bytes());
+ }
+
+ void SetUpTest(const char* codec_name,
+ int codec_sample_rate_hz,
+ int channels,
+ int payload_type,
+ int codec_frame_size_samples,
+ int codec_frame_size_rtp_timestamps) {
+ ASSERT_TRUE(SetUpSender());
+ ASSERT_TRUE(RegisterSendCodec(codec_name,
+ codec_sample_rate_hz,
+ channels,
+ payload_type,
+ codec_frame_size_samples,
+ codec_frame_size_rtp_timestamps));
+ }
+
+ scoped_ptr<test::AcmSendTestOldApi> send_test_;
+ scoped_ptr<test::InputAudioFile> audio_source_;
+ uint32_t frame_size_rtp_timestamps_;
+ int packet_count_;
+ uint8_t payload_type_;
+ uint16_t last_sequence_number_;
+ uint32_t last_timestamp_;
+ rtc::Md5Digest payload_checksum_;
+};
+
+TEST_F(AcmSenderBitExactnessOldApi, IsacWb30ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "c7e5bdadfa2871df95639fcc297cf23d",
+ "0499ca260390769b3172136faad925b9",
+ "0b58f9eeee43d5891f5f6c75e77984a3"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "d42cb5195463da26c8129bbfe73a22e6",
+ "83de248aea9c3c2bd680b6952401b4ca",
+ "3c79f16f34218271f3dca4e2b1dfe1bb"),
+ 33,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, IsacWb60ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "14d63c5f08127d280e722e3191b73bdd",
+ "8da003e16c5371af2dc2be79a50f9076",
+ "1ad29139a04782a33daad8c2b9b35875"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "ebe04a819d3a9d83a83a17f271e1139a",
+ "97aeef98553b5a4b5a68f8b716e8eaf0",
+ "9e0a0ab743ad987b55b8e14802769c56"),
+ 16,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IsacSwb30ms)) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "98d960600eb4ddb3fcbe11f5057ddfd7",
+ "",
+ "2f6dfe142f735f1d96f6bd86d2526f42"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "cc9d2d86a71d6f99f97680a5c27e2762",
+ "",
+ "7b214fc3a5e33d68bf30e77969371f31"),
+ 33,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80));
+ Run("de4a98e1406f8b798d99cd0704e862e2",
+ "c1edd36339ce0326cc4550041ad719a0",
+ 100,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcm16_16000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 16000, 1, 108, 160, 160));
+ Run("ae646d7b68384a1269cc080dd4501916",
+ "ad786526383178b08d80d6eee06e9bad",
+ 100,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcm16_32000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 32000, 1, 109, 320, 320));
+ Run("7fe325e8fbaf755e3c5df0b11a4774fb",
+ "5ef82ea885e922263606c6fdbc49f651",
+ 100,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcm16_stereo_8000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 2, 111, 80, 80));
+ Run("fb263b74e7ac3de915474d77e4744ceb",
+ "62ce5adb0d4965d0a52ec98ae7f98974",
+ 100,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcm16_stereo_16000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 16000, 2, 112, 160, 160));
+ Run("d09e9239553649d7ac93e19d304281fd",
+ "41ca8edac4b8c71cd54fd9f25ec14870",
+ 100,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcm16_stereo_32000khz_10ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 32000, 2, 113, 320, 320));
+ Run("5f025d4f390982cc26b3d92fe02e3044",
+ "50e58502fb04421bf5b857dda4c96879",
+ 100,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcmu_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("PCMU", 8000, 1, 0, 160, 160));
+ Run("81a9d4c0bb72e9becc43aef124c981e9",
+ "8f9b8750bd80fe26b6cbf6659b89f0f9",
+ 50,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcma_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("PCMA", 8000, 1, 8, 160, 160));
+ Run("39611f798969053925a49dc06d08de29",
+ "6ad745e55aa48981bfc790d0eeef2dd1",
+ 50,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcmu_stereo_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("PCMU", 8000, 2, 110, 160, 160));
+ Run("437bec032fdc5cbaa0d5175430af7b18",
+ "60b6f25e8d1e74cb679cfe756dd9bca5",
+ 50,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Pcma_stereo_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("PCMA", 8000, 2, 118, 160, 160));
+ Run("a5c6d83c5b7cedbeff734238220a4b0c",
+ "92b282c83efd20e7eeef52ba40842cf7",
+ 50,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(Ilbc_30ms)) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "7b6ec10910debd9af08011d3ed5249f7",
+ "android_audio",
+ "7b6ec10910debd9af08011d3ed5249f7"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "cfae2e9f6aba96e145f2bcdd5050ce78",
+ "android_payload",
+ "cfae2e9f6aba96e145f2bcdd5050ce78"),
+ 33,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(G722_20ms)) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "7d759436f2533582950d148b5161a36c",
+ "android_audio",
+ "7d759436f2533582950d148b5161a36c"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "fc68a87e1380614e658087cb35d5ca10",
+ "android_payload",
+ "fc68a87e1380614e658087cb35d5ca10"),
+ 50,
+ test::AcmReceiveTestOldApi::kMonoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(G722_stereo_20ms)) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "7190ee718ab3d80eca181e5f7140c210",
+ "android_audio",
+ "7190ee718ab3d80eca181e5f7140c210"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "66516152eeaa1e650ad94ff85f668dac",
+ "android_payload",
+ "66516152eeaa1e650ad94ff85f668dac"),
+ 50,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
+ ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
+ Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "855041f2490b887302bce9d544731849",
+ "1e1a0fce893fef2d66886a7f09e2ebce",
+ "855041f2490b887302bce9d544731849"),
+ AcmReceiverBitExactnessOldApi::PlatformChecksum(
+ "d781cce1ab986b618d0da87226cdde30",
+ "1a1fe04dd12e755949987c8d729fb3e0",
+ "d781cce1ab986b618d0da87226cdde30"),
+ 50,
+ test::AcmReceiveTestOldApi::kStereoOutput);
+}
+
+} // namespace webrtc
diff --git a/modules/audio_coding/main/acm2/call_statistics_unittest.cc b/modules/audio_coding/main/acm2/call_statistics_unittest.cc
index 61aadd7..2bee964 100644
--- a/modules/audio_coding/main/acm2/call_statistics_unittest.cc
+++ b/modules/audio_coding/main/acm2/call_statistics_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
namespace webrtc {
diff --git a/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc b/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
index 38b7cfc..4bf9437 100644
--- a/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
+++ b/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
@@ -10,7 +10,7 @@
#include <string.h>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h"
namespace webrtc {
diff --git a/modules/audio_coding/main/acm2/nack_unittest.cc b/modules/audio_coding/main/acm2/nack_unittest.cc
index 5837c31..7863c75 100644
--- a/modules/audio_coding/main/acm2/nack_unittest.cc
+++ b/modules/audio_coding/main/acm2/nack_unittest.cc
@@ -14,7 +14,7 @@
#include <algorithm>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/typedefs.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
diff --git a/modules/audio_coding/main/interface/audio_coding_module.h b/modules/audio_coding/main/interface/audio_coding_module.h
index cb0953a..8d73285 100644
--- a/modules/audio_coding/main/interface/audio_coding_module.h
+++ b/modules/audio_coding/main/interface/audio_coding_module.h
@@ -14,6 +14,7 @@
#include <vector>
#include "webrtc/common_types.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
#include "webrtc/modules/interface/module.h"
@@ -330,6 +331,7 @@
// -1 if error occurred in setting the bandwidth,
// 0 bandwidth is set successfully.
//
+ // TODO(henrik.lundin) Unused. Remove?
virtual int32_t SetReceivedEstimatedBandwidth(
const int32_t bw) = 0;
@@ -915,6 +917,22 @@
bool enforce_frame_size = false) = 0;
///////////////////////////////////////////////////////////////////////////
+ // int SetOpusMaxPlaybackRate()
+ // If current send codec is Opus, informs it about maximum playback rate the
+ // receiver will render. Opus can use this information to optimize the bit
+ // rate and increase the computation efficiency.
+ //
+ // Input:
+ // -frequency_hz : maximum playback rate in Hz.
+ //
+ // Return value:
+ // -1 if current send codec is not Opus or
+ // error occurred in setting the maximum playback rate,
+ // 0 maximum bandwidth is set successfully.
+ //
+ virtual int SetOpusMaxPlaybackRate(int frequency_hz) = 0;
+
+ ///////////////////////////////////////////////////////////////////////////
// statistics
//
@@ -981,6 +999,186 @@
AudioDecodingCallStats* call_stats) const = 0;
};
+class AudioEncoder;
+class ReceiverInfo;
+
+class AudioCoding {
+ public:
+ struct Config {
+ Config()
+ : neteq_config(),
+ clock(Clock::GetRealTimeClock()),
+ transport(NULL),
+ vad_callback(NULL),
+ play_dtmf(true),
+ initial_playout_delay_ms(0),
+ playout_channels(1),
+ playout_frequency_hz(32000) {}
+
+ AudioCodingModule::Config ToOldConfig() const {
+ AudioCodingModule::Config old_config;
+ old_config.id = 0;
+ old_config.neteq_config = neteq_config;
+ old_config.clock = clock;
+ return old_config;
+ }
+
+ NetEq::Config neteq_config;
+ Clock* clock;
+ AudioPacketizationCallback* transport;
+ ACMVADCallback* vad_callback;
+ bool play_dtmf;
+ int initial_playout_delay_ms;
+ int playout_channels;
+ int playout_frequency_hz;
+ };
+
+ static AudioCoding* Create(const Config& config);
+ virtual ~AudioCoding() {};
+
+ // Registers a codec, specified by |send_codec|, as sending codec.
+ // This API can be called multiple times. The last codec registered overwrites
+ // the previous ones. Returns true if successful, false if not.
+ //
+ // Note: If a stereo codec is registered as send codec, VAD/DTX will
+ // automatically be turned off, since it is not supported for stereo sending.
+ virtual bool RegisterSendCodec(AudioEncoder* send_codec) = 0;
+
+ // Temporary solution to be used during refactoring:
+ // |encoder_type| should be from the anonymous enum in acm2::ACMCodecDB.
+ virtual bool RegisterSendCodec(int encoder_type,
+ uint8_t payload_type,
+ int frame_size_samples = 0) = 0;
+
+ // Returns the encoder object currently in use. This is the same as the
+ // codec that was registered in the latest call to RegisterSendCodec().
+ virtual const AudioEncoder* GetSenderInfo() const = 0;
+
+ // Temporary solution to be used during refactoring.
+ virtual const CodecInst* GetSenderCodecInst() = 0;
+
+ // Adds 10 ms of raw (PCM) audio data to the encoder. If the sampling
+ // frequency of the audio does not match the sampling frequency of the
+ // current encoder, ACM will resample the audio.
+ //
+ // Return value:
+ // 0 successfully added the frame.
+ // -1 some error occurred and data is not added.
+ // < -1 to add the frame to the buffer n samples had to be
+ // overwritten, -n is the return value in this case.
+ // TODO(henrik.lundin): Make a better design for the return values. This one
+ // is just a copy of the old API.
+ virtual int Add10MsAudio(const AudioFrame& audio_frame) = 0;
+
+ // Returns a combined info about the currently used decoder(s).
+ virtual const ReceiverInfo* GetReceiverInfo() const = 0;
+
+ // Registers a codec, specified by |receive_codec|, as receiving codec.
+ // This API can be called multiple times. If registering with a payload type
+ // that was already registered in a previous call, the latest call will
+ // override previous calls. Returns true if successful, false if not.
+ virtual bool RegisterReceiveCodec(AudioDecoder* receive_codec) = 0;
+
+ // Temporary solution:
+ // |decoder_type| should be from the anonymous enum in acm2::ACMCodecDB.
+ virtual bool RegisterReceiveCodec(int decoder_type, uint8_t payload_type) = 0;
+
+ // The following two methods both inserts a new packet to the receiver.
+ // InsertPacket takes an RTP header input in |rtp_info|, while InsertPayload
+ // only requires a payload type and a timestamp. The latter assumes that the
+ // payloads come in the right order, and without any losses. In both cases,
+ // |incoming_payload| contains the RTP payload after the RTP header. Return
+ // true if successful, false if not.
+ virtual bool InsertPacket(const uint8_t* incoming_payload,
+ int32_t payload_len_bytes,
+ const WebRtcRTPHeader& rtp_info) = 0;
+
+ // TODO(henrik.lundin): Remove this method?
+ virtual bool InsertPayload(const uint8_t* incoming_payload,
+ int32_t payload_len_byte,
+ uint8_t payload_type,
+ uint32_t timestamp) = 0;
+
+ // These two methods set a minimum and maximum jitter buffer delay in
+ // milliseconds. The pupose is mainly to adjust the delay to synchronize
+ // audio and video. The preferred jitter buffer size, computed by NetEq based
+ // on the current channel conditions, is clamped from below and above by these
+ // two methods. The given delay limits must be non-negative, less than
+ // 10000 ms, and the minimum must be strictly smaller than the maximum.
+ // Further, the maximum must be at lest one frame duration. If these
+ // conditions are not met, false is returned. Giving the value 0 effectively
+ // unsets the minimum or maximum delay limits.
+ // Note that calling these methods is optional. If not called, NetEq will
+ // determine the optimal buffer size based on the network conditions.
+ virtual bool SetMinimumPlayoutDelay(int time_ms) = 0;
+
+ virtual bool SetMaximumPlayoutDelay(int time_ms) = 0;
+
+ // Returns the current value of the jitter buffer's preferred latency. This
+ // is computed based on inter-arrival times and playout mode of NetEq. The
+ // actual target delay is this value clamped from below and above by the
+ // values specified through SetMinimumPlayoutDelay() and
+ // SetMaximumPlayoutDelay(), respectively, if provided.
+ // TODO(henrik.lundin) Rename to PreferredDelayMs?
+ virtual int LeastRequiredDelayMs() const = 0;
+
+ // The send timestamp of an RTP packet is associated with the decoded
+ // audio of the packet in question. This function returns the timestamp of
+ // the latest audio delivered by Get10MsAudio(). Returns false if no timestamp
+ // can be provided, true otherwise.
+ virtual bool PlayoutTimestamp(uint32_t* timestamp) = 0;
+
+ // Delivers 10 ms of audio in |audio_frame|. Returns true if successful,
+ // false otherwise.
+ virtual bool Get10MsAudio(AudioFrame* audio_frame) = 0;
+
+ // Returns the network statistics. Note that the internal statistics of NetEq
+ // are reset by this call. Returns true if successful, false otherwise.
+ virtual bool NetworkStatistics(ACMNetworkStatistics* network_statistics) = 0;
+
+ // Enables NACK and sets the maximum size of the NACK list. If NACK is already
+ // enabled then the maximum NACK list size is modified accordingly. Returns
+ // true if successful, false otherwise.
+ //
+ // If the sequence number of last received packet is N, the sequence numbers
+ // of NACK list are in the range of [N - |max_nack_list_size|, N).
+ //
+ // |max_nack_list_size| should be positive and less than or equal to
+ // |Nack::kNackListSizeLimit|.
+ virtual bool EnableNack(size_t max_nack_list_size) = 0;
+
+ // Disables NACK.
+ virtual void DisableNack() = 0;
+
+
+ // Temporary solution to be used during refactoring.
+ // If DTX is enabled and the codec does not have internal DTX/VAD
+ // WebRtc VAD will be automatically enabled and |enable_vad| is ignored.
+ //
+ // If DTX is disabled but VAD is enabled no DTX packets are sent,
+ // regardless of whether the codec has internal DTX/VAD or not. In this
+ // case, WebRtc VAD is running to label frames as active/in-active.
+ //
+ // NOTE! VAD/DTX is not supported when sending stereo.
+ //
+ // Return true if successful, false otherwise.
+ virtual bool SetVad(bool enable_dtx,
+ bool enable_vad,
+ ACMVADMode vad_mode) = 0;
+
+ // Returns a list of packets to request retransmission of.
+ // |round_trip_time_ms| is an estimate of the round-trip-time (in
+ // milliseconds). Missing packets which will be decoded sooner than the
+ // round-trip-time (with respect to the time this API is called) will not be
+ // included in the list.
+ // |round_trip_time_ms| must be non-negative.
+ virtual std::vector<uint16_t> GetNackList(int round_trip_time_ms) const = 0;
+
+ // Returns the timing statistics for calls to Get10MsAudio.
+ virtual void GetDecodingCallStatistics(
+ AudioDecodingCallStats* call_stats) const = 0;
+};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_INTERFACE_AUDIO_CODING_MODULE_H_
diff --git a/modules/audio_coding/main/test/ACMTest.cc b/modules/audio_coding/main/test/ACMTest.cc
deleted file mode 100644
index dbbdade..0000000
--- a/modules/audio_coding/main/test/ACMTest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "ACMTest.h"
-
-ACMTest::~ACMTest() {}
diff --git a/modules/audio_coding/main/test/ACMTest.h b/modules/audio_coding/main/test/ACMTest.h
index 767add1..f73961f 100644
--- a/modules/audio_coding/main/test/ACMTest.h
+++ b/modules/audio_coding/main/test/ACMTest.h
@@ -14,7 +14,7 @@
class ACMTest {
public:
ACMTest() {}
- virtual ~ACMTest() = 0;
+ virtual ~ACMTest() {}
virtual void Perform() = 0;
};
diff --git a/modules/audio_coding/main/test/Channel.h b/modules/audio_coding/main/test/Channel.h
index 7611c9d..cdb99c0 100644
--- a/modules/audio_coding/main/test/Channel.h
+++ b/modules/audio_coding/main/test/Channel.h
@@ -50,10 +50,11 @@
Channel(int16_t chID = -1);
~Channel();
- int32_t SendData(const FrameType frameType, const uint8_t payloadType,
- const uint32_t timeStamp, const uint8_t* payloadData,
- const uint16_t payloadSize,
- const RTPFragmentationHeader* fragmentation);
+ virtual int32_t SendData(
+ const FrameType frameType, const uint8_t payloadType,
+ const uint32_t timeStamp, const uint8_t* payloadData,
+ const uint16_t payloadSize,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
void RegisterReceiverACM(AudioCodingModule *acm);
diff --git a/modules/audio_coding/main/test/EncodeDecodeTest.cc b/modules/audio_coding/main/test/EncodeDecodeTest.cc
index d06cc07..3253bbd 100644
--- a/modules/audio_coding/main/test/EncodeDecodeTest.cc
+++ b/modules/audio_coding/main/test/EncodeDecodeTest.cc
@@ -125,7 +125,7 @@
void Receiver::Setup(AudioCodingModule *acm, RTPStream *rtpStream,
std::string out_file_name, int channels) {
- struct CodecInst recvCodec;
+ struct CodecInst recvCodec = CodecInst();
int noOfCodecs;
EXPECT_EQ(0, acm->InitializeReceiver());
diff --git a/modules/audio_coding/main/test/EncodeDecodeTest.h b/modules/audio_coding/main/test/EncodeDecodeTest.h
index dbe3f0c..693c96e 100644
--- a/modules/audio_coding/main/test/EncodeDecodeTest.h
+++ b/modules/audio_coding/main/test/EncodeDecodeTest.h
@@ -29,10 +29,11 @@
public:
TestPacketization(RTPStream *rtpStream, uint16_t frequency);
~TestPacketization();
- virtual int32_t SendData(const FrameType frameType, const uint8_t payloadType,
- const uint32_t timeStamp, const uint8_t* payloadData,
- const uint16_t payloadSize,
- const RTPFragmentationHeader* fragmentation);
+ virtual int32_t SendData(
+ const FrameType frameType, const uint8_t payloadType,
+ const uint32_t timeStamp, const uint8_t* payloadData,
+ const uint16_t payloadSize,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
private:
static void MakeRTPheader(uint8_t* rtpHeader, uint8_t payloadType,
@@ -100,7 +101,7 @@
public:
EncodeDecodeTest();
explicit EncodeDecodeTest(int testMode);
- virtual void Perform();
+ virtual void Perform() OVERRIDE;
uint16_t _playoutFreq;
uint8_t _testMode;
diff --git a/modules/audio_coding/main/test/PCMFile.cc b/modules/audio_coding/main/test/PCMFile.cc
index ce18954..4f46098 100644
--- a/modules/audio_coding/main/test/PCMFile.cc
+++ b/modules/audio_coding/main/test/PCMFile.cc
@@ -14,8 +14,8 @@
#include <stdio.h>
#include <string.h>
-#include "gtest/gtest.h"
-#include "module_common_types.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/interface/module_common_types.h"
namespace webrtc {
diff --git a/modules/audio_coding/main/test/RTPFile.cc b/modules/audio_coding/main/test/RTPFile.cc
index 50aee31..b7f587b 100644
--- a/modules/audio_coding/main/test/RTPFile.cc
+++ b/modules/audio_coding/main/test/RTPFile.cc
@@ -20,8 +20,9 @@
#include "audio_coding_module.h"
#include "engine_configurations.h"
-#include "gtest/gtest.h" // TODO (tlegrand): Consider removing usage of gtest.
#include "rw_lock_wrapper.h"
+// TODO(tlegrand): Consider removing usage of gtest.
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
@@ -233,11 +234,11 @@
if (plen == 0) {
return 0;
}
- if (payloadSize < (lengthBytes - 20)) {
- return -1;
- }
if (lengthBytes < 20) {
- return -1;
+ return 0;
+ }
+ if (payloadSize < (lengthBytes - 20)) {
+ return 0;
}
lengthBytes -= 20;
EXPECT_EQ(lengthBytes, fread(payloadData, 1, lengthBytes, _rtpFile));
diff --git a/modules/audio_coding/main/test/RTPFile.h b/modules/audio_coding/main/test/RTPFile.h
index 9b6d5fc..460553b 100644
--- a/modules/audio_coding/main/test/RTPFile.h
+++ b/modules/audio_coding/main/test/RTPFile.h
@@ -65,14 +65,14 @@
~RTPBuffer();
- void Write(const uint8_t payloadType, const uint32_t timeStamp,
- const int16_t seqNo, const uint8_t* payloadData,
- const uint16_t payloadSize, uint32_t frequency);
+ virtual void Write(const uint8_t payloadType, const uint32_t timeStamp,
+ const int16_t seqNo, const uint8_t* payloadData,
+ const uint16_t payloadSize, uint32_t frequency) OVERRIDE;
- uint16_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
- uint16_t payloadSize, uint32_t* offset);
+ virtual uint16_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
+ uint16_t payloadSize, uint32_t* offset) OVERRIDE;
- virtual bool EndOfFile() const;
+ virtual bool EndOfFile() const OVERRIDE;
private:
RWLockWrapper* _queueRWLock;
@@ -97,14 +97,14 @@
void ReadHeader();
- void Write(const uint8_t payloadType, const uint32_t timeStamp,
- const int16_t seqNo, const uint8_t* payloadData,
- const uint16_t payloadSize, uint32_t frequency);
+ virtual void Write(const uint8_t payloadType, const uint32_t timeStamp,
+ const int16_t seqNo, const uint8_t* payloadData,
+ const uint16_t payloadSize, uint32_t frequency) OVERRIDE;
- uint16_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
- uint16_t payloadSize, uint32_t* offset);
+ virtual uint16_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
+ uint16_t payloadSize, uint32_t* offset) OVERRIDE;
- bool EndOfFile() const {
+ virtual bool EndOfFile() const OVERRIDE {
return _rtpEOF;
}
diff --git a/modules/audio_coding/main/test/TestAllCodecs.cc b/modules/audio_coding/main/test/TestAllCodecs.cc
index d6c6dc4..9b7667b 100644
--- a/modules/audio_coding/main/test/TestAllCodecs.cc
+++ b/modules/audio_coding/main/test/TestAllCodecs.cc
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
@@ -710,10 +710,10 @@
}
// Store the expected packet size in bytes, used to validate the received
- // packet. If variable rate codec (extra_byte == -1), set to -1 (65535).
+ // packet. If variable rate codec (extra_byte == -1), set to -1.
if (extra_byte != -1) {
// Add 0.875 to always round up to a whole byte
- packet_size_bytes_ = static_cast<uint16_t>(static_cast<float>(packet_size
+ packet_size_bytes_ = static_cast<int>(static_cast<float>(packet_size
* rate) / static_cast<float>(sampling_freq_hz * 8) + 0.875)
+ extra_byte;
} else {
@@ -768,8 +768,8 @@
// Verify that the received packet size matches the settings.
receive_size = channel->payload_size();
if (receive_size) {
- if ((receive_size != packet_size_bytes_) &&
- (packet_size_bytes_ < 65535)) {
+ if ((static_cast<int>(receive_size) != packet_size_bytes_) &&
+ (packet_size_bytes_ > -1)) {
error_count++;
}
@@ -777,8 +777,9 @@
// is used to avoid problems when switching codec or frame size in the
// test.
timestamp_diff = channel->timestamp_diff();
- if ((counter > 10) && (timestamp_diff != packet_size_samples_) &&
- (packet_size_samples_ < 65535))
+ if ((counter > 10) &&
+ (static_cast<int>(timestamp_diff) != packet_size_samples_) &&
+ (packet_size_samples_ > -1))
error_count++;
}
@@ -819,4 +820,3 @@
}
} // namespace webrtc
-
diff --git a/modules/audio_coding/main/test/TestAllCodecs.h b/modules/audio_coding/main/test/TestAllCodecs.h
index 10d82ae..2fbf9ef 100644
--- a/modules/audio_coding/main/test/TestAllCodecs.h
+++ b/modules/audio_coding/main/test/TestAllCodecs.h
@@ -28,10 +28,11 @@
void RegisterReceiverACM(AudioCodingModule* acm);
- int32_t SendData(FrameType frame_type, uint8_t payload_type,
- uint32_t timestamp, const uint8_t* payload_data,
- uint16_t payload_size,
- const RTPFragmentationHeader* fragmentation);
+ virtual int32_t SendData(
+ FrameType frame_type, uint8_t payload_type,
+ uint32_t timestamp, const uint8_t* payload_data,
+ uint16_t payload_size,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
uint16_t payload_size();
uint32_t timestamp_diff();
@@ -52,7 +53,7 @@
explicit TestAllCodecs(int test_mode);
~TestAllCodecs();
- void Perform();
+ virtual void Perform() OVERRIDE;
private:
// The default value of '-1' indicates that the registration is based only on
@@ -73,8 +74,8 @@
PCMFile infile_a_;
PCMFile outfile_b_;
int test_count_;
- uint16_t packet_size_samples_;
- uint16_t packet_size_bytes_;
+ int packet_size_samples_;
+ int packet_size_bytes_;
};
} // namespace webrtc
diff --git a/modules/audio_coding/main/test/TestStereo.cc b/modules/audio_coding/main/test/TestStereo.cc
index 00c3631..9c22548 100644
--- a/modules/audio_coding/main/test/TestStereo.cc
+++ b/modules/audio_coding/main/test/TestStereo.cc
@@ -14,7 +14,7 @@
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
@@ -75,7 +75,7 @@
rtp_info);
if (frame_type != kAudioFrameCN) {
- payload_size_ = payload_size;
+ payload_size_ = static_cast<int>(payload_size);
} else {
payload_size_ = -1;
}
@@ -88,7 +88,7 @@
}
uint16_t TestPackStereo::payload_size() {
- return payload_size_;
+ return static_cast<uint16_t>(payload_size_);
}
uint32_t TestPackStereo::timestamp_diff() {
diff --git a/modules/audio_coding/main/test/TestStereo.h b/modules/audio_coding/main/test/TestStereo.h
index 03f8041..8aefa7f 100644
--- a/modules/audio_coding/main/test/TestStereo.h
+++ b/modules/audio_coding/main/test/TestStereo.h
@@ -33,12 +33,13 @@
void RegisterReceiverACM(AudioCodingModule* acm);
- virtual int32_t SendData(const FrameType frame_type,
- const uint8_t payload_type,
- const uint32_t timestamp,
- const uint8_t* payload_data,
- const uint16_t payload_size,
- const RTPFragmentationHeader* fragmentation);
+ virtual int32_t SendData(
+ const FrameType frame_type,
+ const uint8_t payload_type,
+ const uint32_t timestamp,
+ const uint8_t* payload_data,
+ const uint16_t payload_size,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
uint16_t payload_size();
uint32_t timestamp_diff();
@@ -52,7 +53,7 @@
uint32_t timestamp_diff_;
uint32_t last_in_timestamp_;
uint64_t total_bytes_;
- uint16_t payload_size_;
+ int payload_size_;
StereoMonoMode codec_mode_;
// Simulate packet losses
bool lost_packet_;
@@ -63,7 +64,7 @@
explicit TestStereo(int test_mode);
~TestStereo();
- void Perform();
+ virtual void Perform() OVERRIDE;
private:
// The default value of '-1' indicates that the registration is based only on
// codec name and a sampling frequncy matching is not required. This is useful
diff --git a/modules/audio_coding/main/test/TimedTrace.h b/modules/audio_coding/main/test/TimedTrace.h
index 237b329..ef9609a 100644
--- a/modules/audio_coding/main/test/TimedTrace.h
+++ b/modules/audio_coding/main/test/TimedTrace.h
@@ -11,7 +11,7 @@
#ifndef TIMED_TRACE_H
#define TIMED_TRACE_H
-#include "typedefs.h"
+#include "webrtc/typedefs.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/modules/audio_coding/main/test/TwoWayCommunication.cc b/modules/audio_coding/main/test/TwoWayCommunication.cc
index 81ef0c3..b5592d0 100644
--- a/modules/audio_coding/main/test/TwoWayCommunication.cc
+++ b/modules/audio_coding/main/test/TwoWayCommunication.cc
@@ -18,7 +18,7 @@
#include <Windows.h>
#endif
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
diff --git a/modules/audio_coding/main/test/dual_stream_unittest.cc b/modules/audio_coding/main/test/dual_stream_unittest.cc
index 71657c9..7cd2466 100644
--- a/modules/audio_coding/main/test/dual_stream_unittest.cc
+++ b/modules/audio_coding/main/test/dual_stream_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
@@ -35,10 +35,11 @@
void ApiTest();
- int32_t SendData(FrameType frameType, uint8_t payload_type,
- uint32_t timestamp, const uint8_t* payload_data,
- uint16_t payload_size,
- const RTPFragmentationHeader* fragmentation);
+ virtual int32_t SendData(
+ FrameType frameType, uint8_t payload_type,
+ uint32_t timestamp, const uint8_t* payload_data,
+ uint16_t payload_size,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
void Perform(bool start_in_sync, int num_channels_input);
diff --git a/modules/audio_coding/main/test/initial_delay_unittest.cc b/modules/audio_coding/main/test/initial_delay_unittest.cc
index 192539d..0b7aad1 100644
--- a/modules/audio_coding/main/test/initial_delay_unittest.cc
+++ b/modules/audio_coding/main/test/initial_delay_unittest.cc
@@ -15,7 +15,7 @@
#include <iostream>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
diff --git a/modules/audio_coding/main/test/insert_packet_with_timing.cc b/modules/audio_coding/main/test/insert_packet_with_timing.cc
index 398a6b3..0173ac1 100644
--- a/modules/audio_coding/main/test/insert_packet_with_timing.cc
+++ b/modules/audio_coding/main/test/insert_packet_with_timing.cc
@@ -11,7 +11,7 @@
#include <stdio.h>
#include "gflags/gflags.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/audio_coding/main/test/Channel.h"
diff --git a/modules/audio_coding/main/test/opus_test.cc b/modules/audio_coding/main/test/opus_test.cc
index 261eb61..398d59d 100644
--- a/modules/audio_coding/main/test/opus_test.cc
+++ b/modules/audio_coding/main/test/opus_test.cc
@@ -218,6 +218,8 @@
int written_samples = 0;
int read_samples = 0;
int decoded_samples = 0;
+ bool first_packet = true;
+ uint32_t start_time_stamp = 0;
channel->reset_payload_size();
counter_ = 0;
@@ -324,6 +326,10 @@
// Send data to the channel. "channel" will handle the loss simulation.
channel->SendData(kAudioFrameSpeech, payload_type_, rtp_timestamp_,
bitstream, bitstream_len_byte, NULL);
+ if (first_packet) {
+ first_packet = false;
+ start_time_stamp = rtp_timestamp_;
+ }
rtp_timestamp_ += frame_length;
read_samples += frame_length * channels;
}
@@ -344,9 +350,11 @@
// Write stand-alone speech to file.
out_file_standalone_.Write10MsData(out_audio, decoded_samples * channels);
- // Number of channels should be the same for both stand-alone and
- // ACM-decoding.
- EXPECT_EQ(audio_frame.num_channels_, channels);
+ if (audio_frame.timestamp_ > start_time_stamp) {
+ // Number of channels should be the same for both stand-alone and
+ // ACM-decoding.
+ EXPECT_EQ(audio_frame.num_channels_, channels);
+ }
decoded_samples = 0;
}
@@ -367,13 +375,13 @@
file_stream << webrtc::test::OutputPath() << "opustest_out_"
<< test_number << ".pcm";
file_name = file_stream.str();
- out_file_.Open(file_name, 32000, "wb");
+ out_file_.Open(file_name, 48000, "wb");
file_stream.str("");
file_name = file_stream.str();
file_stream << webrtc::test::OutputPath() << "opusstandalone_out_"
<< test_number << ".pcm";
file_name = file_stream.str();
- out_file_standalone_.Open(file_name, 32000, "wb");
+ out_file_standalone_.Open(file_name, 48000, "wb");
}
} // namespace webrtc
diff --git a/modules/audio_coding/main/test/target_delay_unittest.cc b/modules/audio_coding/main/test/target_delay_unittest.cc
index 5636bdf..02b8467 100644
--- a/modules/audio_coding/main/test/target_delay_unittest.cc
+++ b/modules/audio_coding/main/test/target_delay_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
diff --git a/modules/audio_coding/neteq/audio_classifier_unittest.cc b/modules/audio_coding/neteq/audio_classifier_unittest.cc
index cf623ca..530044e 100644
--- a/modules/audio_coding/neteq/audio_classifier_unittest.cc
+++ b/modules/audio_coding/neteq/audio_classifier_unittest.cc
@@ -16,7 +16,7 @@
#include <string.h>
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/audio_decoder.cc b/modules/audio_coding/neteq/audio_decoder.cc
index f539bb2..0fdaa44 100644
--- a/modules/audio_coding/neteq/audio_decoder.cc
+++ b/modules/audio_coding/neteq/audio_decoder.cc
@@ -162,7 +162,7 @@
#ifdef WEBRTC_CODEC_OPUS
case kDecoderOpus:
case kDecoderOpus_2ch: {
- return 32000;
+ return 48000;
}
#endif
case kDecoderCNGswb48kHz: {
diff --git a/modules/audio_coding/neteq/audio_decoder_unittest.cc b/modules/audio_coding/neteq/audio_decoder_unittest.cc
index f82644c..624e6a4 100644
--- a/modules/audio_coding/neteq/audio_decoder_unittest.cc
+++ b/modules/audio_coding/neteq/audio_decoder_unittest.cc
@@ -15,7 +15,7 @@
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common_audio/resampler/include/resampler.h"
#ifdef WEBRTC_CODEC_CELT
#include "webrtc/modules/audio_coding/codecs/celt/include/celt_interface.h"
@@ -54,6 +54,7 @@
// Create arrays.
ASSERT_GT(data_length_, 0u) << "The test must set data_length_ > 0";
input_ = new int16_t[data_length_];
+ // Longest encoded data is produced by PCM16b with 2 bytes per sample.
encoded_ = new uint8_t[data_length_ * 2];
decoded_ = new int16_t[data_length_ * channels_];
// Open input file.
@@ -172,24 +173,18 @@
// Encodes a payload and decodes it twice with decoder re-init before each
// decode. Verifies that the decoded result is the same.
void ReInitTest() {
- uint8_t* encoded = encoded_;
- uint8_t* encoded_copy = encoded_ + 2 * frame_size_;
int16_t* output1 = decoded_;
int16_t* output2 = decoded_ + frame_size_;
InitEncoder();
- size_t enc_len = EncodeFrame(input_, frame_size_, encoded);
+ size_t enc_len = EncodeFrame(input_, frame_size_, encoded_);
size_t dec_len;
- // Copy payload since iSAC fix destroys it during decode.
- // Issue: http://code.google.com/p/webrtc/issues/detail?id=845.
- // TODO(hlundin): Remove if the iSAC bug gets fixed.
- memcpy(encoded_copy, encoded, enc_len);
AudioDecoder::SpeechType speech_type1, speech_type2;
EXPECT_EQ(0, decoder_->Init());
- dec_len = decoder_->Decode(encoded, enc_len, output1, &speech_type1);
+ dec_len = decoder_->Decode(encoded_, enc_len, output1, &speech_type1);
EXPECT_EQ(frame_size_ * channels_, dec_len);
// Re-init decoder and decode again.
EXPECT_EQ(0, decoder_->Init());
- dec_len = decoder_->Decode(encoded_copy, enc_len, output2, &speech_type2);
+ dec_len = decoder_->Decode(encoded_, enc_len, output2, &speech_type2);
EXPECT_EQ(frame_size_ * channels_, dec_len);
for (unsigned int n = 0; n < frame_size_; ++n) {
ASSERT_EQ(output1[n], output2[n]) << "Exit test on first diff; n = " << n;
@@ -353,14 +348,11 @@
virtual int EncodeFrame(const int16_t* input, size_t input_len_samples,
uint8_t* output) {
// Insert 3 * 10 ms. Expect non-zero output on third call.
- EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input,
- reinterpret_cast<int16_t*>(output)));
+ EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input, output));
input += input_size_;
- EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input,
- reinterpret_cast<int16_t*>(output)));
+ EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input, output));
input += input_size_;
- int enc_len_bytes =
- WebRtcIsac_Encode(encoder_, input, reinterpret_cast<int16_t*>(output));
+ int enc_len_bytes = WebRtcIsac_Encode(encoder_, input, output);
EXPECT_GT(enc_len_bytes, 0);
return enc_len_bytes;
}
@@ -393,14 +385,11 @@
virtual int EncodeFrame(const int16_t* input, size_t input_len_samples,
uint8_t* output) {
// Insert 3 * 10 ms. Expect non-zero output on third call.
- EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input,
- reinterpret_cast<int16_t*>(output)));
+ EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input, output));
input += input_size_;
- EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input,
- reinterpret_cast<int16_t*>(output)));
+ EXPECT_EQ(0, WebRtcIsac_Encode(encoder_, input, output));
input += input_size_;
- int enc_len_bytes =
- WebRtcIsac_Encode(encoder_, input, reinterpret_cast<int16_t*>(output));
+ int enc_len_bytes = WebRtcIsac_Encode(encoder_, input, output);
EXPECT_GT(enc_len_bytes, 0);
return enc_len_bytes;
}
@@ -446,14 +435,11 @@
virtual int EncodeFrame(const int16_t* input, size_t input_len_samples,
uint8_t* output) {
// Insert 3 * 10 ms. Expect non-zero output on third call.
- EXPECT_EQ(0, WebRtcIsacfix_Encode(encoder_, input,
- reinterpret_cast<int16_t*>(output)));
+ EXPECT_EQ(0, WebRtcIsacfix_Encode(encoder_, input, output));
input += input_size_;
- EXPECT_EQ(0, WebRtcIsacfix_Encode(encoder_, input,
- reinterpret_cast<int16_t*>(output)));
+ EXPECT_EQ(0, WebRtcIsacfix_Encode(encoder_, input, output));
input += input_size_;
- int enc_len_bytes = WebRtcIsacfix_Encode(
- encoder_, input, reinterpret_cast<int16_t*>(output));
+ int enc_len_bytes = WebRtcIsacfix_Encode(encoder_, input, output);
EXPECT_GT(enc_len_bytes, 0);
return enc_len_bytes;
}
@@ -607,7 +593,7 @@
class AudioDecoderOpusTest : public AudioDecoderTest {
protected:
AudioDecoderOpusTest() : AudioDecoderTest() {
- frame_size_ = 320;
+ frame_size_ = 480;
data_length_ = 10 * frame_size_;
decoder_ = new AudioDecoderOpus(kDecoderOpus);
assert(decoder_);
@@ -618,75 +604,69 @@
WebRtcOpus_EncoderFree(encoder_);
}
+ virtual void SetUp() OVERRIDE {
+ AudioDecoderTest::SetUp();
+ // Upsample from 32 to 48 kHz.
+ // Because Opus is 48 kHz codec but the input file is 32 kHz, so the data
+ // read in |AudioDecoderTest::SetUp| has to be upsampled.
+ // |AudioDecoderTest::SetUp| has read |data_length_| samples, which is more
+ // than necessary after upsampling, so the end of audio that has been read
+ // is unused and the end of the buffer is overwritten by the resampled data.
+ Resampler rs;
+ rs.Reset(32000, 48000, kResamplerSynchronous);
+ const int before_resamp_len_samples = static_cast<int>(data_length_) * 2
+ / 3;
+ int16_t* before_resamp_input = new int16_t[before_resamp_len_samples];
+ memcpy(before_resamp_input, input_,
+ sizeof(int16_t) * before_resamp_len_samples);
+ int resamp_len_samples;
+ EXPECT_EQ(0, rs.Push(before_resamp_input, before_resamp_len_samples,
+ input_, static_cast<int>(data_length_),
+ resamp_len_samples));
+ EXPECT_EQ(static_cast<int>(data_length_), resamp_len_samples);
+ delete[] before_resamp_input;
+ }
+
virtual void InitEncoder() {}
virtual int EncodeFrame(const int16_t* input, size_t input_len_samples,
- uint8_t* output) {
- // Upsample from 32 to 48 kHz.
- Resampler rs;
- rs.Reset(32000, 48000, kResamplerSynchronous);
- const int max_resamp_len_samples = static_cast<int>(input_len_samples) *
- 3 / 2;
- int16_t* resamp_input = new int16_t[max_resamp_len_samples];
- int resamp_len_samples;
- EXPECT_EQ(0, rs.Push(input, static_cast<int>(input_len_samples),
- resamp_input, max_resamp_len_samples,
- resamp_len_samples));
- EXPECT_EQ(max_resamp_len_samples, resamp_len_samples);
- int enc_len_bytes =
- WebRtcOpus_Encode(encoder_, resamp_input, resamp_len_samples,
- static_cast<int>(data_length_), output);
+ uint8_t* output) OVERRIDE {
+ int enc_len_bytes = WebRtcOpus_Encode(encoder_, const_cast<int16_t*>(input),
+ static_cast<int16_t>(input_len_samples),
+ static_cast<int16_t>(data_length_), output);
EXPECT_GT(enc_len_bytes, 0);
- delete [] resamp_input;
return enc_len_bytes;
}
OpusEncInst* encoder_;
};
-class AudioDecoderOpusStereoTest : public AudioDecoderTest {
+class AudioDecoderOpusStereoTest : public AudioDecoderOpusTest {
protected:
- AudioDecoderOpusStereoTest() : AudioDecoderTest() {
+ AudioDecoderOpusStereoTest() : AudioDecoderOpusTest() {
channels_ = 2;
- frame_size_ = 320;
- data_length_ = 10 * frame_size_;
+ WebRtcOpus_EncoderFree(encoder_);
+ delete decoder_;
decoder_ = new AudioDecoderOpus(kDecoderOpus_2ch);
assert(decoder_);
WebRtcOpus_EncoderCreate(&encoder_, 2);
}
- ~AudioDecoderOpusStereoTest() {
- WebRtcOpus_EncoderFree(encoder_);
- }
-
- virtual void InitEncoder() {}
-
virtual int EncodeFrame(const int16_t* input, size_t input_len_samples,
- uint8_t* output) {
+ uint8_t* output) OVERRIDE {
// Create stereo by duplicating each sample in |input|.
const int input_stereo_samples = static_cast<int>(input_len_samples) * 2;
int16_t* input_stereo = new int16_t[input_stereo_samples];
for (size_t i = 0; i < input_len_samples; i++)
input_stereo[i * 2] = input_stereo[i * 2 + 1] = input[i];
- // Upsample from 32 to 48 kHz.
- Resampler rs;
- rs.Reset(32000, 48000, kResamplerSynchronousStereo);
- const int max_resamp_len_samples = input_stereo_samples * 3 / 2;
- int16_t* resamp_input = new int16_t[max_resamp_len_samples];
- int resamp_len_samples;
- EXPECT_EQ(0, rs.Push(input_stereo, input_stereo_samples, resamp_input,
- max_resamp_len_samples, resamp_len_samples));
- EXPECT_EQ(max_resamp_len_samples, resamp_len_samples);
- int enc_len_bytes =
- WebRtcOpus_Encode(encoder_, resamp_input, resamp_len_samples / 2,
- static_cast<int16_t>(data_length_), output);
+
+ int enc_len_bytes = WebRtcOpus_Encode(
+ encoder_, input_stereo, static_cast<int16_t>(input_len_samples),
+ static_cast<int16_t>(data_length_), output);
EXPECT_GT(enc_len_bytes, 0);
- delete [] resamp_input;
- delete [] input_stereo;
+ delete[] input_stereo;
return enc_len_bytes;
}
-
- OpusEncInst* encoder_;
};
TEST_F(AudioDecoderPcmUTest, EncodeDecode) {
@@ -876,11 +856,11 @@
EXPECT_EQ(8000, AudioDecoder::CodecSampleRateHz(kDecoderCNGnb));
EXPECT_EQ(16000, AudioDecoder::CodecSampleRateHz(kDecoderCNGwb));
EXPECT_EQ(32000, AudioDecoder::CodecSampleRateHz(kDecoderCNGswb32kHz));
+ EXPECT_EQ(48000, AudioDecoder::CodecSampleRateHz(kDecoderOpus));
+ EXPECT_EQ(48000, AudioDecoder::CodecSampleRateHz(kDecoderOpus_2ch));
// TODO(tlegrand): Change 32000 to 48000 below once ACM has 48 kHz support.
EXPECT_EQ(32000, AudioDecoder::CodecSampleRateHz(kDecoderCNGswb48kHz));
EXPECT_EQ(-1, AudioDecoder::CodecSampleRateHz(kDecoderArbitrary));
- EXPECT_EQ(32000, AudioDecoder::CodecSampleRateHz(kDecoderOpus));
- EXPECT_EQ(32000, AudioDecoder::CodecSampleRateHz(kDecoderOpus_2ch));
#ifdef WEBRTC_CODEC_CELT
EXPECT_EQ(32000, AudioDecoder::CodecSampleRateHz(kDecoderCELT_32));
EXPECT_EQ(32000, AudioDecoder::CodecSampleRateHz(kDecoderCELT_32_2ch));
diff --git a/modules/audio_coding/neteq/audio_decoder_unittests.isolate b/modules/audio_coding/neteq/audio_decoder_unittests.isolate
index bb57e74..e4a18ca 100644
--- a/modules/audio_coding/neteq/audio_decoder_unittests.isolate
+++ b/modules/audio_coding/neteq/audio_decoder_unittests.isolate
@@ -8,31 +8,29 @@
{
'conditions': [
['OS=="android"', {
- # When doing Android builds, the WebRTC code is put in third_party/webrtc
- # of a Chromium checkout, this is one level above the standalone build.
'variables': {
'isolate_dependency_untracked': [
- '../../../../../resources/',
- '../../../../../data/',
+ '<(DEPTH)/resources/',
+ '<(DEPTH)/data/',
],
},
}],
['OS=="linux" or OS=="mac" or OS=="win"', {
'variables': {
'command': [
- '../../../../testing/test_env.py',
+ '<(DEPTH)/testing/test_env.py',
'<(PRODUCT_DIR)/audio_decoder_unittests<(EXECUTABLE_SUFFIX)',
],
'isolate_dependency_touched': [
- '../../../../DEPS',
+ '<(DEPTH)/DEPS',
],
'isolate_dependency_tracked': [
- '../../../../resources/audio_coding/testfile32kHz.pcm',
- '../../../../testing/test_env.py',
+ '<(DEPTH)/resources/audio_coding/testfile32kHz.pcm',
+ '<(DEPTH)/testing/test_env.py',
'<(PRODUCT_DIR)/audio_decoder_unittests<(EXECUTABLE_SUFFIX)',
],
'isolate_dependency_untracked': [
- '../../../../tools/swarming_client/',
+ '<(DEPTH)/tools/swarming_client/',
],
},
}],
diff --git a/modules/audio_coding/neteq/audio_multi_vector.cc b/modules/audio_coding/neteq/audio_multi_vector.cc
index 5a208a6..b19eef9 100644
--- a/modules/audio_coding/neteq/audio_multi_vector.cc
+++ b/modules/audio_coding/neteq/audio_multi_vector.cc
@@ -57,10 +57,10 @@
}
}
-void AudioMultiVector::CopyFrom(AudioMultiVector* copy_to) const {
+void AudioMultiVector::CopyTo(AudioMultiVector* copy_to) const {
if (copy_to) {
for (size_t i = 0; i < num_channels_; ++i) {
- channels_[i]->CopyFrom(&(*copy_to)[i]);
+ channels_[i]->CopyTo(&(*copy_to)[i]);
}
}
}
@@ -202,6 +202,12 @@
return channels_[0]->Empty();
}
+void AudioMultiVector::CopyChannel(size_t from_channel, size_t to_channel) {
+ assert(from_channel < num_channels_);
+ assert(to_channel < num_channels_);
+ channels_[from_channel]->CopyTo(channels_[to_channel]);
+}
+
const AudioVector& AudioMultiVector::operator[](size_t index) const {
return *(channels_[index]);
}
diff --git a/modules/audio_coding/neteq/audio_multi_vector.h b/modules/audio_coding/neteq/audio_multi_vector.h
index 908de93..27f377e 100644
--- a/modules/audio_coding/neteq/audio_multi_vector.h
+++ b/modules/audio_coding/neteq/audio_multi_vector.h
@@ -43,7 +43,7 @@
// are deleted. After the operation is done, |copy_to| will be an exact
// replica of this object. The source and the destination must have the same
// number of channels.
- virtual void CopyFrom(AudioMultiVector* copy_to) const;
+ virtual void CopyTo(AudioMultiVector* copy_to) const;
// Appends the contents of array |append_this| to the end of this
// object. The array is assumed to be channel-interleaved. |length| must be
@@ -117,6 +117,11 @@
virtual bool Empty() const;
+ // Copies the data between two channels in the AudioMultiVector. The method
+ // does not add any new channel. Thus, |from_channel| and |to_channel| must
+ // both be valid channel numbers.
+ virtual void CopyChannel(size_t from_channel, size_t to_channel);
+
// Accesses and modifies a channel (i.e., an AudioVector object) of this
// AudioMultiVector.
const AudioVector& operator[](size_t index) const;
diff --git a/modules/audio_coding/neteq/audio_multi_vector_unittest.cc b/modules/audio_coding/neteq/audio_multi_vector_unittest.cc
index 9476038..1921dc2 100644
--- a/modules/audio_coding/neteq/audio_multi_vector_unittest.cc
+++ b/modules/audio_coding/neteq/audio_multi_vector_unittest.cc
@@ -15,7 +15,7 @@
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -101,7 +101,7 @@
AudioMultiVector vec(num_channels_);
vec.PushBackInterleaved(array_interleaved_, interleaved_length_);
AudioMultiVector vec_copy(num_channels_);
- vec.CopyFrom(&vec_copy); // Copy from |vec| to |vec_copy|.
+ vec.CopyTo(&vec_copy); // Copy from |vec| to |vec_copy|.
ASSERT_EQ(num_channels_, vec.Channels());
ASSERT_EQ(array_length(), vec.Size());
ASSERT_EQ(num_channels_, vec_copy.Channels());
@@ -118,7 +118,7 @@
EXPECT_TRUE(vec.Empty());
// Now copy the empty vector and verify that the copy becomes empty too.
- vec.CopyFrom(&vec_copy);
+ vec.CopyTo(&vec_copy);
EXPECT_TRUE(vec_copy.Empty());
}
@@ -127,7 +127,7 @@
AudioMultiVector vec(num_channels_);
AudioMultiVector* vec_copy = NULL;
vec.PushBackInterleaved(array_interleaved_, interleaved_length_);
- vec.CopyFrom(vec_copy);
+ vec.CopyTo(vec_copy);
}
// Test the PushBack method with another AudioMultiVector as input argument.
@@ -300,6 +300,31 @@
}
}
+// Test the CopyChannel method, when the test is instantiated with at least two
+// channels.
+TEST_P(AudioMultiVectorTest, CopyChannel) {
+ if (num_channels_ < 2)
+ return;
+
+ AudioMultiVector vec(num_channels_);
+ vec.PushBackInterleaved(array_interleaved_, interleaved_length_);
+ // Create a reference copy.
+ AudioMultiVector ref(num_channels_);
+ ref.PushBack(vec);
+ // Copy from first to last channel.
+ vec.CopyChannel(0, num_channels_ - 1);
+ // Verify that the first and last channels are identical; the others should
+ // be left untouched.
+ for (size_t i = 0; i < array_length(); ++i) {
+ // Verify that all but the last channel are untouched.
+ for (size_t channel = 0; channel < num_channels_ - 1; ++channel) {
+ EXPECT_EQ(ref[channel][i], vec[channel][i]);
+ }
+ // Verify that the last and the first channels are identical.
+ EXPECT_EQ(vec[0][i], vec[num_channels_ - 1][i]);
+ }
+}
+
INSTANTIATE_TEST_CASE_P(TestNumChannels,
AudioMultiVectorTest,
::testing::Values(static_cast<size_t>(1),
diff --git a/modules/audio_coding/neteq/audio_vector.cc b/modules/audio_coding/neteq/audio_vector.cc
index d9fb4e5..ef24ea2 100644
--- a/modules/audio_coding/neteq/audio_vector.cc
+++ b/modules/audio_coding/neteq/audio_vector.cc
@@ -22,7 +22,7 @@
first_free_ix_ = 0;
}
-void AudioVector::CopyFrom(AudioVector* copy_to) const {
+void AudioVector::CopyTo(AudioVector* copy_to) const {
if (copy_to) {
copy_to->Reserve(Size());
assert(copy_to->capacity_ >= Size());
diff --git a/modules/audio_coding/neteq/audio_vector.h b/modules/audio_coding/neteq/audio_vector.h
index f8aabdb..3e025a4 100644
--- a/modules/audio_coding/neteq/audio_vector.h
+++ b/modules/audio_coding/neteq/audio_vector.h
@@ -43,7 +43,7 @@
// Copies all values from this vector to |copy_to|. Any contents in |copy_to|
// are deleted before the copy operation. After the operation is done,
// |copy_to| will be an exact replica of this object.
- virtual void CopyFrom(AudioVector* copy_to) const;
+ virtual void CopyTo(AudioVector* copy_to) const;
// Prepends the contents of AudioVector |prepend_this| to this object. The
// length of this object is increased with the length of |prepend_this|.
diff --git a/modules/audio_coding/neteq/audio_vector_unittest.cc b/modules/audio_coding/neteq/audio_vector_unittest.cc
index 50da1fb..0800986 100644
--- a/modules/audio_coding/neteq/audio_vector_unittest.cc
+++ b/modules/audio_coding/neteq/audio_vector_unittest.cc
@@ -15,7 +15,7 @@
#include <string>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -65,7 +65,7 @@
AudioVector vec;
AudioVector vec_copy;
vec.PushBack(array_, array_length());
- vec.CopyFrom(&vec_copy); // Copy from |vec| to |vec_copy|.
+ vec.CopyTo(&vec_copy); // Copy from |vec| to |vec_copy|.
ASSERT_EQ(array_length(), vec.Size());
ASSERT_EQ(array_length(), vec_copy.Size());
for (size_t i = 0; i < array_length(); ++i) {
@@ -78,7 +78,7 @@
EXPECT_TRUE(vec.Empty());
// Now copy the empty vector and verify that the copy becomes empty too.
- vec.CopyFrom(&vec_copy);
+ vec.CopyTo(&vec_copy);
EXPECT_TRUE(vec_copy.Empty());
}
@@ -87,7 +87,7 @@
AudioVector vec;
AudioVector* vec_copy = NULL;
vec.PushBack(array_, array_length());
- vec.CopyFrom(vec_copy);
+ vec.CopyTo(vec_copy);
}
// Test the PushBack method with another AudioVector as input argument.
diff --git a/modules/audio_coding/neteq/background_noise.cc b/modules/audio_coding/neteq/background_noise.cc
index e00c4f6..8d5a293 100644
--- a/modules/audio_coding/neteq/background_noise.cc
+++ b/modules/audio_coding/neteq/background_noise.cc
@@ -24,7 +24,7 @@
BackgroundNoise::BackgroundNoise(size_t num_channels)
: num_channels_(num_channels),
channel_parameters_(new ChannelParameters[num_channels_]),
- mode_(kBgnOn) {
+ mode_(NetEq::kBgnOn) {
Reset();
}
diff --git a/modules/audio_coding/neteq/background_noise.h b/modules/audio_coding/neteq/background_noise.h
index 8fb310e..5c9f39b 100644
--- a/modules/audio_coding/neteq/background_noise.h
+++ b/modules/audio_coding/neteq/background_noise.h
@@ -68,11 +68,11 @@
// Accessors.
bool initialized() const { return initialized_; }
- NetEqBackgroundNoiseMode mode() const { return mode_; }
+ NetEq::BackgroundNoiseMode mode() const { return mode_; }
// Sets the mode of the background noise playout for cases when there is long
// duration of packet loss.
- void set_mode(NetEqBackgroundNoiseMode mode) { mode_ = mode; }
+ void set_mode(NetEq::BackgroundNoiseMode mode) { mode_ = mode; }
private:
static const int kThresholdIncrement = 229; // 0.0035 in Q16.
@@ -128,7 +128,7 @@
size_t num_channels_;
scoped_ptr<ChannelParameters[]> channel_parameters_;
bool initialized_;
- NetEqBackgroundNoiseMode mode_;
+ NetEq::BackgroundNoiseMode mode_;
DISALLOW_COPY_AND_ASSIGN(BackgroundNoise);
};
diff --git a/modules/audio_coding/neteq/background_noise_unittest.cc b/modules/audio_coding/neteq/background_noise_unittest.cc
index 0aee62c..bd69d67 100644
--- a/modules/audio_coding/neteq/background_noise_unittest.cc
+++ b/modules/audio_coding/neteq/background_noise_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/buffer_level_filter_unittest.cc b/modules/audio_coding/neteq/buffer_level_filter_unittest.cc
index 9589099..4151a9b 100644
--- a/modules/audio_coding/neteq/buffer_level_filter_unittest.cc
+++ b/modules/audio_coding/neteq/buffer_level_filter_unittest.cc
@@ -14,7 +14,7 @@
#include <math.h> // Access to pow function.
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/comfort_noise_unittest.cc b/modules/audio_coding/neteq/comfort_noise_unittest.cc
index 6a1bbe0..cc636a1 100644
--- a/modules/audio_coding/neteq/comfort_noise_unittest.cc
+++ b/modules/audio_coding/neteq/comfort_noise_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/comfort_noise.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
diff --git a/modules/audio_coding/neteq/decision_logic_normal.cc b/modules/audio_coding/neteq/decision_logic_normal.cc
index 97a8843..9e42204 100644
--- a/modules/audio_coding/neteq/decision_logic_normal.cc
+++ b/modules/audio_coding/neteq/decision_logic_normal.cc
@@ -76,8 +76,10 @@
available_timestamp, play_dtmf);
} else {
// This implies that available_timestamp < target_timestamp, which can
- // happen when a new stream or codec is received. Signal for a reset.
- return kUndefined;
+ // happen when a new stream or codec is received. Do Expand instead, and
+ // wait for a newer packet to arrive, or for the buffer to flush (resulting
+ // in a master reset).
+ return kExpand;
}
}
diff --git a/modules/audio_coding/neteq/decision_logic_unittest.cc b/modules/audio_coding/neteq/decision_logic_unittest.cc
index f9056a6..499f946 100644
--- a/modules/audio_coding/neteq/decision_logic_unittest.cc
+++ b/modules/audio_coding/neteq/decision_logic_unittest.cc
@@ -10,7 +10,7 @@
// Unit tests for DecisionLogic class and derived classes.
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h"
#include "webrtc/modules/audio_coding/neteq/decoder_database.h"
#include "webrtc/modules/audio_coding/neteq/decision_logic.h"
diff --git a/modules/audio_coding/neteq/decoder_database_unittest.cc b/modules/audio_coding/neteq/decoder_database_unittest.cc
index d0c6f5a..6f49719 100644
--- a/modules/audio_coding/neteq/decoder_database_unittest.cc
+++ b/modules/audio_coding/neteq/decoder_database_unittest.cc
@@ -15,8 +15,8 @@
#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h"
#include "webrtc/test/testsupport/gtest_disable.h"
diff --git a/modules/audio_coding/neteq/delay_manager_unittest.cc b/modules/audio_coding/neteq/delay_manager_unittest.cc
index 6f97332..30e7647 100644
--- a/modules/audio_coding/neteq/delay_manager_unittest.cc
+++ b/modules/audio_coding/neteq/delay_manager_unittest.cc
@@ -14,8 +14,8 @@
#include <math.h>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/delay_peak_detector_unittest.cc b/modules/audio_coding/neteq/delay_peak_detector_unittest.cc
index 080309b..c40f399 100644
--- a/modules/audio_coding/neteq/delay_peak_detector_unittest.cc
+++ b/modules/audio_coding/neteq/delay_peak_detector_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/delay_peak_detector.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/dsp_helper_unittest.cc b/modules/audio_coding/neteq/dsp_helper_unittest.cc
index cbceff6..a052a58 100644
--- a/modules/audio_coding/neteq/dsp_helper_unittest.cc
+++ b/modules/audio_coding/neteq/dsp_helper_unittest.cc
@@ -10,7 +10,7 @@
#include "webrtc/modules/audio_coding/neteq/dsp_helper.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
#include "webrtc/typedefs.h"
diff --git a/modules/audio_coding/neteq/dtmf_buffer_unittest.cc b/modules/audio_coding/neteq/dtmf_buffer_unittest.cc
index 83f9813..4824b2b 100644
--- a/modules/audio_coding/neteq/dtmf_buffer_unittest.cc
+++ b/modules/audio_coding/neteq/dtmf_buffer_unittest.cc
@@ -18,7 +18,7 @@
#include <iostream>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
// Modify the tests so that they pass with the modifications done to DtmfBuffer
// for backwards bit-exactness. Once bit-exactness is no longer required, this
diff --git a/modules/audio_coding/neteq/dtmf_tone_generator.cc b/modules/audio_coding/neteq/dtmf_tone_generator.cc
index 34c615d..3429bcd 100644
--- a/modules/audio_coding/neteq/dtmf_tone_generator.cc
+++ b/modules/audio_coding/neteq/dtmf_tone_generator.cc
@@ -158,10 +158,6 @@
if (num_samples < 0 || !output) {
return kParameterError;
}
- assert(output->Channels() == 1); // Not adapted for multi-channel yet.
- if (output->Channels() != 1) {
- return kStereoNotSupported;
- }
output->AssertSize(num_samples);
for (int i = 0; i < num_samples; ++i) {
@@ -185,6 +181,10 @@
(*output)[0][i] =
static_cast<int16_t>((temp_val * amplitude_ + 8192) >> 14);
}
+ // Copy first channel to all other channels.
+ for (size_t channel = 1; channel < output->Channels(); ++channel) {
+ output->CopyChannel(0, channel);
+ }
return num_samples;
}
diff --git a/modules/audio_coding/neteq/dtmf_tone_generator.h b/modules/audio_coding/neteq/dtmf_tone_generator.h
index fc1e5e4..232eba4 100644
--- a/modules/audio_coding/neteq/dtmf_tone_generator.h
+++ b/modules/audio_coding/neteq/dtmf_tone_generator.h
@@ -24,7 +24,6 @@
enum ReturnCodes {
kNotInitialized = -1,
kParameterError = -2,
- kStereoNotSupported = -3,
};
DtmfToneGenerator();
diff --git a/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc b/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc
index 94f79dc..ccd7fa6 100644
--- a/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc
+++ b/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc
@@ -14,14 +14,134 @@
#include <math.h>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
namespace webrtc {
-TEST(DtmfToneGenerator, CreateAndDestroy) {
- DtmfToneGenerator* tone_gen = new DtmfToneGenerator();
- delete tone_gen;
+class DtmfToneGeneratorTest : public ::testing::Test {
+ protected:
+ static const double kLowFreqHz[16];
+ static const double kHighFreqHz[16];
+ // This is the attenuation applied to all cases.
+ const double kBaseAttenuation = 16141.0 / 16384.0;
+ const double k3dbAttenuation = 23171.0 / 32768;
+ const int kNumSamples = 10;
+
+ void TestAllTones(int fs_hz, int channels) {
+ AudioMultiVector signal(channels);
+
+ for (int event = 0; event <= 15; ++event) {
+ std::ostringstream ss;
+ ss << "Checking event " << event << " at sample rate " << fs_hz;
+ SCOPED_TRACE(ss.str());
+ const int kAttenuation = 0;
+ ASSERT_EQ(0, tone_gen_.Init(fs_hz, event, kAttenuation));
+ EXPECT_TRUE(tone_gen_.initialized());
+ EXPECT_EQ(kNumSamples, tone_gen_.Generate(kNumSamples, &signal));
+
+ double f1 = kLowFreqHz[event];
+ double f2 = kHighFreqHz[event];
+ const double pi = 3.14159265358979323846;
+
+ for (int n = 0; n < kNumSamples; ++n) {
+ double x = k3dbAttenuation * sin(2.0 * pi * f1 / fs_hz * (-n - 1)) +
+ sin(2.0 * pi * f2 / fs_hz * (-n - 1));
+ x *= kBaseAttenuation;
+ x = ldexp(x, 14); // Scale to Q14.
+ for (int channel = 0; channel < channels; ++channel) {
+ EXPECT_NEAR(x, static_cast<double>(signal[channel][n]), 25);
+ }
+ }
+
+ tone_gen_.Reset();
+ EXPECT_FALSE(tone_gen_.initialized());
+ }
+ }
+
+ void TestAmplitudes(int fs_hz, int channels) {
+ AudioMultiVector signal(channels);
+ AudioMultiVector ref_signal(channels);
+
+ const int event_vec[] = {0, 4, 9, 13}; // Test a few events.
+ for (int e = 0; e < 4; ++e) {
+ int event = event_vec[e];
+ // Create full-scale reference.
+ ASSERT_EQ(0, tone_gen_.Init(fs_hz, event, 0)); // 0 attenuation.
+ EXPECT_EQ(kNumSamples, tone_gen_.Generate(kNumSamples, &ref_signal));
+ // Test every 5 steps (to save time).
+ for (int attenuation = 1; attenuation <= 36; attenuation += 5) {
+ std::ostringstream ss;
+ ss << "Checking event " << event << " at sample rate " << fs_hz;
+ ss << "; attenuation " << attenuation;
+ SCOPED_TRACE(ss.str());
+ ASSERT_EQ(0, tone_gen_.Init(fs_hz, event, attenuation));
+ EXPECT_EQ(kNumSamples, tone_gen_.Generate(kNumSamples, &signal));
+ for (int n = 0; n < kNumSamples; ++n) {
+ double attenuation_factor =
+ pow(10, -static_cast<double>(attenuation) / 20);
+ // Verify that the attenuation is correct.
+ for (int channel = 0; channel < channels; ++channel) {
+ EXPECT_NEAR(attenuation_factor * ref_signal[channel][n],
+ signal[channel][n],
+ 2);
+ }
+ }
+
+ tone_gen_.Reset();
+ }
+ }
+ }
+
+ DtmfToneGenerator tone_gen_;
+};
+
+// Low and high frequencies for events 0 through 15.
+const double DtmfToneGeneratorTest::kLowFreqHz[16] = {
+ 941.0, 697.0, 697.0, 697.0, 770.0, 770.0, 770.0, 852.0,
+ 852.0, 852.0, 941.0, 941.0, 697.0, 770.0, 852.0, 941.0};
+const double DtmfToneGeneratorTest::kHighFreqHz[16] = {
+ 1336.0, 1209.0, 1336.0, 1477.0, 1209.0, 1336.0, 1477.0, 1209.0,
+ 1336.0, 1477.0, 1209.0, 1477.0, 1633.0, 1633.0, 1633.0, 1633.0};
+
+TEST_F(DtmfToneGeneratorTest, Test8000Mono) {
+ TestAllTones(8000, 1);
+ TestAmplitudes(8000, 1);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test16000Mono) {
+ TestAllTones(16000, 1);
+ TestAmplitudes(16000, 1);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test32000Mono) {
+ TestAllTones(32000, 1);
+ TestAmplitudes(32000, 1);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test48000Mono) {
+ TestAllTones(48000, 1);
+ TestAmplitudes(48000, 1);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test8000Stereo) {
+ TestAllTones(8000, 2);
+ TestAmplitudes(8000, 2);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test16000Stereo) {
+ TestAllTones(16000, 2);
+ TestAmplitudes(16000, 2);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test32000Stereo) {
+ TestAllTones(32000, 2);
+ TestAmplitudes(32000, 2);
+}
+
+TEST_F(DtmfToneGeneratorTest, Test48000Stereo) {
+ TestAllTones(48000, 2);
+ TestAmplitudes(48000, 2);
}
TEST(DtmfToneGenerator, TestErrors) {
@@ -58,85 +178,4 @@
tone_gen.Generate(kNumSamples, NULL));
}
-TEST(DtmfToneGenerator, TestTones) {
- DtmfToneGenerator tone_gen;
- const int kAttenuation = 0;
- const int kNumSamples = 10;
- AudioMultiVector signal(1); // One channel.
-
- // Low and high frequencies for events 0 through 15.
- const double low_freq_hz[] = { 941.0, 697.0, 697.0, 697.0, 770.0, 770.0,
- 770.0, 852.0, 852.0, 852.0, 941.0, 941.0, 697.0, 770.0, 852.0, 941.0 };
- const double hi_freq_hz[] = { 1336.0, 1209.0, 1336.0, 1477.0, 1209.0, 1336.0,
- 1477.0, 1209.0, 1336.0, 1477.0, 1209.0, 1477.0, 1633.0, 1633.0, 1633.0,
- 1633.0 };
- const double attenuate_3dB = 23171.0 / 32768; // 3 dB attenuation.
- const double base_attenuation = 16141.0 / 16384.0; // This is the attenuation
- // applied to all cases.
- const int fs_vec[] = { 8000, 16000, 32000, 48000 };
- for (int f = 0; f < 4; ++f) {
- int fs = fs_vec[f];
- for (int event = 0; event <= 15; ++event) {
- std::ostringstream ss;
- ss << "Checking event " << event << " at sample rate " << fs;
- SCOPED_TRACE(ss.str());
- ASSERT_EQ(0, tone_gen.Init(fs, event, kAttenuation));
- EXPECT_TRUE(tone_gen.initialized());
- EXPECT_EQ(kNumSamples, tone_gen.Generate(kNumSamples, &signal));
-
- double f1 = low_freq_hz[event];
- double f2 = hi_freq_hz[event];
- const double pi = 3.14159265358979323846;
-
- for (int n = 0; n < kNumSamples; ++n) {
- double x = attenuate_3dB * sin(2.0 * pi * f1 / fs * (-n - 1))
- + sin(2.0 * pi * f2 / fs * (-n - 1));
- x *= base_attenuation;
- x = ldexp(x, 14); // Scale to Q14.
- static const int kChannel = 0;
- EXPECT_NEAR(x, static_cast<double>(signal[kChannel][n]), 25);
- }
-
- tone_gen.Reset();
- EXPECT_FALSE(tone_gen.initialized());
- }
- }
-}
-
-TEST(DtmfToneGenerator, TestAmplitudes) {
- DtmfToneGenerator tone_gen;
- const int kNumSamples = 10;
- AudioMultiVector signal(1); // One channel.
- AudioMultiVector ref_signal(1); // One channel.
-
- const int fs_vec[] = { 8000, 16000, 32000, 48000 };
- const int event_vec[] = { 0, 4, 9, 13 }; // Test a few events.
- for (int f = 0; f < 4; ++f) {
- int fs = fs_vec[f];
- int event = event_vec[f];
- // Create full-scale reference.
- ASSERT_EQ(0, tone_gen.Init(fs, event, 0)); // 0 attenuation.
- EXPECT_EQ(kNumSamples, tone_gen.Generate(kNumSamples, &ref_signal));
- // Test every 5 steps (to save time).
- for (int attenuation = 1; attenuation <= 36; attenuation += 5) {
- std::ostringstream ss;
- ss << "Checking event " << event << " at sample rate " << fs;
- ss << "; attenuation " << attenuation;
- SCOPED_TRACE(ss.str());
- ASSERT_EQ(0, tone_gen.Init(fs, event, attenuation));
- EXPECT_EQ(kNumSamples, tone_gen.Generate(kNumSamples, &signal));
- for (int n = 0; n < kNumSamples; ++n) {
- double attenuation_factor =
- pow(10, -static_cast<double>(attenuation)/20);
- // Verify that the attenuation is correct.
- static const int kChannel = 0;
- EXPECT_NEAR(attenuation_factor * ref_signal[kChannel][n],
- signal[kChannel][n], 2);
- }
-
- tone_gen.Reset();
- }
- }
-}
-
} // namespace webrtc
diff --git a/modules/audio_coding/neteq/expand.cc b/modules/audio_coding/neteq/expand.cc
index 14a7798..1f46e66 100644
--- a/modules/audio_coding/neteq/expand.cc
+++ b/modules/audio_coding/neteq/expand.cc
@@ -511,7 +511,7 @@
parameters.expand_vector0.Clear();
parameters.expand_vector0.PushBack(vector1, expansion_length);
// Copy from expand_vector0 to expand_vector1.
- parameters.expand_vector0.CopyFrom(¶meters.expand_vector1);
+ parameters.expand_vector0.CopyTo(¶meters.expand_vector1);
// Set the energy_ratio since it is used by muting slope.
if ((energy1 / 4 < energy2) || (energy2 == 0)) {
amplitude_ratio = 4096; // 0.5 in Q13.
@@ -806,7 +806,7 @@
int16_t* buffer) {
static const int kNoiseLpcOrder = BackgroundNoise::kMaxLpcOrder;
int16_t scaled_random_vector[kMaxSampleRate / 8000 * 125];
- assert(kMaxSampleRate / 8000 * 125 >= (int)num_noise_samples);
+ assert(static_cast<size_t>(kMaxSampleRate / 8000 * 125) >= num_noise_samples);
int16_t* noise_samples = &buffer[kNoiseLpcOrder];
if (background_noise_->initialized()) {
// Use background noise parameters.
@@ -838,8 +838,9 @@
// Unmute the background noise.
int16_t bgn_mute_factor = background_noise_->MuteFactor(channel);
- NetEqBackgroundNoiseMode bgn_mode = background_noise_->mode();
- if (bgn_mode == kBgnFade && too_many_expands && bgn_mute_factor > 0) {
+ NetEq::BackgroundNoiseMode bgn_mode = background_noise_->mode();
+ if (bgn_mode == NetEq::kBgnFade && too_many_expands &&
+ bgn_mute_factor > 0) {
// Fade BGN to zero.
// Calculate muting slope, approximately -2^18 / fs_hz.
int16_t mute_slope;
@@ -860,10 +861,10 @@
mute_slope,
noise_samples);
} else if (bgn_mute_factor < 16384) {
- // If mode is kBgnOff, or if kBgnFade has started fading,
- // Use regular |mute_slope|.
- if (!stop_muting_ && bgn_mode != kBgnOff &&
- !(bgn_mode == kBgnFade && too_many_expands)) {
+ // If mode is kBgnOn, or if kBgnFade has started fading,
+ // use regular |mute_slope|.
+ if (!stop_muting_ && bgn_mode != NetEq::kBgnOff &&
+ !(bgn_mode == NetEq::kBgnFade && too_many_expands)) {
DspHelper::UnmuteSignal(noise_samples,
static_cast<int>(num_noise_samples),
&bgn_mute_factor,
@@ -893,7 +894,7 @@
// just as good to generate all of the vector in one call.
size_t samples_generated = 0;
const size_t kMaxRandSamples = RandomVector::kRandomTableSize;
- while(samples_generated < length) {
+ while (samples_generated < length) {
size_t rand_length = std::min(length - samples_generated, kMaxRandSamples);
random_vector_->IncreaseSeedIncrement(seed_increment);
random_vector_->Generate(rand_length, &random_vector[samples_generated]);
diff --git a/modules/audio_coding/neteq/expand_unittest.cc b/modules/audio_coding/neteq/expand_unittest.cc
index bd39f40..68b4f60 100644
--- a/modules/audio_coding/neteq/expand_unittest.cc
+++ b/modules/audio_coding/neteq/expand_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/expand.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
#include "webrtc/modules/audio_coding/neteq/random_vector.h"
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
diff --git a/modules/audio_coding/neteq/interface/neteq.h b/modules/audio_coding/neteq/interface/neteq.h
index c67ab12..7196bc1 100644
--- a/modules/audio_coding/neteq/interface/neteq.h
+++ b/modules/audio_coding/neteq/interface/neteq.h
@@ -58,27 +58,29 @@
kPlayoutStreaming
};
-enum NetEqBackgroundNoiseMode {
- kBgnOn, // Default behavior with eternal noise.
- kBgnFade, // Noise fades to zero after some time.
- kBgnOff // Background noise is always zero.
-};
-
// This is the interface class for NetEq.
class NetEq {
public:
+ enum BackgroundNoiseMode {
+ kBgnOn, // Default behavior with eternal noise.
+ kBgnFade, // Noise fades to zero after some time.
+ kBgnOff // Background noise is always zero.
+ };
+
struct Config {
Config()
: sample_rate_hz(16000),
enable_audio_classifier(false),
max_packets_in_buffer(50),
// |max_delay_ms| has the same effect as calling SetMaximumDelay().
- max_delay_ms(2000) {}
+ max_delay_ms(2000),
+ background_noise_mode(kBgnOff) {}
int sample_rate_hz; // Initial vale. Will change with input data.
bool enable_audio_classifier;
int max_packets_in_buffer;
int max_delay_ms;
+ BackgroundNoiseMode background_noise_mode;
};
enum ReturnCodes {
@@ -259,12 +261,6 @@
virtual int DecodedRtpInfo(int* sequence_number,
uint32_t* timestamp) const = 0;
- // Sets the background noise mode.
- virtual void SetBackgroundNoiseMode(NetEqBackgroundNoiseMode mode) = 0;
-
- // Gets the background noise mode.
- virtual NetEqBackgroundNoiseMode BackgroundNoiseMode() const = 0;
-
protected:
NetEq() {}
diff --git a/modules/audio_coding/neteq/merge_unittest.cc b/modules/audio_coding/neteq/merge_unittest.cc
index fb5f789..bdcbbb8 100644
--- a/modules/audio_coding/neteq/merge_unittest.cc
+++ b/modules/audio_coding/neteq/merge_unittest.cc
@@ -14,7 +14,7 @@
#include <vector>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
#include "webrtc/modules/audio_coding/neteq/expand.h"
#include "webrtc/modules/audio_coding/neteq/random_vector.h"
diff --git a/modules/audio_coding/neteq/mock/mock_audio_decoder.h b/modules/audio_coding/neteq/mock/mock_audio_decoder.h
index edf3b54..f3cecc2 100644
--- a/modules/audio_coding/neteq/mock/mock_audio_decoder.h
+++ b/modules/audio_coding/neteq/mock/mock_audio_decoder.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/interface/audio_decoder.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_audio_vector.h b/modules/audio_coding/neteq/mock/mock_audio_vector.h
index a5a787c..a35a26a 100644
--- a/modules/audio_coding/neteq/mock/mock_audio_vector.h
+++ b/modules/audio_coding/neteq/mock/mock_audio_vector.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/audio_vector.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h b/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h
index d921066..ebc6acd 100644
--- a/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h
+++ b/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_decoder_database.h b/modules/audio_coding/neteq/mock/mock_decoder_database.h
index 583fa54..d127c5d 100644
--- a/modules/audio_coding/neteq/mock/mock_decoder_database.h
+++ b/modules/audio_coding/neteq/mock/mock_decoder_database.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/decoder_database.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_delay_manager.h b/modules/audio_coding/neteq/mock/mock_delay_manager.h
index c21a1c2..1d2dc8e 100644
--- a/modules/audio_coding/neteq/mock/mock_delay_manager.h
+++ b/modules/audio_coding/neteq/mock/mock_delay_manager.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/delay_manager.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h b/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h
index 26e0932..fa5cd7e 100644
--- a/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h
+++ b/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/delay_peak_detector.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h b/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h
index 0351d6b..c76ffaf 100644
--- a/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h
+++ b/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/dtmf_buffer.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h b/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h
index 3bed4d1..881e900 100644
--- a/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h
+++ b/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_expand.h b/modules/audio_coding/neteq/mock/mock_expand.h
new file mode 100644
index 0000000..45e3239
--- /dev/null
+++ b/modules/audio_coding/neteq/mock/mock_expand.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
+#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
+
+#include "webrtc/modules/audio_coding/neteq/expand.h"
+
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace webrtc {
+
+class MockExpand : public Expand {
+ public:
+ MockExpand(BackgroundNoise* background_noise,
+ SyncBuffer* sync_buffer,
+ RandomVector* random_vector,
+ int fs,
+ size_t num_channels)
+ : Expand(background_noise, sync_buffer, random_vector, fs, num_channels) {
+ }
+ virtual ~MockExpand() { Die(); }
+ MOCK_METHOD0(Die, void());
+ MOCK_METHOD0(Reset,
+ void());
+ MOCK_METHOD1(Process,
+ int(AudioMultiVector* output));
+ MOCK_METHOD0(SetParametersForNormalAfterExpand,
+ void());
+ MOCK_METHOD0(SetParametersForMergeAfterExpand,
+ void());
+ MOCK_CONST_METHOD0(overlap_length,
+ size_t());
+};
+
+} // namespace webrtc
+
+namespace webrtc {
+
+class MockExpandFactory : public ExpandFactory {
+ public:
+ MOCK_CONST_METHOD5(Create,
+ Expand*(BackgroundNoise* background_noise,
+ SyncBuffer* sync_buffer,
+ RandomVector* random_vector,
+ int fs,
+ size_t num_channels));
+};
+
+} // namespace webrtc
+#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
diff --git a/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h b/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h
index 9522b53..ef5e03e 100644
--- a/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h
+++ b/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/interface/audio_decoder.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
#include "webrtc/typedefs.h"
diff --git a/modules/audio_coding/neteq/mock/mock_packet_buffer.h b/modules/audio_coding/neteq/mock/mock_packet_buffer.h
index 2882248..74eea6f 100644
--- a/modules/audio_coding/neteq/mock/mock_packet_buffer.h
+++ b/modules/audio_coding/neteq/mock/mock_packet_buffer.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/packet_buffer.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_payload_splitter.h b/modules/audio_coding/neteq/mock/mock_payload_splitter.h
index f166542..09fa4e1 100644
--- a/modules/audio_coding/neteq/mock/mock_payload_splitter.h
+++ b/modules/audio_coding/neteq/mock/mock_payload_splitter.h
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/payload_splitter.h"
-#include "gmock/gmock.h"
+#include "testing/gmock/include/gmock/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/neteq.cc b/modules/audio_coding/neteq/neteq.cc
index 7edacde..420165b 100644
--- a/modules/audio_coding/neteq/neteq.cc
+++ b/modules/audio_coding/neteq/neteq.cc
@@ -44,7 +44,7 @@
ExpandFactory* expand_factory = new ExpandFactory;
PreemptiveExpandFactory* preemptive_expand_factory =
new PreemptiveExpandFactory;
- return new NetEqImpl(config.sample_rate_hz,
+ return new NetEqImpl(config,
buffer_level_filter,
decoder_database,
delay_manager,
diff --git a/modules/audio_coding/neteq/neteq.gypi b/modules/audio_coding/neteq/neteq.gypi
index 21ccee4..01143bc 100644
--- a/modules/audio_coding/neteq/neteq.gypi
+++ b/modules/audio_coding/neteq/neteq.gypi
@@ -157,9 +157,7 @@
'interface/audio_decoder.h',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -200,9 +198,7 @@
}, # neteq_unittest_tools
], # targets
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'audio_decoder_unittests_apk_target',
diff --git a/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc b/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
index a401076..6a8eafa 100644
--- a/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
@@ -13,12 +13,13 @@
#include <string>
#include <list>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h"
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
+#include "webrtc/system_wrappers/interface/compile_assert.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/test/testsupport/gtest_disable.h"
@@ -26,6 +27,7 @@
namespace webrtc {
using ::testing::_;
+using ::testing::Return;
// This test encodes a few packets of PCM16b 32 kHz data and inserts it into two
// different NetEq instances. The first instance uses the internal version of
@@ -46,14 +48,13 @@
frame_size_samples_(frame_size_ms_ * samples_per_ms_),
output_size_samples_(frame_size_ms_ * samples_per_ms_),
external_decoder_(new MockExternalPcm16B(kDecoderPCM16Bswb32kHz)),
- rtp_generator_(samples_per_ms_),
+ rtp_generator_(new test::RtpGenerator(samples_per_ms_)),
payload_size_bytes_(0),
last_send_time_(0),
last_arrival_time_(0) {
- NetEq::Config config;
- config.sample_rate_hz = sample_rate_hz_;
- neteq_external_ = NetEq::Create(config);
- neteq_ = NetEq::Create(config);
+ config_.sample_rate_hz = sample_rate_hz_;
+ neteq_external_ = NetEq::Create(config_);
+ neteq_ = NetEq::Create(config_);
input_ = new int16_t[frame_size_samples_];
encoded_ = new uint8_t[2 * frame_size_samples_];
}
@@ -63,7 +64,6 @@
delete neteq_;
// We will now delete the decoder ourselves, so expecting Die to be called.
EXPECT_CALL(*external_decoder_, Die()).Times(1);
- delete external_decoder_;
delete [] input_;
delete [] encoded_;
}
@@ -78,9 +78,8 @@
// NetEq is not allowed to delete the external decoder (hence Times(0)).
EXPECT_CALL(*external_decoder_, Die()).Times(0);
ASSERT_EQ(NetEq::kOK,
- neteq_external_->RegisterExternalDecoder(external_decoder_,
- decoder,
- kPayloadType));
+ neteq_external_->RegisterExternalDecoder(
+ external_decoder_.get(), decoder, kPayloadType));
ASSERT_EQ(NetEq::kOK,
neteq_->RegisterPayloadType(decoder, kPayloadType));
}
@@ -96,13 +95,12 @@
if (frame_size_samples_ * 2 != payload_size_bytes_) {
return -1;
}
- int next_send_time = rtp_generator_.GetRtpHeader(kPayloadType,
- frame_size_samples_,
- &rtp_header_);
+ int next_send_time = rtp_generator_->GetRtpHeader(
+ kPayloadType, frame_size_samples_, &rtp_header_);
return next_send_time;
}
- void VerifyOutput(size_t num_samples) {
+ virtual void VerifyOutput(size_t num_samples) const {
for (size_t i = 0; i < num_samples; ++i) {
ASSERT_EQ(output_[i], output_external_[i]) <<
"Diff in sample " << i << ".";
@@ -118,6 +116,51 @@
virtual bool Lost() { return false; }
+ virtual void InsertPackets(int next_arrival_time) {
+ // Insert packet in regular instance.
+ ASSERT_EQ(
+ NetEq::kOK,
+ neteq_->InsertPacket(
+ rtp_header_, encoded_, payload_size_bytes_, next_arrival_time));
+ // Insert packet in external decoder instance.
+ EXPECT_CALL(*external_decoder_,
+ IncomingPacket(_,
+ payload_size_bytes_,
+ rtp_header_.header.sequenceNumber,
+ rtp_header_.header.timestamp,
+ next_arrival_time));
+ ASSERT_EQ(
+ NetEq::kOK,
+ neteq_external_->InsertPacket(
+ rtp_header_, encoded_, payload_size_bytes_, next_arrival_time));
+ }
+
+ virtual void GetOutputAudio() {
+ NetEqOutputType output_type;
+ // Get audio from regular instance.
+ int samples_per_channel;
+ int num_channels;
+ EXPECT_EQ(NetEq::kOK,
+ neteq_->GetAudio(kMaxBlockSize,
+ output_,
+ &samples_per_channel,
+ &num_channels,
+ &output_type));
+ EXPECT_EQ(1, num_channels);
+ EXPECT_EQ(output_size_samples_, samples_per_channel);
+ // Get audio from external decoder instance.
+ ASSERT_EQ(NetEq::kOK,
+ neteq_external_->GetAudio(kMaxBlockSize,
+ output_external_,
+ &samples_per_channel,
+ &num_channels,
+ &output_type));
+ EXPECT_EQ(1, num_channels);
+ EXPECT_EQ(output_size_samples_, samples_per_channel);
+ }
+
+ virtual int NumExpectedDecodeCalls(int num_loops) const { return num_loops; }
+
void RunTest(int num_loops) {
// Get next input packets (mono and multi-channel).
int next_send_time;
@@ -129,26 +172,13 @@
} while (Lost()); // If lost, immediately read the next packet.
EXPECT_CALL(*external_decoder_, Decode(_, payload_size_bytes_, _, _))
- .Times(num_loops);
+ .Times(NumExpectedDecodeCalls(num_loops));
int time_now = 0;
for (int k = 0; k < num_loops; ++k) {
while (time_now >= next_arrival_time) {
- // Insert packet in regular instance.
- ASSERT_EQ(NetEq::kOK,
- neteq_->InsertPacket(rtp_header_, encoded_,
- payload_size_bytes_,
- next_arrival_time));
- // Insert packet in external decoder instance.
- EXPECT_CALL(*external_decoder_,
- IncomingPacket(_, payload_size_bytes_,
- rtp_header_.header.sequenceNumber,
- rtp_header_.header.timestamp,
- next_arrival_time));
- ASSERT_EQ(NetEq::kOK,
- neteq_external_->InsertPacket(rtp_header_, encoded_,
- payload_size_bytes_,
- next_arrival_time));
+ InsertPackets(next_arrival_time);
+
// Get next input packet.
do {
next_send_time = GetNewPackets();
@@ -156,23 +186,9 @@
next_arrival_time = GetArrivalTime(next_send_time);
} while (Lost()); // If lost, immediately read the next packet.
}
- NetEqOutputType output_type;
- // Get audio from regular instance.
- int samples_per_channel;
- int num_channels;
- EXPECT_EQ(NetEq::kOK,
- neteq_->GetAudio(kMaxBlockSize, output_,
- &samples_per_channel, &num_channels,
- &output_type));
- EXPECT_EQ(1, num_channels);
- EXPECT_EQ(output_size_samples_, samples_per_channel);
- // Get audio from external decoder instance.
- ASSERT_EQ(NetEq::kOK,
- neteq_external_->GetAudio(kMaxBlockSize, output_external_,
- &samples_per_channel, &num_channels,
- &output_type));
- EXPECT_EQ(1, num_channels);
- EXPECT_EQ(output_size_samples_, samples_per_channel);
+
+ GetOutputAudio();
+
std::ostringstream ss;
ss << "Lap number " << k << ".";
SCOPED_TRACE(ss.str()); // Print out the parameter values on failure.
@@ -183,15 +199,16 @@
}
}
- const int sample_rate_hz_;
- const int samples_per_ms_;
+ NetEq::Config config_;
+ int sample_rate_hz_;
+ int samples_per_ms_;
const int frame_size_ms_;
- const int frame_size_samples_;
- const int output_size_samples_;
+ int frame_size_samples_;
+ int output_size_samples_;
NetEq* neteq_external_;
NetEq* neteq_;
- MockExternalPcm16B* external_decoder_;
- test::RtpGenerator rtp_generator_;
+ scoped_ptr<MockExternalPcm16B> external_decoder_;
+ scoped_ptr<test::RtpGenerator> rtp_generator_;
int16_t* input_;
uint8_t* encoded_;
int16_t output_[kMaxBlockSize];
@@ -207,4 +224,256 @@
RunTest(100); // Run 100 laps @ 10 ms each in the test loop.
}
+class LargeTimestampJumpTest : public NetEqExternalDecoderTest {
+ protected:
+ enum TestStates {
+ kInitialPhase,
+ kNormalPhase,
+ kExpandPhase,
+ kFadedExpandPhase,
+ kRecovered
+ };
+
+ LargeTimestampJumpTest()
+ : NetEqExternalDecoderTest(), test_state_(kInitialPhase) {
+ sample_rate_hz_ = 8000;
+ samples_per_ms_ = sample_rate_hz_ / 1000;
+ frame_size_samples_ = frame_size_ms_ * samples_per_ms_;
+ output_size_samples_ = frame_size_ms_ * samples_per_ms_;
+ EXPECT_CALL(*external_decoder_, Die()).Times(1);
+ external_decoder_.reset(new MockExternalPcm16B(kDecoderPCM16B));
+ }
+
+ void SetUp() OVERRIDE {
+ const std::string file_name =
+ webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
+ input_file_.reset(new test::InputAudioFile(file_name));
+ assert(sample_rate_hz_ == 8000);
+ NetEqDecoder decoder = kDecoderPCM16B;
+ EXPECT_CALL(*external_decoder_, Init());
+ EXPECT_CALL(*external_decoder_, HasDecodePlc())
+ .WillRepeatedly(Return(false));
+ // NetEq is not allowed to delete the external decoder (hence Times(0)).
+ EXPECT_CALL(*external_decoder_, Die()).Times(0);
+ ASSERT_EQ(NetEq::kOK,
+ neteq_external_->RegisterExternalDecoder(
+ external_decoder_.get(), decoder, kPayloadType));
+ ASSERT_EQ(NetEq::kOK, neteq_->RegisterPayloadType(decoder, kPayloadType));
+ }
+
+ void InsertPackets(int next_arrival_time) OVERRIDE {
+ // Insert packet in external decoder instance.
+ EXPECT_CALL(*external_decoder_,
+ IncomingPacket(_,
+ payload_size_bytes_,
+ rtp_header_.header.sequenceNumber,
+ rtp_header_.header.timestamp,
+ next_arrival_time));
+ ASSERT_EQ(
+ NetEq::kOK,
+ neteq_external_->InsertPacket(
+ rtp_header_, encoded_, payload_size_bytes_, next_arrival_time));
+ }
+
+ void GetOutputAudio() OVERRIDE {
+ NetEqOutputType output_type;
+ int samples_per_channel;
+ int num_channels;
+ // Get audio from external decoder instance.
+ ASSERT_EQ(NetEq::kOK,
+ neteq_external_->GetAudio(kMaxBlockSize,
+ output_external_,
+ &samples_per_channel,
+ &num_channels,
+ &output_type));
+ EXPECT_EQ(1, num_channels);
+ EXPECT_EQ(output_size_samples_, samples_per_channel);
+ UpdateState(output_type);
+ }
+
+ virtual void UpdateState(NetEqOutputType output_type) {
+ switch (test_state_) {
+ case kInitialPhase: {
+ if (output_type == kOutputNormal) {
+ test_state_ = kNormalPhase;
+ }
+ break;
+ }
+ case kNormalPhase: {
+ if (output_type == kOutputPLC) {
+ test_state_ = kExpandPhase;
+ }
+ break;
+ }
+ case kExpandPhase: {
+ if (output_type == kOutputPLCtoCNG) {
+ test_state_ = kFadedExpandPhase;
+ }
+ break;
+ }
+ case kFadedExpandPhase: {
+ if (output_type == kOutputNormal) {
+ test_state_ = kRecovered;
+ }
+ break;
+ }
+ case kRecovered: {
+ break;
+ }
+ }
+ }
+
+ void VerifyOutput(size_t num_samples) const OVERRIDE {
+ if (test_state_ == kExpandPhase || test_state_ == kFadedExpandPhase) {
+ // Don't verify the output in this phase of the test.
+ return;
+ }
+ for (size_t i = 0; i < num_samples; ++i) {
+ if (output_external_[i] != 0)
+ return;
+ }
+ EXPECT_TRUE(false)
+ << "Expected at least one non-zero sample in each output block.";
+ }
+
+ int NumExpectedDecodeCalls(int num_loops) const OVERRIDE {
+ // Some packets won't be decoded because of the buffer being flushed after
+ // the timestamp jump.
+ return num_loops - (config_.max_packets_in_buffer + 1);
+ }
+
+ TestStates test_state_;
+};
+
+TEST_F(LargeTimestampJumpTest, JumpLongerThanHalfRange) {
+ // Set the timestamp series to start at 2880, increase to 7200, then jump to
+ // 2869342376. The sequence numbers start at 42076 and increase by 1 for each
+ // packet, also when the timestamp jumps.
+ static const uint16_t kStartSeqeunceNumber = 42076;
+ static const uint32_t kStartTimestamp = 2880;
+ static const uint32_t kJumpFromTimestamp = 7200;
+ static const uint32_t kJumpToTimestamp = 2869342376;
+ COMPILE_ASSERT(kJumpFromTimestamp < kJumpToTimestamp,
+ timestamp_jump_should_not_result_in_wrap);
+ COMPILE_ASSERT(
+ static_cast<uint32_t>(kJumpToTimestamp - kJumpFromTimestamp) > 0x7FFFFFFF,
+ jump_should_be_larger_than_half_range);
+ // Replace the default RTP generator with one that jumps in timestamp.
+ rtp_generator_.reset(new test::TimestampJumpRtpGenerator(samples_per_ms_,
+ kStartSeqeunceNumber,
+ kStartTimestamp,
+ kJumpFromTimestamp,
+ kJumpToTimestamp));
+
+ RunTest(130); // Run 130 laps @ 10 ms each in the test loop.
+ EXPECT_EQ(kRecovered, test_state_);
+}
+
+TEST_F(LargeTimestampJumpTest, JumpLongerThanHalfRangeAndWrap) {
+ // Make a jump larger than half the 32-bit timestamp range. Set the start
+ // timestamp such that the jump will result in a wrap around.
+ static const uint16_t kStartSeqeunceNumber = 42076;
+ // Set the jump length slightly larger than 2^31.
+ static const uint32_t kStartTimestamp = 3221223116;
+ static const uint32_t kJumpFromTimestamp = 3221223216;
+ static const uint32_t kJumpToTimestamp = 1073744278;
+ COMPILE_ASSERT(kJumpToTimestamp < kJumpFromTimestamp,
+ timestamp_jump_should_result_in_wrap);
+ COMPILE_ASSERT(
+ static_cast<uint32_t>(kJumpToTimestamp - kJumpFromTimestamp) > 0x7FFFFFFF,
+ jump_should_be_larger_than_half_range);
+ // Replace the default RTP generator with one that jumps in timestamp.
+ rtp_generator_.reset(new test::TimestampJumpRtpGenerator(samples_per_ms_,
+ kStartSeqeunceNumber,
+ kStartTimestamp,
+ kJumpFromTimestamp,
+ kJumpToTimestamp));
+
+ RunTest(130); // Run 130 laps @ 10 ms each in the test loop.
+ EXPECT_EQ(kRecovered, test_state_);
+}
+
+class ShortTimestampJumpTest : public LargeTimestampJumpTest {
+ protected:
+ void UpdateState(NetEqOutputType output_type) OVERRIDE {
+ switch (test_state_) {
+ case kInitialPhase: {
+ if (output_type == kOutputNormal) {
+ test_state_ = kNormalPhase;
+ }
+ break;
+ }
+ case kNormalPhase: {
+ if (output_type == kOutputPLC) {
+ test_state_ = kExpandPhase;
+ }
+ break;
+ }
+ case kExpandPhase: {
+ if (output_type == kOutputNormal) {
+ test_state_ = kRecovered;
+ }
+ break;
+ }
+ case kRecovered: {
+ break;
+ }
+ default: { FAIL(); }
+ }
+ }
+
+ int NumExpectedDecodeCalls(int num_loops) const OVERRIDE {
+ // Some packets won't be decoded because of the timestamp jump.
+ return num_loops - 2;
+ }
+};
+
+TEST_F(ShortTimestampJumpTest, JumpShorterThanHalfRange) {
+ // Make a jump shorter than half the 32-bit timestamp range. Set the start
+ // timestamp such that the jump will not result in a wrap around.
+ static const uint16_t kStartSeqeunceNumber = 42076;
+ // Set the jump length slightly smaller than 2^31.
+ static const uint32_t kStartTimestamp = 4711;
+ static const uint32_t kJumpFromTimestamp = 4811;
+ static const uint32_t kJumpToTimestamp = 2147483747;
+ COMPILE_ASSERT(kJumpFromTimestamp < kJumpToTimestamp,
+ timestamp_jump_should_not_result_in_wrap);
+ COMPILE_ASSERT(
+ static_cast<uint32_t>(kJumpToTimestamp - kJumpFromTimestamp) < 0x7FFFFFFF,
+ jump_should_be_smaller_than_half_range);
+ // Replace the default RTP generator with one that jumps in timestamp.
+ rtp_generator_.reset(new test::TimestampJumpRtpGenerator(samples_per_ms_,
+ kStartSeqeunceNumber,
+ kStartTimestamp,
+ kJumpFromTimestamp,
+ kJumpToTimestamp));
+
+ RunTest(130); // Run 130 laps @ 10 ms each in the test loop.
+ EXPECT_EQ(kRecovered, test_state_);
+}
+
+TEST_F(ShortTimestampJumpTest, JumpShorterThanHalfRangeAndWrap) {
+ // Make a jump shorter than half the 32-bit timestamp range. Set the start
+ // timestamp such that the jump will result in a wrap around.
+ static const uint16_t kStartSeqeunceNumber = 42076;
+ // Set the jump length slightly smaller than 2^31.
+ static const uint32_t kStartTimestamp = 3221227827;
+ static const uint32_t kJumpFromTimestamp = 3221227927;
+ static const uint32_t kJumpToTimestamp = 1073739567;
+ COMPILE_ASSERT(kJumpToTimestamp < kJumpFromTimestamp,
+ timestamp_jump_should_result_in_wrap);
+ COMPILE_ASSERT(
+ static_cast<uint32_t>(kJumpToTimestamp - kJumpFromTimestamp) < 0x7FFFFFFF,
+ jump_should_be_smaller_than_half_range);
+ // Replace the default RTP generator with one that jumps in timestamp.
+ rtp_generator_.reset(new test::TimestampJumpRtpGenerator(samples_per_ms_,
+ kStartSeqeunceNumber,
+ kStartTimestamp,
+ kJumpFromTimestamp,
+ kJumpToTimestamp));
+
+ RunTest(130); // Run 130 laps @ 10 ms each in the test loop.
+ EXPECT_EQ(kRecovered, test_state_);
+}
+
} // namespace webrtc
diff --git a/modules/audio_coding/neteq/neteq_impl.cc b/modules/audio_coding/neteq/neteq_impl.cc
index 64a8660..d714733 100644
--- a/modules/audio_coding/neteq/neteq_impl.cc
+++ b/modules/audio_coding/neteq/neteq_impl.cc
@@ -49,7 +49,7 @@
namespace webrtc {
-NetEqImpl::NetEqImpl(int fs,
+NetEqImpl::NetEqImpl(const NetEq::Config& config,
BufferLevelFilter* buffer_level_filter,
DecoderDatabase* decoder_database,
DelayManager* delay_manager,
@@ -90,8 +90,10 @@
first_packet_(true),
error_code_(0),
decoder_error_code_(0),
+ background_noise_mode_(config.background_noise_mode),
decoded_packet_sequence_number_(-1),
decoded_packet_timestamp_(0) {
+ int fs = config.sample_rate_hz;
if (fs != 8000 && fs != 16000 && fs != 32000 && fs != 48000) {
LOG(LS_ERROR) << "Sample rate " << fs << " Hz not supported. " <<
"Changing to 8000 Hz.";
@@ -384,18 +386,6 @@
return 0;
}
-void NetEqImpl::SetBackgroundNoiseMode(NetEqBackgroundNoiseMode mode) {
- CriticalSectionScoped lock(crit_sect_.get());
- assert(background_noise_.get());
- background_noise_->set_mode(mode);
-}
-
-NetEqBackgroundNoiseMode NetEqImpl::BackgroundNoiseMode() const {
- CriticalSectionScoped lock(crit_sect_.get());
- assert(background_noise_.get());
- return background_noise_->mode();
-}
-
const SyncBuffer* NetEqImpl::sync_buffer_for_test() const {
CriticalSectionScoped lock(crit_sect_.get());
return sync_buffer_.get();
@@ -874,9 +864,6 @@
assert(sync_buffer_.get());
uint32_t end_timestamp = sync_buffer_->end_timestamp();
- if (!new_codec_) {
- packet_buffer_->DiscardOldPackets(end_timestamp);
- }
const RTPHeader* header = packet_buffer_->NextRtpHeader();
if (decision_logic_->CngRfc3389On() || last_mode_ == kModeRfc3389Cng) {
@@ -1827,6 +1814,14 @@
}
} while (extracted_samples < required_samples && next_packet_available);
+ if (extracted_samples > 0) {
+ // Delete old packets only when we are going to decode something. Otherwise,
+ // we could end up in the situation where we never decode anything, since
+ // all incoming packets are considered too old but the buffer will also
+ // never be flooded and flushed.
+ packet_buffer_->DiscardOldPackets(timestamp_);
+ }
+
return extracted_samples;
}
@@ -1873,14 +1868,9 @@
// Delete sync buffer and create a new one.
sync_buffer_.reset(new SyncBuffer(channels, kSyncBufferSize * fs_mult_));
-
- // Delete BackgroundNoise object and create a new one, while preserving its
- // mode.
- NetEqBackgroundNoiseMode current_mode = kBgnOn;
- if (background_noise_.get())
- current_mode = background_noise_->mode();
+ // Delete BackgroundNoise object and create a new one.
background_noise_.reset(new BackgroundNoise(channels));
- background_noise_->set_mode(current_mode);
+ background_noise_->set_mode(background_noise_mode_);
// Reset random vector.
random_vector_.Reset();
diff --git a/modules/audio_coding/neteq/neteq_impl.h b/modules/audio_coding/neteq/neteq_impl.h
index e92babd..cfe6a40 100644
--- a/modules/audio_coding/neteq/neteq_impl.h
+++ b/modules/audio_coding/neteq/neteq_impl.h
@@ -14,6 +14,7 @@
#include <vector>
#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
#include "webrtc/modules/audio_coding/neteq/defines.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
@@ -22,7 +23,6 @@
#include "webrtc/modules/audio_coding/neteq/rtcp.h"
#include "webrtc/modules/audio_coding/neteq/statistics_calculator.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -58,7 +58,7 @@
public:
// Creates a new NetEqImpl object. The object will assume ownership of all
// injected dependencies, and will delete them when done.
- NetEqImpl(int fs,
+ NetEqImpl(const NetEq::Config& config,
BufferLevelFilter* buffer_level_filter,
DecoderDatabase* decoder_database,
DelayManager* delay_manager,
@@ -82,7 +82,7 @@
virtual int InsertPacket(const WebRtcRTPHeader& rtp_header,
const uint8_t* payload,
int length_bytes,
- uint32_t receive_timestamp);
+ uint32_t receive_timestamp) OVERRIDE;
// Inserts a sync-packet into packet queue. Sync-packets are decoded to
// silence and are intended to keep AV-sync intact in an event of long packet
@@ -94,7 +94,7 @@
// can be implied by inserting a sync-packet.
// Returns kOk on success, kFail on failure.
virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
- uint32_t receive_timestamp);
+ uint32_t receive_timestamp) OVERRIDE;
// Instructs NetEq to deliver 10 ms of audio data. The data is written to
// |output_audio|, which can hold (at least) |max_length| elements.
@@ -106,12 +106,12 @@
// Returns kOK on success, or kFail in case of an error.
virtual int GetAudio(size_t max_length, int16_t* output_audio,
int* samples_per_channel, int* num_channels,
- NetEqOutputType* type);
+ NetEqOutputType* type) OVERRIDE;
// Associates |rtp_payload_type| with |codec| and stores the information in
// the codec database. Returns kOK on success, kFail on failure.
virtual int RegisterPayloadType(enum NetEqDecoder codec,
- uint8_t rtp_payload_type);
+ uint8_t rtp_payload_type) OVERRIDE;
// Provides an externally created decoder object |decoder| to insert in the
// decoder database. The decoder implements a decoder of type |codec| and
@@ -119,86 +119,81 @@
// failure.
virtual int RegisterExternalDecoder(AudioDecoder* decoder,
enum NetEqDecoder codec,
- uint8_t rtp_payload_type);
+ uint8_t rtp_payload_type) OVERRIDE;
// Removes |rtp_payload_type| from the codec database. Returns 0 on success,
// -1 on failure.
- virtual int RemovePayloadType(uint8_t rtp_payload_type);
+ virtual int RemovePayloadType(uint8_t rtp_payload_type) OVERRIDE;
- virtual bool SetMinimumDelay(int delay_ms);
+ virtual bool SetMinimumDelay(int delay_ms) OVERRIDE;
- virtual bool SetMaximumDelay(int delay_ms);
+ virtual bool SetMaximumDelay(int delay_ms) OVERRIDE;
- virtual int LeastRequiredDelayMs() const;
+ virtual int LeastRequiredDelayMs() const OVERRIDE;
- virtual int SetTargetDelay() { return kNotImplemented; }
+ virtual int SetTargetDelay() OVERRIDE { return kNotImplemented; }
- virtual int TargetDelay() { return kNotImplemented; }
+ virtual int TargetDelay() OVERRIDE { return kNotImplemented; }
- virtual int CurrentDelay() { return kNotImplemented; }
+ virtual int CurrentDelay() OVERRIDE { return kNotImplemented; }
// Sets the playout mode to |mode|.
- virtual void SetPlayoutMode(NetEqPlayoutMode mode);
+ virtual void SetPlayoutMode(NetEqPlayoutMode mode) OVERRIDE;
// Returns the current playout mode.
- virtual NetEqPlayoutMode PlayoutMode() const;
+ virtual NetEqPlayoutMode PlayoutMode() const OVERRIDE;
// Writes the current network statistics to |stats|. The statistics are reset
// after the call.
- virtual int NetworkStatistics(NetEqNetworkStatistics* stats);
+ virtual int NetworkStatistics(NetEqNetworkStatistics* stats) OVERRIDE;
// Writes the last packet waiting times (in ms) to |waiting_times|. The number
// of values written is no more than 100, but may be smaller if the interface
// is polled again before 100 packets has arrived.
- virtual void WaitingTimes(std::vector<int>* waiting_times);
+ virtual void WaitingTimes(std::vector<int>* waiting_times) OVERRIDE;
// Writes the current RTCP statistics to |stats|. The statistics are reset
// and a new report period is started with the call.
- virtual void GetRtcpStatistics(RtcpStatistics* stats);
+ virtual void GetRtcpStatistics(RtcpStatistics* stats) OVERRIDE;
// Same as RtcpStatistics(), but does not reset anything.
- virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats);
+ virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) OVERRIDE;
// Enables post-decode VAD. When enabled, GetAudio() will return
// kOutputVADPassive when the signal contains no speech.
- virtual void EnableVad();
+ virtual void EnableVad() OVERRIDE;
// Disables post-decode VAD.
- virtual void DisableVad();
+ virtual void DisableVad() OVERRIDE;
- virtual bool GetPlayoutTimestamp(uint32_t* timestamp);
+ virtual bool GetPlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
- virtual int SetTargetNumberOfChannels() { return kNotImplemented; }
+ virtual int SetTargetNumberOfChannels() OVERRIDE { return kNotImplemented; }
- virtual int SetTargetSampleRate() { return kNotImplemented; }
+ virtual int SetTargetSampleRate() OVERRIDE { return kNotImplemented; }
// Returns the error code for the last occurred error. If no error has
// occurred, 0 is returned.
- virtual int LastError();
+ virtual int LastError() OVERRIDE;
// Returns the error code last returned by a decoder (audio or comfort noise).
// When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check
// this method to get the decoder's error code.
- virtual int LastDecoderError();
+ virtual int LastDecoderError() OVERRIDE;
// Flushes both the packet buffer and the sync buffer.
- virtual void FlushBuffers();
+ virtual void FlushBuffers() OVERRIDE;
virtual void PacketBufferStatistics(int* current_num_packets,
- int* max_num_packets) const;
+ int* max_num_packets) const OVERRIDE;
// Get sequence number and timestamp of the latest RTP.
// This method is to facilitate NACK.
- virtual int DecodedRtpInfo(int* sequence_number, uint32_t* timestamp) const;
-
- // Sets background noise mode.
- virtual void SetBackgroundNoiseMode(NetEqBackgroundNoiseMode mode);
-
- // Gets background noise mode.
- virtual NetEqBackgroundNoiseMode BackgroundNoiseMode() const;
+ virtual int DecodedRtpInfo(int* sequence_number,
+ uint32_t* timestamp) const OVERRIDE;
// This accessor method is only intended for testing purposes.
- virtual const SyncBuffer* sync_buffer_for_test() const;
+ const SyncBuffer* sync_buffer_for_test() const;
protected:
static const int kOutputSizeMs = 10;
@@ -387,6 +382,7 @@
bool first_packet_ GUARDED_BY(crit_sect_);
int error_code_ GUARDED_BY(crit_sect_); // Store last error code.
int decoder_error_code_ GUARDED_BY(crit_sect_);
+ const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_);
// These values are used by NACK module to estimate time-to-play of
// a missing packet. Occasionally, NetEq might decide to decode more
diff --git a/modules/audio_coding/neteq/neteq_impl_unittest.cc b/modules/audio_coding/neteq/neteq_impl_unittest.cc
index 2e66487..d5676d7 100644
--- a/modules/audio_coding/neteq/neteq_impl_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_impl_unittest.cc
@@ -11,8 +11,8 @@
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
#include "webrtc/modules/audio_coding/neteq/neteq_impl.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/accelerate.h"
#include "webrtc/modules/audio_coding/neteq/expand.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h"
@@ -140,7 +140,7 @@
PreemptiveExpandFactory* preemptive_expand_factory =
new PreemptiveExpandFactory;
- neteq_ = new NetEqImpl(config_.sample_rate_hz,
+ neteq_ = new NetEqImpl(config_,
buffer_level_filter_,
decoder_database_,
delay_manager_,
diff --git a/modules/audio_coding/neteq/neteq_stereo_unittest.cc b/modules/audio_coding/neteq/neteq_stereo_unittest.cc
index 3c695c8..c9a10df 100644
--- a/modules/audio_coding/neteq/neteq_stereo_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_stereo_unittest.cc
@@ -14,7 +14,7 @@
#include <string>
#include <list>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
diff --git a/modules/audio_coding/neteq/neteq_tests.gypi b/modules/audio_coding/neteq/neteq_tests.gypi
index 4d2ce25..d134dcd 100644
--- a/modules/audio_coding/neteq/neteq_tests.gypi
+++ b/modules/audio_coding/neteq/neteq_tests.gypi
@@ -13,7 +13,6 @@
'type': 'executable',
'dependencies': [
'neteq',
- 'neteq_test_tools',
'neteq_unittest_tools',
'PCM16B',
'<(webrtc_root)/test/test.gyp:test_support_main',
@@ -203,6 +202,22 @@
},
{
+ 'target_name': 'neteq_isac_quality_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'neteq',
+ 'neteq_test_support',
+ 'iSACFix',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
+ '<(webrtc_root)/test/test.gyp:test_support_main',
+ ],
+ 'sources': [
+ 'test/neteq_isac_quality_test.cc',
+ ],
+ },
+
+ {
'target_name': 'neteq_test_tools',
# Collection of useful functions used in other tests.
'type': 'static_library',
diff --git a/modules/audio_coding/neteq/neteq_unittest.cc b/modules/audio_coding/neteq/neteq_unittest.cc
index 0233e19..256c557 100644
--- a/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_unittest.cc
@@ -24,8 +24,9 @@
#include <vector>
#include "gflags/gflags.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/test/testsupport/gtest_disable.h"
@@ -200,11 +201,10 @@
void LoadDecoders();
void OpenInputFile(const std::string &rtp_file);
void Process(NETEQTEST_RTPpacket* rtp_ptr, int* out_len);
- void DecodeAndCompare(const std::string &rtp_file,
- const std::string &ref_file);
- void DecodeAndCheckStats(const std::string &rtp_file,
- const std::string &stat_ref_file,
- const std::string &rtcp_ref_file);
+ void DecodeAndCompare(const std::string& rtp_file,
+ const std::string& ref_file,
+ const std::string& stat_ref_file,
+ const std::string& rtcp_ref_file);
static void PopulateRtpInfo(int frame_index,
int timestamp,
WebRtcRTPHeader* rtp_info);
@@ -214,8 +214,6 @@
uint8_t* payload,
int* payload_len);
- void CheckBgnOff(int sampling_rate, NetEqBackgroundNoiseMode bgn_mode);
-
void WrapTest(uint16_t start_seq_no, uint32_t start_timestamp,
const std::set<uint16_t>& drop_seq_numbers,
bool expect_seq_no_wrap, bool expect_timestamp_wrap);
@@ -231,6 +229,7 @@
uint32_t PlayoutTimestamp();
NetEq* neteq_;
+ NetEq::Config config_;
FILE* rtp_fp_;
unsigned int sim_clock_;
int16_t out_data_[kMaxBlockSize];
@@ -248,17 +247,17 @@
NetEqDecodingTest::NetEqDecodingTest()
: neteq_(NULL),
+ config_(),
rtp_fp_(NULL),
sim_clock_(0),
output_sample_rate_(kInitSampleRateHz),
algorithmic_delay_ms_(0) {
+ config_.sample_rate_hz = kInitSampleRateHz;
memset(out_data_, 0, sizeof(out_data_));
}
void NetEqDecodingTest::SetUp() {
- NetEq::Config config;
- config.sample_rate_hz = kInitSampleRateHz;
- neteq_ = NetEq::Create(config);
+ neteq_ = NetEq::Create(config_);
NetEqNetworkStatistics stat;
ASSERT_EQ(0, neteq_->NetworkStatistics(&stat));
algorithmic_delay_ms_ = stat.current_buffer_size_ms;
@@ -338,8 +337,10 @@
sim_clock_ += kTimeStepMs;
}
-void NetEqDecodingTest::DecodeAndCompare(const std::string &rtp_file,
- const std::string &ref_file) {
+void NetEqDecodingTest::DecodeAndCompare(const std::string& rtp_file,
+ const std::string& ref_file,
+ const std::string& stat_ref_file,
+ const std::string& rtcp_ref_file) {
OpenInputFile(rtp_file);
std::string ref_out_file = "";
@@ -348,6 +349,18 @@
}
RefFiles ref_files(ref_file, ref_out_file);
+ std::string stat_out_file = "";
+ if (stat_ref_file.empty()) {
+ stat_out_file = webrtc::test::OutputPath() + "neteq_network_stats.dat";
+ }
+ RefFiles network_stat_files(stat_ref_file, stat_out_file);
+
+ std::string rtcp_out_file = "";
+ if (rtcp_ref_file.empty()) {
+ rtcp_out_file = webrtc::test::OutputPath() + "neteq_rtcp_stats.dat";
+ }
+ RefFiles rtcp_stat_files(rtcp_ref_file, rtcp_out_file);
+
NETEQTEST_RTPpacket rtp;
ASSERT_GT(rtp.readFromFile(rtp_fp_), 0);
int i = 0;
@@ -358,32 +371,6 @@
int out_len = 0;
ASSERT_NO_FATAL_FAILURE(Process(&rtp, &out_len));
ASSERT_NO_FATAL_FAILURE(ref_files.ProcessReference(out_data_, out_len));
- }
-}
-
-void NetEqDecodingTest::DecodeAndCheckStats(const std::string &rtp_file,
- const std::string &stat_ref_file,
- const std::string &rtcp_ref_file) {
- OpenInputFile(rtp_file);
- std::string stat_out_file = "";
- if (stat_ref_file.empty()) {
- stat_out_file = webrtc::test::OutputPath() +
- "neteq_network_stats.dat";
- }
- RefFiles network_stat_files(stat_ref_file, stat_out_file);
-
- std::string rtcp_out_file = "";
- if (rtcp_ref_file.empty()) {
- rtcp_out_file = webrtc::test::OutputPath() +
- "neteq_rtcp_stats.dat";
- }
- RefFiles rtcp_stat_files(rtcp_ref_file, rtcp_out_file);
-
- NETEQTEST_RTPpacket rtp;
- ASSERT_GT(rtp.readFromFile(rtp_fp_), 0);
- while (rtp.dataLen() >= 0) {
- int out_len;
- ASSERT_NO_FATAL_FAILURE(Process(&rtp, &out_len));
// Query the network statistics API once per second
if (sim_clock_ % 1000 == 0) {
@@ -425,107 +412,6 @@
*payload_len = 1; // Only noise level, no spectral parameters.
}
-void NetEqDecodingTest::CheckBgnOff(int sampling_rate_hz,
- NetEqBackgroundNoiseMode bgn_mode) {
- int expected_samples_per_channel = 0;
- uint8_t payload_type = 0xFF; // Invalid.
- if (sampling_rate_hz == 8000) {
- expected_samples_per_channel = kBlockSize8kHz;
- payload_type = 93; // PCM 16, 8 kHz.
- } else if (sampling_rate_hz == 16000) {
- expected_samples_per_channel = kBlockSize16kHz;
- payload_type = 94; // PCM 16, 16 kHZ.
- } else if (sampling_rate_hz == 32000) {
- expected_samples_per_channel = kBlockSize32kHz;
- payload_type = 95; // PCM 16, 32 kHz.
- } else {
- ASSERT_TRUE(false); // Unsupported test case.
- }
-
- NetEqOutputType type;
- int16_t output[kBlockSize32kHz]; // Maximum size is chosen.
- int16_t input[kBlockSize32kHz]; // Maximum size is chosen.
-
- // Payload of 10 ms of PCM16 32 kHz.
- uint8_t payload[kBlockSize32kHz * sizeof(int16_t)];
-
- // Random payload.
- for (int n = 0; n < expected_samples_per_channel; ++n) {
- input[n] = (rand() & ((1 << 10) - 1)) - ((1 << 5) - 1);
- }
- int enc_len_bytes = WebRtcPcm16b_EncodeW16(
- input, expected_samples_per_channel, reinterpret_cast<int16_t*>(payload));
- ASSERT_EQ(enc_len_bytes, expected_samples_per_channel * 2);
-
- WebRtcRTPHeader rtp_info;
- PopulateRtpInfo(0, 0, &rtp_info);
- rtp_info.header.payloadType = payload_type;
-
- int number_channels = 0;
- int samples_per_channel = 0;
-
- uint32_t receive_timestamp = 0;
- for (int n = 0; n < 10; ++n) { // Insert few packets and get audio.
- number_channels = 0;
- samples_per_channel = 0;
- ASSERT_EQ(0, neteq_->InsertPacket(
- rtp_info, payload, enc_len_bytes, receive_timestamp));
- ASSERT_EQ(0, neteq_->GetAudio(kBlockSize32kHz, output, &samples_per_channel,
- &number_channels, &type));
- ASSERT_EQ(1, number_channels);
- ASSERT_EQ(expected_samples_per_channel, samples_per_channel);
- ASSERT_EQ(kOutputNormal, type);
-
- // Next packet.
- rtp_info.header.timestamp += expected_samples_per_channel;
- rtp_info.header.sequenceNumber++;
- receive_timestamp += expected_samples_per_channel;
- }
-
- number_channels = 0;
- samples_per_channel = 0;
-
- // Get audio without inserting packets, expecting PLC and PLC-to-CNG. Pull one
- // frame without checking speech-type. This is the first frame pulled without
- // inserting any packet, and might not be labeled as PCL.
- ASSERT_EQ(0, neteq_->GetAudio(kBlockSize32kHz, output, &samples_per_channel,
- &number_channels, &type));
- ASSERT_EQ(1, number_channels);
- ASSERT_EQ(expected_samples_per_channel, samples_per_channel);
-
- // To be able to test the fading of background noise we need at lease to pull
- // 611 frames.
- const int kFadingThreshold = 611;
-
- // Test several CNG-to-PLC packet for the expected behavior. The number 20 is
- // arbitrary, but sufficiently large to test enough number of frames.
- const int kNumPlcToCngTestFrames = 20;
- bool plc_to_cng = false;
- for (int n = 0; n < kFadingThreshold + kNumPlcToCngTestFrames; ++n) {
- number_channels = 0;
- samples_per_channel = 0;
- memset(output, 1, sizeof(output)); // Set to non-zero.
- ASSERT_EQ(0, neteq_->GetAudio(kBlockSize32kHz, output, &samples_per_channel,
- &number_channels, &type));
- ASSERT_EQ(1, number_channels);
- ASSERT_EQ(expected_samples_per_channel, samples_per_channel);
- if (type == kOutputPLCtoCNG) {
- plc_to_cng = true;
- double sum_squared = 0;
- for (int k = 0; k < number_channels * samples_per_channel; ++k)
- sum_squared += output[k] * output[k];
- if (bgn_mode == kBgnOn) {
- EXPECT_NE(0, sum_squared);
- } else if (bgn_mode == kBgnOff || n > kFadingThreshold) {
- EXPECT_EQ(0, sum_squared);
- }
- } else {
- EXPECT_EQ(kOutputPLC, type);
- }
- }
- EXPECT_TRUE(plc_to_cng); // Just to be sure that PLC-to-CNG has occurred.
-}
-
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestBitExactness)) {
const std::string input_rtp_file = webrtc::test::ProjectRootPath() +
"resources/audio_coding/neteq_universal_new.rtp";
@@ -534,17 +420,6 @@
// have a copy of the file, the test will fail.
const std::string input_ref_file =
webrtc::test::ResourcePath("audio_coding/neteq4_universal_ref", "pcm");
-
- if (FLAGS_gen_ref) {
- DecodeAndCompare(input_rtp_file, "");
- } else {
- DecodeAndCompare(input_rtp_file, input_ref_file);
- }
-}
-
-TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestNetworkStatistics)) {
- const std::string input_rtp_file = webrtc::test::ProjectRootPath() +
- "resources/audio_coding/neteq_universal_new.rtp";
#if defined(_MSC_VER) && (_MSC_VER >= 1700)
// For Visual Studio 2012 and later, we will have to use the generic reference
// file, rather than the windows-specific one.
@@ -556,11 +431,14 @@
#endif
const std::string rtcp_stat_ref_file =
webrtc::test::ResourcePath("audio_coding/neteq4_rtcp_stats", "dat");
+
if (FLAGS_gen_ref) {
- DecodeAndCheckStats(input_rtp_file, "", "");
+ DecodeAndCompare(input_rtp_file, "", "", "");
} else {
- DecodeAndCheckStats(input_rtp_file, network_stat_ref_file,
- rtcp_stat_ref_file);
+ DecodeAndCompare(input_rtp_file,
+ input_ref_file,
+ network_stat_ref_file,
+ rtcp_stat_ref_file);
}
}
@@ -993,24 +871,175 @@
}
}
-TEST_F(NetEqDecodingTest, BackgroundNoise) {
- neteq_->SetBackgroundNoiseMode(kBgnOn);
- CheckBgnOff(8000, kBgnOn);
- CheckBgnOff(16000, kBgnOn);
- CheckBgnOff(32000, kBgnOn);
- EXPECT_EQ(kBgnOn, neteq_->BackgroundNoiseMode());
+class NetEqBgnTest : public NetEqDecodingTest {
+ protected:
+ virtual void TestCondition(double sum_squared_noise,
+ bool should_be_faded) = 0;
- neteq_->SetBackgroundNoiseMode(kBgnOff);
- CheckBgnOff(8000, kBgnOff);
- CheckBgnOff(16000, kBgnOff);
- CheckBgnOff(32000, kBgnOff);
- EXPECT_EQ(kBgnOff, neteq_->BackgroundNoiseMode());
+ void CheckBgn(int sampling_rate_hz) {
+ int expected_samples_per_channel = 0;
+ uint8_t payload_type = 0xFF; // Invalid.
+ if (sampling_rate_hz == 8000) {
+ expected_samples_per_channel = kBlockSize8kHz;
+ payload_type = 93; // PCM 16, 8 kHz.
+ } else if (sampling_rate_hz == 16000) {
+ expected_samples_per_channel = kBlockSize16kHz;
+ payload_type = 94; // PCM 16, 16 kHZ.
+ } else if (sampling_rate_hz == 32000) {
+ expected_samples_per_channel = kBlockSize32kHz;
+ payload_type = 95; // PCM 16, 32 kHz.
+ } else {
+ ASSERT_TRUE(false); // Unsupported test case.
+ }
- neteq_->SetBackgroundNoiseMode(kBgnFade);
- CheckBgnOff(8000, kBgnFade);
- CheckBgnOff(16000, kBgnFade);
- CheckBgnOff(32000, kBgnFade);
- EXPECT_EQ(kBgnFade, neteq_->BackgroundNoiseMode());
+ NetEqOutputType type;
+ int16_t output[kBlockSize32kHz]; // Maximum size is chosen.
+ test::AudioLoop input;
+ // We are using the same 32 kHz input file for all tests, regardless of
+ // |sampling_rate_hz|. The output may sound weird, but the test is still
+ // valid.
+ ASSERT_TRUE(input.Init(
+ webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"),
+ 10 * sampling_rate_hz, // Max 10 seconds loop length.
+ expected_samples_per_channel));
+
+ // Payload of 10 ms of PCM16 32 kHz.
+ uint8_t payload[kBlockSize32kHz * sizeof(int16_t)];
+ WebRtcRTPHeader rtp_info;
+ PopulateRtpInfo(0, 0, &rtp_info);
+ rtp_info.header.payloadType = payload_type;
+
+ int number_channels = 0;
+ int samples_per_channel = 0;
+
+ uint32_t receive_timestamp = 0;
+ for (int n = 0; n < 10; ++n) { // Insert few packets and get audio.
+ int enc_len_bytes =
+ WebRtcPcm16b_EncodeW16(input.GetNextBlock(),
+ expected_samples_per_channel,
+ reinterpret_cast<int16_t*>(payload));
+ ASSERT_EQ(enc_len_bytes, expected_samples_per_channel * 2);
+
+ number_channels = 0;
+ samples_per_channel = 0;
+ ASSERT_EQ(0,
+ neteq_->InsertPacket(
+ rtp_info, payload, enc_len_bytes, receive_timestamp));
+ ASSERT_EQ(0,
+ neteq_->GetAudio(kBlockSize32kHz,
+ output,
+ &samples_per_channel,
+ &number_channels,
+ &type));
+ ASSERT_EQ(1, number_channels);
+ ASSERT_EQ(expected_samples_per_channel, samples_per_channel);
+ ASSERT_EQ(kOutputNormal, type);
+
+ // Next packet.
+ rtp_info.header.timestamp += expected_samples_per_channel;
+ rtp_info.header.sequenceNumber++;
+ receive_timestamp += expected_samples_per_channel;
+ }
+
+ number_channels = 0;
+ samples_per_channel = 0;
+
+ // Get audio without inserting packets, expecting PLC and PLC-to-CNG. Pull
+ // one frame without checking speech-type. This is the first frame pulled
+ // without inserting any packet, and might not be labeled as PLC.
+ ASSERT_EQ(0,
+ neteq_->GetAudio(kBlockSize32kHz,
+ output,
+ &samples_per_channel,
+ &number_channels,
+ &type));
+ ASSERT_EQ(1, number_channels);
+ ASSERT_EQ(expected_samples_per_channel, samples_per_channel);
+
+ // To be able to test the fading of background noise we need at lease to
+ // pull 611 frames.
+ const int kFadingThreshold = 611;
+
+ // Test several CNG-to-PLC packet for the expected behavior. The number 20
+ // is arbitrary, but sufficiently large to test enough number of frames.
+ const int kNumPlcToCngTestFrames = 20;
+ bool plc_to_cng = false;
+ for (int n = 0; n < kFadingThreshold + kNumPlcToCngTestFrames; ++n) {
+ number_channels = 0;
+ samples_per_channel = 0;
+ memset(output, 1, sizeof(output)); // Set to non-zero.
+ ASSERT_EQ(0,
+ neteq_->GetAudio(kBlockSize32kHz,
+ output,
+ &samples_per_channel,
+ &number_channels,
+ &type));
+ ASSERT_EQ(1, number_channels);
+ ASSERT_EQ(expected_samples_per_channel, samples_per_channel);
+ if (type == kOutputPLCtoCNG) {
+ plc_to_cng = true;
+ double sum_squared = 0;
+ for (int k = 0; k < number_channels * samples_per_channel; ++k)
+ sum_squared += output[k] * output[k];
+ TestCondition(sum_squared, n > kFadingThreshold);
+ } else {
+ EXPECT_EQ(kOutputPLC, type);
+ }
+ }
+ EXPECT_TRUE(plc_to_cng); // Just to be sure that PLC-to-CNG has occurred.
+ }
+};
+
+class NetEqBgnTestOn : public NetEqBgnTest {
+ protected:
+ NetEqBgnTestOn() : NetEqBgnTest() {
+ config_.background_noise_mode = NetEq::kBgnOn;
+ }
+
+ void TestCondition(double sum_squared_noise, bool /*should_be_faded*/) {
+ EXPECT_NE(0, sum_squared_noise);
+ }
+};
+
+class NetEqBgnTestOff : public NetEqBgnTest {
+ protected:
+ NetEqBgnTestOff() : NetEqBgnTest() {
+ config_.background_noise_mode = NetEq::kBgnOff;
+ }
+
+ void TestCondition(double sum_squared_noise, bool /*should_be_faded*/) {
+ EXPECT_EQ(0, sum_squared_noise);
+ }
+};
+
+class NetEqBgnTestFade : public NetEqBgnTest {
+ protected:
+ NetEqBgnTestFade() : NetEqBgnTest() {
+ config_.background_noise_mode = NetEq::kBgnFade;
+ }
+
+ void TestCondition(double sum_squared_noise, bool should_be_faded) {
+ if (should_be_faded)
+ EXPECT_EQ(0, sum_squared_noise);
+ }
+};
+
+TEST_F(NetEqBgnTestOn, RunTest) {
+ CheckBgn(8000);
+ CheckBgn(16000);
+ CheckBgn(32000);
+}
+
+TEST_F(NetEqBgnTestOff, RunTest) {
+ CheckBgn(8000);
+ CheckBgn(16000);
+ CheckBgn(32000);
+}
+
+TEST_F(NetEqBgnTestFade, RunTest) {
+ CheckBgn(8000);
+ CheckBgn(16000);
+ CheckBgn(32000);
}
TEST_F(NetEqDecodingTest, SyncPacketInsert) {
diff --git a/modules/audio_coding/neteq/normal.cc b/modules/audio_coding/neteq/normal.cc
index bfde179..46d03fb 100644
--- a/modules/audio_coding/neteq/normal.cc
+++ b/modules/audio_coding/neteq/normal.cc
@@ -37,6 +37,11 @@
assert(output->Empty());
// Output should be empty at this point.
+ if (length % output->Channels() != 0) {
+ // The length does not match the number of channels.
+ output->Clear();
+ return 0;
+ }
output->PushBackInterleaved(input, length);
int16_t* signal = &(*output)[0][0];
@@ -78,7 +83,11 @@
scaling = std::max(scaling, 0); // |scaling| should always be >= 0.
int32_t energy = WebRtcSpl_DotProductWithScale(signal, signal,
energy_length, scaling);
- energy = energy / (energy_length >> scaling);
+ if ((energy_length >> scaling) > 0) {
+ energy = energy / (energy_length >> scaling);
+ } else {
+ energy = 0;
+ }
int mute_factor;
if ((energy != 0) &&
diff --git a/modules/audio_coding/neteq/normal_unittest.cc b/modules/audio_coding/neteq/normal_unittest.cc
index c855865..e96359a 100644
--- a/modules/audio_coding/neteq/normal_unittest.cc
+++ b/modules/audio_coding/neteq/normal_unittest.cc
@@ -14,12 +14,18 @@
#include <vector>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
#include "webrtc/modules/audio_coding/neteq/expand.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
+#include "webrtc/modules/audio_coding/neteq/mock/mock_expand.h"
#include "webrtc/modules/audio_coding/neteq/random_vector.h"
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+
+using ::testing::_;
namespace webrtc {
@@ -35,6 +41,80 @@
EXPECT_CALL(db, Die()); // Called when |db| goes out of scope.
}
+TEST(Normal, AvoidDivideByZero) {
+ WebRtcSpl_Init();
+ MockDecoderDatabase db;
+ int fs = 8000;
+ size_t channels = 1;
+ BackgroundNoise bgn(channels);
+ SyncBuffer sync_buffer(1, 1000);
+ RandomVector random_vector;
+ MockExpand expand(&bgn, &sync_buffer, &random_vector, fs, channels);
+ Normal normal(fs, &db, bgn, &expand);
+
+ int16_t input[1000] = {0};
+ scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
+ for (size_t i = 0; i < channels; ++i) {
+ mute_factor_array[i] = 16384;
+ }
+ AudioMultiVector output(channels);
+
+ // Zero input length.
+ EXPECT_EQ(
+ 0,
+ normal.Process(input, 0, kModeExpand, mute_factor_array.get(), &output));
+ EXPECT_EQ(0u, output.Size());
+
+ // Try to make energy_length >> scaling = 0;
+ EXPECT_CALL(expand, SetParametersForNormalAfterExpand());
+ EXPECT_CALL(expand, Process(_));
+ EXPECT_CALL(expand, Reset());
+ // If input_size_samples < 64, then energy_length in Normal::Process() will
+ // be equal to input_size_samples. Since the input is all zeros, decoded_max
+ // will be zero, and scaling will be >= 6. Thus, energy_length >> scaling = 0,
+ // and using this as a denominator would lead to problems.
+ int input_size_samples = 63;
+ EXPECT_EQ(input_size_samples,
+ normal.Process(input,
+ input_size_samples,
+ kModeExpand,
+ mute_factor_array.get(),
+ &output));
+
+ EXPECT_CALL(db, Die()); // Called when |db| goes out of scope.
+ EXPECT_CALL(expand, Die()); // Called when |expand| goes out of scope.
+}
+
+TEST(Normal, InputLengthAndChannelsDoNotMatch) {
+ WebRtcSpl_Init();
+ MockDecoderDatabase db;
+ int fs = 8000;
+ size_t channels = 2;
+ BackgroundNoise bgn(channels);
+ SyncBuffer sync_buffer(channels, 1000);
+ RandomVector random_vector;
+ MockExpand expand(&bgn, &sync_buffer, &random_vector, fs, channels);
+ Normal normal(fs, &db, bgn, &expand);
+
+ int16_t input[1000] = {0};
+ scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
+ for (size_t i = 0; i < channels; ++i) {
+ mute_factor_array[i] = 16384;
+ }
+ AudioMultiVector output(channels);
+
+ // Let the number of samples be one sample less than 80 samples per channel.
+ size_t input_len = 80 * channels - 1;
+ EXPECT_EQ(
+ 0,
+ normal.Process(
+ input, input_len, kModeExpand, mute_factor_array.get(), &output));
+ EXPECT_EQ(0u, output.Size());
+
+ EXPECT_CALL(db, Die()); // Called when |db| goes out of scope.
+ EXPECT_CALL(expand, Die()); // Called when |expand| goes out of scope.
+}
+
// TODO(hlundin): Write more tests.
} // namespace webrtc
diff --git a/modules/audio_coding/neteq/packet_buffer_unittest.cc b/modules/audio_coding/neteq/packet_buffer_unittest.cc
index 5e6b89f..d8af556 100644
--- a/modules/audio_coding/neteq/packet_buffer_unittest.cc
+++ b/modules/audio_coding/neteq/packet_buffer_unittest.cc
@@ -12,8 +12,8 @@
#include "webrtc/modules/audio_coding/neteq/packet_buffer.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
#include "webrtc/modules/audio_coding/neteq/packet.h"
diff --git a/modules/audio_coding/neteq/payload_splitter_unittest.cc b/modules/audio_coding/neteq/payload_splitter_unittest.cc
index 5cde1bd..cf29581 100644
--- a/modules/audio_coding/neteq/payload_splitter_unittest.cc
+++ b/modules/audio_coding/neteq/payload_splitter_unittest.cc
@@ -16,7 +16,7 @@
#include <utility> // pair
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
#include "webrtc/modules/audio_coding/neteq/packet.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
@@ -743,7 +743,7 @@
// Check first packet.
packet = packet_list.front();
EXPECT_EQ(0, packet->header.payloadType);
- EXPECT_EQ(kBaseTimestamp - 20 * 32, packet->header.timestamp);
+ EXPECT_EQ(kBaseTimestamp - 20 * 48, packet->header.timestamp);
EXPECT_EQ(10, packet->payload_length);
EXPECT_FALSE(packet->primary);
delete [] packet->payload;
diff --git a/modules/audio_coding/neteq/post_decode_vad_unittest.cc b/modules/audio_coding/neteq/post_decode_vad_unittest.cc
index ed48db8..65efa7a 100644
--- a/modules/audio_coding/neteq/post_decode_vad_unittest.cc
+++ b/modules/audio_coding/neteq/post_decode_vad_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/post_decode_vad.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/random_vector_unittest.cc b/modules/audio_coding/neteq/random_vector_unittest.cc
index cbdcdf7..ad8e32d 100644
--- a/modules/audio_coding/neteq/random_vector_unittest.cc
+++ b/modules/audio_coding/neteq/random_vector_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/random_vector.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/sync_buffer_unittest.cc b/modules/audio_coding/neteq/sync_buffer_unittest.cc
index 1a3d0fe..332ec2f 100644
--- a/modules/audio_coding/neteq/sync_buffer_unittest.cc
+++ b/modules/audio_coding/neteq/sync_buffer_unittest.cc
@@ -10,7 +10,7 @@
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.cc b/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.cc
index e175091..37e215b 100644
--- a/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.cc
+++ b/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.cc
@@ -29,7 +29,7 @@
uint16_t length, plen;
uint32_t offset;
- int packetLen;
+ int packetLen = 0;
bool readNextPacket = true;
while (readNextPacket) {
diff --git a/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.cc b/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.cc
index 22f18ef..7f94851 100644
--- a/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.cc
+++ b/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.cc
@@ -105,7 +105,7 @@
uint16_t length, plen;
uint32_t offset;
- int packetLen;
+ int packetLen = 0;
bool readNextPacket = true;
while (readNextPacket) {
diff --git a/modules/audio_coding/neteq/test/RTPcat.cc b/modules/audio_coding/neteq/test/RTPcat.cc
index f06b574..19a34ec 100644
--- a/modules/audio_coding/neteq/test/RTPcat.cc
+++ b/modules/audio_coding/neteq/test/RTPcat.cc
@@ -13,7 +13,7 @@
#include <algorithm>
#include <vector>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.h"
#define FIRSTLINELEN 40
diff --git a/modules/audio_coding/neteq/test/RTPencode.cc b/modules/audio_coding/neteq/test/RTPencode.cc
index 93b366b..92bccee 100644
--- a/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/modules/audio_coding/neteq/test/RTPencode.cc
@@ -1632,9 +1632,13 @@
cdlen=0;
while (cdlen<=0) {
#ifdef CODEC_ISAC /* floating point */
- cdlen=WebRtcIsac_Encode(ISAC_inst[k],&indata[noOfCalls*160],(int16_t*)encoded);
+ cdlen = WebRtcIsac_Encode(ISAC_inst[k],
+ &indata[noOfCalls * 160],
+ encoded);
#else /* fixed point */
- cdlen=WebRtcIsacfix_Encode(ISAC_inst[k],&indata[noOfCalls*160],(int16_t*)encoded);
+ cdlen = WebRtcIsacfix_Encode(ISAC_inst[k],
+ &indata[noOfCalls * 160],
+ encoded);
#endif
noOfCalls++;
}
@@ -1645,7 +1649,9 @@
int noOfCalls=0;
cdlen=0;
while (cdlen<=0) {
- cdlen=WebRtcIsac_Encode(ISACSWB_inst[k],&indata[noOfCalls*320],(int16_t*)encoded);
+ cdlen = WebRtcIsac_Encode(ISACSWB_inst[k],
+ &indata[noOfCalls * 320],
+ encoded);
noOfCalls++;
}
}
diff --git a/modules/audio_coding/neteq/test/RTPjitter.cc b/modules/audio_coding/neteq/test/RTPjitter.cc
index eeb4c90..75983d2 100644
--- a/modules/audio_coding/neteq/test/RTPjitter.cc
+++ b/modules/audio_coding/neteq/test/RTPjitter.cc
@@ -25,7 +25,7 @@
#include <assert.h>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/typedefs.h"
/*********************/
@@ -33,11 +33,13 @@
/*********************/
#define FIRSTLINELEN 40
-#define CHECK_NOT_NULL(a) if((a)==NULL){fprintf(stderr,"\n %s \n line: %d \nerror at %s\n",__FILE__,__LINE__,#a );return(-1);}
+#define CHECK_NOT_NULL(a) if((a)==NULL){ \
+ fprintf(stderr,"\n %s \n line: %d \nerror at %s\n",__FILE__,__LINE__,#a ); \
+ return(-1);}
struct arr_time {
- float time;
- uint32_t ix;
+ float time;
+ uint32_t ix;
};
int filelen(FILE *fid)
@@ -61,157 +63,167 @@
int main(int argc, char* argv[])
{
- unsigned int dat_len, rtp_len, Npack, k;
- arr_time *time_vec;
- char firstline[FIRSTLINELEN];
- unsigned char* rtp_vec = NULL;
+ unsigned int dat_len, rtp_len, Npack, k;
+ arr_time *time_vec;
+ char firstline[FIRSTLINELEN];
+ unsigned char* rtp_vec = NULL;
unsigned char** packet_ptr = NULL;
unsigned char* temp_packet = NULL;
- const unsigned int kRtpDumpHeaderSize = 4 + 4 + 4 + 2 + 2;
- uint16_t len;
- uint32_t *offset;
+ const unsigned int kRtpDumpHeaderSize = 4 + 4 + 4 + 2 + 2;
+ uint16_t len;
+ uint32_t *offset;
/* check number of parameters */
- if (argc != 4) {
- /* print help text and exit */
- printf("Apply jitter on RTP stream.\n");
- printf("The program reads an RTP stream and packet timing from two files.\n");
- printf("The RTP stream is modified to have the same jitter as described in the timing files.\n");
- printf("The format of the RTP stream file should be the same as for rtpplay,\n");
- printf("and can be obtained e.g., from Ethereal by using\n");
- printf("Statistics -> RTP -> Show All Streams -> [select a stream] -> Save As\n\n");
- printf("Usage:\n\n");
- printf("%s RTP_infile dat_file RTP_outfile\n", argv[0]);
- printf("where:\n");
+ if (argc != 4) {
+ /* print help text and exit */
+ printf("Apply jitter on RTP stream.\n");
+ printf("Reads an RTP stream and packet timing from two files.\n");
+ printf("The RTP stream is modified to have the same jitter as described in "
+ "the timing files.\n");
+ printf("The format of the RTP stream file should be the same as for \n");
+ printf("rtpplay, and can be obtained e.g., from Ethereal by using\n");
+ printf("Statistics -> RTP -> Show All Streams -> [select a stream] -> "
+ "Save As\n\n");
+ printf("Usage:\n\n");
+ printf("%s RTP_infile dat_file RTP_outfile\n", argv[0]);
+ printf("where:\n");
- printf("RTP_infile : RTP stream input file\n\n");
+ printf("RTP_infile : RTP stream input file\n\n");
- printf("dat_file : file with packet arrival times in ms\n\n");
+ printf("dat_file : file with packet arrival times in ms\n\n");
- printf("RTP_outfile : RTP stream output file\n\n");
+ printf("RTP_outfile : RTP stream output file\n\n");
- return(0);
- }
+ return(0);
+ }
- FILE* in_file=fopen(argv[1],"rb");
- CHECK_NOT_NULL(in_file);
- printf("Input file: %s\n",argv[1]);
- FILE* dat_file=fopen(argv[2],"rb");
- CHECK_NOT_NULL(dat_file);
- printf("Dat-file: %s\n",argv[2]);
- FILE* out_file=fopen(argv[3],"wb");
- CHECK_NOT_NULL(out_file);
- printf("Output file: %s\n\n",argv[3]);
-
- time_vec = (arr_time *) malloc(sizeof(arr_time)*(filelen(dat_file)/sizeof(float)) + 1000); // add 1000 bytes to avoid (rare) strange error
- if (time_vec==NULL) {
- fprintf(stderr, "Error: could not allocate memory for reading dat file\n");
- goto closing;
- }
+ FILE* in_file=fopen(argv[1],"rb");
+ CHECK_NOT_NULL(in_file);
+ printf("Input file: %s\n",argv[1]);
+ FILE* dat_file=fopen(argv[2],"rb");
+ CHECK_NOT_NULL(dat_file);
+ printf("Dat-file: %s\n",argv[2]);
+ FILE* out_file=fopen(argv[3],"wb");
+ CHECK_NOT_NULL(out_file);
+ printf("Output file: %s\n\n",argv[3]);
- dat_len=0;
- while(fread(&(time_vec[dat_len].time),sizeof(float),1,dat_file)>0) {
- time_vec[dat_len].ix=dat_len;
- dat_len++;
- }
-
+ // add 1000 bytes to avoid (rare) strange error.
+ time_vec = (arr_time *) malloc(sizeof(arr_time)
+ *(filelen(dat_file)/sizeof(float)) + 1000);
+ if (time_vec==NULL) {
+ fprintf(stderr, "Error: could not allocate memory for reading dat file\n");
+ goto closing;
+ }
+
+ dat_len=0;
+ while(fread(&(time_vec[dat_len].time),sizeof(float),1,dat_file)>0) {
+ time_vec[dat_len].ix=dat_len;
+ dat_len++;
+ }
+
if (dat_len == 0) {
fprintf(stderr, "Error: dat_file is empty, no arrival time is given.\n");
goto closing;
}
- qsort(time_vec,dat_len,sizeof(arr_time),compare_arr_time);
+ qsort(time_vec,dat_len,sizeof(arr_time),compare_arr_time);
- rtp_vec = (unsigned char *) malloc(sizeof(unsigned char)*filelen(in_file));
- if (rtp_vec==NULL) {
- fprintf(stderr,"Error: could not allocate memory for reading rtp file\n");
- goto closing;
- }
+ rtp_vec = (unsigned char *) malloc(sizeof(unsigned char)*filelen(in_file));
+ if (rtp_vec==NULL) {
+ fprintf(stderr,"Error: could not allocate memory for reading rtp file\n");
+ goto closing;
+ }
- // read file header and write directly to output file
- EXPECT_TRUE(fgets(firstline, FIRSTLINELEN, in_file) != NULL);
- EXPECT_GT(fputs(firstline, out_file), 0);
- EXPECT_EQ(kRtpDumpHeaderSize, fread(firstline, 1, kRtpDumpHeaderSize,
- in_file));
- EXPECT_EQ(kRtpDumpHeaderSize, fwrite(firstline, 1, kRtpDumpHeaderSize,
- out_file));
+ // read file header and write directly to output file
+ EXPECT_TRUE(fgets(firstline, FIRSTLINELEN, in_file) != NULL);
+ EXPECT_GT(fputs(firstline, out_file), 0);
+ EXPECT_EQ(kRtpDumpHeaderSize, fread(firstline, 1, kRtpDumpHeaderSize,
+ in_file));
+ EXPECT_EQ(kRtpDumpHeaderSize, fwrite(firstline, 1, kRtpDumpHeaderSize,
+ out_file));
- // read all RTP packets into vector
- rtp_len=0;
- Npack=0;
- len=(uint16_t) fread(&rtp_vec[rtp_len], sizeof(unsigned char), 2, in_file); // read length of first packet
- while(len==2) {
- len = ntohs(*((uint16_t *)(rtp_vec + rtp_len)));
- rtp_len += 2;
- if(fread(&rtp_vec[rtp_len], sizeof(unsigned char), len-2, in_file)!=(unsigned) (len-2)) {
- fprintf(stderr,"Error: currupt packet length\n");
- goto closing;
- }
- rtp_len += len-2;
- Npack++;
- len=(uint16_t) fread(&rtp_vec[rtp_len], sizeof(unsigned char), 2, in_file); // read length of next packet
- }
+ // read all RTP packets into vector
+ rtp_len=0;
+ Npack=0;
- if (Npack == 0) {
- fprintf(stderr, "Error: No RTP packet found.\n");
- goto closing;
- }
+ // read length of first packet.
+ len=(uint16_t) fread(&rtp_vec[rtp_len], sizeof(unsigned char), 2, in_file);
+ while(len==2) {
+ len = ntohs(*((uint16_t *)(rtp_vec + rtp_len)));
+ rtp_len += 2;
+ if(fread(&rtp_vec[rtp_len], sizeof(unsigned char),
+ len-2, in_file)!=(unsigned) (len-2)) {
+ fprintf(stderr,"Error: currupt packet length\n");
+ goto closing;
+ }
+ rtp_len += len-2;
+ Npack++;
- packet_ptr = (unsigned char **) malloc(Npack*sizeof(unsigned char*));
+ // read length of next packet.
+ len=(uint16_t) fread(&rtp_vec[rtp_len], sizeof(unsigned char), 2, in_file);
+ }
- packet_ptr[0]=rtp_vec;
- k=1;
- while(k<Npack) {
- len = ntohs(*((uint16_t *) packet_ptr[k-1]));
- packet_ptr[k]=packet_ptr[k-1]+len;
- k++;
- }
+ if (Npack == 0) {
+ fprintf(stderr, "Error: No RTP packet found.\n");
+ goto closing;
+ }
- for(k=0; k<dat_len && k<Npack; k++) {
- if(time_vec[k].time < FLT_MAX && time_vec[k].ix < Npack){
- temp_packet = packet_ptr[time_vec[k].ix];
- offset = (uint32_t *) (temp_packet+4);
- if ( time_vec[k].time >= 0 ) {
- *offset = htonl((uint32_t) time_vec[k].time);
- }
- else {
- *offset = htonl((uint32_t) 0);
- fprintf(stderr, "Warning: negative receive time in dat file transformed to 0.\n");
- }
+ packet_ptr = (unsigned char **) malloc(Npack*sizeof(unsigned char*));
- // write packet to file
- if (fwrite(temp_packet, sizeof(unsigned char),
- ntohs(*((uint16_t*) temp_packet)),
- out_file) !=
- ntohs(*((uint16_t*) temp_packet))) {
- return -1;
- }
- }
- }
+ packet_ptr[0]=rtp_vec;
+ k=1;
+ while(k<Npack) {
+ len = ntohs(*((uint16_t *) packet_ptr[k-1]));
+ packet_ptr[k]=packet_ptr[k-1]+len;
+ k++;
+ }
+
+ for(k=0; k<dat_len && k<Npack; k++) {
+ if(time_vec[k].time < FLT_MAX && time_vec[k].ix < Npack){
+ temp_packet = packet_ptr[time_vec[k].ix];
+ offset = (uint32_t *) (temp_packet+4);
+ if ( time_vec[k].time >= 0 ) {
+ *offset = htonl((uint32_t) time_vec[k].time);
+ }
+ else {
+ *offset = htonl((uint32_t) 0);
+ fprintf(stderr, "Warning: negative receive time in dat file transformed"
+ " to 0.\n");
+ }
+
+ // write packet to file
+ if (fwrite(temp_packet, sizeof(unsigned char),
+ ntohs(*((uint16_t*) temp_packet)),
+ out_file) !=
+ ntohs(*((uint16_t*) temp_packet))) {
+ return -1;
+ }
+ }
+ }
closing:
- free(time_vec);
- free(rtp_vec);
+ free(time_vec);
+ free(rtp_vec);
if (packet_ptr != NULL) {
- free(packet_ptr);
+ free(packet_ptr);
}
fclose(in_file);
- fclose(dat_file);
- fclose(out_file);
+ fclose(dat_file);
+ fclose(out_file);
- return(0);
+ return(0);
}
int compare_arr_time(const void *xp, const void *yp) {
- if(((arr_time *)xp)->time == ((arr_time *)yp)->time)
- return(0);
- else if(((arr_time *)xp)->time > ((arr_time *)yp)->time)
- return(1);
+ if(((arr_time *)xp)->time == ((arr_time *)yp)->time)
+ return(0);
+ else if(((arr_time *)xp)->time > ((arr_time *)yp)->time)
+ return(1);
- return(-1);
+ return(-1);
}
diff --git a/modules/audio_coding/neteq/test/RTPtimeshift.cc b/modules/audio_coding/neteq/test/RTPtimeshift.cc
index 15ffdf6..f27819d 100644
--- a/modules/audio_coding/neteq/test/RTPtimeshift.cc
+++ b/modules/audio_coding/neteq/test/RTPtimeshift.cc
@@ -13,7 +13,7 @@
#include <vector>
#include "NETEQTEST_RTPpacket.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
/*********************/
/* Misc. definitions */
diff --git a/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc b/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
new file mode 100644
index 0000000..b672a0c
--- /dev/null
+++ b/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h"
+#include "webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h"
+#include "webrtc/test/testsupport/fileutils.h"
+
+using google::RegisterFlagValidator;
+using google::ParseCommandLineFlags;
+using std::string;
+using testing::InitGoogleTest;
+
+namespace webrtc {
+namespace test {
+
+static const int kIsacBlockDurationMs = 30;
+static const int kIsacInputSamplingKhz = 16;
+static const int kIsacOutputSamplingKhz = 16;
+
+// Define switch for input file name.
+static bool ValidateInFilename(const char* flagname, const string& value) {
+ FILE* fid = fopen(value.c_str(), "rb");
+ if (fid != NULL) {
+ fclose(fid);
+ return true;
+ }
+ printf("Invalid input filename.");
+ return false;
+}
+
+DEFINE_string(in_filename,
+ ResourcePath("audio_coding/speech_mono_16kHz", "pcm"),
+ "Filename for input audio (should be 16 kHz sampled mono).");
+
+static const bool in_filename_dummy =
+ RegisterFlagValidator(&FLAGS_in_filename, &ValidateInFilename);
+
+// Define switch for output file name.
+static bool ValidateOutFilename(const char* flagname, const string& value) {
+ FILE* fid = fopen(value.c_str(), "wb");
+ if (fid != NULL) {
+ fclose(fid);
+ return true;
+ }
+ printf("Invalid output filename.");
+ return false;
+}
+
+DEFINE_string(out_filename, OutputPath() + "neteq4_isac_quality_test.pcm",
+ "Name of output audio file.");
+
+static const bool out_filename_dummy =
+ RegisterFlagValidator(&FLAGS_out_filename, &ValidateOutFilename);
+
+// Define switch for bir rate.
+static bool ValidateBitRate(const char* flagname, int32_t value) {
+ if (value >= 10 && value <= 32)
+ return true;
+ printf("Invalid bit rate, should be between 10 and 32 kbps.");
+ return false;
+}
+
+DEFINE_int32(bit_rate_kbps, 32, "Target bit rate (kbps).");
+
+static const bool bit_rate_dummy =
+ RegisterFlagValidator(&FLAGS_bit_rate_kbps, &ValidateBitRate);
+
+// Define switch for runtime.
+static bool ValidateRuntime(const char* flagname, int32_t value) {
+ if (value > 0)
+ return true;
+ printf("Invalid runtime, should be greater than 0.");
+ return false;
+}
+
+DEFINE_int32(runtime_ms, 10000, "Simulated runtime (milliseconds).");
+
+static const bool runtime_dummy =
+ RegisterFlagValidator(&FLAGS_runtime_ms, &ValidateRuntime);
+
+class NetEqIsacQualityTest : public NetEqQualityTest {
+ protected:
+ NetEqIsacQualityTest();
+ virtual void SetUp() OVERRIDE;
+ virtual void TearDown() OVERRIDE;
+ virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
+ uint8_t* payload, int max_bytes);
+ private:
+ ISACFIX_MainStruct* isac_encoder_;
+ int bit_rate_kbps_;
+};
+
+NetEqIsacQualityTest::NetEqIsacQualityTest()
+ : NetEqQualityTest(kIsacBlockDurationMs, kIsacInputSamplingKhz,
+ kIsacOutputSamplingKhz,
+ kDecoderISAC,
+ 1,
+ FLAGS_in_filename,
+ FLAGS_out_filename),
+ isac_encoder_(NULL),
+ bit_rate_kbps_(FLAGS_bit_rate_kbps) {
+}
+
+void NetEqIsacQualityTest::SetUp() {
+ // Create encoder memory.
+ WebRtcIsacfix_Create(&isac_encoder_);
+ ASSERT_TRUE(isac_encoder_ != NULL);
+ EXPECT_EQ(0, WebRtcIsacfix_EncoderInit(isac_encoder_, 1));
+ // Set bitrate and block length.
+ EXPECT_EQ(0, WebRtcIsacfix_Control(isac_encoder_, bit_rate_kbps_ * 1000,
+ kIsacBlockDurationMs));
+ NetEqQualityTest::SetUp();
+}
+
+void NetEqIsacQualityTest::TearDown() {
+ // Free memory.
+ EXPECT_EQ(0, WebRtcIsacfix_Free(isac_encoder_));
+ NetEqQualityTest::TearDown();
+}
+
+int NetEqIsacQualityTest::EncodeBlock(int16_t* in_data,
+ int block_size_samples,
+ uint8_t* payload, int max_bytes) {
+ // ISAC takes 10 ms for every call.
+ const int subblocks = kIsacBlockDurationMs / 10;
+ const int subblock_length = 10 * kIsacInputSamplingKhz;
+ int value = 0;
+
+ int pointer = 0;
+ for (int idx = 0; idx < subblocks; idx++, pointer += subblock_length) {
+ // The Isac encoder does not perform encoding (and returns 0) until it
+ // receives a sequence of sub-blocks that amount to the frame duration.
+ EXPECT_EQ(0, value);
+ value = WebRtcIsacfix_Encode(isac_encoder_, &in_data[pointer], payload);
+ }
+ EXPECT_GT(value, 0);
+ return value;
+}
+
+TEST_F(NetEqIsacQualityTest, Test) {
+ Simulate(FLAGS_runtime_ms);
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc b/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc
index ad6d8ec..dee99b8 100644
--- a/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc
@@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <gflags/gflags.h>
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
#include "webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h"
#include "webrtc/test/testsupport/fileutils.h"
@@ -22,9 +21,9 @@
namespace test {
static const int kOpusBlockDurationMs = 20;
-static const int kOpusInputSamplingKhz = 48;
-static const int kOpusOutputSamplingKhz = 32;
+static const int kOpusSamplingKhz = 48;
+// Define switch for input file name.
static bool ValidateInFilename(const char* flagname, const string& value) {
FILE* fid = fopen(value.c_str(), "rb");
if (fid != NULL) {
@@ -34,12 +33,15 @@
printf("Invalid input filename.");
return false;
}
+
DEFINE_string(in_filename,
ResourcePath("audio_coding/speech_mono_32_48kHz", "pcm"),
"Filename for input audio (should be 48 kHz sampled raw data).");
+
static const bool in_filename_dummy =
RegisterFlagValidator(&FLAGS_in_filename, &ValidateInFilename);
+// Define switch for output file name.
static bool ValidateOutFilename(const char* flagname, const string& value) {
FILE* fid = fopen(value.c_str(), "wb");
if (fid != NULL) {
@@ -49,50 +51,60 @@
printf("Invalid output filename.");
return false;
}
+
DEFINE_string(out_filename, OutputPath() + "neteq4_opus_fec_quality_test.pcm",
"Name of output audio file.");
+
static const bool out_filename_dummy =
RegisterFlagValidator(&FLAGS_out_filename, &ValidateOutFilename);
+// Define switch for channels.
static bool ValidateChannels(const char* flagname, int32_t value) {
if (value == 1 || value == 2)
return true;
printf("Invalid number of channels, should be either 1 or 2.");
return false;
}
+
DEFINE_int32(channels, 1, "Number of channels in input audio.");
+
static const bool channels_dummy =
RegisterFlagValidator(&FLAGS_channels, &ValidateChannels);
+// Define switch for bit rate.
static bool ValidateBitRate(const char* flagname, int32_t value) {
if (value >= 6 && value <= 510)
return true;
printf("Invalid bit rate, should be between 6 and 510 kbps.");
return false;
}
+
DEFINE_int32(bit_rate_kbps, 32, "Target bit rate (kbps).");
+
static const bool bit_rate_dummy =
RegisterFlagValidator(&FLAGS_bit_rate_kbps, &ValidateBitRate);
+// Define switch for reported packet loss rate.
static bool ValidatePacketLossRate(const char* flagname, int32_t value) {
if (value >= 0 && value <= 100)
return true;
printf("Invalid packet loss percentile, should be between 0 and 100.");
return false;
}
+
DEFINE_int32(reported_loss_rate, 10, "Reported percentile of packet loss.");
+
static const bool reported_loss_rate_dummy =
RegisterFlagValidator(&FLAGS_reported_loss_rate, &ValidatePacketLossRate);
-DEFINE_int32(actual_loss_rate, 0, "Actual percentile of packet loss.");
-static const bool actual_loss_rate_dummy =
- RegisterFlagValidator(&FLAGS_actual_loss_rate, &ValidatePacketLossRate);
+// Define switch for runtime.
static bool ValidateRuntime(const char* flagname, int32_t value) {
if (value > 0)
return true;
printf("Invalid runtime, should be greater than 0.");
return false;
}
+
DEFINE_int32(runtime_ms, 10000, "Simulated runtime (milliseconds).");
static const bool runtime_dummy =
RegisterFlagValidator(&FLAGS_runtime_ms, &ValidateRuntime);
@@ -106,28 +118,26 @@
virtual void TearDown() OVERRIDE;
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
uint8_t* payload, int max_bytes);
- virtual bool PacketLost(int packet_input_time_ms);
private:
WebRtcOpusEncInst* opus_encoder_;
int channels_;
int bit_rate_kbps_;
bool fec_;
int target_loss_rate_;
- int actual_loss_rate_;
};
NetEqOpusFecQualityTest::NetEqOpusFecQualityTest()
- : NetEqQualityTest(kOpusBlockDurationMs, kOpusInputSamplingKhz,
- kOpusOutputSamplingKhz,
+ : NetEqQualityTest(kOpusBlockDurationMs, kOpusSamplingKhz,
+ kOpusSamplingKhz,
(FLAGS_channels == 1) ? kDecoderOpus : kDecoderOpus_2ch,
- FLAGS_channels, 0.0f, FLAGS_in_filename,
+ FLAGS_channels,
+ FLAGS_in_filename,
FLAGS_out_filename),
opus_encoder_(NULL),
channels_(FLAGS_channels),
bit_rate_kbps_(FLAGS_bit_rate_kbps),
fec_(FLAGS_fec),
- target_loss_rate_(FLAGS_reported_loss_rate),
- actual_loss_rate_(FLAGS_actual_loss_rate) {
+ target_loss_rate_(FLAGS_reported_loss_rate) {
}
void NetEqOpusFecQualityTest::SetUp() {
@@ -138,9 +148,9 @@
EXPECT_EQ(0, WebRtcOpus_SetBitRate(opus_encoder_, bit_rate_kbps_ * 1000));
if (fec_) {
EXPECT_EQ(0, WebRtcOpus_EnableFec(opus_encoder_));
- EXPECT_EQ(0, WebRtcOpus_SetPacketLossRate(opus_encoder_,
- target_loss_rate_));
}
+ EXPECT_EQ(0, WebRtcOpus_SetPacketLossRate(opus_encoder_,
+ target_loss_rate_));
NetEqQualityTest::SetUp();
}
@@ -160,16 +170,6 @@
return value;
}
-bool NetEqOpusFecQualityTest::PacketLost(int packet_input_time_ms) {
- static int packets = 0, lost_packets = 0;
- packets++;
- if (lost_packets * 100 < actual_loss_rate_ * packets) {
- lost_packets++;
- return true;
- }
- return false;
-}
-
TEST_F(NetEqOpusFecQualityTest, Test) {
Simulate(FLAGS_runtime_ms);
}
diff --git a/modules/audio_coding/neteq/time_stretch_unittest.cc b/modules/audio_coding/neteq/time_stretch_unittest.cc
index 64789b4..3d1e069 100644
--- a/modules/audio_coding/neteq/time_stretch_unittest.cc
+++ b/modules/audio_coding/neteq/time_stretch_unittest.cc
@@ -13,7 +13,7 @@
#include "webrtc/modules/audio_coding/neteq/accelerate.h"
#include "webrtc/modules/audio_coding/neteq/preemptive_expand.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/timestamp_scaler.cc b/modules/audio_coding/neteq/timestamp_scaler.cc
index 0189013..1809324 100644
--- a/modules/audio_coding/neteq/timestamp_scaler.cc
+++ b/modules/audio_coding/neteq/timestamp_scaler.cc
@@ -48,8 +48,6 @@
denominator_ = 1;
break;
}
- case kDecoderOpus:
- case kDecoderOpus_2ch:
case kDecoderISACfb:
case kDecoderCNGswb48kHz: {
// Use timestamp scaling with factor 2/3 (32 kHz sample rate, but RTP
diff --git a/modules/audio_coding/neteq/timestamp_scaler_unittest.cc b/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
index 8cbbfa3..4b6d940 100644
--- a/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
+++ b/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
@@ -10,8 +10,8 @@
#include "webrtc/modules/audio_coding/neteq/timestamp_scaler.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
#include "webrtc/modules/audio_coding/neteq/packet.h"
@@ -252,10 +252,14 @@
EXPECT_CALL(db, Die()); // Called when database object is deleted.
}
+// TODO(minyue): This test becomes trivial since Opus does not need a timestamp
+// scaler. Therefore, this test may be removed in future. There is no harm to
+// keep it, since it can be taken as a test case for the situation of a trivial
+// timestamp scaler.
TEST(TimestampScaler, TestOpusLargeStep) {
MockDecoderDatabase db;
DecoderDatabase::DecoderInfo info;
- info.codec_type = kDecoderOpus; // Uses a factor 2/3 scaling.
+ info.codec_type = kDecoderOpus;
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
.WillRepeatedly(Return(&info));
@@ -273,8 +277,7 @@
scaler.ToInternal(external_timestamp, kRtpPayloadType));
// Scale back.
EXPECT_EQ(external_timestamp, scaler.ToExternal(internal_timestamp));
- // Internal timestamp should be incremented with twice the step.
- internal_timestamp += 2 * kStep / 3;
+ internal_timestamp += kStep;
}
EXPECT_CALL(db, Die()); // Called when database object is deleted.
@@ -283,7 +286,7 @@
TEST(TimestampScaler, TestIsacFbLargeStep) {
MockDecoderDatabase db;
DecoderDatabase::DecoderInfo info;
- info.codec_type = kDecoderISACfb; // Uses a factor 2/3 scaling.
+ info.codec_type = kDecoderISACfb;
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
.WillRepeatedly(Return(&info));
@@ -301,7 +304,7 @@
scaler.ToInternal(external_timestamp, kRtpPayloadType));
// Scale back.
EXPECT_EQ(external_timestamp, scaler.ToExternal(internal_timestamp));
- // Internal timestamp should be incremented with twice the step.
+ // Internal timestamp should be incremented with two-thirds the step.
internal_timestamp += 2 * kStep / 3;
}
diff --git a/modules/audio_coding/neteq/tools/audio_sink.h b/modules/audio_coding/neteq/tools/audio_sink.h
index 5743c36..474ec1c 100644
--- a/modules/audio_coding/neteq/tools/audio_sink.h
+++ b/modules/audio_coding/neteq/tools/audio_sink.h
@@ -41,6 +41,23 @@
DISALLOW_COPY_AND_ASSIGN(AudioSink);
};
+// Forks the output audio to two AudioSink objects.
+class AudioSinkFork : public AudioSink {
+ public:
+ AudioSinkFork(AudioSink* left, AudioSink* right)
+ : left_sink_(left), right_sink_(right) {}
+
+ virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
+ return left_sink_->WriteArray(audio, num_samples) &&
+ right_sink_->WriteArray(audio, num_samples);
+ }
+
+ private:
+ AudioSink* left_sink_;
+ AudioSink* right_sink_;
+
+ DISALLOW_COPY_AND_ASSIGN(AudioSinkFork);
+};
} // namespace test
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_
diff --git a/modules/audio_coding/neteq/tools/input_audio_file.cc b/modules/audio_coding/neteq/tools/input_audio_file.cc
index 8063173..6bbb328 100644
--- a/modules/audio_coding/neteq/tools/input_audio_file.cc
+++ b/modules/audio_coding/neteq/tools/input_audio_file.cc
@@ -40,8 +40,11 @@
void InputAudioFile::DuplicateInterleaved(const int16_t* source, size_t samples,
size_t channels,
int16_t* destination) {
- for (size_t i = 0; i < samples; ++i) {
- for (size_t j = 0; j < channels; ++j) {
+ // Start from the end of |source| and |destination|, and work towards the
+ // beginning. This is to allow in-place interleaving of the same array (i.e.,
+ // |source| and |destination| are the same array).
+ for (int i = static_cast<int>(samples - 1); i >= 0; --i) {
+ for (int j = static_cast<int>(channels - 1); j >= 0; --j) {
destination[i * channels + j] = source[i];
}
}
diff --git a/modules/audio_coding/neteq/tools/input_audio_file.h b/modules/audio_coding/neteq/tools/input_audio_file.h
index 274f8ea..f546119 100644
--- a/modules/audio_coding/neteq/tools/input_audio_file.h
+++ b/modules/audio_coding/neteq/tools/input_audio_file.h
@@ -37,7 +37,8 @@
// Creates a multi-channel signal from a mono signal. Each sample is repeated
// |channels| times to create an interleaved multi-channel signal where all
// channels are identical. The output |destination| must have the capacity to
- // hold samples * channels elements.
+ // hold samples * channels elements. Note that |source| and |destination| can
+ // be the same array (i.e., point to the same address).
static void DuplicateInterleaved(const int16_t* source, size_t samples,
size_t channels, int16_t* destination);
diff --git a/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc b/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc
new file mode 100644
index 0000000..13d847b
--- /dev/null
+++ b/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+// Unit tests for test InputAudioFile class.
+
+#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace webrtc {
+namespace test {
+
+TEST(TestInputAudioFile, DuplicateInterleaveSeparateSrcDst) {
+ static const size_t kSamples = 10;
+ static const size_t kChannels = 2;
+ int16_t input[kSamples];
+ for (size_t i = 0; i < kSamples; ++i) {
+ input[i] = i;
+ }
+ int16_t output[kSamples * kChannels];
+ InputAudioFile::DuplicateInterleaved(input, kSamples, kChannels, output);
+
+ // Verify output
+ int16_t* output_ptr = output;
+ for (size_t i = 0; i < kSamples; ++i) {
+ for (size_t j = 0; j < kChannels; ++j) {
+ EXPECT_EQ(static_cast<int16_t>(i), *output_ptr++);
+ }
+ }
+}
+
+TEST(TestInputAudioFile, DuplicateInterleaveSameSrcDst) {
+ static const size_t kSamples = 10;
+ static const size_t kChannels = 5;
+ int16_t input[kSamples * kChannels];
+ for (size_t i = 0; i < kSamples; ++i) {
+ input[i] = i;
+ }
+ InputAudioFile::DuplicateInterleaved(input, kSamples, kChannels, input);
+
+ // Verify output
+ int16_t* output_ptr = input;
+ for (size_t i = 0; i < kSamples; ++i) {
+ for (size_t j = 0; j < kChannels; ++j) {
+ EXPECT_EQ(static_cast<int16_t>(i), *output_ptr++);
+ }
+ }
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/modules/audio_coding/neteq/tools/neteq_quality_test.cc b/modules/audio_coding/neteq/tools/neteq_quality_test.cc
index fc5d8ab..8328855 100644
--- a/modules/audio_coding/neteq/tools/neteq_quality_test.cc
+++ b/modules/audio_coding/neteq/tools/neteq_quality_test.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <math.h>
#include <stdio.h>
#include "webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h"
@@ -16,18 +17,116 @@
const uint8_t kPayloadType = 95;
const int kOutputSizeMs = 10;
+const int kInitSeed = 0x12345678;
+const int kPacketLossTimeUnitMs = 10;
+
+// Define switch for packet loss rate.
+static bool ValidatePacketLossRate(const char* /* flag_name */, int32_t value) {
+ if (value >= 0 && value <= 100)
+ return true;
+ printf("Invalid packet loss percentile, should be between 0 and 100.");
+ return false;
+}
+
+DEFINE_int32(packet_loss_rate, 10, "Percentile of packet loss.");
+
+static const bool packet_loss_rate_dummy =
+ RegisterFlagValidator(&FLAGS_packet_loss_rate, &ValidatePacketLossRate);
+
+// Define switch for random loss mode.
+static bool ValidateRandomLossMode(const char* /* flag_name */, int32_t value) {
+ if (value >= 0 && value <= 2)
+ return true;
+ printf("Invalid random packet loss mode, should be between 0 and 2.");
+ return false;
+}
+
+DEFINE_int32(random_loss_mode, 1,
+ "Random loss mode: 0--no loss, 1--uniform loss, 2--Gilbert Elliot loss.");
+static const bool random_loss_mode_dummy =
+ RegisterFlagValidator(&FLAGS_random_loss_mode, &ValidateRandomLossMode);
+
+// Define switch for burst length.
+static bool ValidateBurstLength(const char* /* flag_name */, int32_t value) {
+ if (value >= kPacketLossTimeUnitMs)
+ return true;
+ printf("Invalid burst length, should be greater than %d ms.",
+ kPacketLossTimeUnitMs);
+ return false;
+}
+
+DEFINE_int32(burst_length, 30,
+ "Burst length in milliseconds, only valid for Gilbert Elliot loss.");
+
+static const bool burst_length_dummy =
+ RegisterFlagValidator(&FLAGS_burst_length, &ValidateBurstLength);
+
+// Define switch for drift factor.
+static bool ValidateDriftFactor(const char* /* flag_name */, double value) {
+ if (value > -0.1)
+ return true;
+ printf("Invalid drift factor, should be greater than -0.1.");
+ return false;
+}
+
+DEFINE_double(drift_factor, 0.0, "Time drift factor.");
+
+static const bool drift_factor_dummy =
+ RegisterFlagValidator(&FLAGS_drift_factor, &ValidateDriftFactor);
+
+// ProbTrans00Solver() is to calculate the transition probability from no-loss
+// state to itself in a modified Gilbert Elliot packet loss model. The result is
+// to achieve the target packet loss rate |loss_rate|, when a packet is not
+// lost only if all |units| drawings within the duration of the packet result in
+// no-loss.
+static double ProbTrans00Solver(int units, double loss_rate,
+ double prob_trans_10) {
+ if (units == 1)
+ return prob_trans_10 / (1.0f - loss_rate) - prob_trans_10;
+// 0 == prob_trans_00 ^ (units - 1) + (1 - loss_rate) / prob_trans_10 *
+// prob_trans_00 - (1 - loss_rate) * (1 + 1 / prob_trans_10).
+// There is a unique solution between 0.0 and 1.0, due to the monotonicity and
+// an opposite sign at 0.0 and 1.0.
+// For simplicity, we reformulate the equation as
+// f(x) = x ^ (units - 1) + a x + b.
+// Its derivative is
+// f'(x) = (units - 1) x ^ (units - 2) + a.
+// The derivative is strictly greater than 0 when x is between 0 and 1.
+// We use Newton's method to solve the equation, iteration is
+// x(k+1) = x(k) - f(x) / f'(x);
+ const double kPrecision = 0.001f;
+ const int kIterations = 100;
+ const double a = (1.0f - loss_rate) / prob_trans_10;
+ const double b = (loss_rate - 1.0f) * (1.0f + 1.0f / prob_trans_10);
+ double x = 0.0f; // Starting point;
+ double f = b;
+ double f_p;
+ int iter = 0;
+ while ((f >= kPrecision || f <= -kPrecision) && iter < kIterations) {
+ f_p = (units - 1.0f) * pow(x, units - 2) + a;
+ x -= f / f_p;
+ if (x > 1.0f) {
+ x = 1.0f;
+ } else if (x < 0.0f) {
+ x = 0.0f;
+ }
+ f = pow(x, units - 1) + a * x + b;
+ iter ++;
+ }
+ return x;
+}
NetEqQualityTest::NetEqQualityTest(int block_duration_ms,
int in_sampling_khz,
int out_sampling_khz,
enum NetEqDecoder decoder_type,
int channels,
- double drift_factor,
std::string in_filename,
std::string out_filename)
: decoded_time_ms_(0),
decodable_time_ms_(0),
- drift_factor_(drift_factor),
+ drift_factor_(FLAGS_drift_factor),
+ packet_loss_rate_(FLAGS_packet_loss_rate),
block_duration_ms_(block_duration_ms),
in_sampling_khz_(in_sampling_khz),
out_sampling_khz_(out_sampling_khz),
@@ -35,14 +134,17 @@
channels_(channels),
in_filename_(in_filename),
out_filename_(out_filename),
+ log_filename_(out_filename + ".log"),
in_size_samples_(in_sampling_khz_ * block_duration_ms_),
out_size_samples_(out_sampling_khz_ * kOutputSizeMs),
payload_size_bytes_(0),
max_payload_bytes_(0),
in_file_(new InputAudioFile(in_filename_)),
out_file_(NULL),
+ log_file_(NULL),
rtp_generator_(new RtpGenerator(in_sampling_khz_, 0, 0,
- decodable_time_ms_)) {
+ decodable_time_ms_)),
+ total_payload_size_bytes_(0) {
NetEq::Config config;
config.sample_rate_hz = out_sampling_khz_ * 1000;
neteq_.reset(NetEq::Create(config));
@@ -52,27 +154,134 @@
out_data_.reset(new int16_t[out_size_samples_ * channels_]);
}
+bool NoLoss::Lost() {
+ return false;
+}
+
+UniformLoss::UniformLoss(double loss_rate)
+ : loss_rate_(loss_rate) {
+}
+
+bool UniformLoss::Lost() {
+ int drop_this = rand();
+ return (drop_this < loss_rate_ * RAND_MAX);
+}
+
+GilbertElliotLoss::GilbertElliotLoss(double prob_trans_11, double prob_trans_01)
+ : prob_trans_11_(prob_trans_11),
+ prob_trans_01_(prob_trans_01),
+ lost_last_(false),
+ uniform_loss_model_(new UniformLoss(0)) {
+}
+
+bool GilbertElliotLoss::Lost() {
+ // Simulate bursty channel (Gilbert model).
+ // (1st order) Markov chain model with memory of the previous/last
+ // packet state (lost or received).
+ if (lost_last_) {
+ // Previous packet was not received.
+ uniform_loss_model_->set_loss_rate(prob_trans_11_);
+ return lost_last_ = uniform_loss_model_->Lost();
+ } else {
+ uniform_loss_model_->set_loss_rate(prob_trans_01_);
+ return lost_last_ = uniform_loss_model_->Lost();
+ }
+}
+
void NetEqQualityTest::SetUp() {
out_file_ = fopen(out_filename_.c_str(), "wb");
+ log_file_ = fopen(log_filename_.c_str(), "wt");
ASSERT_TRUE(out_file_ != NULL);
ASSERT_EQ(0, neteq_->RegisterPayloadType(decoder_type_, kPayloadType));
rtp_generator_->set_drift_factor(drift_factor_);
+
+ int units = block_duration_ms_ / kPacketLossTimeUnitMs;
+ switch (FLAGS_random_loss_mode) {
+ case 1: {
+ // |unit_loss_rate| is the packet loss rate for each unit time interval
+ // (kPacketLossTimeUnitMs). Since a packet loss event is generated if any
+ // of |block_duration_ms_ / kPacketLossTimeUnitMs| unit time intervals of
+ // a full packet duration is drawn with a loss, |unit_loss_rate| fulfills
+ // (1 - unit_loss_rate) ^ (block_duration_ms_ / kPacketLossTimeUnitMs) ==
+ // 1 - packet_loss_rate.
+ double unit_loss_rate = (1.0f - pow(1.0f - 0.01f * packet_loss_rate_,
+ 1.0f / units));
+ loss_model_.reset(new UniformLoss(unit_loss_rate));
+ break;
+ }
+ case 2: {
+ // |FLAGS_burst_length| should be integer times of kPacketLossTimeUnitMs.
+ ASSERT_EQ(0, FLAGS_burst_length % kPacketLossTimeUnitMs);
+
+ // We do not allow 100 percent packet loss in Gilbert Elliot model, which
+ // makes no sense.
+ ASSERT_GT(100, packet_loss_rate_);
+
+ // To guarantee the overall packet loss rate, transition probabilities
+ // need to satisfy:
+ // pi_0 * (1 - prob_trans_01_) ^ units +
+ // pi_1 * prob_trans_10_ ^ (units - 1) == 1 - loss_rate
+ // pi_0 = prob_trans_10 / (prob_trans_10 + prob_trans_01_)
+ // is the stationary state probability of no-loss
+ // pi_1 = prob_trans_01_ / (prob_trans_10 + prob_trans_01_)
+ // is the stationary state probability of loss
+ // After a derivation prob_trans_00 should satisfy:
+ // prob_trans_00 ^ (units - 1) = (loss_rate - 1) / prob_trans_10 *
+ // prob_trans_00 + (1 - loss_rate) * (1 + 1 / prob_trans_10).
+ double loss_rate = 0.01f * packet_loss_rate_;
+ double prob_trans_10 = 1.0f * kPacketLossTimeUnitMs / FLAGS_burst_length;
+ double prob_trans_00 = ProbTrans00Solver(units, loss_rate, prob_trans_10);
+ loss_model_.reset(new GilbertElliotLoss(1.0f - prob_trans_10,
+ 1.0f - prob_trans_00));
+ break;
+ }
+ default: {
+ loss_model_.reset(new NoLoss);
+ break;
+ }
+ }
+
+ // Make sure that the packet loss profile is same for all derived tests.
+ srand(kInitSeed);
}
void NetEqQualityTest::TearDown() {
fclose(out_file_);
}
+bool NetEqQualityTest::PacketLost() {
+ int cycles = block_duration_ms_ / kPacketLossTimeUnitMs;
+
+ // The loop is to make sure that codecs with different block lengths share the
+ // same packet loss profile.
+ bool lost = false;
+ for (int idx = 0; idx < cycles; idx ++) {
+ if (loss_model_->Lost()) {
+ // The packet will be lost if any of the drawings indicates a loss, but
+ // the loop has to go on to make sure that codecs with different block
+ // lengths keep the same pace.
+ lost = true;
+ }
+ }
+ return lost;
+}
+
int NetEqQualityTest::Transmit() {
int packet_input_time_ms =
rtp_generator_->GetRtpHeader(kPayloadType, in_size_samples_,
&rtp_header_);
- if (!PacketLost(packet_input_time_ms) && payload_size_bytes_ > 0) {
- int ret = neteq_->InsertPacket(rtp_header_, &payload_[0],
- payload_size_bytes_,
- packet_input_time_ms * in_sampling_khz_);
- if (ret != NetEq::kOK)
- return -1;
+ if (payload_size_bytes_ > 0) {
+ fprintf(log_file_, "Packet at %d ms", packet_input_time_ms);
+ if (!PacketLost()) {
+ int ret = neteq_->InsertPacket(rtp_header_, &payload_[0],
+ payload_size_bytes_,
+ packet_input_time_ms * in_sampling_khz_);
+ if (ret != NetEq::kOK)
+ return -1;
+ fprintf(log_file_, " OK.\n");
+ } else {
+ fprintf(log_file_, " Lost.\n");
+ }
}
return packet_input_time_ms;
}
@@ -97,11 +306,13 @@
int audio_size_samples;
while (decoded_time_ms_ < end_time_ms) {
- while (decodable_time_ms_ - kOutputSizeMs < decoded_time_ms_) {
+ // Assume 10 packets in packets buffer.
+ while (decodable_time_ms_ - 10 * block_duration_ms_ < decoded_time_ms_) {
ASSERT_TRUE(in_file_->Read(in_size_samples_ * channels_, &in_data_[0]));
payload_size_bytes_ = EncodeBlock(&in_data_[0],
in_size_samples_, &payload_[0],
max_payload_bytes_);
+ total_payload_size_bytes_ += payload_size_bytes_;
decodable_time_ms_ = Transmit() + block_duration_ms_;
}
audio_size_samples = DecodeBlock();
@@ -109,6 +320,7 @@
decoded_time_ms_ += audio_size_samples / out_sampling_khz_;
}
}
+ fprintf(log_file_, "%f", 8.0f * total_payload_size_bytes_ / end_time_ms);
}
} // namespace test
diff --git a/modules/audio_coding/neteq/tools/neteq_quality_test.h b/modules/audio_coding/neteq/tools/neteq_quality_test.h
index 87fc507..e0a43b6 100644
--- a/modules/audio_coding/neteq/tools/neteq_quality_test.h
+++ b/modules/audio_coding/neteq/tools/neteq_quality_test.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_
+#include <gflags/gflags.h>
#include <string>
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
@@ -19,9 +20,46 @@
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/typedefs.h"
+using google::RegisterFlagValidator;
+
namespace webrtc {
namespace test {
+class LossModel {
+ public:
+ virtual ~LossModel() {};
+ virtual bool Lost() = 0;
+};
+
+class NoLoss : public LossModel {
+ public:
+ virtual bool Lost() OVERRIDE;
+};
+
+class UniformLoss : public LossModel {
+ public:
+ UniformLoss(double loss_rate);
+ virtual bool Lost() OVERRIDE;
+ void set_loss_rate(double loss_rate) { loss_rate_ = loss_rate; }
+
+ private:
+ double loss_rate_;
+};
+
+class GilbertElliotLoss : public LossModel {
+ public:
+ GilbertElliotLoss(double prob_trans_11, double prob_trans_01);
+ virtual bool Lost() OVERRIDE;
+
+ private:
+ // Prob. of losing current packet, when previous packet is lost.
+ double prob_trans_11_;
+ // Prob. of losing current packet, when previous packet is not lost.
+ double prob_trans_01_;
+ bool lost_last_;
+ scoped_ptr<UniformLoss> uniform_loss_model_;
+};
+
class NetEqQualityTest : public ::testing::Test {
protected:
NetEqQualityTest(int block_duration_ms,
@@ -29,7 +67,6 @@
int out_sampling_khz,
enum NetEqDecoder decoder_type,
int channels,
- double drift_factor,
std::string in_filename,
std::string out_filename);
virtual void SetUp() OVERRIDE;
@@ -43,9 +80,9 @@
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
uint8_t* payload, int max_bytes) = 0;
- // PacketLoss(...) determines weather a packet sent at an indicated time gets
+ // PacketLost(...) determines weather a packet sent at an indicated time gets
// lost or not.
- virtual bool PacketLost(int packet_input_time_ms) { return false; }
+ bool PacketLost();
// DecodeBlock() decodes a block of audio using the payload stored in
// |payload_| with the length of |payload_size_bytes_| (bytes). The decoded
@@ -65,6 +102,7 @@
int decoded_time_ms_;
int decodable_time_ms_;
double drift_factor_;
+ int packet_loss_rate_;
const int block_duration_ms_;
const int in_sampling_khz_;
const int out_sampling_khz_;
@@ -72,6 +110,7 @@
const int channels_;
const std::string in_filename_;
const std::string out_filename_;
+ const std::string log_filename_;
// Number of samples per channel in a frame.
const int in_size_samples_;
@@ -84,14 +123,18 @@
scoped_ptr<InputAudioFile> in_file_;
FILE* out_file_;
+ FILE* log_file_;
scoped_ptr<RtpGenerator> rtp_generator_;
scoped_ptr<NetEq> neteq_;
+ scoped_ptr<LossModel> loss_model_;
scoped_ptr<int16_t[]> in_data_;
scoped_ptr<uint8_t[]> payload_;
scoped_ptr<int16_t[]> out_data_;
WebRtcRTPHeader rtp_header_;
+
+ long total_payload_size_bytes_;
};
} // namespace test
diff --git a/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
index 3c5f6b0..e144ba7 100644
--- a/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
+++ b/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
@@ -21,9 +21,9 @@
#include "google/gflags.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
-#include "webrtc/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.h"
-#include "webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h"
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
+#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/system_wrappers/interface/trace.h"
@@ -92,8 +92,6 @@
google::RegisterFlagValidator(&FLAGS_cn_swb48, &ValidatePayloadType);
DEFINE_bool(codec_map, false, "Prints the mapping between RTP payload type and "
"codec");
-DEFINE_bool(dummy_rtp, false, "The input file contains ""dummy"" RTP data, "
- "i.e., only headers");
DEFINE_string(replacement_audio_file, "",
"A PCM file that will be used to populate ""dummy"" RTP packets");
@@ -107,7 +105,7 @@
size_t* payload_mem_size_bytes,
size_t* frame_size_samples,
WebRtcRTPHeader* rtp_header,
- NETEQTEST_RTPpacket* next_rtp);
+ const webrtc::test::Packet* next_packet);
int CodecSampleRate(uint8_t payload_type);
int CodecTimestampRate(uint8_t payload_type);
bool IsComfortNosie(uint8_t payload_type);
@@ -139,15 +137,13 @@
return 0;
}
- FILE* in_file = fopen(argv[1], "rb");
- if (!in_file) {
- std::cerr << "Cannot open input file " << argv[1] << std::endl;
- exit(1);
- }
- std::cout << "Input file: " << argv[1] << std::endl;
+ printf("Input file: %s\n", argv[1]);
+ webrtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
+ webrtc::test::RtpFileSource::Create(argv[1]));
+ assert(file_source.get());
FILE* out_file = fopen(argv[2], "wb");
- if (!in_file) {
+ if (!out_file) {
std::cerr << "Cannot open output file " << argv[2] << std::endl;
exit(1);
}
@@ -162,12 +158,6 @@
replace_payload = true;
}
- // Read RTP file header.
- if (NETEQTEST_RTPpacket::skipFileHeader(in_file) != 0) {
- std::cerr << "Wrong format in RTP file" << std::endl;
- exit(1);
- }
-
// Enable tracing.
webrtc::Trace::CreateTrace();
webrtc::Trace::SetTraceFile((webrtc::test::OutputPath() +
@@ -182,25 +172,17 @@
RegisterPayloadTypes(neteq);
// Read first packet.
- NETEQTEST_RTPpacket* rtp;
- NETEQTEST_RTPpacket* next_rtp = NULL;
- if (!FLAGS_dummy_rtp) {
- rtp = new NETEQTEST_RTPpacket();
- if (replace_payload) {
- next_rtp = new NETEQTEST_RTPpacket();
- }
- } else {
- rtp = new NETEQTEST_DummyRTPpacket();
- if (replace_payload) {
- next_rtp = new NETEQTEST_DummyRTPpacket();
- }
+ if (file_source->EndOfFile()) {
+ printf("Warning: RTP file is empty");
+ webrtc::Trace::ReturnTrace();
+ return 0;
}
- rtp->readFromFile(in_file);
- if (rtp->dataLen() < 0) {
- std::cout << "Warning: RTP file is empty" << std::endl;
- }
+ webrtc::scoped_ptr<webrtc::test::Packet> packet(file_source->NextPacket());
+ bool packet_available = true;
// Set up variables for audio replacement if needed.
+ webrtc::scoped_ptr<webrtc::test::Packet> next_packet;
+ bool next_packet_available = false;
size_t input_frame_size_timestamps = 0;
webrtc::scoped_ptr<int16_t[]> replacement_audio;
webrtc::scoped_ptr<uint8_t[]> payload;
@@ -213,13 +195,15 @@
replacement_audio.reset(new int16_t[input_frame_size_timestamps]);
payload_mem_size_bytes = 2 * input_frame_size_timestamps;
payload.reset(new uint8_t[payload_mem_size_bytes]);
- assert(next_rtp);
- next_rtp->readFromFile(in_file);
+ assert(!file_source->EndOfFile());
+ next_packet.reset(file_source->NextPacket());
+ next_packet_available = true;
}
// This is the main simulation loop.
- int time_now_ms = rtp->time(); // Start immediately with the first packet.
- int next_input_time_ms = rtp->time();
+ // Set the simulation clock to start immediately with the first packet.
+ int time_now_ms = packet->time_ms();
+ int next_input_time_ms = time_now_ms;
int next_output_time_ms = time_now_ms;
if (time_now_ms % kOutputBlockSizeMs != 0) {
// Make sure that next_output_time_ms is rounded up to the next multiple
@@ -227,43 +211,52 @@
next_output_time_ms +=
kOutputBlockSizeMs - time_now_ms % kOutputBlockSizeMs;
}
- while (rtp->dataLen() >= 0) {
+ while (packet_available) {
// Check if it is time to insert packet.
- while (time_now_ms >= next_input_time_ms && rtp->dataLen() >= 0) {
- if (rtp->dataLen() > 0) {
- // Parse RTP header.
- WebRtcRTPHeader rtp_header;
- rtp->parseHeader(&rtp_header);
- uint8_t* payload_ptr = rtp->payload();
- size_t payload_len = rtp->payloadLen();
- if (replace_payload) {
- payload_len = ReplacePayload(replacement_audio_file.get(),
- &replacement_audio,
- &payload,
- &payload_mem_size_bytes,
- &input_frame_size_timestamps,
- &rtp_header,
- next_rtp);
- payload_ptr = payload.get();
- }
- int error = neteq->InsertPacket(rtp_header, payload_ptr,
- static_cast<int>(payload_len),
- rtp->time() * sample_rate_hz / 1000);
- if (error != NetEq::kOK) {
- std::cerr << "InsertPacket returned error code " <<
- neteq->LastError() << std::endl;
- }
- }
- // Get next packet from file.
- rtp->readFromFile(in_file);
+ while (time_now_ms >= next_input_time_ms && packet_available) {
+ assert(packet->virtual_payload_length_bytes() > 0);
+ // Parse RTP header.
+ WebRtcRTPHeader rtp_header;
+ packet->ConvertHeader(&rtp_header);
+ const uint8_t* payload_ptr = packet->payload();
+ size_t payload_len = packet->payload_length_bytes();
if (replace_payload) {
- // At this point |rtp| contains the packet *after* |next_rtp|.
- // Swap RTP packet objects between |rtp| and |next_rtp|.
- NETEQTEST_RTPpacket* temp_rtp = rtp;
- rtp = next_rtp;
- next_rtp = temp_rtp;
+ payload_len = ReplacePayload(replacement_audio_file.get(),
+ &replacement_audio,
+ &payload,
+ &payload_mem_size_bytes,
+ &input_frame_size_timestamps,
+ &rtp_header,
+ next_packet.get());
+ payload_ptr = payload.get();
}
- next_input_time_ms = rtp->time();
+ int error =
+ neteq->InsertPacket(rtp_header,
+ payload_ptr,
+ static_cast<int>(payload_len),
+ packet->time_ms() * sample_rate_hz / 1000);
+ if (error != NetEq::kOK) {
+ std::cerr << "InsertPacket returned error code " << neteq->LastError()
+ << std::endl;
+ }
+
+ // Get next packet from file.
+ if (!file_source->EndOfFile()) {
+ packet.reset(file_source->NextPacket());
+ } else {
+ packet_available = false;
+ }
+ if (replace_payload) {
+ // At this point |packet| contains the packet *after* |next_packet|.
+ // Swap Packet objects between |packet| and |next_packet|.
+ packet.swap(next_packet);
+ // Swap the status indicators unless they're already the same.
+ if (packet_available != next_packet_available) {
+ packet_available = !packet_available;
+ next_packet_available = !next_packet_available;
+ }
+ }
+ next_input_time_ms = packet->time_ms();
}
// Check if it is time to get output audio.
@@ -300,10 +293,7 @@
std::cout << "Simulation done" << std::endl;
- fclose(in_file);
fclose(out_file);
- delete rtp;
- delete next_rtp;
delete neteq;
webrtc::Trace::ReturnTrace();
return 0;
@@ -503,7 +493,7 @@
size_t* payload_mem_size_bytes,
size_t* frame_size_samples,
WebRtcRTPHeader* rtp_header,
- NETEQTEST_RTPpacket* next_rtp) {
+ const webrtc::test::Packet* next_packet) {
size_t payload_len = 0;
// Check for CNG.
if (IsComfortNosie(rtp_header->header.payloadType)) {
@@ -515,18 +505,18 @@
(*payload)[0] = 127; // Max attenuation of CNG.
payload_len = 1;
} else {
- if (next_rtp->payloadLen() > 0) {
- // Check if payload length has changed.
- if (next_rtp->sequenceNumber() == rtp_header->header.sequenceNumber + 1) {
- if (*frame_size_samples !=
- next_rtp->timeStamp() - rtp_header->header.timestamp) {
- *frame_size_samples =
- next_rtp->timeStamp() - rtp_header->header.timestamp;
- (*replacement_audio).reset(
- new int16_t[*frame_size_samples]);
- *payload_mem_size_bytes = 2 * *frame_size_samples;
- (*payload).reset(new uint8_t[*payload_mem_size_bytes]);
- }
+ assert(next_packet->virtual_payload_length_bytes() > 0);
+ // Check if payload length has changed.
+ if (next_packet->header().sequenceNumber ==
+ rtp_header->header.sequenceNumber + 1) {
+ if (*frame_size_samples !=
+ next_packet->header().timestamp - rtp_header->header.timestamp) {
+ *frame_size_samples =
+ next_packet->header().timestamp - rtp_header->header.timestamp;
+ (*replacement_audio).reset(
+ new int16_t[*frame_size_samples]);
+ *payload_mem_size_bytes = 2 * *frame_size_samples;
+ (*payload).reset(new uint8_t[*payload_mem_size_bytes]);
}
}
// Get new speech.
@@ -545,7 +535,7 @@
assert(*frame_size_samples > 0);
if (!replacement_audio_file->Read(*frame_size_samples,
(*replacement_audio).get())) {
- std::cerr << "Could no read replacement audio file." << std::endl;
+ std::cerr << "Could not read replacement audio file." << std::endl;
webrtc::Trace::ReturnTrace();
exit(1);
}
@@ -575,7 +565,6 @@
" not supported or unknown." << std::endl;
webrtc::Trace::ReturnTrace();
exit(1);
- assert(false);
}
}
return payload_len;
diff --git a/modules/audio_coding/neteq/tools/packet.cc b/modules/audio_coding/neteq/tools/packet.cc
index d8fb713..794c308 100644
--- a/modules/audio_coding/neteq/tools/packet.cc
+++ b/modules/audio_coding/neteq/tools/packet.cc
@@ -9,6 +9,10 @@
*/
#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
+
+#include <string.h>
+
+#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
namespace webrtc {
@@ -117,6 +121,14 @@
}
}
+void Packet::ConvertHeader(WebRtcRTPHeader* copy_to) const {
+ memcpy(©_to->header, &header_, sizeof(header_));
+ copy_to->frameType = kAudioFrameSpeech;
+ copy_to->type.Audio.numEnergy = 0;
+ copy_to->type.Audio.channel = 1;
+ copy_to->type.Audio.isCNG = false;
+}
+
bool Packet::ParseHeader(const RtpHeaderParser& parser) {
bool valid_header = parser.Parse(
payload_memory_.get(), static_cast<int>(packet_length_bytes_), &header_);
diff --git a/modules/audio_coding/neteq/tools/packet.h b/modules/audio_coding/neteq/tools/packet.h
index eb8ce28..df7aeb7 100644
--- a/modules/audio_coding/neteq/tools/packet.h
+++ b/modules/audio_coding/neteq/tools/packet.h
@@ -21,6 +21,7 @@
namespace webrtc {
class RtpHeaderParser;
+struct WebRtcRTPHeader;
namespace test {
@@ -89,6 +90,10 @@
const RTPHeader& header() const { return header_; }
+ // Copies the packet header information, converting from the native RTPHeader
+ // type to WebRtcRTPHeader.
+ void ConvertHeader(WebRtcRTPHeader* copy_to) const;
+
void set_time_ms(double time) { time_ms_ = time; }
double time_ms() const { return time_ms_; }
bool valid_header() const { return valid_header_; }
diff --git a/modules/audio_coding/neteq/tools/packet_source.h b/modules/audio_coding/neteq/tools/packet_source.h
index 669bc14..ab9ef83 100644
--- a/modules/audio_coding/neteq/tools/packet_source.h
+++ b/modules/audio_coding/neteq/tools/packet_source.h
@@ -11,7 +11,10 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_PACKET_SOURCE_H_
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_PACKET_SOURCE_H_
+#include <bitset>
+
#include "webrtc/base/constructormagic.h"
+#include "webrtc/typedefs.h"
namespace webrtc {
namespace test {
@@ -28,6 +31,13 @@
// depleted, or if an error occurred.
virtual Packet* NextPacket() = 0;
+ virtual void FilterOutPayloadType(uint8_t payload_type) {
+ filter_.set(payload_type, true);
+ }
+
+ protected:
+ std::bitset<128> filter_; // Payload type is 7 bits in the RFC.
+
private:
DISALLOW_COPY_AND_ASSIGN(PacketSource);
};
diff --git a/modules/audio_coding/neteq/tools/packet_unittest.cc b/modules/audio_coding/neteq/tools/packet_unittest.cc
index df844ee..10bcc5c 100644
--- a/modules/audio_coding/neteq/tools/packet_unittest.cc
+++ b/modules/audio_coding/neteq/tools/packet_unittest.cc
@@ -12,7 +12,7 @@
#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
namespace test {
diff --git a/modules/audio_coding/neteq/tools/rtp_analyze.cc b/modules/audio_coding/neteq/tools/rtp_analyze.cc
index 773cc2c..b07de0b 100644
--- a/modules/audio_coding/neteq/tools/rtp_analyze.cc
+++ b/modules/audio_coding/neteq/tools/rtp_analyze.cc
@@ -59,11 +59,6 @@
return 0;
}
- FILE* in_file = fopen(argv[1], "rb");
- if (!in_file) {
- printf("Cannot open input file %s\n", argv[1]);
- return -1;
- }
printf("Input file: %s\n", argv[1]);
webrtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
webrtc::test::RtpFileSource::Create(argv[1]));
@@ -140,7 +135,6 @@
}
}
- fclose(in_file);
fclose(out_file);
return 0;
diff --git a/modules/audio_coding/neteq/tools/rtp_file_source.cc b/modules/audio_coding/neteq/tools/rtp_file_source.cc
index 6490d46..6924a7f 100644
--- a/modules/audio_coding/neteq/tools/rtp_file_source.cc
+++ b/modules/audio_coding/neteq/tools/rtp_file_source.cc
@@ -92,6 +92,10 @@
assert(false);
return NULL;
}
+ if (filter_.test(packet->header().payloadType)) {
+ // This payload type should be filtered out. Continue to the next packet.
+ continue;
+ }
return packet.release();
}
return NULL;
diff --git a/modules/audio_coding/neteq/tools/rtp_generator.cc b/modules/audio_coding/neteq/tools/rtp_generator.cc
index 17ac209..db9988d 100644
--- a/modules/audio_coding/neteq/tools/rtp_generator.cc
+++ b/modules/audio_coding/neteq/tools/rtp_generator.cc
@@ -44,5 +44,19 @@
}
}
+uint32_t TimestampJumpRtpGenerator::GetRtpHeader(uint8_t payload_type,
+ size_t payload_length_samples,
+ WebRtcRTPHeader* rtp_header) {
+ uint32_t ret = RtpGenerator::GetRtpHeader(
+ payload_type, payload_length_samples, rtp_header);
+ if (timestamp_ - static_cast<uint32_t>(payload_length_samples) <=
+ jump_from_timestamp_ &&
+ timestamp_ > jump_from_timestamp_) {
+ // We just moved across the |jump_from_timestamp_| timestamp. Do the jump.
+ timestamp_ = jump_to_timestamp_;
+ }
+ return ret;
+}
+
} // namespace test
} // namespace webrtc
diff --git a/modules/audio_coding/neteq/tools/rtp_generator.h b/modules/audio_coding/neteq/tools/rtp_generator.h
index d3824c8..2280436 100644
--- a/modules/audio_coding/neteq/tools/rtp_generator.h
+++ b/modules/audio_coding/neteq/tools/rtp_generator.h
@@ -34,24 +34,50 @@
drift_factor_(0.0) {
}
+ virtual ~RtpGenerator() {}
+
// Writes the next RTP header to |rtp_header|, which will be of type
// |payload_type|. Returns the send time for this packet (in ms). The value of
// |payload_length_samples| determines the send time for the next packet.
- uint32_t GetRtpHeader(uint8_t payload_type, size_t payload_length_samples,
- WebRtcRTPHeader* rtp_header);
+ virtual uint32_t GetRtpHeader(uint8_t payload_type,
+ size_t payload_length_samples,
+ WebRtcRTPHeader* rtp_header);
void set_drift_factor(double factor);
- private:
+ protected:
uint16_t seq_number_;
uint32_t timestamp_;
uint32_t next_send_time_ms_;
const uint32_t ssrc_;
const int samples_per_ms_;
double drift_factor_;
+
+ private:
DISALLOW_COPY_AND_ASSIGN(RtpGenerator);
};
+class TimestampJumpRtpGenerator : public RtpGenerator {
+ public:
+ TimestampJumpRtpGenerator(int samples_per_ms,
+ uint16_t start_seq_number,
+ uint32_t start_timestamp,
+ uint32_t jump_from_timestamp,
+ uint32_t jump_to_timestamp)
+ : RtpGenerator(samples_per_ms, start_seq_number, start_timestamp),
+ jump_from_timestamp_(jump_from_timestamp),
+ jump_to_timestamp_(jump_to_timestamp) {}
+
+ uint32_t GetRtpHeader(uint8_t payload_type,
+ size_t payload_length_samples,
+ WebRtcRTPHeader* rtp_header) OVERRIDE;
+
+ private:
+ uint32_t jump_from_timestamp_;
+ uint32_t jump_to_timestamp_;
+ DISALLOW_COPY_AND_ASSIGN(TimestampJumpRtpGenerator);
+};
+
} // namespace test
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_GENERATOR_H_
diff --git a/modules/audio_coding_module.target.darwin-arm.mk b/modules/audio_coding_module.target.darwin-arm.mk
index 5c4b23b..5e46f9b 100644
--- a/modules/audio_coding_module.target.darwin-arm.mk
+++ b/modules/audio_coding_module.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -77,13 +75,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -98,6 +96,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -105,7 +104,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -122,12 +120,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -183,23 +184,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,13 +219,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -245,7 +247,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -262,12 +263,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -324,68 +328,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.darwin-arm64.mk b/modules/audio_coding_module.target.darwin-arm64.mk
index 95146c3..30a38e3 100644
--- a/modules/audio_coding_module.target.darwin-arm64.mk
+++ b/modules/audio_coding_module.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,13 +86,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -111,12 +109,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -169,21 +170,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -219,7 +221,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -236,12 +237,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -295,59 +299,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.darwin-mips.mk b/modules/audio_coding_module.target.darwin-mips.mk
index d2855e0..a25cf1e 100644
--- a/modules/audio_coding_module.target.darwin-mips.mk
+++ b/modules/audio_coding_module.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,18 +66,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -94,6 +88,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -101,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -118,17 +112,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -178,23 +173,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,18 +199,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -236,7 +228,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -253,17 +244,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -314,64 +306,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.darwin-mips64.mk b/modules/audio_coding_module.target.darwin-mips64.mk
new file mode 100644
index 0000000..a25cf1e
--- /dev/null
+++ b/modules/audio_coding_module.target.darwin-mips64.mk
@@ -0,0 +1,340 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_amr.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_amrwb.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_celt.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_cng.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g722.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g7221.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g7221c.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g729.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g7291.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_ilbc.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_isac.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_opus.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_speex.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_pcma.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_pcmu.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_red.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/call_statistics.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/nack.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_coding_module_gyp
+
+# Alias gyp target name.
+.PHONY: audio_coding_module
+audio_coding_module: third_party_webrtc_modules_audio_coding_module_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding_module.target.darwin-x86.mk b/modules/audio_coding_module.target.darwin-x86.mk
index 3638fed..4b19bd5 100644
--- a/modules/audio_coding_module.target.darwin-x86.mk
+++ b/modules/audio_coding_module.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +99,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,12 +115,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -175,21 +176,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -231,7 +233,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -248,12 +249,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -307,63 +311,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.darwin-x86_64.mk b/modules/audio_coding_module.target.darwin-x86_64.mk
index c917e4a..1406cfd 100644
--- a/modules/audio_coding_module.target.darwin-x86_64.mk
+++ b/modules/audio_coding_module.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -174,22 +175,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -229,7 +231,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -246,12 +247,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -305,63 +309,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.linux-arm.mk b/modules/audio_coding_module.target.linux-arm.mk
index 5c4b23b..5e46f9b 100644
--- a/modules/audio_coding_module.target.linux-arm.mk
+++ b/modules/audio_coding_module.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -77,13 +75,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -98,6 +96,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -105,7 +104,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -122,12 +120,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -183,23 +184,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,13 +219,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -245,7 +247,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -262,12 +263,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -324,68 +328,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.linux-arm64.mk b/modules/audio_coding_module.target.linux-arm64.mk
index 95146c3..30a38e3 100644
--- a/modules/audio_coding_module.target.linux-arm64.mk
+++ b/modules/audio_coding_module.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,13 +86,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -111,12 +109,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -169,21 +170,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -219,7 +221,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -236,12 +237,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -295,59 +299,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.linux-mips.mk b/modules/audio_coding_module.target.linux-mips.mk
index d2855e0..a25cf1e 100644
--- a/modules/audio_coding_module.target.linux-mips.mk
+++ b/modules/audio_coding_module.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,18 +66,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -94,6 +88,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -101,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -118,17 +112,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -178,23 +173,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,18 +199,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -236,7 +228,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -253,17 +244,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -314,64 +306,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.linux-mips64.mk b/modules/audio_coding_module.target.linux-mips64.mk
new file mode 100644
index 0000000..a25cf1e
--- /dev/null
+++ b/modules/audio_coding_module.target.linux-mips64.mk
@@ -0,0 +1,340 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_amr.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_amrwb.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_celt.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_cng.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g722.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g7221.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g7221c.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g729.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_g7291.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_ilbc.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_isac.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_opus.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_speex.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_pcma.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_pcmu.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_red.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/call_statistics.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc \
+ third_party/webrtc/modules/audio_coding/main/acm2/nack.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_coding_module_gyp
+
+# Alias gyp target name.
+.PHONY: audio_coding_module
+audio_coding_module: third_party_webrtc_modules_audio_coding_module_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_coding_module.target.linux-x86.mk b/modules/audio_coding_module.target.linux-x86.mk
index 3638fed..4b19bd5 100644
--- a/modules/audio_coding_module.target.linux-x86.mk
+++ b/modules/audio_coding_module.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +99,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,12 +115,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -175,21 +176,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -231,7 +233,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -248,12 +249,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -307,63 +311,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_coding_module.target.linux-x86_64.mk b/modules/audio_coding_module.target.linux-x86_64.mk
index c917e4a..1406cfd 100644
--- a/modules/audio_coding_module.target.linux-x86_64.mk
+++ b/modules/audio_coding_module.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_coding_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -174,22 +175,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -229,7 +231,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -246,12 +247,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -305,63 +309,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.darwin-arm.mk b/modules/audio_conference_mixer.target.darwin-arm.mk
index 4e9f7f6..0140c91 100644
--- a/modules/audio_conference_mixer.target.darwin-arm.mk
+++ b/modules/audio_conference_mixer.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -74,6 +72,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,23 +145,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +180,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -206,7 +208,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -223,12 +224,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,68 +274,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.darwin-arm64.mk b/modules/audio_conference_mixer.target.darwin-arm64.mk
index e9dfe2e..57eaa61 100644
--- a/modules/audio_conference_mixer.target.darwin-arm64.mk
+++ b/modules/audio_conference_mixer.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,13 +62,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,21 +131,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +182,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +198,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -241,59 +245,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.darwin-mips.mk b/modules/audio_conference_mixer.target.darwin-mips.mk
index 7dfc4ae..5cd67d1 100644
--- a/modules/audio_conference_mixer.target.darwin-mips.mk
+++ b/modules/audio_conference_mixer.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -44,18 +42,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,17 +88,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -139,23 +134,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,18 +160,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -197,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -214,17 +205,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -260,64 +252,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.darwin-mips64.mk b/modules/audio_conference_mixer.target.darwin-mips64.mk
new file mode 100644
index 0000000..5cd67d1
--- /dev/null
+++ b/modules/audio_conference_mixer.target.darwin-mips64.mk
@@ -0,0 +1,286 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_conference_mixer/source/audio_frame_manipulator.cc \
+ third_party/webrtc/modules/audio_conference_mixer/source/level_indicator.cc \
+ third_party/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc \
+ third_party/webrtc/modules/audio_conference_mixer/source/time_scheduler.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_conference_mixer_gyp
+
+# Alias gyp target name.
+.PHONY: audio_conference_mixer
+audio_conference_mixer: third_party_webrtc_modules_audio_conference_mixer_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_conference_mixer.target.darwin-x86.mk b/modules/audio_conference_mixer.target.darwin-x86.mk
index 4d87699..538b871 100644
--- a/modules/audio_conference_mixer.target.darwin-x86.mk
+++ b/modules/audio_conference_mixer.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +67,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +75,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +91,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,21 +137,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,7 +194,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +210,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,63 +257,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.darwin-x86_64.mk b/modules/audio_conference_mixer.target.darwin-x86_64.mk
index 6e15d2b..d65d7a1 100644
--- a/modules/audio_conference_mixer.target.darwin-x86_64.mk
+++ b/modules/audio_conference_mixer.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,22 +136,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,7 +192,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -207,12 +208,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -251,63 +255,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.linux-arm.mk b/modules/audio_conference_mixer.target.linux-arm.mk
index 4e9f7f6..0140c91 100644
--- a/modules/audio_conference_mixer.target.linux-arm.mk
+++ b/modules/audio_conference_mixer.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -74,6 +72,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,23 +145,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +180,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -206,7 +208,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -223,12 +224,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,68 +274,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.linux-arm64.mk b/modules/audio_conference_mixer.target.linux-arm64.mk
index e9dfe2e..57eaa61 100644
--- a/modules/audio_conference_mixer.target.linux-arm64.mk
+++ b/modules/audio_conference_mixer.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,13 +62,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,21 +131,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +182,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +198,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -241,59 +245,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.linux-mips.mk b/modules/audio_conference_mixer.target.linux-mips.mk
index 7dfc4ae..5cd67d1 100644
--- a/modules/audio_conference_mixer.target.linux-mips.mk
+++ b/modules/audio_conference_mixer.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -44,18 +42,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,17 +88,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -139,23 +134,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,18 +160,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -197,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -214,17 +205,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -260,64 +252,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.linux-mips64.mk b/modules/audio_conference_mixer.target.linux-mips64.mk
new file mode 100644
index 0000000..5cd67d1
--- /dev/null
+++ b/modules/audio_conference_mixer.target.linux-mips64.mk
@@ -0,0 +1,286 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_conference_mixer/source/audio_frame_manipulator.cc \
+ third_party/webrtc/modules/audio_conference_mixer/source/level_indicator.cc \
+ third_party/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc \
+ third_party/webrtc/modules/audio_conference_mixer/source/time_scheduler.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_conference_mixer_gyp
+
+# Alias gyp target name.
+.PHONY: audio_conference_mixer
+audio_conference_mixer: third_party_webrtc_modules_audio_conference_mixer_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_conference_mixer.target.linux-x86.mk b/modules/audio_conference_mixer.target.linux-x86.mk
index 4d87699..538b871 100644
--- a/modules/audio_conference_mixer.target.linux-x86.mk
+++ b/modules/audio_conference_mixer.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +67,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +75,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +91,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,21 +137,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,7 +194,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +210,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,63 +257,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer.target.linux-x86_64.mk b/modules/audio_conference_mixer.target.linux-x86_64.mk
index 6e15d2b..d65d7a1 100644
--- a/modules/audio_conference_mixer.target.linux-x86_64.mk
+++ b/modules/audio_conference_mixer.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_conference_mixer_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,22 +136,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,7 +192,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -207,12 +208,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -251,63 +255,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_conference_mixer/BUILD.gn b/modules/audio_conference_mixer/BUILD.gn
new file mode 100644
index 0000000..a94d005
--- /dev/null
+++ b/modules/audio_conference_mixer/BUILD.gn
@@ -0,0 +1,47 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+config("internal_config") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ include_dirs = [
+ "interface",
+ "../interface",
+ ]
+}
+
+source_set("audio_conference_mixer") {
+ sources = [
+ "interface/audio_conference_mixer.h",
+ "interface/audio_conference_mixer_defines.h",
+ "source/audio_conference_mixer_impl.cc",
+ "source/audio_conference_mixer_impl.h",
+ "source/audio_frame_manipulator.cc",
+ "source/audio_frame_manipulator.h",
+ "source/level_indicator.cc",
+ "source/level_indicator.h",
+ "source/memory_pool.h",
+ "source/memory_pool_posix.h",
+ "source/memory_pool_win.h",
+ "source/time_scheduler.cc",
+ "source/time_scheduler.h",
+ ]
+
+ direct_dependent_configs = [ ":internal_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ "../../system_wrappers",
+ "../audio_processing",
+ "../utility",
+ ]
+}
diff --git a/modules/audio_conference_mixer/OWNERS b/modules/audio_conference_mixer/OWNERS
index 7dc791e..940b245 100644
--- a/modules/audio_conference_mixer/OWNERS
+++ b/modules/audio_conference_mixer/OWNERS
@@ -1,3 +1,4 @@
henrike@webrtc.org
-pwestin@webrtc.org
-andrew@webrtc.org
\ No newline at end of file
+andrew@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/audio_conference_mixer/interface/audio_conference_mixer.h b/modules/audio_conference_mixer/interface/audio_conference_mixer.h
index 2969ece..6290c22 100644
--- a/modules/audio_conference_mixer/interface/audio_conference_mixer.h
+++ b/modules/audio_conference_mixer/interface/audio_conference_mixer.h
@@ -40,9 +40,9 @@
virtual ~AudioConferenceMixer() {}
// Module functions
- virtual int32_t ChangeUniqueId(const int32_t id) = 0;
- virtual int32_t TimeUntilNextProcess() = 0 ;
- virtual int32_t Process() = 0;
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0;
+ virtual int32_t TimeUntilNextProcess() OVERRIDE = 0;
+ virtual int32_t Process() OVERRIDE = 0;
// Register/unregister a callback class for receiving the mixed audio.
virtual int32_t RegisterMixedStreamCallback(
diff --git a/modules/audio_conference_mixer/source/Android.mk b/modules/audio_conference_mixer/source/Android.mk
deleted file mode 100644
index a90ff1d..0000000
--- a/modules/audio_conference_mixer/source/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_audio_conference_mixer
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- audio_frame_manipulator.cc \
- level_indicator.cc \
- audio_conference_mixer_impl.cc \
- time_scheduler.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../audio_processing/include \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
index 26ef3e8..6ef6166 100644
--- a/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
+++ b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
@@ -32,10 +32,13 @@
// stereo at most.
//
// TODO(andrew): consider not modifying |frame| here.
-void MixFrames(AudioFrame* mixed_frame, AudioFrame* frame) {
+void MixFrames(AudioFrame* mixed_frame, AudioFrame* frame, bool use_limiter) {
assert(mixed_frame->num_channels_ >= frame->num_channels_);
- // Divide by two to avoid saturation in the mixing.
- *frame >>= 1;
+ if (use_limiter) {
+ // Divide by two to avoid saturation in the mixing.
+ // This is only meaningful if the limiter will be used.
+ *frame >>= 1;
+ }
if (mixed_frame->num_channels_ > frame->num_channels_) {
// We only support mono-to-stereo.
assert(mixed_frame->num_channels_ == 2 &&
@@ -131,6 +134,7 @@
_participantList(),
_additionalParticipantList(),
_numMixedParticipants(0),
+ use_limiter_(true),
_timeStamp(0),
_timeScheduler(kProcessPeriodicityInMs),
_mixedAudioLevel(),
@@ -308,6 +312,11 @@
_timeStamp += _sampleSize;
+ // We only use the limiter if it supports the output sample rate and
+ // we're actually mixing multiple streams.
+ use_limiter_ = _numMixedParticipants > 1 &&
+ _outputFrequency <= kAudioProcMaxNativeSampleRateHz;
+
MixFromList(*mixedAudio, &mixList);
MixAnonomouslyFromList(*mixedAudio, &additionalFramesList);
MixAnonomouslyFromList(*mixedAudio, &rampOutList);
@@ -946,16 +955,8 @@
if(audioFrameList->empty()) return 0;
uint32_t position = 0;
- if(_numMixedParticipants == 1) {
- // No mixing required here; skip the saturation protection.
- AudioFrame* audioFrame = audioFrameList->front();
- mixedAudio.CopyFrom(*audioFrame);
- SetParticipantStatistics(&_scratchMixedParticipants[position],
- *audioFrame);
- return 0;
- }
- if (audioFrameList->size() == 1) {
+ if (_numMixedParticipants == 1) {
mixedAudio.timestamp_ = audioFrameList->front()->timestamp_;
mixedAudio.elapsed_time_ms_ = audioFrameList->front()->elapsed_time_ms_;
} else {
@@ -979,7 +980,7 @@
assert(false);
position = 0;
}
- MixFrames(&mixedAudio, (*iter));
+ MixFrames(&mixedAudio, (*iter), use_limiter_);
SetParticipantStatistics(&_scratchMixedParticipants[position],
**iter);
@@ -999,24 +1000,17 @@
if(audioFrameList->empty()) return 0;
- if(_numMixedParticipants == 1) {
- // No mixing required here; skip the saturation protection.
- AudioFrame* audioFrame = audioFrameList->front();
- mixedAudio.CopyFrom(*audioFrame);
- return 0;
- }
-
for (AudioFrameList::const_iterator iter = audioFrameList->begin();
iter != audioFrameList->end();
++iter) {
- MixFrames(&mixedAudio, *iter);
+ MixFrames(&mixedAudio, *iter, use_limiter_);
}
return 0;
}
bool AudioConferenceMixerImpl::LimitMixedAudio(AudioFrame& mixedAudio) {
- if(_numMixedParticipants == 1) {
- return true;
+ if (!use_limiter_) {
+ return true;
}
// Smoothly limit the mixed frame.
diff --git a/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
index 31dc71e..2756314 100644
--- a/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
+++ b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
@@ -64,27 +64,27 @@
bool Init();
// Module functions
- virtual int32_t ChangeUniqueId(const int32_t id);
- virtual int32_t TimeUntilNextProcess();
- virtual int32_t Process();
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
+ virtual int32_t TimeUntilNextProcess() OVERRIDE;
+ virtual int32_t Process() OVERRIDE;
// AudioConferenceMixer functions
virtual int32_t RegisterMixedStreamCallback(
- AudioMixerOutputReceiver& mixReceiver);
- virtual int32_t UnRegisterMixedStreamCallback();
+ AudioMixerOutputReceiver& mixReceiver) OVERRIDE;
+ virtual int32_t UnRegisterMixedStreamCallback() OVERRIDE;
virtual int32_t RegisterMixerStatusCallback(
AudioMixerStatusReceiver& mixerStatusCallback,
- const uint32_t amountOf10MsBetweenCallbacks);
- virtual int32_t UnRegisterMixerStatusCallback();
+ const uint32_t amountOf10MsBetweenCallbacks) OVERRIDE;
+ virtual int32_t UnRegisterMixerStatusCallback() OVERRIDE;
virtual int32_t SetMixabilityStatus(MixerParticipant& participant,
- bool mixable);
+ bool mixable) OVERRIDE;
virtual int32_t MixabilityStatus(MixerParticipant& participant,
- bool& mixable);
- virtual int32_t SetMinimumMixingFrequency(Frequency freq);
+ bool& mixable) OVERRIDE;
+ virtual int32_t SetMinimumMixingFrequency(Frequency freq) OVERRIDE;
virtual int32_t SetAnonymousMixabilityStatus(
- MixerParticipant& participant, const bool mixable);
+ MixerParticipant& participant, const bool mixable) OVERRIDE;
virtual int32_t AnonymousMixabilityStatus(
- MixerParticipant& participant, bool& mixable);
+ MixerParticipant& participant, bool& mixable) OVERRIDE;
private:
enum{DEFAULT_AUDIO_FRAME_POOLSIZE = 50};
@@ -192,6 +192,9 @@
MixerParticipantList _additionalParticipantList;
size_t _numMixedParticipants;
+ // Determines if we will use a limiter for clipping protection during
+ // mixing.
+ bool use_limiter_;
uint32_t _timeStamp;
diff --git a/modules/audio_device.target.darwin-arm.mk b/modules/audio_device.target.darwin-arm.mk
index 92cc118..0d40dc6 100644
--- a/modules/audio_device.target.darwin-arm.mk
+++ b/modules/audio_device.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -77,6 +75,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,7 +83,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -101,12 +99,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,23 +155,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,13 +190,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -216,7 +218,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +234,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -287,68 +291,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.darwin-arm64.mk b/modules/audio_device.target.darwin-arm64.mk
index 6580fbb..13f8aca 100644
--- a/modules/audio_device.target.darwin-arm64.mk
+++ b/modules/audio_device.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,13 +65,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,21 +141,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,7 +192,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -207,12 +208,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -258,59 +262,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.darwin-mips.mk b/modules/audio_device.target.darwin-mips.mk
index 56811c1..9b8f6c6 100644
--- a/modules/audio_device.target.darwin-mips.mk
+++ b/modules/audio_device.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -47,18 +45,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +67,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -80,7 +75,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -97,17 +91,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -149,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,18 +170,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -207,7 +199,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -224,17 +215,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -277,64 +269,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.darwin-mips64.mk b/modules/audio_device.target.darwin-mips64.mk
new file mode 100644
index 0000000..9b8f6c6
--- /dev/null
+++ b/modules/audio_device.target.darwin-mips64.mk
@@ -0,0 +1,303 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_device/audio_device_buffer.cc \
+ third_party/webrtc/modules/audio_device/audio_device_generic.cc \
+ third_party/webrtc/modules/audio_device/audio_device_utility.cc \
+ third_party/webrtc/modules/audio_device/audio_device_impl.cc \
+ third_party/webrtc/modules/audio_device/dummy/audio_device_dummy.cc \
+ third_party/webrtc/modules/audio_device/dummy/audio_device_utility_dummy.cc \
+ third_party/webrtc/modules/audio_device/dummy/file_audio_device.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_DUMMY_AUDIO_BUILD' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/dummy \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/android \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_DUMMY_AUDIO_BUILD' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/dummy \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/android \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_device_gyp
+
+# Alias gyp target name.
+.PHONY: audio_device
+audio_device: third_party_webrtc_modules_audio_device_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_device.target.darwin-x86.mk b/modules/audio_device.target.darwin-x86.mk
index 13000e0..94aee5d 100644
--- a/modules/audio_device.target.darwin-x86.mk
+++ b/modules/audio_device.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,6 +70,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -79,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -96,12 +94,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -146,21 +147,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,63 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.darwin-x86_64.mk b/modules/audio_device.target.darwin-x86_64.mk
index ff4f6f8..b913f4c 100644
--- a/modules/audio_device.target.darwin-x86_64.mk
+++ b/modules/audio_device.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -145,22 +146,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -217,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,63 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.linux-arm.mk b/modules/audio_device.target.linux-arm.mk
index 92cc118..0d40dc6 100644
--- a/modules/audio_device.target.linux-arm.mk
+++ b/modules/audio_device.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -77,6 +75,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,7 +83,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -101,12 +99,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,23 +155,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,13 +190,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -216,7 +218,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +234,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -287,68 +291,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.linux-arm64.mk b/modules/audio_device.target.linux-arm64.mk
index 6580fbb..13f8aca 100644
--- a/modules/audio_device.target.linux-arm64.mk
+++ b/modules/audio_device.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,13 +65,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,21 +141,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,7 +192,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -207,12 +208,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -258,59 +262,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.linux-mips.mk b/modules/audio_device.target.linux-mips.mk
index 56811c1..9b8f6c6 100644
--- a/modules/audio_device.target.linux-mips.mk
+++ b/modules/audio_device.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -47,18 +45,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +67,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -80,7 +75,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -97,17 +91,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -149,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,18 +170,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -207,7 +199,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -224,17 +215,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -277,64 +269,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.linux-mips64.mk b/modules/audio_device.target.linux-mips64.mk
new file mode 100644
index 0000000..9b8f6c6
--- /dev/null
+++ b/modules/audio_device.target.linux-mips64.mk
@@ -0,0 +1,303 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_device/audio_device_buffer.cc \
+ third_party/webrtc/modules/audio_device/audio_device_generic.cc \
+ third_party/webrtc/modules/audio_device/audio_device_utility.cc \
+ third_party/webrtc/modules/audio_device/audio_device_impl.cc \
+ third_party/webrtc/modules/audio_device/dummy/audio_device_dummy.cc \
+ third_party/webrtc/modules/audio_device/dummy/audio_device_utility_dummy.cc \
+ third_party/webrtc/modules/audio_device/dummy/file_audio_device.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_DUMMY_AUDIO_BUILD' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/dummy \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/android \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_DUMMY_AUDIO_BUILD' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/dummy \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/android \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_device_gyp
+
+# Alias gyp target name.
+.PHONY: audio_device
+audio_device: third_party_webrtc_modules_audio_device_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_device.target.linux-x86.mk b/modules/audio_device.target.linux-x86.mk
index 13000e0..94aee5d 100644
--- a/modules/audio_device.target.linux-x86.mk
+++ b/modules/audio_device.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,6 +70,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -79,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -96,12 +94,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -146,21 +147,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,63 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device.target.linux-x86_64.mk b/modules/audio_device.target.linux-x86_64.mk
index ff4f6f8..b913f4c 100644
--- a/modules/audio_device.target.linux-x86_64.mk
+++ b/modules/audio_device.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_device_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -145,22 +146,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -217,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,63 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_device/Android.mk b/modules/audio_device/Android.mk
deleted file mode 100644
index 4b3b912..0000000
--- a/modules/audio_device/Android.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_audio_device
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- audio_device_buffer.cc \
- audio_device_generic.cc \
- audio_device_utility.cc \
- audio_device_impl.cc \
- android/audio_device_android_opensles.cc \
- android/audio_device_utility_android.cc \
- dummy/audio_device_utility_dummy.cc \
- dummy/audio_device_dummy.cc \
- dummy/file_audio_device.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_ANDROID_OPENSLES'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/android \
- $(LOCAL_PATH)/dummy \
- $(LOCAL_PATH)/linux \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../../common_audio/resampler/include \
- $(LOCAL_PATH)/../../../../common_audio/signal_processing/include \
- $(LOCAL_PATH)/../../../../system_wrappers/interface \
- system/media/wilhelm/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport \
- libOpenSLES
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn
new file mode 100644
index 0000000..60a83dc
--- /dev/null
+++ b/modules/audio_device/BUILD.gn
@@ -0,0 +1,182 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+config("audio_device_config") {
+ include_dirs = [
+ "../interface",
+ "include",
+ "dummy", # Contains dummy audio device implementations.
+ ]
+}
+
+source_set("audio_device") {
+ sources = [
+ "include/audio_device.h",
+ "include/audio_device_defines.h",
+ "audio_device_buffer.cc",
+ "audio_device_buffer.h",
+ "audio_device_generic.cc",
+ "audio_device_generic.h",
+ "audio_device_utility.cc",
+ "audio_device_utility.h",
+ "audio_device_impl.cc",
+ "audio_device_impl.h",
+ "audio_device_config.h",
+ "dummy/audio_device_dummy.cc",
+ "dummy/audio_device_dummy.h",
+ "dummy/audio_device_utility_dummy.cc",
+ "dummy/audio_device_utility_dummy.h",
+ "dummy/file_audio_device.cc",
+ "dummy/file_audio_device.h",
+ ]
+
+ direct_dependent_configs = [ ":audio_device_config"]
+
+ include_dirs = []
+ if (is_linux) {
+ include_dirs += [ "linux" ]
+ }
+ if (is_ios) {
+ include_dirs += [ "ios" ]
+ }
+ if (is_mac) {
+ include_dirs += [ "mac" ]
+ }
+ if (is_win) {
+ include_dirs += [ "win" ]
+ }
+ if (is_android) {
+ include_dirs += [ "android" ]
+ }
+ if (rtc_include_internal_audio_device) {
+ sources += [
+ "linux/alsasymboltable_linux.cc",
+ "linux/alsasymboltable_linux.h",
+ "linux/audio_device_alsa_linux.cc",
+ "linux/audio_device_alsa_linux.h",
+ "linux/audio_device_utility_linux.cc",
+ "linux/audio_device_utility_linux.h",
+ "linux/audio_mixer_manager_alsa_linux.cc",
+ "linux/audio_mixer_manager_alsa_linux.h",
+ "linux/latebindingsymboltable_linux.cc",
+ "linux/latebindingsymboltable_linux.h",
+ "ios/audio_device_ios.mm",
+ "ios/audio_device_ios.h",
+ "ios/audio_device_utility_ios.cc",
+ "ios/audio_device_utility_ios.h",
+ "mac/audio_device_mac.cc",
+ "mac/audio_device_mac.h",
+ "mac/audio_device_utility_mac.cc",
+ "mac/audio_device_utility_mac.h",
+ "mac/audio_mixer_manager_mac.cc",
+ "mac/audio_mixer_manager_mac.h",
+ "mac/portaudio/pa_memorybarrier.h",
+ "mac/portaudio/pa_ringbuffer.c",
+ "mac/portaudio/pa_ringbuffer.h",
+ "win/audio_device_core_win.cc",
+ "win/audio_device_core_win.h",
+ "win/audio_device_wave_win.cc",
+ "win/audio_device_wave_win.h",
+ "win/audio_device_utility_win.cc",
+ "win/audio_device_utility_win.h",
+ "win/audio_mixer_manager_win.cc",
+ "win/audio_mixer_manager_win.h",
+ "android/audio_device_template.h",
+ "android/audio_device_utility_android.cc",
+ "android/audio_device_utility_android.h",
+ "android/audio_manager_jni.cc",
+ "android/audio_manager_jni.h",
+ "android/audio_record_jni.cc",
+ "android/audio_record_jni.h",
+ "android/audio_track_jni.cc",
+ "android/audio_track_jni.h",
+ "android/fine_audio_buffer.cc",
+ "android/fine_audio_buffer.h",
+ "android/low_latency_event_posix.cc",
+ "android/low_latency_event.h",
+ "android/opensles_common.cc",
+ "android/opensles_common.h",
+ "android/opensles_input.cc",
+ "android/opensles_input.h",
+ "android/opensles_output.cc",
+ "android/opensles_output.h",
+ "android/single_rw_fifo.cc",
+ "android/single_rw_fifo.h",
+ ]
+ if (is_linux) {
+ defines += [ "LINUX_ALSA" ]
+
+ libs = [
+ "dl",
+ "X11",
+ ]
+
+ if (rtc_include_pulse_audio) {
+ sources += [
+ "linux/audio_device_pulse_linux.cc",
+ "linux/audio_device_pulse_linux.h",
+ "linux/audio_mixer_manager_pulse_linux.cc",
+ "linux/audio_mixer_manager_pulse_linux.h",
+ "linux/pulseaudiosymboltable_linux.cc",
+ "linux/pulseaudiosymboltable_linux.h",
+ ]
+
+ defines += [ "LINUX_PULSE" ]
+ }
+ }
+ if (is_mac) {
+ libs = [
+ "AudioToolbox.framework",
+ "CoreAudio.framework",
+ ]
+ }
+ if (is_ios) {
+ cflags += [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES.
+
+ libs = [
+ "AudioToolbox.framework",
+ "AVFoundation.framework",
+ ]
+ }
+ if (is_win) {
+ libs = [
+ # Required for the built-in WASAPI AEC.
+ "dmoguids.lib",
+ "wmcodecdspuuid.lib",
+ "amstrmid.lib",
+ "msdmo.lib",
+ ]
+ }
+ } else {
+ defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
+ }
+
+ if (!build_with_chromium) {
+ sources += [
+ # Do not link these into Chrome since they contain static data.
+ "dummy/file_audio_device_factory.cc",
+ "dummy/file_audio_device_factory.h",
+ ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ "../../common_audio",
+ "../../system_wrappers",
+ "../utility",
+ ]
+}
+
+
diff --git a/modules/audio_device/OWNERS b/modules/audio_device/OWNERS
index 7bb3cd5..bb11a4e 100644
--- a/modules/audio_device/OWNERS
+++ b/modules/audio_device/OWNERS
@@ -1,6 +1,7 @@
henrikg@webrtc.org
henrika@webrtc.org
niklas.enbom@webrtc.org
+tkchin@webrtc.org
xians@webrtc.org
per-file *.isolate=kjellander@webrtc.org
@@ -9,3 +10,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/audio_device/android/OWNERS b/modules/audio_device/android/OWNERS
index e6f452e..38865f5 100644
--- a/modules/audio_device/android/OWNERS
+++ b/modules/audio_device/android/OWNERS
@@ -1,2 +1 @@
henrike@webrtc.org
-fischman@webrtc.org
\ No newline at end of file
diff --git a/modules/audio_device/audio_device.gypi b/modules/audio_device/audio_device.gypi
index a64856b..23f417f 100644
--- a/modules/audio_device/audio_device.gypi
+++ b/modules/audio_device/audio_device.gypi
@@ -98,7 +98,7 @@
'linux/audio_mixer_manager_alsa_linux.h',
'linux/latebindingsymboltable_linux.cc',
'linux/latebindingsymboltable_linux.h',
- 'ios/audio_device_ios.cc',
+ 'ios/audio_device_ios.mm',
'ios/audio_device_ios.h',
'ios/audio_device_utility_ios.cc',
'ios/audio_device_utility_ios.h',
@@ -175,7 +175,7 @@
}],
],
}],
- ['OS=="mac" or OS=="ios"', {
+ ['OS=="mac"', {
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
@@ -183,6 +183,19 @@
],
},
}],
+ ['OS=="ios"', {
+ 'xcode_settings': {
+ 'CLANG_ENABLE_OBJC_ARC': 'YES',
+ },
+ 'link_settings': {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-framework AudioToolbox',
+ '-framework AVFoundation',
+ ],
+ },
+ },
+ }],
['OS=="win"', {
'link_settings': {
'libraries': [
diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc
index 58411e3..826a89d 100644
--- a/modules/audio_device/audio_device_impl.cc
+++ b/modules/audio_device/audio_device_impl.cc
@@ -278,11 +278,13 @@
// AudioRecordJni provides hardware AEC and OpenSlesOutput low latency.
#if defined(WEBRTC_ANDROID_OPENSLES)
ptrAudioDevice = new AudioDeviceTemplate<OpenSlesInput, OpenSlesOutput>(Id());
-#else
- ptrAudioDevice = new AudioDeviceTemplate<AudioRecordJni, AudioTrackJni>(Id());
-#endif
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
"Android OpenSLES Audio APIs will be utilized");
+#else
+ ptrAudioDevice = new AudioDeviceTemplate<AudioRecordJni, AudioTrackJni>(Id());
+ WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
+ "Android JNI Audio APIs will be utilized");
+#endif
}
if (ptrAudioDevice != NULL)
@@ -349,15 +351,15 @@
#if defined(WEBRTC_IOS)
if (audioLayer == kPlatformDefaultAudio)
{
- // Create *iPhone Audio* implementation
- ptrAudioDevice = new AudioDeviceIPhone(Id());
+ // Create iOS Audio Device implementation.
+ ptrAudioDevice = new AudioDeviceIOS(Id());
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "iPhone Audio APIs will be utilized");
}
if (ptrAudioDevice != NULL)
{
- // Create the Mac implementation of the Device Utility.
- ptrAudioDeviceUtility = new AudioDeviceUtilityIPhone(Id());
+ // Create iOS Device Utility implementation.
+ ptrAudioDeviceUtility = new AudioDeviceUtilityIOS(Id());
}
// END #if defined(WEBRTC_IOS)
diff --git a/modules/audio_device/audio_device_utility.h b/modules/audio_device/audio_device_utility.h
index eb3e623..ebe06d1 100644
--- a/modules/audio_device/audio_device_utility.h
+++ b/modules/audio_device/audio_device_utility.h
@@ -18,15 +18,15 @@
class AudioDeviceUtility
{
-public:
- static uint32_t GetTimeInMS();
- static void WaitForKey();
- static bool StringCompare(const char* str1,
- const char* str2,
- const uint32_t length);
- virtual int32_t Init() = 0;
+ public:
+ static uint32_t GetTimeInMS();
+ static void WaitForKey();
+ static bool StringCompare(const char* str1,
+ const char* str2,
+ const uint32_t length);
+ virtual int32_t Init() = 0;
- virtual ~AudioDeviceUtility() {}
+ virtual ~AudioDeviceUtility() {}
};
} // namespace webrtc
diff --git a/modules/audio_device/dummy/file_audio_device.cc b/modules/audio_device/dummy/file_audio_device.cc
index e7771c6..182c43d 100644
--- a/modules/audio_device/dummy/file_audio_device.cc
+++ b/modules/audio_device/dummy/file_audio_device.cc
@@ -194,6 +194,7 @@
_playing = true;
_playoutFramesLeft = 0;
+ _playoutFramesIn10MS = kPlayoutFixedSampleRate/100;
if (!_playoutBuffer)
_playoutBuffer = new int8_t[2 *
diff --git a/modules/audio_device/dummy/file_audio_device_factory.cc b/modules/audio_device/dummy/file_audio_device_factory.cc
index db35bf1..5e25230 100644
--- a/modules/audio_device/dummy/file_audio_device_factory.cc
+++ b/modules/audio_device/dummy/file_audio_device_factory.cc
@@ -32,12 +32,19 @@
void FileAudioDeviceFactory::SetFilenamesToUse(
const char* inputAudioFilename, const char* outputAudioFilename) {
+#ifdef WEBRTC_DUMMY_FILE_DEVICES
assert(strlen(inputAudioFilename) < MAX_FILENAME_LEN &&
strlen(outputAudioFilename) < MAX_FILENAME_LEN);
// Copy the strings since we don't know the lifetime of the input pointers.
strncpy(_inputAudioFilename, inputAudioFilename, MAX_FILENAME_LEN);
strncpy(_outputAudioFilename, outputAudioFilename, MAX_FILENAME_LEN);
+#else
+ // Sanity: must be compiled with the right define to run this.
+ printf("Trying to use dummy file devices, but is not compiled "
+ "with WEBRTC_DUMMY_FILE_DEVICES. Bailing out.\n");
+ exit(1);
+#endif
}
} // namespace webrtc
diff --git a/modules/audio_device/ios/audio_device_ios.h b/modules/audio_device/ios/audio_device_ios.h
index 011b6ac..2a48845 100644
--- a/modules/audio_device/ios/audio_device_ios.h
+++ b/modules/audio_device/ios/audio_device_ios.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IPHONE_H
-#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IPHONE_H
+#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IOS_H
+#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IOS_H
#include <AudioUnit/AudioUnit.h>
@@ -32,244 +32,241 @@
// Number of 10 ms recording blocks in recording buffer
const uint16_t N_REC_BUFFERS = 20;
-class AudioDeviceIPhone : public AudioDeviceGeneric {
-public:
- AudioDeviceIPhone(const int32_t id);
- ~AudioDeviceIPhone();
+class AudioDeviceIOS : public AudioDeviceGeneric {
+ public:
+ AudioDeviceIOS(const int32_t id);
+ ~AudioDeviceIOS();
- // Retrieve the currently utilized audio layer
- virtual int32_t
- ActiveAudioLayer(AudioDeviceModule::AudioLayer& audioLayer) const;
+ // Retrieve the currently utilized audio layer
+ virtual int32_t ActiveAudioLayer(
+ AudioDeviceModule::AudioLayer& audioLayer) const;
- // Main initializaton and termination
- virtual int32_t Init();
- virtual int32_t Terminate();
- virtual bool Initialized() const;
+ // Main initializaton and termination
+ virtual int32_t Init();
+ virtual int32_t Terminate();
+ virtual bool Initialized() const;
- // Device enumeration
- virtual int16_t PlayoutDevices();
- virtual int16_t RecordingDevices();
- virtual int32_t PlayoutDeviceName(uint16_t index,
+ // Device enumeration
+ virtual int16_t PlayoutDevices();
+ virtual int16_t RecordingDevices();
+ virtual int32_t PlayoutDeviceName(uint16_t index,
+ char name[kAdmMaxDeviceNameSize],
+ char guid[kAdmMaxGuidSize]);
+ virtual int32_t RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]);
- virtual int32_t RecordingDeviceName(uint16_t index,
- char name[kAdmMaxDeviceNameSize],
- char guid[kAdmMaxGuidSize]);
- // Device selection
- virtual int32_t SetPlayoutDevice(uint16_t index);
- virtual int32_t
- SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device);
- virtual int32_t SetRecordingDevice(uint16_t index);
- virtual int32_t SetRecordingDevice(
- AudioDeviceModule::WindowsDeviceType device);
+ // Device selection
+ virtual int32_t SetPlayoutDevice(uint16_t index);
+ virtual int32_t SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device);
+ virtual int32_t SetRecordingDevice(uint16_t index);
+ virtual int32_t SetRecordingDevice(
+ AudioDeviceModule::WindowsDeviceType device);
- // Audio transport initialization
- virtual int32_t PlayoutIsAvailable(bool& available);
- virtual int32_t InitPlayout();
- virtual bool PlayoutIsInitialized() const;
- virtual int32_t RecordingIsAvailable(bool& available);
- virtual int32_t InitRecording();
- virtual bool RecordingIsInitialized() const;
+ // Audio transport initialization
+ virtual int32_t PlayoutIsAvailable(bool& available);
+ virtual int32_t InitPlayout();
+ virtual bool PlayoutIsInitialized() const;
+ virtual int32_t RecordingIsAvailable(bool& available);
+ virtual int32_t InitRecording();
+ virtual bool RecordingIsInitialized() const;
- // Audio transport control
- virtual int32_t StartPlayout();
- virtual int32_t StopPlayout();
- virtual bool Playing() const;
- virtual int32_t StartRecording();
- virtual int32_t StopRecording();
- virtual bool Recording() const;
+ // Audio transport control
+ virtual int32_t StartPlayout();
+ virtual int32_t StopPlayout();
+ virtual bool Playing() const;
+ virtual int32_t StartRecording();
+ virtual int32_t StopRecording();
+ virtual bool Recording() const;
- // Microphone Automatic Gain Control (AGC)
- virtual int32_t SetAGC(bool enable);
- virtual bool AGC() const;
+ // Microphone Automatic Gain Control (AGC)
+ virtual int32_t SetAGC(bool enable);
+ virtual bool AGC() const;
- // Volume control based on the Windows Wave API (Windows only)
- virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight);
- virtual int32_t WaveOutVolume(uint16_t& volumeLeft,
- uint16_t& volumeRight) const;
+ // Volume control based on the Windows Wave API (Windows only)
+ virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight);
+ virtual int32_t WaveOutVolume(uint16_t& volumeLeft,
+ uint16_t& volumeRight) const;
- // Audio mixer initialization
- virtual int32_t InitSpeaker();
- virtual bool SpeakerIsInitialized() const;
- virtual int32_t InitMicrophone();
- virtual bool MicrophoneIsInitialized() const;
+ // Audio mixer initialization
+ virtual int32_t InitSpeaker();
+ virtual bool SpeakerIsInitialized() const;
+ virtual int32_t InitMicrophone();
+ virtual bool MicrophoneIsInitialized() const;
- // Speaker volume controls
- virtual int32_t SpeakerVolumeIsAvailable(bool& available);
- virtual int32_t SetSpeakerVolume(uint32_t volume);
- virtual int32_t SpeakerVolume(uint32_t& volume) const;
- virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
- virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const;
- virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
+ // Speaker volume controls
+ virtual int32_t SpeakerVolumeIsAvailable(bool& available);
+ virtual int32_t SetSpeakerVolume(uint32_t volume);
+ virtual int32_t SpeakerVolume(uint32_t& volume) const;
+ virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
+ virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const;
+ virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
- // Microphone volume controls
- virtual int32_t MicrophoneVolumeIsAvailable(bool& available);
- virtual int32_t SetMicrophoneVolume(uint32_t volume);
- virtual int32_t MicrophoneVolume(uint32_t& volume) const;
- virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
- virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
- virtual int32_t
- MicrophoneVolumeStepSize(uint16_t& stepSize) const;
+ // Microphone volume controls
+ virtual int32_t MicrophoneVolumeIsAvailable(bool& available);
+ virtual int32_t SetMicrophoneVolume(uint32_t volume);
+ virtual int32_t MicrophoneVolume(uint32_t& volume) const;
+ virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
+ virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
+ virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
- // Microphone mute control
- virtual int32_t MicrophoneMuteIsAvailable(bool& available);
- virtual int32_t SetMicrophoneMute(bool enable);
- virtual int32_t MicrophoneMute(bool& enabled) const;
+ // Microphone mute control
+ virtual int32_t MicrophoneMuteIsAvailable(bool& available);
+ virtual int32_t SetMicrophoneMute(bool enable);
+ virtual int32_t MicrophoneMute(bool& enabled) const;
- // Speaker mute control
- virtual int32_t SpeakerMuteIsAvailable(bool& available);
- virtual int32_t SetSpeakerMute(bool enable);
- virtual int32_t SpeakerMute(bool& enabled) const;
+ // Speaker mute control
+ virtual int32_t SpeakerMuteIsAvailable(bool& available);
+ virtual int32_t SetSpeakerMute(bool enable);
+ virtual int32_t SpeakerMute(bool& enabled) const;
- // Microphone boost control
- virtual int32_t MicrophoneBoostIsAvailable(bool& available);
- virtual int32_t SetMicrophoneBoost(bool enable);
- virtual int32_t MicrophoneBoost(bool& enabled) const;
+ // Microphone boost control
+ virtual int32_t MicrophoneBoostIsAvailable(bool& available);
+ virtual int32_t SetMicrophoneBoost(bool enable);
+ virtual int32_t MicrophoneBoost(bool& enabled) const;
- // Stereo support
- virtual int32_t StereoPlayoutIsAvailable(bool& available);
- virtual int32_t SetStereoPlayout(bool enable);
- virtual int32_t StereoPlayout(bool& enabled) const;
- virtual int32_t StereoRecordingIsAvailable(bool& available);
- virtual int32_t SetStereoRecording(bool enable);
- virtual int32_t StereoRecording(bool& enabled) const;
+ // Stereo support
+ virtual int32_t StereoPlayoutIsAvailable(bool& available);
+ virtual int32_t SetStereoPlayout(bool enable);
+ virtual int32_t StereoPlayout(bool& enabled) const;
+ virtual int32_t StereoRecordingIsAvailable(bool& available);
+ virtual int32_t SetStereoRecording(bool enable);
+ virtual int32_t StereoRecording(bool& enabled) const;
- // Delay information and control
- virtual int32_t
- SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
- uint16_t sizeMS);
- virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
- uint16_t& sizeMS) const;
- virtual int32_t PlayoutDelay(uint16_t& delayMS) const;
- virtual int32_t RecordingDelay(uint16_t& delayMS) const;
+ // Delay information and control
+ virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
+ uint16_t sizeMS);
+ virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
+ uint16_t& sizeMS) const;
+ virtual int32_t PlayoutDelay(uint16_t& delayMS) const;
+ virtual int32_t RecordingDelay(uint16_t& delayMS) const;
- // CPU load
- virtual int32_t CPULoad(uint16_t& load) const;
+ // CPU load
+ virtual int32_t CPULoad(uint16_t& load) const;
-public:
- virtual bool PlayoutWarning() const;
- virtual bool PlayoutError() const;
- virtual bool RecordingWarning() const;
- virtual bool RecordingError() const;
- virtual void ClearPlayoutWarning();
- virtual void ClearPlayoutError();
- virtual void ClearRecordingWarning();
- virtual void ClearRecordingError();
+ public:
+ virtual bool PlayoutWarning() const;
+ virtual bool PlayoutError() const;
+ virtual bool RecordingWarning() const;
+ virtual bool RecordingError() const;
+ virtual void ClearPlayoutWarning();
+ virtual void ClearPlayoutError();
+ virtual void ClearRecordingWarning();
+ virtual void ClearRecordingError();
-public:
- virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer);
+ public:
+ virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer);
- // Reset Audio Deivce (for mobile devices only)
- virtual int32_t ResetAudioDevice();
+ // Reset Audio Device (for mobile devices only)
+ virtual int32_t ResetAudioDevice();
- // enable or disable loud speaker (for iphone only)
- virtual int32_t SetLoudspeakerStatus(bool enable);
- virtual int32_t GetLoudspeakerStatus(bool& enabled) const;
+ // enable or disable loud speaker (for iphone only)
+ virtual int32_t SetLoudspeakerStatus(bool enable);
+ virtual int32_t GetLoudspeakerStatus(bool& enabled) const;
-private:
- void Lock() {
- _critSect.Enter();
- }
+ private:
+ void Lock() {
+ _critSect.Enter();
+ }
- void UnLock() {
- _critSect.Leave();
- }
+ void UnLock() {
+ _critSect.Leave();
+ }
- int32_t Id() {
- return _id;
- }
+ int32_t Id() {
+ return _id;
+ }
- // Init and shutdown
- int32_t InitPlayOrRecord();
- int32_t ShutdownPlayOrRecord();
+ // Init and shutdown
+ int32_t InitPlayOrRecord();
+ int32_t ShutdownPlayOrRecord();
- void UpdateRecordingDelay();
- void UpdatePlayoutDelay();
+ void UpdateRecordingDelay();
+ void UpdatePlayoutDelay();
- static OSStatus RecordProcess(void *inRefCon,
- AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *timeStamp,
- UInt32 inBusNumber,
- UInt32 inNumberFrames,
- AudioBufferList *ioData);
-
- static OSStatus PlayoutProcess(void *inRefCon,
- AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *timeStamp,
- UInt32 inBusNumber,
- UInt32 inNumberFrames,
- AudioBufferList *ioData);
-
- OSStatus RecordProcessImpl(AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *timeStamp,
- uint32_t inBusNumber,
- uint32_t inNumberFrames);
-
- OSStatus PlayoutProcessImpl(uint32_t inNumberFrames,
+ static OSStatus RecordProcess(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *timeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
AudioBufferList *ioData);
- static bool RunCapture(void* ptrThis);
- bool CaptureWorkerThread();
+ static OSStatus PlayoutProcess(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *timeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList *ioData);
-private:
- AudioDeviceBuffer* _ptrAudioBuffer;
+ OSStatus RecordProcessImpl(AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *timeStamp,
+ uint32_t inBusNumber,
+ uint32_t inNumberFrames);
- CriticalSectionWrapper& _critSect;
+ OSStatus PlayoutProcessImpl(uint32_t inNumberFrames,
+ AudioBufferList *ioData);
- ThreadWrapper* _captureWorkerThread;
- uint32_t _captureWorkerThreadId;
+ static bool RunCapture(void* ptrThis);
+ bool CaptureWorkerThread();
- int32_t _id;
+ private:
+ AudioDeviceBuffer* _ptrAudioBuffer;
- AudioUnit _auVoiceProcessing;
+ CriticalSectionWrapper& _critSect;
-private:
- bool _initialized;
- bool _isShutDown;
- bool _recording;
- bool _playing;
- bool _recIsInitialized;
- bool _playIsInitialized;
+ ThreadWrapper* _captureWorkerThread;
+ uint32_t _captureWorkerThreadId;
- bool _recordingDeviceIsSpecified;
- bool _playoutDeviceIsSpecified;
- bool _micIsInitialized;
- bool _speakerIsInitialized;
+ int32_t _id;
- bool _AGC;
+ AudioUnit _auVoiceProcessing;
+ void* _audioInterruptionObserver;
- // The sampling rate to use with Audio Device Buffer
- uint32_t _adbSampFreq;
+ private:
+ bool _initialized;
+ bool _isShutDown;
+ bool _recording;
+ bool _playing;
+ bool _recIsInitialized;
+ bool _playIsInitialized;
- // Delay calculation
- uint32_t _recordingDelay;
- uint32_t _playoutDelay;
- uint32_t _playoutDelayMeasurementCounter;
- uint32_t _recordingDelayHWAndOS;
- uint32_t _recordingDelayMeasurementCounter;
+ bool _recordingDeviceIsSpecified;
+ bool _playoutDeviceIsSpecified;
+ bool _micIsInitialized;
+ bool _speakerIsInitialized;
- // Errors and warnings count
- uint16_t _playWarning;
- uint16_t _playError;
- uint16_t _recWarning;
- uint16_t _recError;
+ bool _AGC;
- // Playout buffer, needed for 44.0 / 44.1 kHz mismatch
- int16_t _playoutBuffer[ENGINE_PLAY_BUF_SIZE_IN_SAMPLES];
- uint32_t _playoutBufferUsed; // How much is filled
+ // The sampling rate to use with Audio Device Buffer
+ uint32_t _adbSampFreq;
- // Recording buffers
- int16_t
- _recordingBuffer[N_REC_BUFFERS][ENGINE_REC_BUF_SIZE_IN_SAMPLES];
- uint32_t _recordingLength[N_REC_BUFFERS];
- uint32_t _recordingSeqNumber[N_REC_BUFFERS];
- uint32_t _recordingCurrentSeq;
+ // Delay calculation
+ uint32_t _recordingDelay;
+ uint32_t _playoutDelay;
+ uint32_t _playoutDelayMeasurementCounter;
+ uint32_t _recordingDelayHWAndOS;
+ uint32_t _recordingDelayMeasurementCounter;
- // Current total size all data in buffers, used for delay estimate
- uint32_t _recordingBufferTotalSize;
+ // Errors and warnings count
+ uint16_t _playWarning;
+ uint16_t _playError;
+ uint16_t _recWarning;
+ uint16_t _recError;
+
+ // Playout buffer, needed for 44.0 / 44.1 kHz mismatch
+ int16_t _playoutBuffer[ENGINE_PLAY_BUF_SIZE_IN_SAMPLES];
+ uint32_t _playoutBufferUsed; // How much is filled
+
+ // Recording buffers
+ int16_t _recordingBuffer[N_REC_BUFFERS][ENGINE_REC_BUF_SIZE_IN_SAMPLES];
+ uint32_t _recordingLength[N_REC_BUFFERS];
+ uint32_t _recordingSeqNumber[N_REC_BUFFERS];
+ uint32_t _recordingCurrentSeq;
+
+ // Current total size all data in buffers, used for delay estimate
+ uint32_t _recordingBufferTotalSize;
};
} // namespace webrtc
-#endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_MAC_AUDIO_DEVICE_IPHONE_H_
+#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IOS_H
diff --git a/modules/audio_device/ios/audio_device_ios.cc b/modules/audio_device/ios/audio_device_ios.mm
similarity index 79%
rename from modules/audio_device/ios/audio_device_ios.cc
rename to modules/audio_device/ios/audio_device_ios.mm
index 7a7189a..19dcfdf 100644
--- a/modules/audio_device/ios/audio_device_ios.cc
+++ b/modules/audio_device/ios/audio_device_ios.mm
@@ -8,7 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <AudioToolbox/AudioServices.h> // AudioSession
+#import <AVFoundation/AVFoundation.h>
+#import <Foundation/Foundation.h>
#include "webrtc/modules/audio_device/ios/audio_device_ios.h"
@@ -16,7 +17,7 @@
#include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
-AudioDeviceIPhone::AudioDeviceIPhone(const int32_t id)
+AudioDeviceIOS::AudioDeviceIOS(const int32_t id)
:
_ptrAudioBuffer(NULL),
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
@@ -24,6 +25,7 @@
_captureWorkerThreadId(0),
_id(id),
_auVoiceProcessing(NULL),
+ _audioInterruptionObserver(NULL),
_initialized(false),
_isShutDown(false),
_recording(false),
@@ -57,7 +59,7 @@
memset(_recordingSeqNumber, 0, sizeof(_recordingSeqNumber));
}
-AudioDeviceIPhone::~AudioDeviceIPhone() {
+AudioDeviceIOS::~AudioDeviceIOS() {
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
"%s destroyed", __FUNCTION__);
@@ -71,7 +73,7 @@
// API
// ============================================================================
-void AudioDeviceIPhone::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {
+void AudioDeviceIOS::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -86,7 +88,7 @@
_ptrAudioBuffer->SetPlayoutChannels(N_PLAY_CHANNELS);
}
-int32_t AudioDeviceIPhone::ActiveAudioLayer(
+int32_t AudioDeviceIOS::ActiveAudioLayer(
AudioDeviceModule::AudioLayer& audioLayer) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -94,7 +96,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::Init() {
+int32_t AudioDeviceIOS::Init() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -137,7 +139,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::Terminate() {
+int32_t AudioDeviceIOS::Terminate() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -169,13 +171,13 @@
return 0;
}
-bool AudioDeviceIPhone::Initialized() const {
+bool AudioDeviceIOS::Initialized() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
return (_initialized);
}
-int32_t AudioDeviceIPhone::InitSpeaker() {
+int32_t AudioDeviceIOS::InitSpeaker() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -205,7 +207,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::InitMicrophone() {
+int32_t AudioDeviceIOS::InitMicrophone() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -236,19 +238,19 @@
return 0;
}
-bool AudioDeviceIPhone::SpeakerIsInitialized() const {
+bool AudioDeviceIOS::SpeakerIsInitialized() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
return _speakerIsInitialized;
}
-bool AudioDeviceIPhone::MicrophoneIsInitialized() const {
+bool AudioDeviceIOS::MicrophoneIsInitialized() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
return _micIsInitialized;
}
-int32_t AudioDeviceIPhone::SpeakerVolumeIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::SpeakerVolumeIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -257,16 +259,16 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetSpeakerVolume(uint32_t volume) {
+int32_t AudioDeviceIOS::SetSpeakerVolume(uint32_t volume) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetSpeakerVolume(volume=%u)", volume);
+ "AudioDeviceIOS::SetSpeakerVolume(volume=%u)", volume);
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
" API call not supported on this platform");
return -1;
}
-int32_t AudioDeviceIPhone::SpeakerVolume(uint32_t& volume) const {
+int32_t AudioDeviceIOS::SpeakerVolume(uint32_t& volume) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -276,13 +278,13 @@
}
int32_t
- AudioDeviceIPhone::SetWaveOutVolume(uint16_t volumeLeft,
- uint16_t volumeRight) {
+ AudioDeviceIOS::SetWaveOutVolume(uint16_t volumeLeft,
+ uint16_t volumeRight) {
WEBRTC_TRACE(
kTraceModuleCall,
kTraceAudioDevice,
_id,
- "AudioDeviceIPhone::SetWaveOutVolume(volumeLeft=%u, volumeRight=%u)",
+ "AudioDeviceIOS::SetWaveOutVolume(volumeLeft=%u, volumeRight=%u)",
volumeLeft, volumeRight);
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
@@ -292,7 +294,7 @@
}
int32_t
-AudioDeviceIPhone::WaveOutVolume(uint16_t& /*volumeLeft*/,
+AudioDeviceIOS::WaveOutVolume(uint16_t& /*volumeLeft*/,
uint16_t& /*volumeRight*/) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -303,7 +305,7 @@
}
int32_t
- AudioDeviceIPhone::MaxSpeakerVolume(uint32_t& maxVolume) const {
+ AudioDeviceIOS::MaxSpeakerVolume(uint32_t& maxVolume) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -312,7 +314,7 @@
return -1;
}
-int32_t AudioDeviceIPhone::MinSpeakerVolume(
+int32_t AudioDeviceIOS::MinSpeakerVolume(
uint32_t& minVolume) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -323,7 +325,7 @@
}
int32_t
- AudioDeviceIPhone::SpeakerVolumeStepSize(uint16_t& stepSize) const {
+ AudioDeviceIOS::SpeakerVolumeStepSize(uint16_t& stepSize) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -332,7 +334,7 @@
return -1;
}
-int32_t AudioDeviceIPhone::SpeakerMuteIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::SpeakerMuteIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -341,7 +343,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetSpeakerMute(bool enable) {
+int32_t AudioDeviceIOS::SetSpeakerMute(bool enable) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -350,7 +352,7 @@
return -1;
}
-int32_t AudioDeviceIPhone::SpeakerMute(bool& enabled) const {
+int32_t AudioDeviceIOS::SpeakerMute(bool& enabled) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -359,7 +361,7 @@
return -1;
}
-int32_t AudioDeviceIPhone::MicrophoneMuteIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::MicrophoneMuteIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -368,7 +370,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetMicrophoneMute(bool enable) {
+int32_t AudioDeviceIOS::SetMicrophoneMute(bool enable) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -377,7 +379,7 @@
return -1;
}
-int32_t AudioDeviceIPhone::MicrophoneMute(bool& enabled) const {
+int32_t AudioDeviceIOS::MicrophoneMute(bool& enabled) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -386,7 +388,7 @@
return -1;
}
-int32_t AudioDeviceIPhone::MicrophoneBoostIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::MicrophoneBoostIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -395,9 +397,9 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetMicrophoneBoost(bool enable) {
+int32_t AudioDeviceIOS::SetMicrophoneBoost(bool enable) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetMicrophoneBoost(enable=%u)", enable);
+ "AudioDeviceIOS::SetMicrophoneBoost(enable=%u)", enable);
if (!_micIsInitialized) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
@@ -414,7 +416,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::MicrophoneBoost(bool& enabled) const {
+int32_t AudioDeviceIOS::MicrophoneBoost(bool& enabled) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
if (!_micIsInitialized) {
@@ -428,7 +430,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::StereoRecordingIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::StereoRecordingIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -437,9 +439,9 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetStereoRecording(bool enable) {
+int32_t AudioDeviceIOS::SetStereoRecording(bool enable) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetStereoRecording(enable=%u)", enable);
+ "AudioDeviceIOS::SetStereoRecording(enable=%u)", enable);
if (enable) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
@@ -449,7 +451,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::StereoRecording(bool& enabled) const {
+int32_t AudioDeviceIOS::StereoRecording(bool& enabled) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -457,7 +459,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::StereoPlayoutIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::StereoPlayoutIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -466,9 +468,9 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetStereoPlayout(bool enable) {
+int32_t AudioDeviceIOS::SetStereoPlayout(bool enable) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetStereoPlayout(enable=%u)", enable);
+ "AudioDeviceIOS::SetStereoPlayout(enable=%u)", enable);
if (enable) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
@@ -478,7 +480,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::StereoPlayout(bool& enabled) const {
+int32_t AudioDeviceIOS::StereoPlayout(bool& enabled) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -486,23 +488,23 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetAGC(bool enable) {
+int32_t AudioDeviceIOS::SetAGC(bool enable) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetAGC(enable=%d)", enable);
+ "AudioDeviceIOS::SetAGC(enable=%d)", enable);
_AGC = enable;
return 0;
}
-bool AudioDeviceIPhone::AGC() const {
+bool AudioDeviceIOS::AGC() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
return _AGC;
}
-int32_t AudioDeviceIPhone::MicrophoneVolumeIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::MicrophoneVolumeIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -511,9 +513,9 @@
return 0;
}
-int32_t AudioDeviceIPhone::SetMicrophoneVolume(uint32_t volume) {
+int32_t AudioDeviceIOS::SetMicrophoneVolume(uint32_t volume) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetMicrophoneVolume(volume=%u)", volume);
+ "AudioDeviceIOS::SetMicrophoneVolume(volume=%u)", volume);
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
" API call not supported on this platform");
@@ -521,7 +523,7 @@
}
int32_t
- AudioDeviceIPhone::MicrophoneVolume(uint32_t& volume) const {
+ AudioDeviceIOS::MicrophoneVolume(uint32_t& volume) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -531,7 +533,7 @@
}
int32_t
- AudioDeviceIPhone::MaxMicrophoneVolume(uint32_t& maxVolume) const {
+ AudioDeviceIOS::MaxMicrophoneVolume(uint32_t& maxVolume) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -541,7 +543,7 @@
}
int32_t
- AudioDeviceIPhone::MinMicrophoneVolume(uint32_t& minVolume) const {
+ AudioDeviceIOS::MinMicrophoneVolume(uint32_t& minVolume) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -551,7 +553,7 @@
}
int32_t
- AudioDeviceIPhone::MicrophoneVolumeStepSize(
+ AudioDeviceIOS::MicrophoneVolumeStepSize(
uint16_t& stepSize) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
@@ -561,16 +563,16 @@
return -1;
}
-int16_t AudioDeviceIPhone::PlayoutDevices() {
+int16_t AudioDeviceIOS::PlayoutDevices() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
return (int16_t)1;
}
-int32_t AudioDeviceIPhone::SetPlayoutDevice(uint16_t index) {
+int32_t AudioDeviceIOS::SetPlayoutDevice(uint16_t index) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetPlayoutDevice(index=%u)", index);
+ "AudioDeviceIOS::SetPlayoutDevice(index=%u)", index);
if (_playIsInitialized) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
@@ -589,18 +591,18 @@
}
int32_t
- AudioDeviceIPhone::SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType) {
+ AudioDeviceIOS::SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
"WindowsDeviceType not supported");
return -1;
}
int32_t
- AudioDeviceIPhone::PlayoutDeviceName(uint16_t index,
+ AudioDeviceIOS::PlayoutDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::PlayoutDeviceName(index=%u)", index);
+ "AudioDeviceIOS::PlayoutDeviceName(index=%u)", index);
if (index != 0) {
return -1;
@@ -615,11 +617,11 @@
}
int32_t
- AudioDeviceIPhone::RecordingDeviceName(uint16_t index,
+ AudioDeviceIOS::RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::RecordingDeviceName(index=%u)", index);
+ "AudioDeviceIOS::RecordingDeviceName(index=%u)", index);
if (index != 0) {
return -1;
@@ -633,15 +635,15 @@
return 0;
}
-int16_t AudioDeviceIPhone::RecordingDevices() {
+int16_t AudioDeviceIOS::RecordingDevices() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
return (int16_t)1;
}
-int32_t AudioDeviceIPhone::SetRecordingDevice(uint16_t index) {
+int32_t AudioDeviceIOS::SetRecordingDevice(uint16_t index) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetRecordingDevice(index=%u)", index);
+ "AudioDeviceIOS::SetRecordingDevice(index=%u)", index);
if (_recIsInitialized) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
@@ -661,7 +663,7 @@
}
int32_t
- AudioDeviceIPhone::SetRecordingDevice(
+ AudioDeviceIOS::SetRecordingDevice(
AudioDeviceModule::WindowsDeviceType) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
"WindowsDeviceType not supported");
@@ -671,52 +673,55 @@
// ----------------------------------------------------------------------------
// SetLoudspeakerStatus
//
-// Overrides the receiver playout route to speaker instead. See
-// kAudioSessionProperty_OverrideCategoryDefaultToSpeaker in CoreAudio
-// documentation.
+// Change the default receiver playout route to speaker.
+//
// ----------------------------------------------------------------------------
-int32_t AudioDeviceIPhone::SetLoudspeakerStatus(bool enable) {
+int32_t AudioDeviceIOS::SetLoudspeakerStatus(bool enable) {
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetLoudspeakerStatus(enable=%d)", enable);
+ "AudioDeviceIOS::SetLoudspeakerStatus(enable=%d)", enable);
- UInt32 doChangeDefaultRoute = enable ? 1 : 0;
- OSStatus err = AudioSessionSetProperty(
- kAudioSessionProperty_OverrideCategoryDefaultToSpeaker,
- sizeof(doChangeDefaultRoute), &doChangeDefaultRoute);
+ AVAudioSession* session = [AVAudioSession sharedInstance];
+ NSString* category = session.category;
+ AVAudioSessionCategoryOptions options = session.categoryOptions;
+ // Respect old category options if category is
+ // AVAudioSessionCategoryPlayAndRecord. Otherwise reset it since old options
+ // might not be valid for this category.
+ if ([category isEqualToString:AVAudioSessionCategoryPlayAndRecord]) {
+ if (enable) {
+ options |= AVAudioSessionCategoryOptionDefaultToSpeaker;
+ } else {
+ options &= ~AVAudioSessionCategoryOptionDefaultToSpeaker;
+ }
+ } else {
+ options = AVAudioSessionCategoryOptionDefaultToSpeaker;
+ }
- if (err != noErr) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "Error changing default output route " \
- "(only available on iOS 3.1 or later)");
- return -1;
+ NSError* error = nil;
+ [session setCategory:AVAudioSessionCategoryPlayAndRecord
+ withOptions:options
+ error:&error];
+ if (error != nil) {
+ WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
+ "Error changing default output route ");
+ return -1;
}
return 0;
}
-int32_t AudioDeviceIPhone::GetLoudspeakerStatus(bool &enabled) const {
+int32_t AudioDeviceIOS::GetLoudspeakerStatus(bool &enabled) const {
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetLoudspeakerStatus(enabled=?)");
+ "AudioDeviceIOS::SetLoudspeakerStatus(enabled=?)");
- UInt32 route(0);
- UInt32 size = sizeof(route);
- OSStatus err = AudioSessionGetProperty(
- kAudioSessionProperty_OverrideCategoryDefaultToSpeaker,
- &size, &route);
- if (err != noErr) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "Error changing default output route " \
- "(only available on iOS 3.1 or later)");
- return -1;
- }
-
- enabled = route == 1 ? true: false;
+ AVAudioSession* session = [AVAudioSession sharedInstance];
+ AVAudioSessionCategoryOptions options = session.categoryOptions;
+ enabled = options & AVAudioSessionCategoryOptionDefaultToSpeaker;
return 0;
}
-int32_t AudioDeviceIPhone::PlayoutIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::PlayoutIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
available = false;
@@ -734,7 +739,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::RecordingIsAvailable(bool& available) {
+int32_t AudioDeviceIOS::RecordingIsAvailable(bool& available) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
available = false;
@@ -752,7 +757,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::InitPlayout() {
+int32_t AudioDeviceIOS::InitPlayout() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
CriticalSectionScoped lock(&_critSect);
@@ -803,12 +808,12 @@
return 0;
}
-bool AudioDeviceIPhone::PlayoutIsInitialized() const {
+bool AudioDeviceIOS::PlayoutIsInitialized() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
return (_playIsInitialized);
}
-int32_t AudioDeviceIPhone::InitRecording() {
+int32_t AudioDeviceIOS::InitRecording() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
CriticalSectionScoped lock(&_critSect);
@@ -861,12 +866,12 @@
return 0;
}
-bool AudioDeviceIPhone::RecordingIsInitialized() const {
+bool AudioDeviceIOS::RecordingIsInitialized() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
return (_recIsInitialized);
}
-int32_t AudioDeviceIPhone::StartRecording() {
+int32_t AudioDeviceIOS::StartRecording() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
CriticalSectionScoped lock(&_critSect);
@@ -913,7 +918,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::StopRecording() {
+int32_t AudioDeviceIOS::StopRecording() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
CriticalSectionScoped lock(&_critSect);
@@ -937,12 +942,12 @@
return 0;
}
-bool AudioDeviceIPhone::Recording() const {
+bool AudioDeviceIOS::Recording() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
return (_recording);
}
-int32_t AudioDeviceIPhone::StartPlayout() {
+int32_t AudioDeviceIOS::StartPlayout() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
// This lock is (among other things) needed to avoid concurrency issues
@@ -988,7 +993,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::StopPlayout() {
+int32_t AudioDeviceIOS::StopPlayout() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
CriticalSectionScoped lock(&_critSect);
@@ -1012,7 +1017,7 @@
return 0;
}
-bool AudioDeviceIPhone::Playing() const {
+bool AudioDeviceIOS::Playing() const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
return (_playing);
@@ -1025,7 +1030,7 @@
// and set enable states after shutdown to same as current.
// In capture thread audio device will be shutdown, then started again.
// ----------------------------------------------------------------------------
-int32_t AudioDeviceIPhone::ResetAudioDevice() {
+int32_t AudioDeviceIOS::ResetAudioDevice() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
CriticalSectionScoped lock(&_critSect);
@@ -1067,22 +1072,21 @@
return 0;
}
-int32_t AudioDeviceIPhone::PlayoutDelay(uint16_t& delayMS) const {
+int32_t AudioDeviceIOS::PlayoutDelay(uint16_t& delayMS) const {
delayMS = _playoutDelay;
return 0;
}
-int32_t AudioDeviceIPhone::RecordingDelay(uint16_t& delayMS) const {
+int32_t AudioDeviceIOS::RecordingDelay(uint16_t& delayMS) const {
delayMS = _recordingDelay;
return 0;
}
int32_t
- AudioDeviceIPhone::SetPlayoutBuffer(
- const AudioDeviceModule::BufferType type,
- uint16_t sizeMS) {
+ AudioDeviceIOS::SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
+ uint16_t sizeMS) {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
- "AudioDeviceIPhone::SetPlayoutBuffer(type=%u, sizeMS=%u)",
+ "AudioDeviceIOS::SetPlayoutBuffer(type=%u, sizeMS=%u)",
type, sizeMS);
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
@@ -1091,7 +1095,7 @@
}
int32_t
- AudioDeviceIPhone::PlayoutBuffer(AudioDeviceModule::BufferType& type,
+ AudioDeviceIOS::PlayoutBuffer(AudioDeviceModule::BufferType& type,
uint16_t& sizeMS) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
@@ -1102,7 +1106,7 @@
return 0;
}
-int32_t AudioDeviceIPhone::CPULoad(uint16_t& /*load*/) const {
+int32_t AudioDeviceIOS::CPULoad(uint16_t& /*load*/) const {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
@@ -1110,35 +1114,35 @@
return -1;
}
-bool AudioDeviceIPhone::PlayoutWarning() const {
+bool AudioDeviceIOS::PlayoutWarning() const {
return (_playWarning > 0);
}
-bool AudioDeviceIPhone::PlayoutError() const {
+bool AudioDeviceIOS::PlayoutError() const {
return (_playError > 0);
}
-bool AudioDeviceIPhone::RecordingWarning() const {
+bool AudioDeviceIOS::RecordingWarning() const {
return (_recWarning > 0);
}
-bool AudioDeviceIPhone::RecordingError() const {
+bool AudioDeviceIOS::RecordingError() const {
return (_recError > 0);
}
-void AudioDeviceIPhone::ClearPlayoutWarning() {
+void AudioDeviceIOS::ClearPlayoutWarning() {
_playWarning = 0;
}
-void AudioDeviceIPhone::ClearPlayoutError() {
+void AudioDeviceIOS::ClearPlayoutError() {
_playError = 0;
}
-void AudioDeviceIPhone::ClearRecordingWarning() {
+void AudioDeviceIOS::ClearRecordingWarning() {
_recWarning = 0;
}
-void AudioDeviceIPhone::ClearRecordingError() {
+void AudioDeviceIOS::ClearRecordingError() {
_recError = 0;
}
@@ -1146,7 +1150,7 @@
// Private Methods
// ============================================================================
-int32_t AudioDeviceIPhone::InitPlayOrRecord() {
+int32_t AudioDeviceIOS::InitPlayOrRecord() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id, "%s", __FUNCTION__);
OSStatus result = -1;
@@ -1187,18 +1191,32 @@
}
// Set preferred hardware sample rate to 16 kHz
- Float64 sampleRate(16000.0);
- result = AudioSessionSetProperty(
- kAudioSessionProperty_PreferredHardwareSampleRate,
- sizeof(sampleRate), &sampleRate);
- if (0 != result) {
+ NSError* error = nil;
+ AVAudioSession* session = [AVAudioSession sharedInstance];
+ Float64 preferredSampleRate(16000.0);
+ [session setPreferredSampleRate:preferredSampleRate
+ error:&error];
+ if (error != nil) {
+ const char* errorString = [[error localizedDescription] UTF8String];
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Could not set preferred sample rate (result=%d)", result);
+ "Could not set preferred sample rate: %s", errorString);
}
-
- uint32_t voiceChat = kAudioSessionMode_VoiceChat;
- AudioSessionSetProperty(kAudioSessionProperty_Mode,
- sizeof(voiceChat), &voiceChat);
+ error = nil;
+ [session setMode:AVAudioSessionModeVoiceChat
+ error:&error];
+ if (error != nil) {
+ const char* errorString = [[error localizedDescription] UTF8String];
+ WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
+ "Could not set mode: %s", errorString);
+ }
+ error = nil;
+ [session setCategory:AVAudioSessionCategoryPlayAndRecord
+ error:&error];
+ if (error != nil) {
+ const char* errorString = [[error localizedDescription] UTF8String];
+ WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
+ "Could not set category: %s", errorString);
+ }
//////////////////////
// Setup Voice Processing Audio Unit
@@ -1293,7 +1311,7 @@
" Audio Unit playout opened in sampling rate %f",
playoutDesc.mSampleRate);
- playoutDesc.mSampleRate = sampleRate;
+ playoutDesc.mSampleRate = preferredSampleRate;
// Store the sampling frequency to use towards the Audio Device Buffer
// todo: Add 48 kHz (increase buffer sizes). Other fs?
@@ -1362,7 +1380,7 @@
" Audio Unit recording opened in sampling rate %f",
recordingDesc.mSampleRate);
- recordingDesc.mSampleRate = sampleRate;
+ recordingDesc.mSampleRate = preferredSampleRate;
// Set stream format for out/1 (use same sampling frequency as for in/1)
recordingDesc.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger
@@ -1392,25 +1410,73 @@
}
// Get hardware sample rate for logging (see if we get what we asked for)
- Float64 hardwareSampleRate = 0.0;
- size = sizeof(hardwareSampleRate);
- result = AudioSessionGetProperty(
- kAudioSessionProperty_CurrentHardwareSampleRate, &size,
- &hardwareSampleRate);
- if (0 != result) {
- WEBRTC_TRACE(kTraceDebug, kTraceAudioDevice, _id,
- " Could not get current HW sample rate (result=%d)", result);
- }
+ double sampleRate = session.sampleRate;
WEBRTC_TRACE(kTraceDebug, kTraceAudioDevice, _id,
" Current HW sample rate is %f, ADB sample rate is %d",
- hardwareSampleRate, _adbSampFreq);
+ sampleRate, _adbSampFreq);
+
+ // Listen to audio interruptions.
+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
+ id observer =
+ [center addObserverForName:AVAudioSessionInterruptionNotification
+ object:nil
+ queue:[NSOperationQueue mainQueue]
+ usingBlock:^(NSNotification* notification) {
+ NSNumber* typeNumber =
+ [notification userInfo][AVAudioSessionInterruptionTypeKey];
+ AVAudioSessionInterruptionType type =
+ (AVAudioSessionInterruptionType)[typeNumber unsignedIntegerValue];
+ switch (type) {
+ case AVAudioSessionInterruptionTypeBegan:
+ // At this point our audio session has been deactivated and the
+ // audio unit render callbacks no longer occur. Nothing to do.
+ break;
+ case AVAudioSessionInterruptionTypeEnded: {
+ NSError* error = nil;
+ AVAudioSession* session = [AVAudioSession sharedInstance];
+ [session setActive:YES
+ error:&error];
+ if (error != nil) {
+ WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
+ "Error activating audio session");
+ }
+ // Post interruption the audio unit render callbacks don't
+ // automatically continue, so we restart the unit manually here.
+ AudioOutputUnitStop(_auVoiceProcessing);
+ AudioOutputUnitStart(_auVoiceProcessing);
+ break;
+ }
+ }
+ }];
+ // Increment refcount on observer using ARC bridge. Instance variable is a
+ // void* instead of an id because header is included in other pure C++
+ // files.
+ _audioInterruptionObserver = (__bridge_retained void*)observer;
+
+ // Activate audio session.
+ error = nil;
+ [session setActive:YES
+ error:&error];
+ if (error != nil) {
+ WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
+ "Error activating audio session");
+ }
return 0;
}
-int32_t AudioDeviceIPhone::ShutdownPlayOrRecord() {
+int32_t AudioDeviceIOS::ShutdownPlayOrRecord() {
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "%s", __FUNCTION__);
+ if (_audioInterruptionObserver != NULL) {
+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
+ // Transfer ownership of observer back to ARC, which will dealloc the
+ // observer once it exits this scope.
+ id observer = (__bridge_transfer id)_audioInterruptionObserver;
+ [center removeObserver:observer];
+ _audioInterruptionObserver = NULL;
+ }
+
// Close and delete AU
OSStatus result = -1;
if (NULL != _auVoiceProcessing) {
@@ -1435,13 +1501,13 @@
// ============================================================================
OSStatus
- AudioDeviceIPhone::RecordProcess(void *inRefCon,
- AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *inTimeStamp,
- UInt32 inBusNumber,
- UInt32 inNumberFrames,
- AudioBufferList *ioData) {
- AudioDeviceIPhone* ptrThis = static_cast<AudioDeviceIPhone*>(inRefCon);
+ AudioDeviceIOS::RecordProcess(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList *ioData) {
+ AudioDeviceIOS* ptrThis = static_cast<AudioDeviceIOS*>(inRefCon);
return ptrThis->RecordProcessImpl(ioActionFlags,
inTimeStamp,
@@ -1451,11 +1517,10 @@
OSStatus
- AudioDeviceIPhone::RecordProcessImpl(
- AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *inTimeStamp,
- uint32_t inBusNumber,
- uint32_t inNumberFrames) {
+ AudioDeviceIOS::RecordProcessImpl(AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ uint32_t inBusNumber,
+ uint32_t inNumberFrames) {
// Setup some basic stuff
// Use temp buffer not to lock up recording buffer more than necessary
// todo: Make dataTmp a member variable with static size that holds
@@ -1561,20 +1626,20 @@
}
OSStatus
- AudioDeviceIPhone::PlayoutProcess(void *inRefCon,
- AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *inTimeStamp,
- UInt32 inBusNumber,
- UInt32 inNumberFrames,
- AudioBufferList *ioData) {
- AudioDeviceIPhone* ptrThis = static_cast<AudioDeviceIPhone*>(inRefCon);
+ AudioDeviceIOS::PlayoutProcess(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList *ioData) {
+ AudioDeviceIOS* ptrThis = static_cast<AudioDeviceIOS*>(inRefCon);
return ptrThis->PlayoutProcessImpl(inNumberFrames, ioData);
}
OSStatus
- AudioDeviceIPhone::PlayoutProcessImpl(uint32_t inNumberFrames,
- AudioBufferList *ioData) {
+ AudioDeviceIOS::PlayoutProcessImpl(uint32_t inNumberFrames,
+ AudioBufferList *ioData) {
// Setup some basic stuff
// assert(sizeof(short) == 2); // Assumption for implementation
@@ -1677,7 +1742,7 @@
return 0;
}
-void AudioDeviceIPhone::UpdatePlayoutDelay() {
+void AudioDeviceIOS::UpdatePlayoutDelay() {
++_playoutDelayMeasurementCounter;
if (_playoutDelayMeasurementCounter >= 100) {
@@ -1686,36 +1751,25 @@
// Since this is eventually rounded to integral ms, add 0.5ms
// here to get round-to-nearest-int behavior instead of
// truncation.
- float totalDelaySeconds = 0.0005;
+ double totalDelaySeconds = 0.0005;
// HW output latency
- Float32 f32(0);
- UInt32 size = sizeof(f32);
- OSStatus result = AudioSessionGetProperty(
- kAudioSessionProperty_CurrentHardwareOutputLatency, &size, &f32);
- if (0 != result) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "error HW latency (result=%d)", result);
- }
- assert(f32 >= 0);
- totalDelaySeconds += f32;
+ AVAudioSession* session = [AVAudioSession sharedInstance];
+ double latency = session.outputLatency;
+ assert(latency >= 0);
+ totalDelaySeconds += latency;
// HW buffer duration
- f32 = 0;
- result = AudioSessionGetProperty(
- kAudioSessionProperty_CurrentHardwareIOBufferDuration, &size, &f32);
- if (0 != result) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "error HW buffer duration (result=%d)", result);
- }
- assert(f32 >= 0);
- totalDelaySeconds += f32;
+ double ioBufferDuration = session.IOBufferDuration;
+ assert(ioBufferDuration >= 0);
+ totalDelaySeconds += ioBufferDuration;
// AU latency
Float64 f64(0);
- size = sizeof(f64);
- result = AudioUnitGetProperty(_auVoiceProcessing,
- kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0, &f64, &size);
+ UInt32 size = sizeof(f64);
+ OSStatus result = AudioUnitGetProperty(
+ _auVoiceProcessing, kAudioUnitProperty_Latency,
+ kAudioUnitScope_Global, 0, &f64, &size);
if (0 != result) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
"error AU latency (result=%d)", result);
@@ -1733,7 +1787,7 @@
// todo: Add playout buffer?
}
-void AudioDeviceIPhone::UpdateRecordingDelay() {
+void AudioDeviceIOS::UpdateRecordingDelay() {
++_recordingDelayMeasurementCounter;
if (_recordingDelayMeasurementCounter >= 100) {
@@ -1742,37 +1796,25 @@
// Since this is eventually rounded to integral ms, add 0.5ms
// here to get round-to-nearest-int behavior instead of
// truncation.
- float totalDelaySeconds = 0.0005;
+ double totalDelaySeconds = 0.0005;
// HW input latency
- Float32 f32(0);
- UInt32 size = sizeof(f32);
- OSStatus result = AudioSessionGetProperty(
- kAudioSessionProperty_CurrentHardwareInputLatency, &size, &f32);
- if (0 != result) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "error HW latency (result=%d)", result);
- }
- assert(f32 >= 0);
- totalDelaySeconds += f32;
+ AVAudioSession* session = [AVAudioSession sharedInstance];
+ double latency = session.inputLatency;
+ assert(latency >= 0);
+ totalDelaySeconds += latency;
// HW buffer duration
- f32 = 0;
- result = AudioSessionGetProperty(
- kAudioSessionProperty_CurrentHardwareIOBufferDuration, &size, &f32);
- if (0 != result) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "error HW buffer duration (result=%d)", result);
- }
- assert(f32 >= 0);
- totalDelaySeconds += f32;
+ double ioBufferDuration = session.IOBufferDuration;
+ assert(ioBufferDuration >= 0);
+ totalDelaySeconds += ioBufferDuration;
// AU latency
Float64 f64(0);
- size = sizeof(f64);
- result = AudioUnitGetProperty(_auVoiceProcessing,
- kAudioUnitProperty_Latency,
- kAudioUnitScope_Global, 0, &f64, &size);
+ UInt32 size = sizeof(f64);
+ OSStatus result = AudioUnitGetProperty(
+ _auVoiceProcessing, kAudioUnitProperty_Latency,
+ kAudioUnitScope_Global, 0, &f64, &size);
if (0 != result) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
"error AU latency (result=%d)", result);
@@ -1799,11 +1841,11 @@
}
}
-bool AudioDeviceIPhone::RunCapture(void* ptrThis) {
- return static_cast<AudioDeviceIPhone*>(ptrThis)->CaptureWorkerThread();
+bool AudioDeviceIOS::RunCapture(void* ptrThis) {
+ return static_cast<AudioDeviceIOS*>(ptrThis)->CaptureWorkerThread();
}
-bool AudioDeviceIPhone::CaptureWorkerThread() {
+bool AudioDeviceIOS::CaptureWorkerThread() {
if (_recording) {
int bufPos = 0;
unsigned int lowestSeq = 0;
diff --git a/modules/audio_device/ios/audio_device_utility_ios.cc b/modules/audio_device/ios/audio_device_utility_ios.cc
index 6bbceb9..3362817 100644
--- a/modules/audio_device/ios/audio_device_utility_ios.cc
+++ b/modules/audio_device/ios/audio_device_utility_ios.cc
@@ -15,7 +15,7 @@
#include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
-AudioDeviceUtilityIPhone::AudioDeviceUtilityIPhone(const int32_t id)
+AudioDeviceUtilityIOS::AudioDeviceUtilityIOS(const int32_t id)
:
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_id(id),
@@ -24,15 +24,16 @@
"%s created", __FUNCTION__);
}
-AudioDeviceUtilityIPhone::~AudioDeviceUtilityIPhone() {
+AudioDeviceUtilityIOS::~AudioDeviceUtilityIOS() {
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
"%s destroyed", __FUNCTION__);
- CriticalSectionScoped lock(&_critSect);
-
+ {
+ CriticalSectionScoped lock(&_critSect);
+ }
delete &_critSect;
}
-int32_t AudioDeviceUtilityIPhone::Init() {
+int32_t AudioDeviceUtilityIOS::Init() {
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
"%s", __FUNCTION__);
diff --git a/modules/audio_device/ios/audio_device_utility_ios.h b/modules/audio_device/ios/audio_device_utility_ios.h
index 081ab82..1694868 100644
--- a/modules/audio_device/ios/audio_device_utility_ios.h
+++ b/modules/audio_device/ios/audio_device_utility_ios.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_IPHONE_H
-#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_IPHONE_H
+#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_IOS_H
+#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_IOS_H
#include "webrtc/modules/audio_device/audio_device_utility.h"
#include "webrtc/modules/audio_device/include/audio_device.h"
@@ -17,15 +17,15 @@
namespace webrtc {
class CriticalSectionWrapper;
-class AudioDeviceUtilityIPhone: public AudioDeviceUtility {
-public:
- AudioDeviceUtilityIPhone(const int32_t id);
- AudioDeviceUtilityIPhone();
- virtual ~AudioDeviceUtilityIPhone();
+class AudioDeviceUtilityIOS: public AudioDeviceUtility {
+ public:
+ AudioDeviceUtilityIOS(const int32_t id);
+ AudioDeviceUtilityIOS();
+ virtual ~AudioDeviceUtilityIOS();
virtual int32_t Init();
-private:
+ private:
CriticalSectionWrapper& _critSect;
int32_t _id;
AudioDeviceModule::ErrorCode _lastError;
@@ -33,4 +33,4 @@
} // namespace webrtc
-#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_IPHONE_H
+#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_IOS_H
diff --git a/modules/audio_device/linux/latebindingsymboltable_linux.cc b/modules/audio_device/linux/latebindingsymboltable_linux.cc
index d6a2162..4e694fa 100644
--- a/modules/audio_device/linux/latebindingsymboltable_linux.cc
+++ b/modules/audio_device/linux/latebindingsymboltable_linux.cc
@@ -64,10 +64,19 @@
void InternalUnloadDll(DllHandle handle) {
#ifdef WEBRTC_LINUX
+// TODO(pbos): Remove this dlclose() exclusion when leaks and suppressions from
+// here are gone (or AddressSanitizer can display them properly).
+//
+// Skip dlclose() on AddressSanitizer as leaks including this module in the
+// stack trace gets displayed as <unknown module> instead of the actual library
+// -> it can not be suppressed.
+// https://code.google.com/p/address-sanitizer/issues/detail?id=89
+#if !defined(ADDRESS_SANITIZER)
if (dlclose(handle) != 0) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1,
"%s", GetDllError());
}
+#endif // !defined(ADDRESS_SANITIZER)
#else
#error Not implemented
#endif
diff --git a/modules/audio_device/test/audio_device_test_api.cc b/modules/audio_device/test/audio_device_test_api.cc
index 011fc10..b4b8235 100644
--- a/modules/audio_device/test/audio_device_test_api.cc
+++ b/modules/audio_device/test/audio_device_test_api.cc
@@ -386,6 +386,8 @@
EXPECT_GT(audio_device_->RecordingDevices(), 0);
}
+// TODO(henrika): uncomment when you have decided what to do with issue 3675.
+#if 0
TEST_F(AudioDeviceAPITest, PlayoutDeviceName) {
char name[kAdmMaxDeviceNameSize];
char guid[kAdmMaxGuidSize];
@@ -482,6 +484,7 @@
EXPECT_EQ(0, audio_device_->SetRecordingDevice(i));
}
}
+#endif // 0
TEST_F(AudioDeviceAPITest, PlayoutIsAvailable) {
bool available;
diff --git a/modules/audio_device/test/func_test_manager.cc b/modules/audio_device/test/func_test_manager.cc
index 2a19287..49ceca5 100644
--- a/modules/audio_device/test/func_test_manager.cc
+++ b/modules/audio_device/test/func_test_manager.cc
@@ -922,9 +922,12 @@
#ifdef _WIN32
// default (-1)
+ // TODO(henrika): fix below test.
+#if 0
EXPECT_EQ(0, audioDevice->PlayoutDeviceName(-1, name, guid));
TEST_LOG("PlayoutDeviceName(%d): default name=%s \n \
default guid=%s\n", -1, name, guid);
+#endif // 0
#else
// should fail
EXPECT_EQ(-1, audioDevice->PlayoutDeviceName(-1, name, guid));
@@ -944,9 +947,12 @@
#ifdef _WIN32
// default (-1)
+ // TODO(henrika): fix below test.
+#if 0
EXPECT_EQ(0, audioDevice->RecordingDeviceName(-1, name, guid));
TEST_LOG("RecordingDeviceName(%d): default name=%s \n \
default guid=%s\n", -1, name, guid);
+#endif
#else
// should fail
EXPECT_EQ(-1, audioDevice->PlayoutDeviceName(-1, name, guid));
diff --git a/modules/audio_device/win/audio_device_core_win.cc b/modules/audio_device/win/audio_device_core_win.cc
index 32b5e49..3708c54 100644
--- a/modules/audio_device/win/audio_device_core_win.cc
+++ b/modules/audio_device/win/audio_device_core_win.cc
@@ -20,12 +20,6 @@
#include "webrtc/modules/audio_device/audio_device_config.h"
-#if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD)
-#pragma message(">> INFO: WEBRTC_WINDOWS_CORE_AUDIO_BUILD is defined")
-#else
-#pragma message(">> INFO: WEBRTC_WINDOWS_CORE_AUDIO_BUILD is *not* defined")
-#endif
-
#ifdef WEBRTC_WINDOWS_CORE_AUDIO_BUILD
#include "webrtc/modules/audio_device/win/audio_device_core_win.h"
@@ -2201,7 +2195,7 @@
HRESULT hr = S_OK;
WAVEFORMATEX* pWfxOut = NULL;
- WAVEFORMATEX Wfx;
+ WAVEFORMATEX Wfx = WAVEFORMATEX();
WAVEFORMATEX* pWfxClosestMatch = NULL;
// Create COM object with IAudioClient interface.
@@ -2538,7 +2532,7 @@
HRESULT hr = S_OK;
WAVEFORMATEX* pWfxIn = NULL;
- WAVEFORMATEX Wfx;
+ WAVEFORMATEX Wfx = WAVEFORMATEX();
WAVEFORMATEX* pWfxClosestMatch = NULL;
// Create COM object with IAudioClient interface.
@@ -3335,7 +3329,7 @@
default: // unexpected error
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
" unknown wait termination on get volume thread");
- return -1;
+ return 1;
}
}
}
@@ -3356,7 +3350,7 @@
default: // unexpected error
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
" unknown wait termination on set volume thread");
- return -1;
+ return 1;
}
_Lock();
@@ -3392,10 +3386,10 @@
if (!comInit.succeeded()) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
"failed to initialize COM in render thread");
- return -1;
+ return 1;
}
- _SetThreadName(-1, "webrtc_core_audio_render_thread");
+ _SetThreadName(0, "webrtc_core_audio_render_thread");
// Use Multimedia Class Scheduler Service (MMCSS) to boost the thread priority.
//
@@ -3672,7 +3666,7 @@
{
_hMmTask = NULL;
- _SetThreadName(-1, "webrtc_core_audio_capture_thread");
+ _SetThreadName(0, "webrtc_core_audio_capture_thread");
// Use Multimedia Class Scheduler Service (MMCSS) to boost the thread
// priority.
@@ -3726,7 +3720,7 @@
if (!comInit.succeeded()) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
"failed to initialize COM in polling DMO thread");
- return -1;
+ return 1;
}
HRESULT hr = InitCaptureThreadPriority();
@@ -3884,7 +3878,7 @@
if (!comInit.succeeded()) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
"failed to initialize COM in capture thread");
- return -1;
+ return 1;
}
hr = InitCaptureThreadPriority();
@@ -3911,7 +3905,7 @@
syncBuffer = new BYTE[syncBufferSize];
if (syncBuffer == NULL)
{
- return E_POINTER;
+ return (DWORD)E_POINTER;
}
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "[CAPT] size of sync buffer : %u [bytes]", syncBufferSize);
diff --git a/modules/audio_device/win/audio_device_utility_win.cc b/modules/audio_device/win/audio_device_utility_win.cc
index 1d28e3d..9cfd6be 100644
--- a/modules/audio_device/win/audio_device_utility_win.cc
+++ b/modules/audio_device/win/audio_device_utility_win.cc
@@ -105,7 +105,8 @@
// Retrieve information about the current operating system
//
- if (!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi)))
+ bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi);
+ if (!bOsVersionInfoEx)
return FALSE;
// Parse our OS version string
diff --git a/modules/audio_device/win/audio_device_wave_win.cc b/modules/audio_device/win/audio_device_wave_win.cc
index e2e515b..f47f080 100644
--- a/modules/audio_device/win/audio_device_wave_win.cc
+++ b/modules/audio_device/win/audio_device_wave_win.cc
@@ -428,7 +428,7 @@
default: // unexpected error
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
" unknown wait termination on get volume thread");
- return -1;
+ return 1;
}
if (AGC())
@@ -464,7 +464,7 @@
default: // unexpected error
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
" unknown wait termination on set volume thread");
- return -1;
+ return 1;
}
_critSect.Enter();
@@ -3310,7 +3310,7 @@
_sndCardPlayDelay = msecOnPlaySide;
_sndCardRecDelay = msecOnRecordSide;
- LARGE_INTEGER t1,t2;
+ LARGE_INTEGER t1={0},t2={0};
if (send)
{
diff --git a/modules/audio_device/win/audio_mixer_manager_win.cc b/modules/audio_device/win/audio_mixer_manager_win.cc
index 7b5aa69..4d6e7bb 100644
--- a/modules/audio_device/win/audio_mixer_manager_win.cc
+++ b/modules/audio_device/win/audio_mixer_manager_win.cc
@@ -586,7 +586,7 @@
_outputMixerHandle = NULL;
}
- MMRESULT res;
+ MMRESULT res = MMSYSERR_NOERROR;
WAVEFORMATEX waveFormat;
HWAVEOUT hWaveOut(NULL);
@@ -808,7 +808,7 @@
_inputMixerHandle = NULL;
}
- MMRESULT res;
+ MMRESULT res = MMSYSERR_NOERROR;
WAVEFORMATEX waveFormat;
HWAVEIN hWaveIn(NULL);
diff --git a/modules/audio_processing.target.darwin-arm.mk b/modules/audio_processing.target.darwin-arm.mk
index 13f3e8a..ae20275 100644
--- a/modules/audio_processing.target.darwin-arm.mk
+++ b/modules/audio_processing.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -78,13 +76,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -99,6 +97,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -106,7 +105,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -123,12 +121,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -178,23 +179,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -212,13 +214,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -240,7 +242,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -257,12 +258,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -313,69 +317,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.darwin-arm64.mk b/modules/audio_processing.target.darwin-arm64.mk
index f8bb58e..cc2e870 100644
--- a/modules/audio_processing.target.darwin-arm64.mk
+++ b/modules/audio_processing.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,13 +86,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -111,12 +109,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -163,21 +164,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,7 +215,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -230,12 +231,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -283,60 +287,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.darwin-mips.mk b/modules/audio_processing.target.darwin-mips.mk
index 7a4bd12..a114603 100644
--- a/modules/audio_processing.target.darwin-mips.mk
+++ b/modules/audio_processing.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -51,9 +50,7 @@
third_party/webrtc/modules/audio_processing/voice_detection_impl.cc \
third_party/webrtc/modules/audio_processing/ns/noise_suppression.c \
third_party/webrtc/modules/audio_processing/ns/ns_core.c \
- third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.c \
- third_party/webrtc/modules/audio_processing/aec/aec_core_mips.c \
- third_party/webrtc/modules/audio_processing/aec/aec_rdft_mips.c
+ third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.c
# Flags passed to both C and C++ files.
@@ -61,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,18 +66,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +88,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -120,17 +112,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -174,23 +167,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,18 +193,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -232,7 +222,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -249,17 +238,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -304,65 +294,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.darwin-mips64.mk b/modules/audio_processing.target.darwin-mips64.mk
new file mode 100644
index 0000000..a114603
--- /dev/null
+++ b/modules/audio_processing.target.darwin-mips64.mk
@@ -0,0 +1,328 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_modules_audioproc_debug_proto_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_modules_audioproc_debug_proto_gyp.a
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_processing/aec/echo_cancellation.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_core.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_rdft.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_resampler.c \
+ third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.c \
+ third_party/webrtc/modules/audio_processing/aecm/aecm_core.c \
+ third_party/webrtc/modules/audio_processing/agc/analog_agc.c \
+ third_party/webrtc/modules/audio_processing/agc/digital_agc.c \
+ third_party/webrtc/modules/audio_processing/audio_buffer.cc \
+ third_party/webrtc/modules/audio_processing/audio_processing_impl.cc \
+ third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc \
+ third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc \
+ third_party/webrtc/modules/audio_processing/gain_control_impl.cc \
+ third_party/webrtc/modules/audio_processing/high_pass_filter_impl.cc \
+ third_party/webrtc/modules/audio_processing/level_estimator_impl.cc \
+ third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc \
+ third_party/webrtc/modules/audio_processing/processing_component.cc \
+ third_party/webrtc/modules/audio_processing/rms_level.cc \
+ third_party/webrtc/modules/audio_processing/typing_detection.cc \
+ third_party/webrtc/modules/audio_processing/utility/delay_estimator.c \
+ third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.c \
+ third_party/webrtc/modules/audio_processing/utility/fft4g.c \
+ third_party/webrtc/modules/audio_processing/utility/ring_buffer.c \
+ third_party/webrtc/modules/audio_processing/voice_detection_impl.cc \
+ third_party/webrtc/modules/audio_processing/ns/noise_suppression.c \
+ third_party/webrtc/modules/audio_processing/ns/ns_core.c \
+ third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_AUDIOPROC_DEBUG_DUMP' \
+ '-DWEBRTC_NS_FLOAT' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_AUDIOPROC_DEBUG_DUMP' \
+ '-DWEBRTC_NS_FLOAT' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_processing_gyp
+
+# Alias gyp target name.
+.PHONY: audio_processing
+audio_processing: third_party_webrtc_modules_audio_processing_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_processing.target.darwin-x86.mk b/modules/audio_processing.target.darwin-x86.mk
index 731f4dd..763371b 100644
--- a/modules/audio_processing.target.darwin-x86.mk
+++ b/modules/audio_processing.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +99,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,12 +115,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -169,21 +170,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -225,7 +227,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +243,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -295,64 +299,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.darwin-x86_64.mk b/modules/audio_processing.target.darwin-x86_64.mk
index eb318f4..bc0bbd2 100644
--- a/modules/audio_processing.target.darwin-x86_64.mk
+++ b/modules/audio_processing.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,22 +169,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -223,7 +225,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -240,12 +241,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -293,64 +297,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.linux-arm.mk b/modules/audio_processing.target.linux-arm.mk
index 13f3e8a..ae20275 100644
--- a/modules/audio_processing.target.linux-arm.mk
+++ b/modules/audio_processing.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -78,13 +76,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -99,6 +97,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -106,7 +105,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -123,12 +121,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -178,23 +179,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -212,13 +214,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -240,7 +242,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -257,12 +258,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -313,69 +317,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.linux-arm64.mk b/modules/audio_processing.target.linux-arm64.mk
index f8bb58e..cc2e870 100644
--- a/modules/audio_processing.target.linux-arm64.mk
+++ b/modules/audio_processing.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,13 +86,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -111,12 +109,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -163,21 +164,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,7 +215,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -230,12 +231,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -283,60 +287,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.linux-mips.mk b/modules/audio_processing.target.linux-mips.mk
index 7a4bd12..a114603 100644
--- a/modules/audio_processing.target.linux-mips.mk
+++ b/modules/audio_processing.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -51,9 +50,7 @@
third_party/webrtc/modules/audio_processing/voice_detection_impl.cc \
third_party/webrtc/modules/audio_processing/ns/noise_suppression.c \
third_party/webrtc/modules/audio_processing/ns/ns_core.c \
- third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.c \
- third_party/webrtc/modules/audio_processing/aec/aec_core_mips.c \
- third_party/webrtc/modules/audio_processing/aec/aec_rdft_mips.c
+ third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.c
# Flags passed to both C and C++ files.
@@ -61,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,18 +66,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +88,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -120,17 +112,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -174,23 +167,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,18 +193,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -232,7 +222,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -249,17 +238,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -304,65 +294,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.linux-mips64.mk b/modules/audio_processing.target.linux-mips64.mk
new file mode 100644
index 0000000..a114603
--- /dev/null
+++ b/modules/audio_processing.target.linux-mips64.mk
@@ -0,0 +1,328 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_webrtc_modules_audioproc_debug_proto_gyp,,,$(GYP_VAR_PREFIX))/third_party_webrtc_modules_audioproc_debug_proto_gyp.a
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_processing/aec/echo_cancellation.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_core.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_rdft.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_resampler.c \
+ third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.c \
+ third_party/webrtc/modules/audio_processing/aecm/aecm_core.c \
+ third_party/webrtc/modules/audio_processing/agc/analog_agc.c \
+ third_party/webrtc/modules/audio_processing/agc/digital_agc.c \
+ third_party/webrtc/modules/audio_processing/audio_buffer.cc \
+ third_party/webrtc/modules/audio_processing/audio_processing_impl.cc \
+ third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc \
+ third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc \
+ third_party/webrtc/modules/audio_processing/gain_control_impl.cc \
+ third_party/webrtc/modules/audio_processing/high_pass_filter_impl.cc \
+ third_party/webrtc/modules/audio_processing/level_estimator_impl.cc \
+ third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc \
+ third_party/webrtc/modules/audio_processing/processing_component.cc \
+ third_party/webrtc/modules/audio_processing/rms_level.cc \
+ third_party/webrtc/modules/audio_processing/typing_detection.cc \
+ third_party/webrtc/modules/audio_processing/utility/delay_estimator.c \
+ third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.c \
+ third_party/webrtc/modules/audio_processing/utility/fft4g.c \
+ third_party/webrtc/modules/audio_processing/utility/ring_buffer.c \
+ third_party/webrtc/modules/audio_processing/voice_detection_impl.cc \
+ third_party/webrtc/modules/audio_processing/ns/noise_suppression.c \
+ third_party/webrtc/modules/audio_processing/ns/ns_core.c \
+ third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_AUDIOPROC_DEBUG_DUMP' \
+ '-DWEBRTC_NS_FLOAT' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_AUDIOPROC_DEBUG_DUMP' \
+ '-DWEBRTC_NS_FLOAT' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audio_processing_gyp
+
+# Alias gyp target name.
+.PHONY: audio_processing
+audio_processing: third_party_webrtc_modules_audio_processing_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_processing.target.linux-x86.mk b/modules/audio_processing.target.linux-x86.mk
index 731f4dd..763371b 100644
--- a/modules/audio_processing.target.linux-x86.mk
+++ b/modules/audio_processing.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +99,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,12 +115,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -169,21 +170,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -225,7 +227,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +243,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -295,64 +299,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing.target.linux-x86_64.mk b/modules/audio_processing.target.linux-x86_64.mk
index eb318f4..bc0bbd2 100644
--- a/modules/audio_processing.target.linux-x86_64.mk
+++ b/modules/audio_processing.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,22 +169,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -223,7 +225,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -240,12 +241,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -293,64 +297,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- third_party_webrtc_modules_audioproc_debug_proto_gyp
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing/Android.mk b/modules/audio_processing/Android.mk
deleted file mode 100644
index 3273908..0000000
--- a/modules/audio_processing/Android.mk
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc_apm
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- $(call all-proto-files-under, .) \
- audio_buffer.cc \
- audio_processing_impl.cc \
- echo_cancellation_impl.cc \
- echo_control_mobile_impl.cc \
- gain_control_impl.cc \
- high_pass_filter_impl.cc \
- level_estimator_impl.cc \
- noise_suppression_impl.cc \
- splitting_filter.cc \
- processing_component.cc \
- voice_detection_impl.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_NS_FIXED' \
- '-DWEBRTC_ANDROID_PLATFORM_BUILD' \
- '-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
-# floating point
-# -DWEBRTC_NS_FLOAT'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/aec/include \
- $(LOCAL_PATH)/aecm/include \
- $(LOCAL_PATH)/agc/include \
- $(LOCAL_PATH)/ns/include \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../../common_audio/signal_processing/include \
- $(LOCAL_PATH)/../../common_audio/vad/include \
- $(LOCAL_PATH)/../../system_wrappers/interface \
- external/protobuf/src \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-# apm process test app
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= \
- $(call all-proto-files-under, .) \
- test/process_test.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_ANDROID_PLATFORM_BUILD' \
- '-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../../system_wrappers/interface \
- external/gtest/include \
- external/webrtc
-
-LOCAL_STATIC_LIBRARIES := \
- libgtest \
- libwebrtc_test_support \
- libprotobuf-cpp-2.3.0-lite
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libstlport \
- libwebrtc_audio_preprocessing
-
-LOCAL_MODULE:= webrtc_audioproc
-
-ifdef NDK_ROOT
-include $(BUILD_EXECUTABLE)
-else
-include external/stlport/libstlport.mk
-include $(BUILD_NATIVE_TEST)
-endif
-
-# apm unit test app
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= \
- $(call all-proto-files-under, test) \
- test/audio_processing_unittest.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_AUDIOPROC_FIXED_PROFILE' \
- '-DWEBRTC_ANDROID_PLATFORM_BUILD' \
- '-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../../../test \
- $(LOCAL_PATH)/../../system_wrappers/interface \
- $(LOCAL_PATH)/../../common_audio/signal_processing/include \
- external/gtest/include \
- external/protobuf/src \
- external/webrtc
-
-LOCAL_STATIC_LIBRARIES := \
- libgtest \
- libwebrtc_test_support \
- libprotobuf-cpp-2.3.0-lite
-
-LOCAL_SHARED_LIBRARIES := \
- libstlport \
- libwebrtc_audio_preprocessing
-
-LOCAL_MODULE:= webrtc_audioproc_unittest
-
-ifdef NDK_ROOT
-include $(BUILD_EXECUTABLE)
-else
-include external/stlport/libstlport.mk
-include $(BUILD_NATIVE_TEST)
-endif
diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn
new file mode 100644
index 0000000..42ec6e7
--- /dev/null
+++ b/modules/audio_processing/BUILD.gn
@@ -0,0 +1,231 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("//build/config/arm.gni")
+import("//third_party/protobuf/proto_library.gni")
+import("../../build/webrtc.gni")
+
+declare_args() {
+ # Outputs some low-level debug files.
+ aec_debug_dump = false
+
+ # Disables the usual mode where we trust the reported system delay
+ # values the AEC receives. The corresponding define is set appropriately
+ # in the code, but it can be force-enabled here for testing.
+ aec_untrusted_delay_for_testing = false
+}
+
+source_set("audio_processing") {
+ sources = [
+ "aec/include/echo_cancellation.h",
+ "aec/echo_cancellation.c",
+ "aec/echo_cancellation_internal.h",
+ "aec/aec_core.h",
+ "aec/aec_core.c",
+ "aec/aec_core_internal.h",
+ "aec/aec_rdft.h",
+ "aec/aec_rdft.c",
+ "aec/aec_resampler.h",
+ "aec/aec_resampler.c",
+ "aecm/include/echo_control_mobile.h",
+ "aecm/echo_control_mobile.c",
+ "aecm/aecm_core.c",
+ "aecm/aecm_core.h",
+ "agc/include/gain_control.h",
+ "agc/analog_agc.c",
+ "agc/analog_agc.h",
+ "agc/digital_agc.c",
+ "agc/digital_agc.h",
+ "audio_buffer.cc",
+ "audio_buffer.h",
+ "audio_processing_impl.cc",
+ "audio_processing_impl.h",
+ "common.h",
+ "echo_cancellation_impl.cc",
+ "echo_cancellation_impl.h",
+ "echo_control_mobile_impl.cc",
+ "echo_control_mobile_impl.h",
+ "gain_control_impl.cc",
+ "gain_control_impl.h",
+ "high_pass_filter_impl.cc",
+ "high_pass_filter_impl.h",
+ "include/audio_processing.h",
+ "level_estimator_impl.cc",
+ "level_estimator_impl.h",
+ "noise_suppression_impl.cc",
+ "noise_suppression_impl.h",
+ "processing_component.cc",
+ "processing_component.h",
+ "rms_level.cc",
+ "rms_level.h",
+ "typing_detection.cc",
+ "typing_detection.h",
+ "utility/delay_estimator.c",
+ "utility/delay_estimator.h",
+ "utility/delay_estimator_internal.h",
+ "utility/delay_estimator_wrapper.c",
+ "utility/delay_estimator_wrapper.h",
+ "utility/fft4g.c",
+ "utility/fft4g.h",
+ "utility/ring_buffer.c",
+ "utility/ring_buffer.h",
+ "voice_detection_impl.cc",
+ "voice_detection_impl.h",
+ ]
+
+ configs += [ "../..:common_config" ]
+ direct_dependent_configs = [ "../..:common_inherited_config" ]
+
+ defines = []
+ deps = []
+
+ if (aec_debug_dump) {
+ defines += [ "WEBRTC_AEC_DEBUG_DUMP" ]
+ }
+
+ if (aec_untrusted_delay_for_testing) {
+ defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
+ }
+
+ if (rtc_enable_protobuf) {
+ defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
+ deps += [ ":audioproc_debug_proto" ]
+ }
+
+ if (rtc_prefer_fixed_point) {
+ defines += [ "WEBRTC_NS_FIXED" ]
+ sources += [
+ "ns/include/noise_suppression_x.h",
+ "ns/noise_suppression_x.c",
+ "ns/nsx_core.c",
+ "ns/nsx_core.h",
+ "ns/nsx_defines.h",
+ ]
+ if (cpu_arch == "mipsel") {
+ sources += [ "ns/nsx_core_mips.c" ]
+ } else {
+ sources += [ "ns/nsx_core_c.c" ]
+ }
+ } else {
+ defines += [ "WEBRTC_NS_FLOAT" ]
+ sources += [
+ "ns/defines.h",
+ "ns/include/noise_suppression.h",
+ "ns/noise_suppression.c",
+ "ns/ns_core.c",
+ "ns/ns_core.h",
+ "ns/windows_private.h",
+ ]
+ }
+
+ if (cpu_arch == "x86" || cpu_arch == "x64") {
+ deps += [ ":audio_processing_sse2" ]
+ }
+
+ if (rtc_build_armv7_neon) {
+ deps += [ ":audio_processing_neon" ]
+ }
+
+ if (cpu_arch == "mipsel") {
+ sources += [ "aecm/aecm_core_mips.c" ]
+ if (mips_fpu) {
+ sources += [
+ "aec/aec_core_mips.c",
+ "aec/aec_rdft_mips.c",
+ ]
+ }
+ } else {
+ sources += [ "aecm/aecm_core_c.c" ]
+ }
+
+ if (is_win) {
+ cflags = [
+ # TODO(jschuh): Bug 1348: fix this warning.
+ "/wd4267", # size_t to int truncations
+ ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps += [
+ "../../base:rtc_base_approved",
+ "../../common_audio",
+ "../../system_wrappers",
+ ]
+}
+
+if (rtc_enable_protobuf) {
+ proto_library("audioproc_debug_proto") {
+ sources = [ "debug.proto" ]
+
+ proto_out_dir = "webrtc/audio_processing"
+ }
+}
+
+if (cpu_arch == "x86" || cpu_arch == "x64") {
+ source_set("audio_processing_sse2") {
+ sources = [
+ "aec/aec_core_sse2.c",
+ "aec/aec_rdft_sse2.c",
+ ]
+
+ cflags = [ "-msse2" ]
+
+ configs += [ "../..:common_inherited_config" ]
+ }
+}
+
+if (rtc_build_armv7_neon) {
+ source_set("audio_processing_neon") {
+ sources = [
+ "aec/aec_core_neon.c",
+ "aec/aec_rdft_neon.c",
+ ]
+
+ deps = [ "../../common_audio" ]
+
+ if (is_android || is_ios) {
+ sources += [
+ # TODO(andrew): Re-enable these once webrtc:3580 is resolved.
+ #"aecm/aecm_core_neon.S",
+ #"ns/nsx_core_neon.S",
+ ]
+
+ include_dirs = [ target_out_dir ]
+ } else {
+ sources += [
+ "aecm/aecm_core_neon.c",
+ "ns/nsx_core_neon.c",
+ ]
+ }
+
+ # Enable compilation for the ARM v7 Neon instruction set. This is needed
+ # since //build/config/arm.gni only enables Neon for iOS, not Android.
+ # This provides the same functionality as webrtc/build/arm_neon.gypi.
+ # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
+ # //build/config/arm.gni instead, to reduce code duplication.
+ # Remove the -mfpu=vfpv3-d16 cflag.
+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+ cflags = [
+ "-flax-vector-conversions",
+ "-mfpu=neon",
+ ]
+
+ # Disable LTO in audio_processing_neon target due to compiler bug.
+ if (rtc_use_lto) {
+ cflags -= [
+ "-flto",
+ "-ffat-lto-objects",
+ ]
+ }
+ }
+}
diff --git a/modules/audio_processing/OWNERS b/modules/audio_processing/OWNERS
index 7c1f788..41a82af 100644
--- a/modules/audio_processing/OWNERS
+++ b/modules/audio_processing/OWNERS
@@ -6,3 +6,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/audio_processing/aec/Android.mk b/modules/audio_processing/aec/Android.mk
deleted file mode 100644
index 181e87d..0000000
--- a/modules/audio_processing/aec/Android.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_aec
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- echo_cancellation.c \
- aec_resampler.c \
- aec_core.c \
- aec_rdft.c \
-
-ifeq ($(TARGET_ARCH),x86)
-LOCAL_SRC_FILES += \
- aec_core_sse2.c \
- aec_rdft_sse2.c
-endif
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../utility \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-#########################
-# Build the neon library.
-ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
-LOCAL_SRC_FILES += \
- aec_core_neon.c
-
-endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
diff --git a/modules/audio_processing/aec/aec_common.h b/modules/audio_processing/aec/aec_common.h
new file mode 100644
index 0000000..1e24ca9
--- /dev/null
+++ b/modules/audio_processing/aec/aec_common.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
+#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
+
+#include "webrtc/typedefs.h"
+
+#ifdef _MSC_VER /* visual c++ */
+#define ALIGN16_BEG __declspec(align(16))
+#define ALIGN16_END
+#else /* gcc or icc */
+#define ALIGN16_BEG
+#define ALIGN16_END __attribute__((aligned(16)))
+#endif
+
+extern ALIGN16_BEG const float ALIGN16_END WebRtcAec_sqrtHanning[65];
+extern ALIGN16_BEG const float ALIGN16_END WebRtcAec_weightCurve[65];
+extern ALIGN16_BEG const float ALIGN16_END WebRtcAec_overDriveCurve[65];
+extern const float WebRtcAec_kExtendedSmoothingCoefficients[2][2];
+extern const float WebRtcAec_kNormalSmoothingCoefficients[2][2];
+extern const float WebRtcAec_kMinFarendPSD;
+
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
+
diff --git a/modules/audio_processing/aec/aec_core.c b/modules/audio_processing/aec/aec_core.c
index 207c6dc..1e217eb 100644
--- a/modules/audio_processing/aec/aec_core.c
+++ b/modules/audio_processing/aec/aec_core.c
@@ -14,6 +14,10 @@
#include "webrtc/modules/audio_processing/aec/aec_core.h"
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+#include <stdio.h>
+#endif
+
#include <assert.h>
#include <math.h>
#include <stddef.h> // size_t
@@ -21,6 +25,7 @@
#include <string.h>
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_processing/aec/aec_common.h"
#include "webrtc/modules/audio_processing/aec/aec_core_internal.h"
#include "webrtc/modules/audio_processing/aec/aec_rdft.h"
#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
@@ -45,7 +50,7 @@
// Matlab code to produce table:
// win = sqrt(hanning(63)); win = [0 ; win(1:32)];
// fprintf(1, '\t%.14f, %.14f, %.14f,\n', win);
-static const float sqrtHanning[65] = {
+ALIGN16_BEG const float ALIGN16_END WebRtcAec_sqrtHanning[65] = {
0.00000000000000f, 0.02454122852291f, 0.04906767432742f, 0.07356456359967f,
0.09801714032956f, 0.12241067519922f, 0.14673047445536f, 0.17096188876030f,
0.19509032201613f, 0.21910124015687f, 0.24298017990326f, 0.26671275747490f,
@@ -99,10 +104,10 @@
// Two sets of parameters, one for the extended filter mode.
static const float kExtendedMinOverDrive[3] = {3.0f, 6.0f, 15.0f};
static const float kNormalMinOverDrive[3] = {1.0f, 2.0f, 5.0f};
-static const float kExtendedSmoothingCoefficients[2][2] = {{0.9f, 0.1f},
- {0.92f, 0.08f}};
-static const float kNormalSmoothingCoefficients[2][2] = {{0.9f, 0.1f},
- {0.93f, 0.07f}};
+const float WebRtcAec_kExtendedSmoothingCoefficients[2][2] = {{0.9f, 0.1f},
+ {0.92f, 0.08f}};
+const float WebRtcAec_kNormalSmoothingCoefficients[2][2] = {{0.9f, 0.1f},
+ {0.93f, 0.07f}};
// Number of partitions forming the NLP's "preferred" bands.
enum {
@@ -113,30 +118,12 @@
extern int webrtc_aec_instance_count;
#endif
-// "Private" function prototypes.
-static void ProcessBlock(AecCore* aec);
-
-static void NonLinearProcessing(AecCore* aec, float* output, float* outputH);
-
-static void GetHighbandGain(const float* lambda, float* nlpGainHband);
-
-// Comfort_noise also computes noise for H band returned in comfortNoiseHband
-static void ComfortNoise(AecCore* aec,
- float efw[2][PART_LEN1],
- complex_t* comfortNoiseHband,
- const float* noisePow,
- const float* lambda);
-
-static void InitLevel(PowerLevel* level);
-static void InitStats(Stats* stats);
-static void InitMetrics(AecCore* aec);
-static void UpdateLevel(PowerLevel* level, float in[2][PART_LEN1]);
-static void UpdateMetrics(AecCore* aec);
-// Convert from time domain to frequency domain. Note that |time_data| are
-// overwritten.
-static void TimeToFrequency(float time_data[PART_LEN2],
- float freq_data[2][PART_LEN1],
- int window);
+WebRtcAec_FilterFar_t WebRtcAec_FilterFar;
+WebRtcAec_ScaleErrorSignal_t WebRtcAec_ScaleErrorSignal;
+WebRtcAec_FilterAdaptation_t WebRtcAec_FilterAdaptation;
+WebRtcAec_OverdriveAndSuppress_t WebRtcAec_OverdriveAndSuppress;
+WebRtcAec_ComfortNoise_t WebRtcAec_ComfortNoise;
+WebRtcAec_SubbandCoherence_t WebRtcAec_SubbandCoherence;
__inline static float MulRe(float aRe, float aIm, float bRe, float bIm) {
return aRe * bRe - aIm * bIm;
@@ -153,121 +140,6 @@
return (*da > *db) - (*da < *db);
}
-int WebRtcAec_CreateAec(AecCore** aecInst) {
- AecCore* aec = malloc(sizeof(AecCore));
- *aecInst = aec;
- if (aec == NULL) {
- return -1;
- }
-
- aec->nearFrBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
- if (!aec->nearFrBuf) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
-
- aec->outFrBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
- if (!aec->outFrBuf) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
-
- aec->nearFrBufH = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
- if (!aec->nearFrBufH) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
-
- aec->outFrBufH = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
- if (!aec->outFrBufH) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
-
- // Create far-end buffers.
- aec->far_buf =
- WebRtc_CreateBuffer(kBufSizePartitions, sizeof(float) * 2 * PART_LEN1);
- if (!aec->far_buf) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
- aec->far_buf_windowed =
- WebRtc_CreateBuffer(kBufSizePartitions, sizeof(float) * 2 * PART_LEN1);
- if (!aec->far_buf_windowed) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- aec->far_time_buf =
- WebRtc_CreateBuffer(kBufSizePartitions, sizeof(int16_t) * PART_LEN);
- if (!aec->far_time_buf) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
- {
- char filename[64];
- sprintf(filename, "aec_far%d.pcm", webrtc_aec_instance_count);
- aec->farFile = fopen(filename, "wb");
- sprintf(filename, "aec_near%d.pcm", webrtc_aec_instance_count);
- aec->nearFile = fopen(filename, "wb");
- sprintf(filename, "aec_out%d.pcm", webrtc_aec_instance_count);
- aec->outFile = fopen(filename, "wb");
- sprintf(filename, "aec_out_linear%d.pcm", webrtc_aec_instance_count);
- aec->outLinearFile = fopen(filename, "wb");
- }
-#endif
- aec->delay_estimator_farend =
- WebRtc_CreateDelayEstimatorFarend(PART_LEN1, kHistorySizeBlocks);
- if (aec->delay_estimator_farend == NULL) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
- aec->delay_estimator = WebRtc_CreateDelayEstimator(
- aec->delay_estimator_farend, kLookaheadBlocks);
- if (aec->delay_estimator == NULL) {
- WebRtcAec_FreeAec(aec);
- aec = NULL;
- return -1;
- }
-
- return 0;
-}
-
-int WebRtcAec_FreeAec(AecCore* aec) {
- if (aec == NULL) {
- return -1;
- }
-
- WebRtc_FreeBuffer(aec->nearFrBuf);
- WebRtc_FreeBuffer(aec->outFrBuf);
-
- WebRtc_FreeBuffer(aec->nearFrBufH);
- WebRtc_FreeBuffer(aec->outFrBufH);
-
- WebRtc_FreeBuffer(aec->far_buf);
- WebRtc_FreeBuffer(aec->far_buf_windowed);
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- WebRtc_FreeBuffer(aec->far_time_buf);
- fclose(aec->farFile);
- fclose(aec->nearFile);
- fclose(aec->outFile);
- fclose(aec->outLinearFile);
-#endif
- WebRtc_FreeDelayEstimator(aec->delay_estimator);
- WebRtc_FreeDelayEstimatorFarend(aec->delay_estimator_farend);
-
- free(aec);
- return 0;
-}
-
static void FilterFar(AecCore* aec, float yf[2][PART_LEN1]) {
int i;
for (i = 0; i < aec->num_partitions; i++) {
@@ -415,724 +287,55 @@
}
}
-WebRtcAec_FilterFar_t WebRtcAec_FilterFar;
-WebRtcAec_ScaleErrorSignal_t WebRtcAec_ScaleErrorSignal;
-WebRtcAec_FilterAdaptation_t WebRtcAec_FilterAdaptation;
-WebRtcAec_OverdriveAndSuppress_t WebRtcAec_OverdriveAndSuppress;
-WebRtcAec_ComfortNoise_t WebRtcAec_ComfortNoise;
-
-int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
+static int PartitionDelay(const AecCore* aec) {
+ // Measures the energy in each filter partition and returns the partition with
+ // highest energy.
+ // TODO(bjornv): Spread computational cost by computing one partition per
+ // block?
+ float wfEnMax = 0;
int i;
+ int delay = 0;
- aec->sampFreq = sampFreq;
-
- if (sampFreq == 8000) {
- aec->normal_mu = 0.6f;
- aec->normal_error_threshold = 2e-6f;
- } else {
- aec->normal_mu = 0.5f;
- aec->normal_error_threshold = 1.5e-6f;
- }
-
- if (WebRtc_InitBuffer(aec->nearFrBuf) == -1) {
- return -1;
- }
-
- if (WebRtc_InitBuffer(aec->outFrBuf) == -1) {
- return -1;
- }
-
- if (WebRtc_InitBuffer(aec->nearFrBufH) == -1) {
- return -1;
- }
-
- if (WebRtc_InitBuffer(aec->outFrBufH) == -1) {
- return -1;
- }
-
- // Initialize far-end buffers.
- if (WebRtc_InitBuffer(aec->far_buf) == -1) {
- return -1;
- }
- if (WebRtc_InitBuffer(aec->far_buf_windowed) == -1) {
- return -1;
- }
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- if (WebRtc_InitBuffer(aec->far_time_buf) == -1) {
- return -1;
- }
-#endif
- aec->system_delay = 0;
-
- if (WebRtc_InitDelayEstimatorFarend(aec->delay_estimator_farend) != 0) {
- return -1;
- }
- if (WebRtc_InitDelayEstimator(aec->delay_estimator) != 0) {
- return -1;
- }
- aec->delay_logging_enabled = 0;
- memset(aec->delay_histogram, 0, sizeof(aec->delay_histogram));
-
- aec->reported_delay_enabled = 1;
- aec->extended_filter_enabled = 0;
- aec->num_partitions = kNormalNumPartitions;
-
- // Update the delay estimator with filter length. We use half the
- // |num_partitions| to take the echo path into account. In practice we say
- // that the echo has a duration of maximum half |num_partitions|, which is not
- // true, but serves as a crude measure.
- WebRtc_set_allowed_offset(aec->delay_estimator, aec->num_partitions / 2);
- // TODO(bjornv): I currently hard coded the enable. Once we've established
- // that AECM has no performance regression, robust_validation will be enabled
- // all the time and the APIs to turn it on/off will be removed. Hence, remove
- // this line then.
- WebRtc_enable_robust_validation(aec->delay_estimator, 1);
-
- // Default target suppression mode.
- aec->nlp_mode = 1;
-
- // Sampling frequency multiplier
- // SWB is processed as 160 frame size
- if (aec->sampFreq == 32000) {
- aec->mult = (short)aec->sampFreq / 16000;
- } else {
- aec->mult = (short)aec->sampFreq / 8000;
- }
-
- aec->farBufWritePos = 0;
- aec->farBufReadPos = 0;
-
- aec->inSamples = 0;
- aec->outSamples = 0;
- aec->knownDelay = 0;
-
- // Initialize buffers
- memset(aec->dBuf, 0, sizeof(aec->dBuf));
- memset(aec->eBuf, 0, sizeof(aec->eBuf));
- // For H band
- memset(aec->dBufH, 0, sizeof(aec->dBufH));
-
- memset(aec->xPow, 0, sizeof(aec->xPow));
- memset(aec->dPow, 0, sizeof(aec->dPow));
- memset(aec->dInitMinPow, 0, sizeof(aec->dInitMinPow));
- aec->noisePow = aec->dInitMinPow;
- aec->noiseEstCtr = 0;
-
- // Initial comfort noise power
- for (i = 0; i < PART_LEN1; i++) {
- aec->dMinPow[i] = 1.0e6f;
- }
-
- // Holds the last block written to
- aec->xfBufBlockPos = 0;
- // TODO: Investigate need for these initializations. Deleting them doesn't
- // change the output at all and yields 0.4% overall speedup.
- memset(aec->xfBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);
- memset(aec->wfBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);
- memset(aec->sde, 0, sizeof(complex_t) * PART_LEN1);
- memset(aec->sxd, 0, sizeof(complex_t) * PART_LEN1);
- memset(
- aec->xfwBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);
- memset(aec->se, 0, sizeof(float) * PART_LEN1);
-
- // To prevent numerical instability in the first block.
- for (i = 0; i < PART_LEN1; i++) {
- aec->sd[i] = 1;
- }
- for (i = 0; i < PART_LEN1; i++) {
- aec->sx[i] = 1;
- }
-
- memset(aec->hNs, 0, sizeof(aec->hNs));
- memset(aec->outBuf, 0, sizeof(float) * PART_LEN);
-
- aec->hNlFbMin = 1;
- aec->hNlFbLocalMin = 1;
- aec->hNlXdAvgMin = 1;
- aec->hNlNewMin = 0;
- aec->hNlMinCtr = 0;
- aec->overDrive = 2;
- aec->overDriveSm = 2;
- aec->delayIdx = 0;
- aec->stNearState = 0;
- aec->echoState = 0;
- aec->divergeState = 0;
-
- aec->seed = 777;
- aec->delayEstCtr = 0;
-
- // Metrics disabled by default
- aec->metricsMode = 0;
- InitMetrics(aec);
-
- // Assembly optimization
- WebRtcAec_FilterFar = FilterFar;
- WebRtcAec_ScaleErrorSignal = ScaleErrorSignal;
- WebRtcAec_FilterAdaptation = FilterAdaptation;
- WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppress;
- WebRtcAec_ComfortNoise = ComfortNoise;
-
-#if defined(WEBRTC_ARCH_X86_FAMILY)
- if (WebRtc_GetCPUInfo(kSSE2)) {
- WebRtcAec_InitAec_SSE2();
- }
-#endif
-
-#if defined(MIPS_FPU_LE)
- WebRtcAec_InitAec_mips();
-#endif
-
-#if defined(WEBRTC_DETECT_ARM_NEON) || defined(WEBRTC_ARCH_ARM_NEON)
- WebRtcAec_InitAec_neon();
-#endif
-
- aec_rdft_init();
-
- return 0;
-}
-
-void WebRtcAec_BufferFarendPartition(AecCore* aec, const float* farend) {
- float fft[PART_LEN2];
- float xf[2][PART_LEN1];
-
- // Check if the buffer is full, and in that case flush the oldest data.
- if (WebRtc_available_write(aec->far_buf) < 1) {
- WebRtcAec_MoveFarReadPtr(aec, 1);
- }
- // Convert far-end partition to the frequency domain without windowing.
- memcpy(fft, farend, sizeof(float) * PART_LEN2);
- TimeToFrequency(fft, xf, 0);
- WebRtc_WriteBuffer(aec->far_buf, &xf[0][0], 1);
-
- // Convert far-end partition to the frequency domain with windowing.
- memcpy(fft, farend, sizeof(float) * PART_LEN2);
- TimeToFrequency(fft, xf, 1);
- WebRtc_WriteBuffer(aec->far_buf_windowed, &xf[0][0], 1);
-}
-
-int WebRtcAec_MoveFarReadPtr(AecCore* aec, int elements) {
- int elements_moved = WebRtc_MoveReadPtr(aec->far_buf_windowed, elements);
- WebRtc_MoveReadPtr(aec->far_buf, elements);
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- WebRtc_MoveReadPtr(aec->far_time_buf, elements);
-#endif
- aec->system_delay -= elements_moved * PART_LEN;
- return elements_moved;
-}
-
-void WebRtcAec_ProcessFrame(AecCore* aec,
- const float* nearend,
- const float* nearendH,
- int knownDelay,
- float* out,
- float* outH) {
- int out_elements = 0;
-
- // For each frame the process is as follows:
- // 1) If the system_delay indicates on being too small for processing a
- // frame we stuff the buffer with enough data for 10 ms.
- // 2) Adjust the buffer to the system delay, by moving the read pointer.
- // 3) TODO(bjornv): Investigate if we need to add this:
- // If we can't move read pointer due to buffer size limitations we
- // flush/stuff the buffer.
- // 4) Process as many partitions as possible.
- // 5) Update the |system_delay| with respect to a full frame of FRAME_LEN
- // samples. Even though we will have data left to process (we work with
- // partitions) we consider updating a whole frame, since that's the
- // amount of data we input and output in audio_processing.
- // 6) Update the outputs.
-
- // TODO(bjornv): Investigate how we should round the delay difference; right
- // now we know that incoming |knownDelay| is underestimated when it's less
- // than |aec->knownDelay|. We therefore, round (-32) in that direction. In
- // the other direction, we don't have this situation, but might flush one
- // partition too little. This can cause non-causality, which should be
- // investigated. Maybe, allow for a non-symmetric rounding, like -16.
- int move_elements = (aec->knownDelay - knownDelay - 32) / PART_LEN;
- int moved_elements = 0;
-
- // TODO(bjornv): Change the near-end buffer handling to be the same as for
- // far-end, that is, with a near_pre_buf.
- // Buffer the near-end frame.
- WebRtc_WriteBuffer(aec->nearFrBuf, nearend, FRAME_LEN);
- // For H band
- if (aec->sampFreq == 32000) {
- WebRtc_WriteBuffer(aec->nearFrBufH, nearendH, FRAME_LEN);
- }
-
- // 1) At most we process |aec->mult|+1 partitions in 10 ms. Make sure we
- // have enough far-end data for that by stuffing the buffer if the
- // |system_delay| indicates others.
- if (aec->system_delay < FRAME_LEN) {
- // We don't have enough data so we rewind 10 ms.
- WebRtcAec_MoveFarReadPtr(aec, -(aec->mult + 1));
- }
-
- // 2) Compensate for a possible change in the system delay.
- WebRtc_MoveReadPtr(aec->far_buf_windowed, move_elements);
- moved_elements = WebRtc_MoveReadPtr(aec->far_buf, move_elements);
- aec->knownDelay -= moved_elements * PART_LEN;
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- WebRtc_MoveReadPtr(aec->far_time_buf, move_elements);
-#endif
-
- // 4) Process as many blocks as possible.
- while (WebRtc_available_read(aec->nearFrBuf) >= PART_LEN) {
- ProcessBlock(aec);
- }
-
- // 5) Update system delay with respect to the entire frame.
- aec->system_delay -= FRAME_LEN;
-
- // 6) Update output frame.
- // Stuff the out buffer if we have less than a frame to output.
- // This should only happen for the first frame.
- out_elements = (int)WebRtc_available_read(aec->outFrBuf);
- if (out_elements < FRAME_LEN) {
- WebRtc_MoveReadPtr(aec->outFrBuf, out_elements - FRAME_LEN);
- if (aec->sampFreq == 32000) {
- WebRtc_MoveReadPtr(aec->outFrBufH, out_elements - FRAME_LEN);
- }
- }
- // Obtain an output frame.
- WebRtc_ReadBuffer(aec->outFrBuf, NULL, out, FRAME_LEN);
- // For H band.
- if (aec->sampFreq == 32000) {
- WebRtc_ReadBuffer(aec->outFrBufH, NULL, outH, FRAME_LEN);
- }
-}
-
-int WebRtcAec_GetDelayMetricsCore(AecCore* self, int* median, int* std) {
- int i = 0;
- int delay_values = 0;
- int num_delay_values = 0;
- int my_median = 0;
- const int kMsPerBlock = PART_LEN / (self->mult * 8);
- float l1_norm = 0;
-
- assert(self != NULL);
- assert(median != NULL);
- assert(std != NULL);
-
- if (self->delay_logging_enabled == 0) {
- // Logging disabled.
- return -1;
- }
-
- // Get number of delay values since last update.
- for (i = 0; i < kHistorySizeBlocks; i++) {
- num_delay_values += self->delay_histogram[i];
- }
- if (num_delay_values == 0) {
- // We have no new delay value data. Even though -1 is a valid estimate, it
- // will practically never be used since multiples of |kMsPerBlock| will
- // always be returned.
- *median = -1;
- *std = -1;
- return 0;
- }
-
- delay_values = num_delay_values >> 1; // Start value for median count down.
- // Get median of delay values since last update.
- for (i = 0; i < kHistorySizeBlocks; i++) {
- delay_values -= self->delay_histogram[i];
- if (delay_values < 0) {
- my_median = i;
- break;
- }
- }
- // Account for lookahead.
- *median = (my_median - kLookaheadBlocks) * kMsPerBlock;
-
- // Calculate the L1 norm, with median value as central moment.
- for (i = 0; i < kHistorySizeBlocks; i++) {
- l1_norm += (float)abs(i - my_median) * self->delay_histogram[i];
- }
- *std = (int)(l1_norm / (float)num_delay_values + 0.5f) * kMsPerBlock;
-
- // Reset histogram.
- memset(self->delay_histogram, 0, sizeof(self->delay_histogram));
-
- return 0;
-}
-
-int WebRtcAec_echo_state(AecCore* self) { return self->echoState; }
-
-void WebRtcAec_GetEchoStats(AecCore* self,
- Stats* erl,
- Stats* erle,
- Stats* a_nlp) {
- assert(erl != NULL);
- assert(erle != NULL);
- assert(a_nlp != NULL);
- *erl = self->erl;
- *erle = self->erle;
- *a_nlp = self->aNlp;
-}
-
-#ifdef WEBRTC_AEC_DEBUG_DUMP
-void* WebRtcAec_far_time_buf(AecCore* self) { return self->far_time_buf; }
-#endif
-
-void WebRtcAec_SetConfigCore(AecCore* self,
- int nlp_mode,
- int metrics_mode,
- int delay_logging) {
- assert(nlp_mode >= 0 && nlp_mode < 3);
- self->nlp_mode = nlp_mode;
- self->metricsMode = metrics_mode;
- if (self->metricsMode) {
- InitMetrics(self);
- }
- self->delay_logging_enabled = delay_logging;
- if (self->delay_logging_enabled) {
- memset(self->delay_histogram, 0, sizeof(self->delay_histogram));
- }
-}
-
-void WebRtcAec_enable_reported_delay(AecCore* self, int enable) {
- self->reported_delay_enabled = enable;
-}
-
-int WebRtcAec_reported_delay_enabled(AecCore* self) {
- return self->reported_delay_enabled;
-}
-
-void WebRtcAec_enable_delay_correction(AecCore* self, int enable) {
- self->extended_filter_enabled = enable;
- self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions;
- // Update the delay estimator with filter length. See InitAEC() for details.
- WebRtc_set_allowed_offset(self->delay_estimator, self->num_partitions / 2);
-}
-
-int WebRtcAec_delay_correction_enabled(AecCore* self) {
- return self->extended_filter_enabled;
-}
-
-int WebRtcAec_system_delay(AecCore* self) { return self->system_delay; }
-
-void WebRtcAec_SetSystemDelay(AecCore* self, int delay) {
- assert(delay >= 0);
- self->system_delay = delay;
-}
-
-static void ProcessBlock(AecCore* aec) {
- int i;
- float y[PART_LEN], e[PART_LEN];
- float scale;
-
- float fft[PART_LEN2];
- float xf[2][PART_LEN1], yf[2][PART_LEN1], ef[2][PART_LEN1];
- float df[2][PART_LEN1];
- float far_spectrum = 0.0f;
- float near_spectrum = 0.0f;
- float abs_far_spectrum[PART_LEN1];
- float abs_near_spectrum[PART_LEN1];
-
- const float gPow[2] = {0.9f, 0.1f};
-
- // Noise estimate constants.
- const int noiseInitBlocks = 500 * aec->mult;
- const float step = 0.1f;
- const float ramp = 1.0002f;
- const float gInitNoise[2] = {0.999f, 0.001f};
-
- float nearend[PART_LEN];
- float* nearend_ptr = NULL;
- float output[PART_LEN];
- float outputH[PART_LEN];
-
- float* xf_ptr = NULL;
-
- // Concatenate old and new nearend blocks.
- if (aec->sampFreq == 32000) {
- WebRtc_ReadBuffer(aec->nearFrBufH, (void**)&nearend_ptr, nearend, PART_LEN);
- memcpy(aec->dBufH + PART_LEN, nearend_ptr, sizeof(nearend));
- }
- WebRtc_ReadBuffer(aec->nearFrBuf, (void**)&nearend_ptr, nearend, PART_LEN);
- memcpy(aec->dBuf + PART_LEN, nearend_ptr, sizeof(nearend));
-
- // ---------- Ooura fft ----------
-
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- {
- int16_t farend[PART_LEN];
- int16_t* farend_ptr = NULL;
- WebRtc_ReadBuffer(aec->far_time_buf, (void**)&farend_ptr, farend, 1);
- (void)fwrite(farend_ptr, sizeof(int16_t), PART_LEN, aec->farFile);
- (void)fwrite(nearend_ptr, sizeof(int16_t), PART_LEN, aec->nearFile);
- }
-#endif
-
- // We should always have at least one element stored in |far_buf|.
- assert(WebRtc_available_read(aec->far_buf) > 0);
- WebRtc_ReadBuffer(aec->far_buf, (void**)&xf_ptr, &xf[0][0], 1);
-
- // Near fft
- memcpy(fft, aec->dBuf, sizeof(float) * PART_LEN2);
- TimeToFrequency(fft, df, 0);
-
- // Power smoothing
- for (i = 0; i < PART_LEN1; i++) {
- far_spectrum = (xf_ptr[i] * xf_ptr[i]) +
- (xf_ptr[PART_LEN1 + i] * xf_ptr[PART_LEN1 + i]);
- aec->xPow[i] =
- gPow[0] * aec->xPow[i] + gPow[1] * aec->num_partitions * far_spectrum;
- // Calculate absolute spectra
- abs_far_spectrum[i] = sqrtf(far_spectrum);
-
- near_spectrum = df[0][i] * df[0][i] + df[1][i] * df[1][i];
- aec->dPow[i] = gPow[0] * aec->dPow[i] + gPow[1] * near_spectrum;
- // Calculate absolute spectra
- abs_near_spectrum[i] = sqrtf(near_spectrum);
- }
-
- // Estimate noise power. Wait until dPow is more stable.
- if (aec->noiseEstCtr > 50) {
- for (i = 0; i < PART_LEN1; i++) {
- if (aec->dPow[i] < aec->dMinPow[i]) {
- aec->dMinPow[i] =
- (aec->dPow[i] + step * (aec->dMinPow[i] - aec->dPow[i])) * ramp;
- } else {
- aec->dMinPow[i] *= ramp;
- }
- }
- }
-
- // Smooth increasing noise power from zero at the start,
- // to avoid a sudden burst of comfort noise.
- if (aec->noiseEstCtr < noiseInitBlocks) {
- aec->noiseEstCtr++;
- for (i = 0; i < PART_LEN1; i++) {
- if (aec->dMinPow[i] > aec->dInitMinPow[i]) {
- aec->dInitMinPow[i] = gInitNoise[0] * aec->dInitMinPow[i] +
- gInitNoise[1] * aec->dMinPow[i];
- } else {
- aec->dInitMinPow[i] = aec->dMinPow[i];
- }
- }
- aec->noisePow = aec->dInitMinPow;
- } else {
- aec->noisePow = aec->dMinPow;
- }
-
- // Block wise delay estimation used for logging
- if (aec->delay_logging_enabled) {
- int delay_estimate = 0;
- if (WebRtc_AddFarSpectrumFloat(
- aec->delay_estimator_farend, abs_far_spectrum, PART_LEN1) == 0) {
- delay_estimate = WebRtc_DelayEstimatorProcessFloat(
- aec->delay_estimator, abs_near_spectrum, PART_LEN1);
- if (delay_estimate >= 0) {
- // Update delay estimate buffer.
- aec->delay_histogram[delay_estimate]++;
- }
- }
- }
-
- // Update the xfBuf block position.
- aec->xfBufBlockPos--;
- if (aec->xfBufBlockPos == -1) {
- aec->xfBufBlockPos = aec->num_partitions - 1;
- }
-
- // Buffer xf
- memcpy(aec->xfBuf[0] + aec->xfBufBlockPos * PART_LEN1,
- xf_ptr,
- sizeof(float) * PART_LEN1);
- memcpy(aec->xfBuf[1] + aec->xfBufBlockPos * PART_LEN1,
- &xf_ptr[PART_LEN1],
- sizeof(float) * PART_LEN1);
-
- memset(yf, 0, sizeof(yf));
-
- // Filter far
- WebRtcAec_FilterFar(aec, yf);
-
- // Inverse fft to obtain echo estimate and error.
- fft[0] = yf[0][0];
- fft[1] = yf[0][PART_LEN];
- for (i = 1; i < PART_LEN; i++) {
- fft[2 * i] = yf[0][i];
- fft[2 * i + 1] = yf[1][i];
- }
- aec_rdft_inverse_128(fft);
-
- scale = 2.0f / PART_LEN2;
- for (i = 0; i < PART_LEN; i++) {
- y[i] = fft[PART_LEN + i] * scale; // fft scaling
- }
-
- for (i = 0; i < PART_LEN; i++) {
- e[i] = nearend_ptr[i] - y[i];
- }
-
- // Error fft
- memcpy(aec->eBuf + PART_LEN, e, sizeof(float) * PART_LEN);
- memset(fft, 0, sizeof(float) * PART_LEN);
- memcpy(fft + PART_LEN, e, sizeof(float) * PART_LEN);
- // TODO(bjornv): Change to use TimeToFrequency().
- aec_rdft_forward_128(fft);
-
- ef[1][0] = 0;
- ef[1][PART_LEN] = 0;
- ef[0][0] = fft[0];
- ef[0][PART_LEN] = fft[1];
- for (i = 1; i < PART_LEN; i++) {
- ef[0][i] = fft[2 * i];
- ef[1][i] = fft[2 * i + 1];
- }
-
- if (aec->metricsMode == 1) {
- // Note that the first PART_LEN samples in fft (before transformation) are
- // zero. Hence, the scaling by two in UpdateLevel() should not be
- // performed. That scaling is taken care of in UpdateMetrics() instead.
- UpdateLevel(&aec->linoutlevel, ef);
- }
-
- // Scale error signal inversely with far power.
- WebRtcAec_ScaleErrorSignal(aec, ef);
- WebRtcAec_FilterAdaptation(aec, fft, ef);
- NonLinearProcessing(aec, output, outputH);
-
- if (aec->metricsMode == 1) {
- // Update power levels and echo metrics
- UpdateLevel(&aec->farlevel, (float(*)[PART_LEN1])xf_ptr);
- UpdateLevel(&aec->nearlevel, df);
- UpdateMetrics(aec);
- }
-
- // Store the output block.
- WebRtc_WriteBuffer(aec->outFrBuf, output, PART_LEN);
- // For H band
- if (aec->sampFreq == 32000) {
- WebRtc_WriteBuffer(aec->outFrBufH, outputH, PART_LEN);
- }
-
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- {
- int16_t eInt16[PART_LEN];
- for (i = 0; i < PART_LEN; i++) {
- eInt16[i] = (int16_t)WEBRTC_SPL_SAT(
- WEBRTC_SPL_WORD16_MAX, e[i], WEBRTC_SPL_WORD16_MIN);
+ for (i = 0; i < aec->num_partitions; i++) {
+ int j;
+ int pos = i * PART_LEN1;
+ float wfEn = 0;
+ for (j = 0; j < PART_LEN1; j++) {
+ wfEn += aec->wfBuf[0][pos + j] * aec->wfBuf[0][pos + j] +
+ aec->wfBuf[1][pos + j] * aec->wfBuf[1][pos + j];
}
- (void)fwrite(eInt16, sizeof(int16_t), PART_LEN, aec->outLinearFile);
- (void)fwrite(output, sizeof(int16_t), PART_LEN, aec->outFile);
+ if (wfEn > wfEnMax) {
+ wfEnMax = wfEn;
+ delay = i;
+ }
}
-#endif
+ return delay;
}
-static void NonLinearProcessing(AecCore* aec, float* output, float* outputH) {
- float efw[2][PART_LEN1], dfw[2][PART_LEN1], xfw[2][PART_LEN1];
- complex_t comfortNoiseHband[PART_LEN1];
- float fft[PART_LEN2];
- float scale, dtmp;
- float nlpGainHband;
- int i, j, pos;
+// Threshold to protect against the ill-effects of a zero far-end.
+const float WebRtcAec_kMinFarendPSD = 15;
- // Coherence and non-linear filter
- float cohde[PART_LEN1], cohxd[PART_LEN1];
- float hNlDeAvg, hNlXdAvg;
- float hNl[PART_LEN1];
- float hNlPref[kPrefBandSize];
- float hNlFb = 0, hNlFbLow = 0;
- const float prefBandQuant = 0.75f, prefBandQuantLow = 0.5f;
- const int prefBandSize = kPrefBandSize / aec->mult;
- const int minPrefBand = 4 / aec->mult;
-
- // Near and error power sums
- float sdSum = 0, seSum = 0;
-
+// Updates the following smoothed Power Spectral Densities (PSD):
+// - sd : near-end
+// - se : residual echo
+// - sx : far-end
+// - sde : cross-PSD of near-end and residual echo
+// - sxd : cross-PSD of near-end and far-end
+//
+// In addition to updating the PSDs, also the filter diverge state is determined
+// upon actions are taken.
+static void SmoothedPSD(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float dfw[2][PART_LEN1],
+ float xfw[2][PART_LEN1]) {
// Power estimate smoothing coefficients.
const float* ptrGCoh = aec->extended_filter_enabled
- ? kExtendedSmoothingCoefficients[aec->mult - 1]
- : kNormalSmoothingCoefficients[aec->mult - 1];
- const float* min_overdrive = aec->extended_filter_enabled
- ? kExtendedMinOverDrive
- : kNormalMinOverDrive;
+ ? WebRtcAec_kExtendedSmoothingCoefficients[aec->mult - 1]
+ : WebRtcAec_kNormalSmoothingCoefficients[aec->mult - 1];
+ int i;
+ float sdSum = 0, seSum = 0;
- // Filter energy
- float wfEnMax = 0, wfEn = 0;
- const int delayEstInterval = 10 * aec->mult;
-
- float* xfw_ptr = NULL;
-
- aec->delayEstCtr++;
- if (aec->delayEstCtr == delayEstInterval) {
- aec->delayEstCtr = 0;
- }
-
- // initialize comfort noise for H band
- memset(comfortNoiseHband, 0, sizeof(comfortNoiseHband));
- nlpGainHband = (float)0.0;
- dtmp = (float)0.0;
-
- // Measure energy in each filter partition to determine delay.
- // TODO: Spread by computing one partition per block?
- if (aec->delayEstCtr == 0) {
- wfEnMax = 0;
- aec->delayIdx = 0;
- for (i = 0; i < aec->num_partitions; i++) {
- pos = i * PART_LEN1;
- wfEn = 0;
- for (j = 0; j < PART_LEN1; j++) {
- wfEn += aec->wfBuf[0][pos + j] * aec->wfBuf[0][pos + j] +
- aec->wfBuf[1][pos + j] * aec->wfBuf[1][pos + j];
- }
-
- if (wfEn > wfEnMax) {
- wfEnMax = wfEn;
- aec->delayIdx = i;
- }
- }
- }
-
- // We should always have at least one element stored in |far_buf|.
- assert(WebRtc_available_read(aec->far_buf_windowed) > 0);
- // NLP
- WebRtc_ReadBuffer(aec->far_buf_windowed, (void**)&xfw_ptr, &xfw[0][0], 1);
-
- // TODO(bjornv): Investigate if we can reuse |far_buf_windowed| instead of
- // |xfwBuf|.
- // Buffer far.
- memcpy(aec->xfwBuf, xfw_ptr, sizeof(float) * 2 * PART_LEN1);
-
- // Use delayed far.
- memcpy(xfw, aec->xfwBuf + aec->delayIdx * PART_LEN1, sizeof(xfw));
-
- // Windowed near fft
- for (i = 0; i < PART_LEN; i++) {
- fft[i] = aec->dBuf[i] * sqrtHanning[i];
- fft[PART_LEN + i] = aec->dBuf[PART_LEN + i] * sqrtHanning[PART_LEN - i];
- }
- aec_rdft_forward_128(fft);
-
- dfw[1][0] = 0;
- dfw[1][PART_LEN] = 0;
- dfw[0][0] = fft[0];
- dfw[0][PART_LEN] = fft[1];
- for (i = 1; i < PART_LEN; i++) {
- dfw[0][i] = fft[2 * i];
- dfw[1][i] = fft[2 * i + 1];
- }
-
- // Windowed error fft
- for (i = 0; i < PART_LEN; i++) {
- fft[i] = aec->eBuf[i] * sqrtHanning[i];
- fft[PART_LEN + i] = aec->eBuf[PART_LEN + i] * sqrtHanning[PART_LEN - i];
- }
- aec_rdft_forward_128(fft);
- efw[1][0] = 0;
- efw[1][PART_LEN] = 0;
- efw[0][0] = fft[0];
- efw[0][PART_LEN] = fft[1];
- for (i = 1; i < PART_LEN; i++) {
- efw[0][i] = fft[2 * i];
- efw[1][i] = fft[2 * i + 1];
- }
-
- // Smoothed PSD
for (i = 0; i < PART_LEN1; i++) {
aec->sd[i] = ptrGCoh[0] * aec->sd[i] +
ptrGCoh[1] * (dfw[0][i] * dfw[0][i] + dfw[1][i] * dfw[1][i]);
@@ -1141,11 +344,12 @@
// We threshold here to protect against the ill-effects of a zero farend.
// The threshold is not arbitrarily chosen, but balances protection and
// adverse interaction with the algorithm's tuning.
- // TODO: investigate further why this is so sensitive.
+ // TODO(bjornv): investigate further why this is so sensitive.
aec->sx[i] =
ptrGCoh[0] * aec->sx[i] +
- ptrGCoh[1] *
- WEBRTC_SPL_MAX(xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i], 15);
+ ptrGCoh[1] * WEBRTC_SPL_MAX(
+ xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i],
+ WebRtcAec_kMinFarendPSD);
aec->sde[i][0] =
ptrGCoh[0] * aec->sde[i][0] +
@@ -1166,26 +370,68 @@
}
// Divergent filter safeguard.
- if (aec->divergeState == 0) {
- if (seSum > sdSum) {
- aec->divergeState = 1;
- }
- } else {
- if (seSum * 1.05f < sdSum) {
- aec->divergeState = 0;
- }
- }
+ aec->divergeState = (aec->divergeState ? 1.05f : 1.0f) * seSum > sdSum;
- if (aec->divergeState == 1) {
- memcpy(efw, dfw, sizeof(efw));
- }
+ if (aec->divergeState)
+ memcpy(efw, dfw, sizeof(efw[0][0]) * 2 * PART_LEN1);
- if (!aec->extended_filter_enabled) {
- // Reset if error is significantly larger than nearend (13 dB).
- if (seSum > (19.95f * sdSum)) {
- memset(aec->wfBuf, 0, sizeof(aec->wfBuf));
- }
+ // Reset if error is significantly larger than nearend (13 dB).
+ if (!aec->extended_filter_enabled && seSum > (19.95f * sdSum))
+ memset(aec->wfBuf, 0, sizeof(aec->wfBuf));
+}
+
+// Window time domain data to be used by the fft.
+__inline static void WindowData(float* x_windowed, const float* x) {
+ int i;
+ for (i = 0; i < PART_LEN; i++) {
+ x_windowed[i] = x[i] * WebRtcAec_sqrtHanning[i];
+ x_windowed[PART_LEN + i] =
+ x[PART_LEN + i] * WebRtcAec_sqrtHanning[PART_LEN - i];
}
+}
+
+// Puts fft output data into a complex valued array.
+__inline static void StoreAsComplex(const float* data,
+ float data_complex[2][PART_LEN1]) {
+ int i;
+ data_complex[0][0] = data[0];
+ data_complex[1][0] = 0;
+ for (i = 1; i < PART_LEN; i++) {
+ data_complex[0][i] = data[2 * i];
+ data_complex[1][i] = data[2 * i + 1];
+ }
+ data_complex[0][PART_LEN] = data[1];
+ data_complex[1][PART_LEN] = 0;
+}
+
+static void SubbandCoherence(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float xfw[2][PART_LEN1],
+ float* fft,
+ float* cohde,
+ float* cohxd) {
+ float dfw[2][PART_LEN1];
+ int i;
+
+ if (aec->delayEstCtr == 0)
+ aec->delayIdx = PartitionDelay(aec);
+
+ // Use delayed far.
+ memcpy(xfw,
+ aec->xfwBuf + aec->delayIdx * PART_LEN1,
+ sizeof(xfw[0][0]) * 2 * PART_LEN1);
+
+ // Windowed near fft
+ WindowData(fft, aec->dBuf);
+ aec_rdft_forward_128(fft);
+ StoreAsComplex(fft, dfw);
+
+ // Windowed error fft
+ WindowData(fft, aec->eBuf);
+ aec_rdft_forward_128(fft);
+ StoreAsComplex(fft, efw);
+
+ SmoothedPSD(aec, efw, dfw, xfw);
// Subband coherence
for (i = 0; i < PART_LEN1; i++) {
@@ -1196,184 +442,6 @@
(aec->sxd[i][0] * aec->sxd[i][0] + aec->sxd[i][1] * aec->sxd[i][1]) /
(aec->sx[i] * aec->sd[i] + 1e-10f);
}
-
- hNlXdAvg = 0;
- for (i = minPrefBand; i < prefBandSize + minPrefBand; i++) {
- hNlXdAvg += cohxd[i];
- }
- hNlXdAvg /= prefBandSize;
- hNlXdAvg = 1 - hNlXdAvg;
-
- hNlDeAvg = 0;
- for (i = minPrefBand; i < prefBandSize + minPrefBand; i++) {
- hNlDeAvg += cohde[i];
- }
- hNlDeAvg /= prefBandSize;
-
- if (hNlXdAvg < 0.75f && hNlXdAvg < aec->hNlXdAvgMin) {
- aec->hNlXdAvgMin = hNlXdAvg;
- }
-
- if (hNlDeAvg > 0.98f && hNlXdAvg > 0.9f) {
- aec->stNearState = 1;
- } else if (hNlDeAvg < 0.95f || hNlXdAvg < 0.8f) {
- aec->stNearState = 0;
- }
-
- if (aec->hNlXdAvgMin == 1) {
- aec->echoState = 0;
- aec->overDrive = min_overdrive[aec->nlp_mode];
-
- if (aec->stNearState == 1) {
- memcpy(hNl, cohde, sizeof(hNl));
- hNlFb = hNlDeAvg;
- hNlFbLow = hNlDeAvg;
- } else {
- for (i = 0; i < PART_LEN1; i++) {
- hNl[i] = 1 - cohxd[i];
- }
- hNlFb = hNlXdAvg;
- hNlFbLow = hNlXdAvg;
- }
- } else {
-
- if (aec->stNearState == 1) {
- aec->echoState = 0;
- memcpy(hNl, cohde, sizeof(hNl));
- hNlFb = hNlDeAvg;
- hNlFbLow = hNlDeAvg;
- } else {
- aec->echoState = 1;
- for (i = 0; i < PART_LEN1; i++) {
- hNl[i] = WEBRTC_SPL_MIN(cohde[i], 1 - cohxd[i]);
- }
-
- // Select an order statistic from the preferred bands.
- // TODO: Using quicksort now, but a selection algorithm may be preferred.
- memcpy(hNlPref, &hNl[minPrefBand], sizeof(float) * prefBandSize);
- qsort(hNlPref, prefBandSize, sizeof(float), CmpFloat);
- hNlFb = hNlPref[(int)floor(prefBandQuant * (prefBandSize - 1))];
- hNlFbLow = hNlPref[(int)floor(prefBandQuantLow * (prefBandSize - 1))];
- }
- }
-
- // Track the local filter minimum to determine suppression overdrive.
- if (hNlFbLow < 0.6f && hNlFbLow < aec->hNlFbLocalMin) {
- aec->hNlFbLocalMin = hNlFbLow;
- aec->hNlFbMin = hNlFbLow;
- aec->hNlNewMin = 1;
- aec->hNlMinCtr = 0;
- }
- aec->hNlFbLocalMin =
- WEBRTC_SPL_MIN(aec->hNlFbLocalMin + 0.0008f / aec->mult, 1);
- aec->hNlXdAvgMin = WEBRTC_SPL_MIN(aec->hNlXdAvgMin + 0.0006f / aec->mult, 1);
-
- if (aec->hNlNewMin == 1) {
- aec->hNlMinCtr++;
- }
- if (aec->hNlMinCtr == 2) {
- aec->hNlNewMin = 0;
- aec->hNlMinCtr = 0;
- aec->overDrive =
- WEBRTC_SPL_MAX(kTargetSupp[aec->nlp_mode] /
- ((float)log(aec->hNlFbMin + 1e-10f) + 1e-10f),
- min_overdrive[aec->nlp_mode]);
- }
-
- // Smooth the overdrive.
- if (aec->overDrive < aec->overDriveSm) {
- aec->overDriveSm = 0.99f * aec->overDriveSm + 0.01f * aec->overDrive;
- } else {
- aec->overDriveSm = 0.9f * aec->overDriveSm + 0.1f * aec->overDrive;
- }
-
- WebRtcAec_OverdriveAndSuppress(aec, hNl, hNlFb, efw);
-
- // Add comfort noise.
- WebRtcAec_ComfortNoise(aec, efw, comfortNoiseHband, aec->noisePow, hNl);
-
- // TODO(bjornv): Investigate how to take the windowing below into account if
- // needed.
- if (aec->metricsMode == 1) {
- // Note that we have a scaling by two in the time domain |eBuf|.
- // In addition the time domain signal is windowed before transformation,
- // losing half the energy on the average. We take care of the first
- // scaling only in UpdateMetrics().
- UpdateLevel(&aec->nlpoutlevel, efw);
- }
- // Inverse error fft.
- fft[0] = efw[0][0];
- fft[1] = efw[0][PART_LEN];
- for (i = 1; i < PART_LEN; i++) {
- fft[2 * i] = efw[0][i];
- // Sign change required by Ooura fft.
- fft[2 * i + 1] = -efw[1][i];
- }
- aec_rdft_inverse_128(fft);
-
- // Overlap and add to obtain output.
- scale = 2.0f / PART_LEN2;
- for (i = 0; i < PART_LEN; i++) {
- fft[i] *= scale; // fft scaling
- fft[i] = fft[i] * sqrtHanning[i] + aec->outBuf[i];
-
- fft[PART_LEN + i] *= scale; // fft scaling
- aec->outBuf[i] = fft[PART_LEN + i] * sqrtHanning[PART_LEN - i];
-
- // Saturate output to keep it in the allowed range.
- output[i] = WEBRTC_SPL_SAT(
- WEBRTC_SPL_WORD16_MAX, fft[i], WEBRTC_SPL_WORD16_MIN);
- }
-
- // For H band
- if (aec->sampFreq == 32000) {
-
- // H band gain
- // average nlp over low band: average over second half of freq spectrum
- // (4->8khz)
- GetHighbandGain(hNl, &nlpGainHband);
-
- // Inverse comfort_noise
- if (flagHbandCn == 1) {
- fft[0] = comfortNoiseHband[0][0];
- fft[1] = comfortNoiseHband[PART_LEN][0];
- for (i = 1; i < PART_LEN; i++) {
- fft[2 * i] = comfortNoiseHband[i][0];
- fft[2 * i + 1] = comfortNoiseHband[i][1];
- }
- aec_rdft_inverse_128(fft);
- scale = 2.0f / PART_LEN2;
- }
-
- // compute gain factor
- for (i = 0; i < PART_LEN; i++) {
- dtmp = aec->dBufH[i];
- dtmp = dtmp * nlpGainHband; // for variable gain
-
- // add some comfort noise where Hband is attenuated
- if (flagHbandCn == 1) {
- fft[i] *= scale; // fft scaling
- dtmp += cnScaleHband * fft[i];
- }
-
- // Saturate output to keep it in the allowed range.
- outputH[i] = WEBRTC_SPL_SAT(
- WEBRTC_SPL_WORD16_MAX, dtmp, WEBRTC_SPL_WORD16_MIN);
- }
- }
-
- // Copy the current block to the old position.
- memcpy(aec->dBuf, aec->dBuf + PART_LEN, sizeof(float) * PART_LEN);
- memcpy(aec->eBuf, aec->eBuf + PART_LEN, sizeof(float) * PART_LEN);
-
- // Copy the current block to the old position for H band
- if (aec->sampFreq == 32000) {
- memcpy(aec->dBufH, aec->dBufH + PART_LEN, sizeof(float) * PART_LEN);
- }
-
- memmove(aec->xfwBuf + PART_LEN1,
- aec->xfwBuf,
- sizeof(aec->xfwBuf) - sizeof(complex_t) * PART_LEN1);
}
static void GetHighbandGain(const float* lambda, float* nlpGainHband) {
@@ -1705,8 +773,8 @@
// TODO(bjornv): Should we have a different function/wrapper for windowed FFT?
if (window) {
for (i = 0; i < PART_LEN; i++) {
- time_data[i] *= sqrtHanning[i];
- time_data[PART_LEN + i] *= sqrtHanning[PART_LEN - i];
+ time_data[i] *= WebRtcAec_sqrtHanning[i];
+ time_data[PART_LEN + i] *= WebRtcAec_sqrtHanning[PART_LEN - i];
}
}
@@ -1721,3 +789,969 @@
freq_data[1][i] = time_data[2 * i + 1];
}
}
+
+static void NonLinearProcessing(AecCore* aec, float* output, float* outputH) {
+ float efw[2][PART_LEN1], xfw[2][PART_LEN1];
+ complex_t comfortNoiseHband[PART_LEN1];
+ float fft[PART_LEN2];
+ float scale, dtmp;
+ float nlpGainHband;
+ int i;
+
+ // Coherence and non-linear filter
+ float cohde[PART_LEN1], cohxd[PART_LEN1];
+ float hNlDeAvg, hNlXdAvg;
+ float hNl[PART_LEN1];
+ float hNlPref[kPrefBandSize];
+ float hNlFb = 0, hNlFbLow = 0;
+ const float prefBandQuant = 0.75f, prefBandQuantLow = 0.5f;
+ const int prefBandSize = kPrefBandSize / aec->mult;
+ const int minPrefBand = 4 / aec->mult;
+ // Power estimate smoothing coefficients.
+ const float* min_overdrive = aec->extended_filter_enabled
+ ? kExtendedMinOverDrive
+ : kNormalMinOverDrive;
+
+ // Filter energy
+ const int delayEstInterval = 10 * aec->mult;
+
+ float* xfw_ptr = NULL;
+
+ aec->delayEstCtr++;
+ if (aec->delayEstCtr == delayEstInterval) {
+ aec->delayEstCtr = 0;
+ }
+
+ // initialize comfort noise for H band
+ memset(comfortNoiseHband, 0, sizeof(comfortNoiseHband));
+ nlpGainHband = (float)0.0;
+ dtmp = (float)0.0;
+
+ // We should always have at least one element stored in |far_buf|.
+ assert(WebRtc_available_read(aec->far_buf_windowed) > 0);
+ // NLP
+ WebRtc_ReadBuffer(aec->far_buf_windowed, (void**)&xfw_ptr, &xfw[0][0], 1);
+
+ // TODO(bjornv): Investigate if we can reuse |far_buf_windowed| instead of
+ // |xfwBuf|.
+ // Buffer far.
+ memcpy(aec->xfwBuf, xfw_ptr, sizeof(float) * 2 * PART_LEN1);
+
+ WebRtcAec_SubbandCoherence(aec, efw, xfw, fft, cohde, cohxd);
+
+ hNlXdAvg = 0;
+ for (i = minPrefBand; i < prefBandSize + minPrefBand; i++) {
+ hNlXdAvg += cohxd[i];
+ }
+ hNlXdAvg /= prefBandSize;
+ hNlXdAvg = 1 - hNlXdAvg;
+
+ hNlDeAvg = 0;
+ for (i = minPrefBand; i < prefBandSize + minPrefBand; i++) {
+ hNlDeAvg += cohde[i];
+ }
+ hNlDeAvg /= prefBandSize;
+
+ if (hNlXdAvg < 0.75f && hNlXdAvg < aec->hNlXdAvgMin) {
+ aec->hNlXdAvgMin = hNlXdAvg;
+ }
+
+ if (hNlDeAvg > 0.98f && hNlXdAvg > 0.9f) {
+ aec->stNearState = 1;
+ } else if (hNlDeAvg < 0.95f || hNlXdAvg < 0.8f) {
+ aec->stNearState = 0;
+ }
+
+ if (aec->hNlXdAvgMin == 1) {
+ aec->echoState = 0;
+ aec->overDrive = min_overdrive[aec->nlp_mode];
+
+ if (aec->stNearState == 1) {
+ memcpy(hNl, cohde, sizeof(hNl));
+ hNlFb = hNlDeAvg;
+ hNlFbLow = hNlDeAvg;
+ } else {
+ for (i = 0; i < PART_LEN1; i++) {
+ hNl[i] = 1 - cohxd[i];
+ }
+ hNlFb = hNlXdAvg;
+ hNlFbLow = hNlXdAvg;
+ }
+ } else {
+
+ if (aec->stNearState == 1) {
+ aec->echoState = 0;
+ memcpy(hNl, cohde, sizeof(hNl));
+ hNlFb = hNlDeAvg;
+ hNlFbLow = hNlDeAvg;
+ } else {
+ aec->echoState = 1;
+ for (i = 0; i < PART_LEN1; i++) {
+ hNl[i] = WEBRTC_SPL_MIN(cohde[i], 1 - cohxd[i]);
+ }
+
+ // Select an order statistic from the preferred bands.
+ // TODO: Using quicksort now, but a selection algorithm may be preferred.
+ memcpy(hNlPref, &hNl[minPrefBand], sizeof(float) * prefBandSize);
+ qsort(hNlPref, prefBandSize, sizeof(float), CmpFloat);
+ hNlFb = hNlPref[(int)floor(prefBandQuant * (prefBandSize - 1))];
+ hNlFbLow = hNlPref[(int)floor(prefBandQuantLow * (prefBandSize - 1))];
+ }
+ }
+
+ // Track the local filter minimum to determine suppression overdrive.
+ if (hNlFbLow < 0.6f && hNlFbLow < aec->hNlFbLocalMin) {
+ aec->hNlFbLocalMin = hNlFbLow;
+ aec->hNlFbMin = hNlFbLow;
+ aec->hNlNewMin = 1;
+ aec->hNlMinCtr = 0;
+ }
+ aec->hNlFbLocalMin =
+ WEBRTC_SPL_MIN(aec->hNlFbLocalMin + 0.0008f / aec->mult, 1);
+ aec->hNlXdAvgMin = WEBRTC_SPL_MIN(aec->hNlXdAvgMin + 0.0006f / aec->mult, 1);
+
+ if (aec->hNlNewMin == 1) {
+ aec->hNlMinCtr++;
+ }
+ if (aec->hNlMinCtr == 2) {
+ aec->hNlNewMin = 0;
+ aec->hNlMinCtr = 0;
+ aec->overDrive =
+ WEBRTC_SPL_MAX(kTargetSupp[aec->nlp_mode] /
+ ((float)log(aec->hNlFbMin + 1e-10f) + 1e-10f),
+ min_overdrive[aec->nlp_mode]);
+ }
+
+ // Smooth the overdrive.
+ if (aec->overDrive < aec->overDriveSm) {
+ aec->overDriveSm = 0.99f * aec->overDriveSm + 0.01f * aec->overDrive;
+ } else {
+ aec->overDriveSm = 0.9f * aec->overDriveSm + 0.1f * aec->overDrive;
+ }
+
+ WebRtcAec_OverdriveAndSuppress(aec, hNl, hNlFb, efw);
+
+ // Add comfort noise.
+ WebRtcAec_ComfortNoise(aec, efw, comfortNoiseHband, aec->noisePow, hNl);
+
+ // TODO(bjornv): Investigate how to take the windowing below into account if
+ // needed.
+ if (aec->metricsMode == 1) {
+ // Note that we have a scaling by two in the time domain |eBuf|.
+ // In addition the time domain signal is windowed before transformation,
+ // losing half the energy on the average. We take care of the first
+ // scaling only in UpdateMetrics().
+ UpdateLevel(&aec->nlpoutlevel, efw);
+ }
+ // Inverse error fft.
+ fft[0] = efw[0][0];
+ fft[1] = efw[0][PART_LEN];
+ for (i = 1; i < PART_LEN; i++) {
+ fft[2 * i] = efw[0][i];
+ // Sign change required by Ooura fft.
+ fft[2 * i + 1] = -efw[1][i];
+ }
+ aec_rdft_inverse_128(fft);
+
+ // Overlap and add to obtain output.
+ scale = 2.0f / PART_LEN2;
+ for (i = 0; i < PART_LEN; i++) {
+ fft[i] *= scale; // fft scaling
+ fft[i] = fft[i] * WebRtcAec_sqrtHanning[i] + aec->outBuf[i];
+
+ fft[PART_LEN + i] *= scale; // fft scaling
+ aec->outBuf[i] = fft[PART_LEN + i] * WebRtcAec_sqrtHanning[PART_LEN - i];
+
+ // Saturate output to keep it in the allowed range.
+ output[i] = WEBRTC_SPL_SAT(
+ WEBRTC_SPL_WORD16_MAX, fft[i], WEBRTC_SPL_WORD16_MIN);
+ }
+
+ // For H band
+ if (aec->sampFreq == 32000) {
+
+ // H band gain
+ // average nlp over low band: average over second half of freq spectrum
+ // (4->8khz)
+ GetHighbandGain(hNl, &nlpGainHband);
+
+ // Inverse comfort_noise
+ if (flagHbandCn == 1) {
+ fft[0] = comfortNoiseHband[0][0];
+ fft[1] = comfortNoiseHband[PART_LEN][0];
+ for (i = 1; i < PART_LEN; i++) {
+ fft[2 * i] = comfortNoiseHband[i][0];
+ fft[2 * i + 1] = comfortNoiseHband[i][1];
+ }
+ aec_rdft_inverse_128(fft);
+ scale = 2.0f / PART_LEN2;
+ }
+
+ // compute gain factor
+ for (i = 0; i < PART_LEN; i++) {
+ dtmp = aec->dBufH[i];
+ dtmp = dtmp * nlpGainHband; // for variable gain
+
+ // add some comfort noise where Hband is attenuated
+ if (flagHbandCn == 1) {
+ fft[i] *= scale; // fft scaling
+ dtmp += cnScaleHband * fft[i];
+ }
+
+ // Saturate output to keep it in the allowed range.
+ outputH[i] = WEBRTC_SPL_SAT(
+ WEBRTC_SPL_WORD16_MAX, dtmp, WEBRTC_SPL_WORD16_MIN);
+ }
+ }
+
+ // Copy the current block to the old position.
+ memcpy(aec->dBuf, aec->dBuf + PART_LEN, sizeof(float) * PART_LEN);
+ memcpy(aec->eBuf, aec->eBuf + PART_LEN, sizeof(float) * PART_LEN);
+
+ // Copy the current block to the old position for H band
+ if (aec->sampFreq == 32000) {
+ memcpy(aec->dBufH, aec->dBufH + PART_LEN, sizeof(float) * PART_LEN);
+ }
+
+ memmove(aec->xfwBuf + PART_LEN1,
+ aec->xfwBuf,
+ sizeof(aec->xfwBuf) - sizeof(complex_t) * PART_LEN1);
+}
+
+static void ProcessBlock(AecCore* aec) {
+ int i;
+ float y[PART_LEN], e[PART_LEN];
+ float scale;
+
+ float fft[PART_LEN2];
+ float xf[2][PART_LEN1], yf[2][PART_LEN1], ef[2][PART_LEN1];
+ float df[2][PART_LEN1];
+ float far_spectrum = 0.0f;
+ float near_spectrum = 0.0f;
+ float abs_far_spectrum[PART_LEN1];
+ float abs_near_spectrum[PART_LEN1];
+
+ const float gPow[2] = {0.9f, 0.1f};
+
+ // Noise estimate constants.
+ const int noiseInitBlocks = 500 * aec->mult;
+ const float step = 0.1f;
+ const float ramp = 1.0002f;
+ const float gInitNoise[2] = {0.999f, 0.001f};
+
+ float nearend[PART_LEN];
+ float* nearend_ptr = NULL;
+ float output[PART_LEN];
+ float outputH[PART_LEN];
+
+ float* xf_ptr = NULL;
+
+ // Concatenate old and new nearend blocks.
+ if (aec->sampFreq == 32000) {
+ WebRtc_ReadBuffer(aec->nearFrBufH, (void**)&nearend_ptr, nearend, PART_LEN);
+ memcpy(aec->dBufH + PART_LEN, nearend_ptr, sizeof(nearend));
+ }
+ WebRtc_ReadBuffer(aec->nearFrBuf, (void**)&nearend_ptr, nearend, PART_LEN);
+ memcpy(aec->dBuf + PART_LEN, nearend_ptr, sizeof(nearend));
+
+ // ---------- Ooura fft ----------
+
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ {
+ float farend[PART_LEN];
+ float* farend_ptr = NULL;
+ WebRtc_ReadBuffer(aec->far_time_buf, (void**)&farend_ptr, farend, 1);
+ rtc_WavWriteSamples(aec->farFile, farend_ptr, PART_LEN);
+ rtc_WavWriteSamples(aec->nearFile, nearend_ptr, PART_LEN);
+ }
+#endif
+
+ // We should always have at least one element stored in |far_buf|.
+ assert(WebRtc_available_read(aec->far_buf) > 0);
+ WebRtc_ReadBuffer(aec->far_buf, (void**)&xf_ptr, &xf[0][0], 1);
+
+ // Near fft
+ memcpy(fft, aec->dBuf, sizeof(float) * PART_LEN2);
+ TimeToFrequency(fft, df, 0);
+
+ // Power smoothing
+ for (i = 0; i < PART_LEN1; i++) {
+ far_spectrum = (xf_ptr[i] * xf_ptr[i]) +
+ (xf_ptr[PART_LEN1 + i] * xf_ptr[PART_LEN1 + i]);
+ aec->xPow[i] =
+ gPow[0] * aec->xPow[i] + gPow[1] * aec->num_partitions * far_spectrum;
+ // Calculate absolute spectra
+ abs_far_spectrum[i] = sqrtf(far_spectrum);
+
+ near_spectrum = df[0][i] * df[0][i] + df[1][i] * df[1][i];
+ aec->dPow[i] = gPow[0] * aec->dPow[i] + gPow[1] * near_spectrum;
+ // Calculate absolute spectra
+ abs_near_spectrum[i] = sqrtf(near_spectrum);
+ }
+
+ // Estimate noise power. Wait until dPow is more stable.
+ if (aec->noiseEstCtr > 50) {
+ for (i = 0; i < PART_LEN1; i++) {
+ if (aec->dPow[i] < aec->dMinPow[i]) {
+ aec->dMinPow[i] =
+ (aec->dPow[i] + step * (aec->dMinPow[i] - aec->dPow[i])) * ramp;
+ } else {
+ aec->dMinPow[i] *= ramp;
+ }
+ }
+ }
+
+ // Smooth increasing noise power from zero at the start,
+ // to avoid a sudden burst of comfort noise.
+ if (aec->noiseEstCtr < noiseInitBlocks) {
+ aec->noiseEstCtr++;
+ for (i = 0; i < PART_LEN1; i++) {
+ if (aec->dMinPow[i] > aec->dInitMinPow[i]) {
+ aec->dInitMinPow[i] = gInitNoise[0] * aec->dInitMinPow[i] +
+ gInitNoise[1] * aec->dMinPow[i];
+ } else {
+ aec->dInitMinPow[i] = aec->dMinPow[i];
+ }
+ }
+ aec->noisePow = aec->dInitMinPow;
+ } else {
+ aec->noisePow = aec->dMinPow;
+ }
+
+ // Block wise delay estimation used for logging
+ if (aec->delay_logging_enabled) {
+ int delay_estimate = 0;
+ if (WebRtc_AddFarSpectrumFloat(
+ aec->delay_estimator_farend, abs_far_spectrum, PART_LEN1) == 0) {
+ delay_estimate = WebRtc_DelayEstimatorProcessFloat(
+ aec->delay_estimator, abs_near_spectrum, PART_LEN1);
+ if (delay_estimate >= 0) {
+ // Update delay estimate buffer.
+ aec->delay_histogram[delay_estimate]++;
+ }
+ }
+ }
+
+ // Update the xfBuf block position.
+ aec->xfBufBlockPos--;
+ if (aec->xfBufBlockPos == -1) {
+ aec->xfBufBlockPos = aec->num_partitions - 1;
+ }
+
+ // Buffer xf
+ memcpy(aec->xfBuf[0] + aec->xfBufBlockPos * PART_LEN1,
+ xf_ptr,
+ sizeof(float) * PART_LEN1);
+ memcpy(aec->xfBuf[1] + aec->xfBufBlockPos * PART_LEN1,
+ &xf_ptr[PART_LEN1],
+ sizeof(float) * PART_LEN1);
+
+ memset(yf, 0, sizeof(yf));
+
+ // Filter far
+ WebRtcAec_FilterFar(aec, yf);
+
+ // Inverse fft to obtain echo estimate and error.
+ fft[0] = yf[0][0];
+ fft[1] = yf[0][PART_LEN];
+ for (i = 1; i < PART_LEN; i++) {
+ fft[2 * i] = yf[0][i];
+ fft[2 * i + 1] = yf[1][i];
+ }
+ aec_rdft_inverse_128(fft);
+
+ scale = 2.0f / PART_LEN2;
+ for (i = 0; i < PART_LEN; i++) {
+ y[i] = fft[PART_LEN + i] * scale; // fft scaling
+ }
+
+ for (i = 0; i < PART_LEN; i++) {
+ e[i] = nearend_ptr[i] - y[i];
+ }
+
+ // Error fft
+ memcpy(aec->eBuf + PART_LEN, e, sizeof(float) * PART_LEN);
+ memset(fft, 0, sizeof(float) * PART_LEN);
+ memcpy(fft + PART_LEN, e, sizeof(float) * PART_LEN);
+ // TODO(bjornv): Change to use TimeToFrequency().
+ aec_rdft_forward_128(fft);
+
+ ef[1][0] = 0;
+ ef[1][PART_LEN] = 0;
+ ef[0][0] = fft[0];
+ ef[0][PART_LEN] = fft[1];
+ for (i = 1; i < PART_LEN; i++) {
+ ef[0][i] = fft[2 * i];
+ ef[1][i] = fft[2 * i + 1];
+ }
+
+ if (aec->metricsMode == 1) {
+ // Note that the first PART_LEN samples in fft (before transformation) are
+ // zero. Hence, the scaling by two in UpdateLevel() should not be
+ // performed. That scaling is taken care of in UpdateMetrics() instead.
+ UpdateLevel(&aec->linoutlevel, ef);
+ }
+
+ // Scale error signal inversely with far power.
+ WebRtcAec_ScaleErrorSignal(aec, ef);
+ WebRtcAec_FilterAdaptation(aec, fft, ef);
+ NonLinearProcessing(aec, output, outputH);
+
+ if (aec->metricsMode == 1) {
+ // Update power levels and echo metrics
+ UpdateLevel(&aec->farlevel, (float(*)[PART_LEN1])xf_ptr);
+ UpdateLevel(&aec->nearlevel, df);
+ UpdateMetrics(aec);
+ }
+
+ // Store the output block.
+ WebRtc_WriteBuffer(aec->outFrBuf, output, PART_LEN);
+ // For H band
+ if (aec->sampFreq == 32000) {
+ WebRtc_WriteBuffer(aec->outFrBufH, outputH, PART_LEN);
+ }
+
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ rtc_WavWriteSamples(aec->outLinearFile, e, PART_LEN);
+ rtc_WavWriteSamples(aec->outFile, output, PART_LEN);
+#endif
+}
+
+int WebRtcAec_CreateAec(AecCore** aecInst) {
+ AecCore* aec = malloc(sizeof(AecCore));
+ *aecInst = aec;
+ if (aec == NULL) {
+ return -1;
+ }
+
+ aec->nearFrBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
+ if (!aec->nearFrBuf) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+
+ aec->outFrBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
+ if (!aec->outFrBuf) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+
+ aec->nearFrBufH = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
+ if (!aec->nearFrBufH) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+
+ aec->outFrBufH = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
+ if (!aec->outFrBufH) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+
+ // Create far-end buffers.
+ aec->far_buf =
+ WebRtc_CreateBuffer(kBufSizePartitions, sizeof(float) * 2 * PART_LEN1);
+ if (!aec->far_buf) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+ aec->far_buf_windowed =
+ WebRtc_CreateBuffer(kBufSizePartitions, sizeof(float) * 2 * PART_LEN1);
+ if (!aec->far_buf_windowed) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ aec->instance_index = webrtc_aec_instance_count;
+ aec->far_time_buf =
+ WebRtc_CreateBuffer(kBufSizePartitions, sizeof(float) * PART_LEN);
+ if (!aec->far_time_buf) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+ aec->farFile = aec->nearFile = aec->outFile = aec->outLinearFile = NULL;
+ aec->debug_dump_count = 0;
+#endif
+ aec->delay_estimator_farend =
+ WebRtc_CreateDelayEstimatorFarend(PART_LEN1, kHistorySizeBlocks);
+ if (aec->delay_estimator_farend == NULL) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+ aec->delay_estimator = WebRtc_CreateDelayEstimator(
+ aec->delay_estimator_farend, kLookaheadBlocks);
+ if (aec->delay_estimator == NULL) {
+ WebRtcAec_FreeAec(aec);
+ aec = NULL;
+ return -1;
+ }
+
+ // Assembly optimization
+ WebRtcAec_FilterFar = FilterFar;
+ WebRtcAec_ScaleErrorSignal = ScaleErrorSignal;
+ WebRtcAec_FilterAdaptation = FilterAdaptation;
+ WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppress;
+ WebRtcAec_ComfortNoise = ComfortNoise;
+ WebRtcAec_SubbandCoherence = SubbandCoherence;
+
+#if defined(WEBRTC_ARCH_X86_FAMILY)
+ if (WebRtc_GetCPUInfo(kSSE2)) {
+ WebRtcAec_InitAec_SSE2();
+ }
+#endif
+
+#if defined(MIPS_FPU_LE)
+ WebRtcAec_InitAec_mips();
+#endif
+
+#if defined(WEBRTC_DETECT_ARM_NEON) || defined(WEBRTC_ARCH_ARM_NEON)
+ WebRtcAec_InitAec_neon();
+#endif
+
+ aec_rdft_init();
+
+ return 0;
+}
+
+int WebRtcAec_FreeAec(AecCore* aec) {
+ if (aec == NULL) {
+ return -1;
+ }
+
+ WebRtc_FreeBuffer(aec->nearFrBuf);
+ WebRtc_FreeBuffer(aec->outFrBuf);
+
+ WebRtc_FreeBuffer(aec->nearFrBufH);
+ WebRtc_FreeBuffer(aec->outFrBufH);
+
+ WebRtc_FreeBuffer(aec->far_buf);
+ WebRtc_FreeBuffer(aec->far_buf_windowed);
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ WebRtc_FreeBuffer(aec->far_time_buf);
+ rtc_WavClose(aec->farFile);
+ rtc_WavClose(aec->nearFile);
+ rtc_WavClose(aec->outFile);
+ rtc_WavClose(aec->outLinearFile);
+#endif
+ WebRtc_FreeDelayEstimator(aec->delay_estimator);
+ WebRtc_FreeDelayEstimatorFarend(aec->delay_estimator_farend);
+
+ free(aec);
+ return 0;
+}
+
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+// Open a new Wav file for writing. If it was already open with a different
+// sample frequency, close it first.
+static void ReopenWav(rtc_WavFile** wav_file,
+ const char* name,
+ int seq1,
+ int seq2,
+ int sample_rate) {
+ int written UNUSED;
+ char filename[64];
+ if (*wav_file) {
+ if (rtc_WavSampleRate(*wav_file) == sample_rate)
+ return;
+ rtc_WavClose(*wav_file);
+ }
+ written = snprintf(filename, sizeof(filename), "%s%d-%d.wav",
+ name, seq1, seq2);
+ assert(written >= 0); // no output error
+ assert((size_t)written < sizeof(filename)); // buffer was large enough
+ *wav_file = rtc_WavOpen(filename, sample_rate, 1);
+}
+#endif // WEBRTC_AEC_DEBUG_DUMP
+
+int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
+ int i;
+
+ aec->sampFreq = sampFreq;
+
+ if (sampFreq == 8000) {
+ aec->normal_mu = 0.6f;
+ aec->normal_error_threshold = 2e-6f;
+ } else {
+ aec->normal_mu = 0.5f;
+ aec->normal_error_threshold = 1.5e-6f;
+ }
+
+ if (WebRtc_InitBuffer(aec->nearFrBuf) == -1) {
+ return -1;
+ }
+
+ if (WebRtc_InitBuffer(aec->outFrBuf) == -1) {
+ return -1;
+ }
+
+ if (WebRtc_InitBuffer(aec->nearFrBufH) == -1) {
+ return -1;
+ }
+
+ if (WebRtc_InitBuffer(aec->outFrBufH) == -1) {
+ return -1;
+ }
+
+ // Initialize far-end buffers.
+ if (WebRtc_InitBuffer(aec->far_buf) == -1) {
+ return -1;
+ }
+ if (WebRtc_InitBuffer(aec->far_buf_windowed) == -1) {
+ return -1;
+ }
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ if (WebRtc_InitBuffer(aec->far_time_buf) == -1) {
+ return -1;
+ }
+ {
+ int process_rate = sampFreq > 16000 ? 16000 : sampFreq;
+ ReopenWav(&aec->farFile, "aec_far",
+ aec->instance_index, aec->debug_dump_count, process_rate);
+ ReopenWav(&aec->nearFile, "aec_near",
+ aec->instance_index, aec->debug_dump_count, process_rate);
+ ReopenWav(&aec->outFile, "aec_out",
+ aec->instance_index, aec->debug_dump_count, process_rate);
+ ReopenWav(&aec->outLinearFile, "aec_out_linear",
+ aec->instance_index, aec->debug_dump_count, process_rate);
+ }
+ ++aec->debug_dump_count;
+#endif
+ aec->system_delay = 0;
+
+ if (WebRtc_InitDelayEstimatorFarend(aec->delay_estimator_farend) != 0) {
+ return -1;
+ }
+ if (WebRtc_InitDelayEstimator(aec->delay_estimator) != 0) {
+ return -1;
+ }
+ aec->delay_logging_enabled = 0;
+ memset(aec->delay_histogram, 0, sizeof(aec->delay_histogram));
+
+ aec->reported_delay_enabled = 1;
+ aec->extended_filter_enabled = 0;
+ aec->num_partitions = kNormalNumPartitions;
+
+ // Update the delay estimator with filter length. We use half the
+ // |num_partitions| to take the echo path into account. In practice we say
+ // that the echo has a duration of maximum half |num_partitions|, which is not
+ // true, but serves as a crude measure.
+ WebRtc_set_allowed_offset(aec->delay_estimator, aec->num_partitions / 2);
+ // TODO(bjornv): I currently hard coded the enable. Once we've established
+ // that AECM has no performance regression, robust_validation will be enabled
+ // all the time and the APIs to turn it on/off will be removed. Hence, remove
+ // this line then.
+ WebRtc_enable_robust_validation(aec->delay_estimator, 1);
+
+ // Default target suppression mode.
+ aec->nlp_mode = 1;
+
+ // Sampling frequency multiplier
+ // SWB is processed as 160 frame size
+ if (aec->sampFreq == 32000) {
+ aec->mult = (short)aec->sampFreq / 16000;
+ } else {
+ aec->mult = (short)aec->sampFreq / 8000;
+ }
+
+ aec->farBufWritePos = 0;
+ aec->farBufReadPos = 0;
+
+ aec->inSamples = 0;
+ aec->outSamples = 0;
+ aec->knownDelay = 0;
+
+ // Initialize buffers
+ memset(aec->dBuf, 0, sizeof(aec->dBuf));
+ memset(aec->eBuf, 0, sizeof(aec->eBuf));
+ // For H band
+ memset(aec->dBufH, 0, sizeof(aec->dBufH));
+
+ memset(aec->xPow, 0, sizeof(aec->xPow));
+ memset(aec->dPow, 0, sizeof(aec->dPow));
+ memset(aec->dInitMinPow, 0, sizeof(aec->dInitMinPow));
+ aec->noisePow = aec->dInitMinPow;
+ aec->noiseEstCtr = 0;
+
+ // Initial comfort noise power
+ for (i = 0; i < PART_LEN1; i++) {
+ aec->dMinPow[i] = 1.0e6f;
+ }
+
+ // Holds the last block written to
+ aec->xfBufBlockPos = 0;
+ // TODO: Investigate need for these initializations. Deleting them doesn't
+ // change the output at all and yields 0.4% overall speedup.
+ memset(aec->xfBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);
+ memset(aec->wfBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);
+ memset(aec->sde, 0, sizeof(complex_t) * PART_LEN1);
+ memset(aec->sxd, 0, sizeof(complex_t) * PART_LEN1);
+ memset(
+ aec->xfwBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);
+ memset(aec->se, 0, sizeof(float) * PART_LEN1);
+
+ // To prevent numerical instability in the first block.
+ for (i = 0; i < PART_LEN1; i++) {
+ aec->sd[i] = 1;
+ }
+ for (i = 0; i < PART_LEN1; i++) {
+ aec->sx[i] = 1;
+ }
+
+ memset(aec->hNs, 0, sizeof(aec->hNs));
+ memset(aec->outBuf, 0, sizeof(float) * PART_LEN);
+
+ aec->hNlFbMin = 1;
+ aec->hNlFbLocalMin = 1;
+ aec->hNlXdAvgMin = 1;
+ aec->hNlNewMin = 0;
+ aec->hNlMinCtr = 0;
+ aec->overDrive = 2;
+ aec->overDriveSm = 2;
+ aec->delayIdx = 0;
+ aec->stNearState = 0;
+ aec->echoState = 0;
+ aec->divergeState = 0;
+
+ aec->seed = 777;
+ aec->delayEstCtr = 0;
+
+ // Metrics disabled by default
+ aec->metricsMode = 0;
+ InitMetrics(aec);
+
+ return 0;
+}
+
+void WebRtcAec_BufferFarendPartition(AecCore* aec, const float* farend) {
+ float fft[PART_LEN2];
+ float xf[2][PART_LEN1];
+
+ // Check if the buffer is full, and in that case flush the oldest data.
+ if (WebRtc_available_write(aec->far_buf) < 1) {
+ WebRtcAec_MoveFarReadPtr(aec, 1);
+ }
+ // Convert far-end partition to the frequency domain without windowing.
+ memcpy(fft, farend, sizeof(float) * PART_LEN2);
+ TimeToFrequency(fft, xf, 0);
+ WebRtc_WriteBuffer(aec->far_buf, &xf[0][0], 1);
+
+ // Convert far-end partition to the frequency domain with windowing.
+ memcpy(fft, farend, sizeof(float) * PART_LEN2);
+ TimeToFrequency(fft, xf, 1);
+ WebRtc_WriteBuffer(aec->far_buf_windowed, &xf[0][0], 1);
+}
+
+int WebRtcAec_MoveFarReadPtr(AecCore* aec, int elements) {
+ int elements_moved = WebRtc_MoveReadPtr(aec->far_buf_windowed, elements);
+ WebRtc_MoveReadPtr(aec->far_buf, elements);
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ WebRtc_MoveReadPtr(aec->far_time_buf, elements);
+#endif
+ aec->system_delay -= elements_moved * PART_LEN;
+ return elements_moved;
+}
+
+void WebRtcAec_ProcessFrame(AecCore* aec,
+ const float* nearend,
+ const float* nearendH,
+ int knownDelay,
+ float* out,
+ float* outH) {
+ int out_elements = 0;
+
+ // For each frame the process is as follows:
+ // 1) If the system_delay indicates on being too small for processing a
+ // frame we stuff the buffer with enough data for 10 ms.
+ // 2) Adjust the buffer to the system delay, by moving the read pointer.
+ // 3) TODO(bjornv): Investigate if we need to add this:
+ // If we can't move read pointer due to buffer size limitations we
+ // flush/stuff the buffer.
+ // 4) Process as many partitions as possible.
+ // 5) Update the |system_delay| with respect to a full frame of FRAME_LEN
+ // samples. Even though we will have data left to process (we work with
+ // partitions) we consider updating a whole frame, since that's the
+ // amount of data we input and output in audio_processing.
+ // 6) Update the outputs.
+
+ // TODO(bjornv): Investigate how we should round the delay difference; right
+ // now we know that incoming |knownDelay| is underestimated when it's less
+ // than |aec->knownDelay|. We therefore, round (-32) in that direction. In
+ // the other direction, we don't have this situation, but might flush one
+ // partition too little. This can cause non-causality, which should be
+ // investigated. Maybe, allow for a non-symmetric rounding, like -16.
+ int move_elements = (aec->knownDelay - knownDelay - 32) / PART_LEN;
+ int moved_elements = 0;
+
+ // TODO(bjornv): Change the near-end buffer handling to be the same as for
+ // far-end, that is, with a near_pre_buf.
+ // Buffer the near-end frame.
+ WebRtc_WriteBuffer(aec->nearFrBuf, nearend, FRAME_LEN);
+ // For H band
+ if (aec->sampFreq == 32000) {
+ WebRtc_WriteBuffer(aec->nearFrBufH, nearendH, FRAME_LEN);
+ }
+
+ // 1) At most we process |aec->mult|+1 partitions in 10 ms. Make sure we
+ // have enough far-end data for that by stuffing the buffer if the
+ // |system_delay| indicates others.
+ if (aec->system_delay < FRAME_LEN) {
+ // We don't have enough data so we rewind 10 ms.
+ WebRtcAec_MoveFarReadPtr(aec, -(aec->mult + 1));
+ }
+
+ // 2) Compensate for a possible change in the system delay.
+ WebRtc_MoveReadPtr(aec->far_buf_windowed, move_elements);
+ moved_elements = WebRtc_MoveReadPtr(aec->far_buf, move_elements);
+ aec->knownDelay -= moved_elements * PART_LEN;
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ WebRtc_MoveReadPtr(aec->far_time_buf, move_elements);
+#endif
+
+ // 4) Process as many blocks as possible.
+ while (WebRtc_available_read(aec->nearFrBuf) >= PART_LEN) {
+ ProcessBlock(aec);
+ }
+
+ // 5) Update system delay with respect to the entire frame.
+ aec->system_delay -= FRAME_LEN;
+
+ // 6) Update output frame.
+ // Stuff the out buffer if we have less than a frame to output.
+ // This should only happen for the first frame.
+ out_elements = (int)WebRtc_available_read(aec->outFrBuf);
+ if (out_elements < FRAME_LEN) {
+ WebRtc_MoveReadPtr(aec->outFrBuf, out_elements - FRAME_LEN);
+ if (aec->sampFreq == 32000) {
+ WebRtc_MoveReadPtr(aec->outFrBufH, out_elements - FRAME_LEN);
+ }
+ }
+ // Obtain an output frame.
+ WebRtc_ReadBuffer(aec->outFrBuf, NULL, out, FRAME_LEN);
+ // For H band.
+ if (aec->sampFreq == 32000) {
+ WebRtc_ReadBuffer(aec->outFrBufH, NULL, outH, FRAME_LEN);
+ }
+}
+
+int WebRtcAec_GetDelayMetricsCore(AecCore* self, int* median, int* std) {
+ int i = 0;
+ int delay_values = 0;
+ int num_delay_values = 0;
+ int my_median = 0;
+ const int kMsPerBlock = PART_LEN / (self->mult * 8);
+ float l1_norm = 0;
+
+ assert(self != NULL);
+ assert(median != NULL);
+ assert(std != NULL);
+
+ if (self->delay_logging_enabled == 0) {
+ // Logging disabled.
+ return -1;
+ }
+
+ // Get number of delay values since last update.
+ for (i = 0; i < kHistorySizeBlocks; i++) {
+ num_delay_values += self->delay_histogram[i];
+ }
+ if (num_delay_values == 0) {
+ // We have no new delay value data. Even though -1 is a valid estimate, it
+ // will practically never be used since multiples of |kMsPerBlock| will
+ // always be returned.
+ *median = -1;
+ *std = -1;
+ return 0;
+ }
+
+ delay_values = num_delay_values >> 1; // Start value for median count down.
+ // Get median of delay values since last update.
+ for (i = 0; i < kHistorySizeBlocks; i++) {
+ delay_values -= self->delay_histogram[i];
+ if (delay_values < 0) {
+ my_median = i;
+ break;
+ }
+ }
+ // Account for lookahead.
+ *median = (my_median - kLookaheadBlocks) * kMsPerBlock;
+
+ // Calculate the L1 norm, with median value as central moment.
+ for (i = 0; i < kHistorySizeBlocks; i++) {
+ l1_norm += (float)abs(i - my_median) * self->delay_histogram[i];
+ }
+ *std = (int)(l1_norm / (float)num_delay_values + 0.5f) * kMsPerBlock;
+
+ // Reset histogram.
+ memset(self->delay_histogram, 0, sizeof(self->delay_histogram));
+
+ return 0;
+}
+
+int WebRtcAec_echo_state(AecCore* self) { return self->echoState; }
+
+void WebRtcAec_GetEchoStats(AecCore* self,
+ Stats* erl,
+ Stats* erle,
+ Stats* a_nlp) {
+ assert(erl != NULL);
+ assert(erle != NULL);
+ assert(a_nlp != NULL);
+ *erl = self->erl;
+ *erle = self->erle;
+ *a_nlp = self->aNlp;
+}
+
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+void* WebRtcAec_far_time_buf(AecCore* self) { return self->far_time_buf; }
+#endif
+
+void WebRtcAec_SetConfigCore(AecCore* self,
+ int nlp_mode,
+ int metrics_mode,
+ int delay_logging) {
+ assert(nlp_mode >= 0 && nlp_mode < 3);
+ self->nlp_mode = nlp_mode;
+ self->metricsMode = metrics_mode;
+ if (self->metricsMode) {
+ InitMetrics(self);
+ }
+ self->delay_logging_enabled = delay_logging;
+ if (self->delay_logging_enabled) {
+ memset(self->delay_histogram, 0, sizeof(self->delay_histogram));
+ }
+}
+
+void WebRtcAec_enable_reported_delay(AecCore* self, int enable) {
+ self->reported_delay_enabled = enable;
+}
+
+int WebRtcAec_reported_delay_enabled(AecCore* self) {
+ return self->reported_delay_enabled;
+}
+
+void WebRtcAec_enable_delay_correction(AecCore* self, int enable) {
+ self->extended_filter_enabled = enable;
+ self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions;
+ // Update the delay estimator with filter length. See InitAEC() for details.
+ WebRtc_set_allowed_offset(self->delay_estimator, self->num_partitions / 2);
+}
+
+int WebRtcAec_delay_correction_enabled(AecCore* self) {
+ return self->extended_filter_enabled;
+}
+
+int WebRtcAec_system_delay(AecCore* self) { return self->system_delay; }
+
+void WebRtcAec_SetSystemDelay(AecCore* self, int delay) {
+ assert(delay >= 0);
+ self->system_delay = delay;
+}
+
diff --git a/modules/audio_processing/aec/aec_core_internal.h b/modules/audio_processing/aec/aec_core_internal.h
index 1c560f9..6adc4d6 100644
--- a/modules/audio_processing/aec/aec_core_internal.h
+++ b/modules/audio_processing/aec/aec_core_internal.h
@@ -11,10 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_INTERNAL_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_INTERNAL_H_
-#ifdef WEBRTC_AEC_DEBUG_DUMP
-#include <stdio.h>
-#endif
-
+#include "webrtc/common_audio/wav_writer.h"
+#include "webrtc/modules/audio_processing/aec/aec_common.h"
#include "webrtc/modules/audio_processing/aec/aec_core.h"
#include "webrtc/modules/audio_processing/utility/ring_buffer.h"
#include "webrtc/typedefs.h"
@@ -140,11 +138,19 @@
int num_partitions;
#ifdef WEBRTC_AEC_DEBUG_DUMP
+ // Sequence number of this AEC instance, so that different instances can
+ // choose different dump file names.
+ int instance_index;
+
+ // Number of times we've restarted dumping; used to pick new dump file names
+ // each time.
+ int debug_dump_count;
+
RingBuffer* far_time_buf;
- FILE* farFile;
- FILE* nearFile;
- FILE* outFile;
- FILE* outLinearFile;
+ rtc_WavFile* farFile;
+ rtc_WavFile* nearFile;
+ rtc_WavFile* outFile;
+ rtc_WavFile* outLinearFile;
#endif
};
@@ -170,4 +176,12 @@
const float* lambda);
extern WebRtcAec_ComfortNoise_t WebRtcAec_ComfortNoise;
+typedef void (*WebRtcAec_SubbandCoherence_t)(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float xfw[2][PART_LEN1],
+ float* fft,
+ float* cohde,
+ float* cohxd);
+extern WebRtcAec_SubbandCoherence_t WebRtcAec_SubbandCoherence;
+
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_INTERNAL_H_
diff --git a/modules/audio_processing/aec/aec_core_mips.c b/modules/audio_processing/aec/aec_core_mips.c
index d861e10..4f5f117 100644
--- a/modules/audio_processing/aec/aec_core_mips.c
+++ b/modules/audio_processing/aec/aec_core_mips.c
@@ -41,9 +41,9 @@
// Generate a uniform random array on [0 1]
WebRtcSpl_RandUArray(randW16, PART_LEN, &aec->seed);
- int16_t *randWptr = randW16;
+ int16_t* randWptr = randW16;
float randTemp, randTemp2, randTemp3, randTemp4;
- short tmp1s, tmp2s, tmp3s, tmp4s;
+ int32_t tmp1s, tmp2s, tmp3s, tmp4s;
for (i = 0; i < PART_LEN; i+=4) {
__asm __volatile (
@@ -76,18 +76,18 @@
: "memory"
);
- u[i+1][0] = (float)cos(randTemp);
- u[i+1][1] = (float)sin(randTemp);
- u[i+2][0] = (float)cos(randTemp2);
- u[i+2][1] = (float)sin(randTemp2);
- u[i+3][0] = (float)cos(randTemp3);
- u[i+3][1] = (float)sin(randTemp3);
- u[i+4][0] = (float)cos(randTemp4);
- u[i+4][1] = (float)sin(randTemp4);
+ u[i+1][0] = cosf(randTemp);
+ u[i+1][1] = sinf(randTemp);
+ u[i+2][0] = cosf(randTemp2);
+ u[i+2][1] = sinf(randTemp2);
+ u[i+3][0] = cosf(randTemp3);
+ u[i+3][1] = sinf(randTemp3);
+ u[i+4][0] = cosf(randTemp4);
+ u[i+4][1] = sinf(randTemp4);
}
// Reject LF noise
- float *u_ptr = &u[1][0];
+ float* u_ptr = &u[1][0];
float noise2, noise3, noise4;
float tmp1f, tmp2f, tmp3f, tmp4f, tmp5f, tmp6f, tmp7f, tmp8f;
@@ -151,12 +151,11 @@
noisePow -= PART_LEN;
u_ptr = &u[0][0];
- float *u_ptr_end = &u[PART_LEN][0];
- float *efw_ptr_0 = &efw[0][0];
- float *efw_ptr_1 = &efw[1][0];
+ float* u_ptr_end = &u[PART_LEN][0];
+ float* efw_ptr_0 = &efw[0][0];
+ float* efw_ptr_1 = &efw[1][0];
float tmp9f, tmp10f;
const float tmp1c = 1.0;
- const float tmp2c = 0.0;
__asm __volatile (
".set push \n\t"
@@ -164,7 +163,7 @@
"1: \n\t"
"lwc1 %[tmp1f], 0(%[lambda]) \n\t"
"lwc1 %[tmp6f], 4(%[lambda]) \n\t"
- "addiu %[lambda], %[lambda], 8 \n\t"
+ "addiu %[lambda], %[lambda], 8 \n\t"
"c.lt.s %[tmp1f], %[tmp1c] \n\t"
"bc1f 4f \n\t"
" nop \n\t"
@@ -260,7 +259,7 @@
[tmp4f] "=&f" (tmp4f), [tmp5f] "=&f" (tmp5f),
[tmp6f] "=&f" (tmp6f), [tmp7f] "=&f" (tmp7f), [tmp8f] "=&f" (tmp8f),
[tmp9f] "=&f" (tmp9f), [tmp10f] "=&f" (tmp10f)
- : [tmp1c] "f" (tmp1c), [tmp2c] "f" (tmp2c), [u_ptr_end] "r" (u_ptr_end)
+ : [tmp1c] "f" (tmp1c), [u_ptr_end] "r" (u_ptr_end)
: "memory"
);
@@ -321,7 +320,7 @@
}
}
-void WebRtcAec_FilterFar_mips(AecCore *aec, float yf[2][PART_LEN1]) {
+void WebRtcAec_FilterFar_mips(AecCore* aec, float yf[2][PART_LEN1]) {
int i;
for (i = 0; i < aec->num_partitions; i++) {
int xPos = (i + aec->xfBufBlockPos) * PART_LEN1;
@@ -330,12 +329,12 @@
if (i + aec->xfBufBlockPos >= aec->num_partitions) {
xPos -= aec->num_partitions * (PART_LEN1);
}
- float *yf0 = yf[0];
- float *yf1 = yf[1];
- float *aRe = aec->xfBuf[0] + xPos;
- float *aIm = aec->xfBuf[1] + xPos;
- float *bRe = aec->wfBuf[0] + pos;
- float *bIm = aec->wfBuf[1] + pos;
+ float* yf0 = yf[0];
+ float* yf1 = yf[1];
+ float* aRe = aec->xfBuf[0] + xPos;
+ float* aIm = aec->xfBuf[1] + xPos;
+ float* bRe = aec->wfBuf[0] + pos;
+ float* bIm = aec->wfBuf[1] + pos;
float f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13;
int len = PART_LEN1 >> 1;
int len1 = PART_LEN1 & 1;
@@ -428,14 +427,14 @@
[f12] "=&f" (f12), [f13] "=&f" (f13), [aRe] "+r" (aRe),
[aIm] "+r" (aIm), [bRe] "+r" (bRe), [bIm] "+r" (bIm),
[yf0] "+r" (yf0), [yf1] "+r" (yf1), [len] "+r" (len)
- : [len1] "r" (len1)
+ :
: "memory"
);
}
}
-void WebRtcAec_FilterAdaptation_mips(AecCore *aec,
- float *fft,
+void WebRtcAec_FilterAdaptation_mips(AecCore* aec,
+ float* fft,
float ef[2][PART_LEN1]) {
int i;
for (i = 0; i < aec->num_partitions; i++) {
@@ -447,11 +446,11 @@
}
pos = i * PART_LEN1;
- float *aRe = aec->xfBuf[0] + xPos;
- float *aIm = aec->xfBuf[1] + xPos;
- float *bRe = ef[0];
- float *bIm = ef[1];
- float *fft_tmp = fft;
+ float* aRe = aec->xfBuf[0] + xPos;
+ float* aIm = aec->xfBuf[1] + xPos;
+ float* bRe = ef[0];
+ float* bIm = ef[1];
+ float* fft_tmp;
float f0, f1, f2, f3, f4, f5, f6 ,f7, f8, f9, f10, f11, f12;
int len = PART_LEN >> 1;
@@ -459,6 +458,7 @@
__asm __volatile (
".set push \n\t"
".set noreorder \n\t"
+ "addiu %[fft_tmp], %[fft], 0 \n\t"
"1: \n\t"
"lwc1 %[f0], 0(%[aRe]) \n\t"
"lwc1 %[f1], 0(%[bRe]) \n\t"
@@ -519,9 +519,9 @@
[f6] "=&f" (f6), [f7] "=&f" (f7), [f8] "=&f" (f8),
[f9] "=&f" (f9), [f10] "=&f" (f10), [f11] "=&f" (f11),
[f12] "=&f" (f12), [aRe] "+r" (aRe), [aIm] "+r" (aIm),
- [bRe] "+r" (bRe), [bIm] "+r" (bIm), [fft_tmp] "+r" (fft_tmp),
- [len] "+r" (len), [fft] "=&r" (fft)
- :
+ [bRe] "+r" (bRe), [bIm] "+r" (bIm), [fft_tmp] "=&r" (fft_tmp),
+ [len] "+r" (len)
+ : [fft] "r" (fft)
: "memory"
);
@@ -626,21 +626,23 @@
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2),
[f3] "=&f" (f3), [f4] "=&f" (f4), [f5] "=&f" (f5),
[f6] "=&f" (f6), [f7] "=&f" (f7), [len] "=&r" (len),
- [fft_tmp] "=&r" (fft_tmp)
- : [aRe] "r" (aRe), [aIm] "r" (aIm), [fft] "r" (fft)
+ [fft_tmp] "=&r" (fft_tmp), [aRe] "+r" (aRe), [aIm] "+r" (aIm)
+ : [fft] "r" (fft)
: "memory"
);
}
}
-void WebRtcAec_OverdriveAndSuppress_mips(AecCore *aec,
+void WebRtcAec_OverdriveAndSuppress_mips(AecCore* aec,
float hNl[PART_LEN1],
const float hNlFb,
float efw[2][PART_LEN1]) {
int i;
const float one = 1.0;
- float *p_hNl, *p_efw0, *p_efw1;
- float *p_WebRtcAec_wC;
+ float* p_hNl;
+ float* p_efw0;
+ float* p_efw1;
+ float* p_WebRtcAec_wC;
float temp1, temp2, temp3, temp4;
p_hNl = &hNl[0];
@@ -698,15 +700,15 @@
}
}
-void WebRtcAec_ScaleErrorSignal_mips(AecCore *aec, float ef[2][PART_LEN1]) {
+void WebRtcAec_ScaleErrorSignal_mips(AecCore* aec, float ef[2][PART_LEN1]) {
const float mu = aec->extended_filter_enabled ? kExtendedMu : aec->normal_mu;
const float error_threshold = aec->extended_filter_enabled
? kExtendedErrorThreshold
: aec->normal_error_threshold;
int len = (PART_LEN1);
- float *ef0 = ef[0];
- float *ef1 = ef[1];
- float *xPow = aec->xPow;
+ float* ef0 = ef[0];
+ float* ef1 = ef[1];
+ float* xPow = aec->xPow;
float fac1 = 1e-10f;
float err_th2 = error_threshold * error_threshold;
float f0, f1, f2;
@@ -763,8 +765,7 @@
);
}
-void WebRtcAec_InitAec_mips(void)
-{
+void WebRtcAec_InitAec_mips(void) {
WebRtcAec_FilterFar = WebRtcAec_FilterFar_mips;
WebRtcAec_FilterAdaptation = WebRtcAec_FilterAdaptation_mips;
WebRtcAec_ScaleErrorSignal = WebRtcAec_ScaleErrorSignal_mips;
diff --git a/modules/audio_processing/aec/aec_core_neon.c b/modules/audio_processing/aec/aec_core_neon.c
index cec0a7e..a21a954 100644
--- a/modules/audio_processing/aec/aec_core_neon.c
+++ b/modules/audio_processing/aec/aec_core_neon.c
@@ -14,12 +14,12 @@
* Based on aec_core_sse2.c.
*/
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-
#include <arm_neon.h>
#include <math.h>
#include <string.h> // memset
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_processing/aec/aec_common.h"
#include "webrtc/modules/audio_processing/aec/aec_core_internal.h"
#include "webrtc/modules/audio_processing/aec/aec_rdft.h"
@@ -30,6 +30,151 @@
return aRe * bRe - aIm * bIm;
}
+__inline static float MulIm(float aRe, float aIm, float bRe, float bIm) {
+ return aRe * bIm + aIm * bRe;
+}
+
+static void FilterFarNEON(AecCore* aec, float yf[2][PART_LEN1]) {
+ int i;
+ const int num_partitions = aec->num_partitions;
+ for (i = 0; i < num_partitions; i++) {
+ int j;
+ int xPos = (i + aec->xfBufBlockPos) * PART_LEN1;
+ int pos = i * PART_LEN1;
+ // Check for wrap
+ if (i + aec->xfBufBlockPos >= num_partitions) {
+ xPos -= num_partitions * PART_LEN1;
+ }
+
+ // vectorized code (four at once)
+ for (j = 0; j + 3 < PART_LEN1; j += 4) {
+ const float32x4_t xfBuf_re = vld1q_f32(&aec->xfBuf[0][xPos + j]);
+ const float32x4_t xfBuf_im = vld1q_f32(&aec->xfBuf[1][xPos + j]);
+ const float32x4_t wfBuf_re = vld1q_f32(&aec->wfBuf[0][pos + j]);
+ const float32x4_t wfBuf_im = vld1q_f32(&aec->wfBuf[1][pos + j]);
+ const float32x4_t yf_re = vld1q_f32(&yf[0][j]);
+ const float32x4_t yf_im = vld1q_f32(&yf[1][j]);
+ const float32x4_t a = vmulq_f32(xfBuf_re, wfBuf_re);
+ const float32x4_t e = vmlsq_f32(a, xfBuf_im, wfBuf_im);
+ const float32x4_t c = vmulq_f32(xfBuf_re, wfBuf_im);
+ const float32x4_t f = vmlaq_f32(c, xfBuf_im, wfBuf_re);
+ const float32x4_t g = vaddq_f32(yf_re, e);
+ const float32x4_t h = vaddq_f32(yf_im, f);
+ vst1q_f32(&yf[0][j], g);
+ vst1q_f32(&yf[1][j], h);
+ }
+ // scalar code for the remaining items.
+ for (; j < PART_LEN1; j++) {
+ yf[0][j] += MulRe(aec->xfBuf[0][xPos + j],
+ aec->xfBuf[1][xPos + j],
+ aec->wfBuf[0][pos + j],
+ aec->wfBuf[1][pos + j]);
+ yf[1][j] += MulIm(aec->xfBuf[0][xPos + j],
+ aec->xfBuf[1][xPos + j],
+ aec->wfBuf[0][pos + j],
+ aec->wfBuf[1][pos + j]);
+ }
+ }
+}
+
+static float32x4_t vdivq_f32(float32x4_t a, float32x4_t b) {
+ int i;
+ float32x4_t x = vrecpeq_f32(b);
+ // from arm documentation
+ // The Newton-Raphson iteration:
+ // x[n+1] = x[n] * (2 - d * x[n])
+ // converges to (1/d) if x0 is the result of VRECPE applied to d.
+ //
+ // Note: The precision did not improve after 2 iterations.
+ for (i = 0; i < 2; i++) {
+ x = vmulq_f32(vrecpsq_f32(b, x), x);
+ }
+ // a/b = a*(1/b)
+ return vmulq_f32(a, x);
+}
+
+static float32x4_t vsqrtq_f32(float32x4_t s) {
+ int i;
+ float32x4_t x = vrsqrteq_f32(s);
+
+ // Code to handle sqrt(0).
+ // If the input to sqrtf() is zero, a zero will be returned.
+ // If the input to vrsqrteq_f32() is zero, positive infinity is returned.
+ const uint32x4_t vec_p_inf = vdupq_n_u32(0x7F800000);
+ // check for divide by zero
+ const uint32x4_t div_by_zero = vceqq_u32(vec_p_inf, vreinterpretq_u32_f32(x));
+ // zero out the positive infinity results
+ x = vreinterpretq_f32_u32(vandq_u32(vmvnq_u32(div_by_zero),
+ vreinterpretq_u32_f32(x)));
+ // from arm documentation
+ // The Newton-Raphson iteration:
+ // x[n+1] = x[n] * (3 - d * (x[n] * x[n])) / 2)
+ // converges to (1/√d) if x0 is the result of VRSQRTE applied to d.
+ //
+ // Note: The precision did not improve after 2 iterations.
+ for (i = 0; i < 2; i++) {
+ x = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x, x), s), x);
+ }
+ // sqrt(s) = s * 1/sqrt(s)
+ return vmulq_f32(s, x);;
+}
+
+static void ScaleErrorSignalNEON(AecCore* aec, float ef[2][PART_LEN1]) {
+ const float mu = aec->extended_filter_enabled ? kExtendedMu : aec->normal_mu;
+ const float error_threshold = aec->extended_filter_enabled ?
+ kExtendedErrorThreshold : aec->normal_error_threshold;
+ const float32x4_t k1e_10f = vdupq_n_f32(1e-10f);
+ const float32x4_t kMu = vmovq_n_f32(mu);
+ const float32x4_t kThresh = vmovq_n_f32(error_threshold);
+ int i;
+ // vectorized code (four at once)
+ for (i = 0; i + 3 < PART_LEN1; i += 4) {
+ const float32x4_t xPow = vld1q_f32(&aec->xPow[i]);
+ const float32x4_t ef_re_base = vld1q_f32(&ef[0][i]);
+ const float32x4_t ef_im_base = vld1q_f32(&ef[1][i]);
+ const float32x4_t xPowPlus = vaddq_f32(xPow, k1e_10f);
+ float32x4_t ef_re = vdivq_f32(ef_re_base, xPowPlus);
+ float32x4_t ef_im = vdivq_f32(ef_im_base, xPowPlus);
+ const float32x4_t ef_re2 = vmulq_f32(ef_re, ef_re);
+ const float32x4_t ef_sum2 = vmlaq_f32(ef_re2, ef_im, ef_im);
+ const float32x4_t absEf = vsqrtq_f32(ef_sum2);
+ const uint32x4_t bigger = vcgtq_f32(absEf, kThresh);
+ const float32x4_t absEfPlus = vaddq_f32(absEf, k1e_10f);
+ const float32x4_t absEfInv = vdivq_f32(kThresh, absEfPlus);
+ uint32x4_t ef_re_if = vreinterpretq_u32_f32(vmulq_f32(ef_re, absEfInv));
+ uint32x4_t ef_im_if = vreinterpretq_u32_f32(vmulq_f32(ef_im, absEfInv));
+ uint32x4_t ef_re_u32 = vandq_u32(vmvnq_u32(bigger),
+ vreinterpretq_u32_f32(ef_re));
+ uint32x4_t ef_im_u32 = vandq_u32(vmvnq_u32(bigger),
+ vreinterpretq_u32_f32(ef_im));
+ ef_re_if = vandq_u32(bigger, ef_re_if);
+ ef_im_if = vandq_u32(bigger, ef_im_if);
+ ef_re_u32 = vorrq_u32(ef_re_u32, ef_re_if);
+ ef_im_u32 = vorrq_u32(ef_im_u32, ef_im_if);
+ ef_re = vmulq_f32(vreinterpretq_f32_u32(ef_re_u32), kMu);
+ ef_im = vmulq_f32(vreinterpretq_f32_u32(ef_im_u32), kMu);
+ vst1q_f32(&ef[0][i], ef_re);
+ vst1q_f32(&ef[1][i], ef_im);
+ }
+ // scalar code for the remaining items.
+ for (; i < PART_LEN1; i++) {
+ float abs_ef;
+ ef[0][i] /= (aec->xPow[i] + 1e-10f);
+ ef[1][i] /= (aec->xPow[i] + 1e-10f);
+ abs_ef = sqrtf(ef[0][i] * ef[0][i] + ef[1][i] * ef[1][i]);
+
+ if (abs_ef > error_threshold) {
+ abs_ef = error_threshold / (abs_ef + 1e-10f);
+ ef[0][i] *= abs_ef;
+ ef[1][i] *= abs_ef;
+ }
+
+ // Stepsize factor
+ ef[0][i] *= mu;
+ ef[1][i] *= mu;
+ }
+}
+
static void FilterAdaptationNEON(AecCore* aec,
float* fft,
float ef[2][PART_LEN1]) {
@@ -105,9 +250,6 @@
}
}
-extern const float WebRtcAec_weightCurve[65];
-extern const float WebRtcAec_overDriveCurve[65];
-
static float32x4_t vpowq_f32(float32x4_t a, float32x4_t b) {
// a^b = exp2(b * log2(a))
// exp2(x) and log2(x) are calculated using polynomial approximations.
@@ -297,8 +439,295 @@
}
}
+static int PartitionDelay(const AecCore* aec) {
+ // Measures the energy in each filter partition and returns the partition with
+ // highest energy.
+ // TODO(bjornv): Spread computational cost by computing one partition per
+ // block?
+ float wfEnMax = 0;
+ int i;
+ int delay = 0;
+
+ for (i = 0; i < aec->num_partitions; i++) {
+ int j;
+ int pos = i * PART_LEN1;
+ float wfEn = 0;
+ float32x4_t vec_wfEn = vdupq_n_f32(0.0f);
+ // vectorized code (four at once)
+ for (j = 0; j + 3 < PART_LEN1; j += 4) {
+ const float32x4_t vec_wfBuf0 = vld1q_f32(&aec->wfBuf[0][pos + j]);
+ const float32x4_t vec_wfBuf1 = vld1q_f32(&aec->wfBuf[1][pos + j]);
+ vec_wfEn = vmlaq_f32(vec_wfEn, vec_wfBuf0, vec_wfBuf0);
+ vec_wfEn = vmlaq_f32(vec_wfEn, vec_wfBuf1, vec_wfBuf1);
+ }
+ {
+ float32x2_t vec_total;
+ // A B C D
+ vec_total = vpadd_f32(vget_low_f32(vec_wfEn), vget_high_f32(vec_wfEn));
+ // A+B C+D
+ vec_total = vpadd_f32(vec_total, vec_total);
+ // A+B+C+D A+B+C+D
+ wfEn = vget_lane_f32(vec_total, 0);
+ }
+
+ // scalar code for the remaining items.
+ for (; j < PART_LEN1; j++) {
+ wfEn += aec->wfBuf[0][pos + j] * aec->wfBuf[0][pos + j] +
+ aec->wfBuf[1][pos + j] * aec->wfBuf[1][pos + j];
+ }
+
+ if (wfEn > wfEnMax) {
+ wfEnMax = wfEn;
+ delay = i;
+ }
+ }
+ return delay;
+}
+
+// Updates the following smoothed Power Spectral Densities (PSD):
+// - sd : near-end
+// - se : residual echo
+// - sx : far-end
+// - sde : cross-PSD of near-end and residual echo
+// - sxd : cross-PSD of near-end and far-end
+//
+// In addition to updating the PSDs, also the filter diverge state is determined
+// upon actions are taken.
+static void SmoothedPSD(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float dfw[2][PART_LEN1],
+ float xfw[2][PART_LEN1]) {
+ // Power estimate smoothing coefficients.
+ const float* ptrGCoh = aec->extended_filter_enabled
+ ? WebRtcAec_kExtendedSmoothingCoefficients[aec->mult - 1]
+ : WebRtcAec_kNormalSmoothingCoefficients[aec->mult - 1];
+ int i;
+ float sdSum = 0, seSum = 0;
+ const float32x4_t vec_15 = vdupq_n_f32(WebRtcAec_kMinFarendPSD);
+ float32x4_t vec_sdSum = vdupq_n_f32(0.0f);
+ float32x4_t vec_seSum = vdupq_n_f32(0.0f);
+
+ for (i = 0; i + 3 < PART_LEN1; i += 4) {
+ const float32x4_t vec_dfw0 = vld1q_f32(&dfw[0][i]);
+ const float32x4_t vec_dfw1 = vld1q_f32(&dfw[1][i]);
+ const float32x4_t vec_efw0 = vld1q_f32(&efw[0][i]);
+ const float32x4_t vec_efw1 = vld1q_f32(&efw[1][i]);
+ const float32x4_t vec_xfw0 = vld1q_f32(&xfw[0][i]);
+ const float32x4_t vec_xfw1 = vld1q_f32(&xfw[1][i]);
+ float32x4_t vec_sd = vmulq_n_f32(vld1q_f32(&aec->sd[i]), ptrGCoh[0]);
+ float32x4_t vec_se = vmulq_n_f32(vld1q_f32(&aec->se[i]), ptrGCoh[0]);
+ float32x4_t vec_sx = vmulq_n_f32(vld1q_f32(&aec->sx[i]), ptrGCoh[0]);
+ float32x4_t vec_dfw_sumsq = vmulq_f32(vec_dfw0, vec_dfw0);
+ float32x4_t vec_efw_sumsq = vmulq_f32(vec_efw0, vec_efw0);
+ float32x4_t vec_xfw_sumsq = vmulq_f32(vec_xfw0, vec_xfw0);
+
+ vec_dfw_sumsq = vmlaq_f32(vec_dfw_sumsq, vec_dfw1, vec_dfw1);
+ vec_efw_sumsq = vmlaq_f32(vec_efw_sumsq, vec_efw1, vec_efw1);
+ vec_xfw_sumsq = vmlaq_f32(vec_xfw_sumsq, vec_xfw1, vec_xfw1);
+ vec_xfw_sumsq = vmaxq_f32(vec_xfw_sumsq, vec_15);
+ vec_sd = vmlaq_n_f32(vec_sd, vec_dfw_sumsq, ptrGCoh[1]);
+ vec_se = vmlaq_n_f32(vec_se, vec_efw_sumsq, ptrGCoh[1]);
+ vec_sx = vmlaq_n_f32(vec_sx, vec_xfw_sumsq, ptrGCoh[1]);
+
+ vst1q_f32(&aec->sd[i], vec_sd);
+ vst1q_f32(&aec->se[i], vec_se);
+ vst1q_f32(&aec->sx[i], vec_sx);
+
+ {
+ float32x4x2_t vec_sde = vld2q_f32(&aec->sde[i][0]);
+ float32x4_t vec_dfwefw0011 = vmulq_f32(vec_dfw0, vec_efw0);
+ float32x4_t vec_dfwefw0110 = vmulq_f32(vec_dfw0, vec_efw1);
+ vec_sde.val[0] = vmulq_n_f32(vec_sde.val[0], ptrGCoh[0]);
+ vec_sde.val[1] = vmulq_n_f32(vec_sde.val[1], ptrGCoh[0]);
+ vec_dfwefw0011 = vmlaq_f32(vec_dfwefw0011, vec_dfw1, vec_efw1);
+ vec_dfwefw0110 = vmlsq_f32(vec_dfwefw0110, vec_dfw1, vec_efw0);
+ vec_sde.val[0] = vmlaq_n_f32(vec_sde.val[0], vec_dfwefw0011, ptrGCoh[1]);
+ vec_sde.val[1] = vmlaq_n_f32(vec_sde.val[1], vec_dfwefw0110, ptrGCoh[1]);
+ vst2q_f32(&aec->sde[i][0], vec_sde);
+ }
+
+ {
+ float32x4x2_t vec_sxd = vld2q_f32(&aec->sxd[i][0]);
+ float32x4_t vec_dfwxfw0011 = vmulq_f32(vec_dfw0, vec_xfw0);
+ float32x4_t vec_dfwxfw0110 = vmulq_f32(vec_dfw0, vec_xfw1);
+ vec_sxd.val[0] = vmulq_n_f32(vec_sxd.val[0], ptrGCoh[0]);
+ vec_sxd.val[1] = vmulq_n_f32(vec_sxd.val[1], ptrGCoh[0]);
+ vec_dfwxfw0011 = vmlaq_f32(vec_dfwxfw0011, vec_dfw1, vec_xfw1);
+ vec_dfwxfw0110 = vmlsq_f32(vec_dfwxfw0110, vec_dfw1, vec_xfw0);
+ vec_sxd.val[0] = vmlaq_n_f32(vec_sxd.val[0], vec_dfwxfw0011, ptrGCoh[1]);
+ vec_sxd.val[1] = vmlaq_n_f32(vec_sxd.val[1], vec_dfwxfw0110, ptrGCoh[1]);
+ vst2q_f32(&aec->sxd[i][0], vec_sxd);
+ }
+
+ vec_sdSum = vaddq_f32(vec_sdSum, vec_sd);
+ vec_seSum = vaddq_f32(vec_seSum, vec_se);
+ }
+ {
+ float32x2_t vec_sdSum_total;
+ float32x2_t vec_seSum_total;
+ // A B C D
+ vec_sdSum_total = vpadd_f32(vget_low_f32(vec_sdSum),
+ vget_high_f32(vec_sdSum));
+ vec_seSum_total = vpadd_f32(vget_low_f32(vec_seSum),
+ vget_high_f32(vec_seSum));
+ // A+B C+D
+ vec_sdSum_total = vpadd_f32(vec_sdSum_total, vec_sdSum_total);
+ vec_seSum_total = vpadd_f32(vec_seSum_total, vec_seSum_total);
+ // A+B+C+D A+B+C+D
+ sdSum = vget_lane_f32(vec_sdSum_total, 0);
+ seSum = vget_lane_f32(vec_seSum_total, 0);
+ }
+
+ // scalar code for the remaining items.
+ for (; i < PART_LEN1; i++) {
+ aec->sd[i] = ptrGCoh[0] * aec->sd[i] +
+ ptrGCoh[1] * (dfw[0][i] * dfw[0][i] + dfw[1][i] * dfw[1][i]);
+ aec->se[i] = ptrGCoh[0] * aec->se[i] +
+ ptrGCoh[1] * (efw[0][i] * efw[0][i] + efw[1][i] * efw[1][i]);
+ // We threshold here to protect against the ill-effects of a zero farend.
+ // The threshold is not arbitrarily chosen, but balances protection and
+ // adverse interaction with the algorithm's tuning.
+ // TODO(bjornv): investigate further why this is so sensitive.
+ aec->sx[i] =
+ ptrGCoh[0] * aec->sx[i] +
+ ptrGCoh[1] * WEBRTC_SPL_MAX(
+ xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i],
+ WebRtcAec_kMinFarendPSD);
+
+ aec->sde[i][0] =
+ ptrGCoh[0] * aec->sde[i][0] +
+ ptrGCoh[1] * (dfw[0][i] * efw[0][i] + dfw[1][i] * efw[1][i]);
+ aec->sde[i][1] =
+ ptrGCoh[0] * aec->sde[i][1] +
+ ptrGCoh[1] * (dfw[0][i] * efw[1][i] - dfw[1][i] * efw[0][i]);
+
+ aec->sxd[i][0] =
+ ptrGCoh[0] * aec->sxd[i][0] +
+ ptrGCoh[1] * (dfw[0][i] * xfw[0][i] + dfw[1][i] * xfw[1][i]);
+ aec->sxd[i][1] =
+ ptrGCoh[0] * aec->sxd[i][1] +
+ ptrGCoh[1] * (dfw[0][i] * xfw[1][i] - dfw[1][i] * xfw[0][i]);
+
+ sdSum += aec->sd[i];
+ seSum += aec->se[i];
+ }
+
+ // Divergent filter safeguard.
+ aec->divergeState = (aec->divergeState ? 1.05f : 1.0f) * seSum > sdSum;
+
+ if (aec->divergeState)
+ memcpy(efw, dfw, sizeof(efw[0][0]) * 2 * PART_LEN1);
+
+ // Reset if error is significantly larger than nearend (13 dB).
+ if (!aec->extended_filter_enabled && seSum > (19.95f * sdSum))
+ memset(aec->wfBuf, 0, sizeof(aec->wfBuf));
+}
+
+// Window time domain data to be used by the fft.
+__inline static void WindowData(float* x_windowed, const float* x) {
+ int i;
+ for (i = 0; i < PART_LEN; i += 4) {
+ const float32x4_t vec_Buf1 = vld1q_f32(&x[i]);
+ const float32x4_t vec_Buf2 = vld1q_f32(&x[PART_LEN + i]);
+ const float32x4_t vec_sqrtHanning = vld1q_f32(&WebRtcAec_sqrtHanning[i]);
+ // A B C D
+ float32x4_t vec_sqrtHanning_rev =
+ vld1q_f32(&WebRtcAec_sqrtHanning[PART_LEN - i - 3]);
+ // B A D C
+ vec_sqrtHanning_rev = vrev64q_f32(vec_sqrtHanning_rev);
+ // D C B A
+ vec_sqrtHanning_rev = vcombine_f32(vget_high_f32(vec_sqrtHanning_rev),
+ vget_low_f32(vec_sqrtHanning_rev));
+ vst1q_f32(&x_windowed[i], vmulq_f32(vec_Buf1, vec_sqrtHanning));
+ vst1q_f32(&x_windowed[PART_LEN + i],
+ vmulq_f32(vec_Buf2, vec_sqrtHanning_rev));
+ }
+}
+
+// Puts fft output data into a complex valued array.
+__inline static void StoreAsComplex(const float* data,
+ float data_complex[2][PART_LEN1]) {
+ int i;
+ for (i = 0; i < PART_LEN; i += 4) {
+ const float32x4x2_t vec_data = vld2q_f32(&data[2 * i]);
+ vst1q_f32(&data_complex[0][i], vec_data.val[0]);
+ vst1q_f32(&data_complex[1][i], vec_data.val[1]);
+ }
+ // fix beginning/end values
+ data_complex[1][0] = 0;
+ data_complex[1][PART_LEN] = 0;
+ data_complex[0][0] = data[0];
+ data_complex[0][PART_LEN] = data[1];
+}
+
+static void SubbandCoherenceNEON(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float xfw[2][PART_LEN1],
+ float* fft,
+ float* cohde,
+ float* cohxd) {
+ float dfw[2][PART_LEN1];
+ int i;
+
+ if (aec->delayEstCtr == 0)
+ aec->delayIdx = PartitionDelay(aec);
+
+ // Use delayed far.
+ memcpy(xfw,
+ aec->xfwBuf + aec->delayIdx * PART_LEN1,
+ sizeof(xfw[0][0]) * 2 * PART_LEN1);
+
+ // Windowed near fft
+ WindowData(fft, aec->dBuf);
+ aec_rdft_forward_128(fft);
+ StoreAsComplex(fft, dfw);
+
+ // Windowed error fft
+ WindowData(fft, aec->eBuf);
+ aec_rdft_forward_128(fft);
+ StoreAsComplex(fft, efw);
+
+ SmoothedPSD(aec, efw, dfw, xfw);
+
+ {
+ const float32x4_t vec_1eminus10 = vdupq_n_f32(1e-10f);
+
+ // Subband coherence
+ for (i = 0; i + 3 < PART_LEN1; i += 4) {
+ const float32x4_t vec_sd = vld1q_f32(&aec->sd[i]);
+ const float32x4_t vec_se = vld1q_f32(&aec->se[i]);
+ const float32x4_t vec_sx = vld1q_f32(&aec->sx[i]);
+ const float32x4_t vec_sdse = vmlaq_f32(vec_1eminus10, vec_sd, vec_se);
+ const float32x4_t vec_sdsx = vmlaq_f32(vec_1eminus10, vec_sd, vec_sx);
+ float32x4x2_t vec_sde = vld2q_f32(&aec->sde[i][0]);
+ float32x4x2_t vec_sxd = vld2q_f32(&aec->sxd[i][0]);
+ float32x4_t vec_cohde = vmulq_f32(vec_sde.val[0], vec_sde.val[0]);
+ float32x4_t vec_cohxd = vmulq_f32(vec_sxd.val[0], vec_sxd.val[0]);
+ vec_cohde = vmlaq_f32(vec_cohde, vec_sde.val[1], vec_sde.val[1]);
+ vec_cohde = vdivq_f32(vec_cohde, vec_sdse);
+ vec_cohxd = vmlaq_f32(vec_cohxd, vec_sxd.val[1], vec_sxd.val[1]);
+ vec_cohxd = vdivq_f32(vec_cohxd, vec_sdsx);
+
+ vst1q_f32(&cohde[i], vec_cohde);
+ vst1q_f32(&cohxd[i], vec_cohxd);
+ }
+ }
+ // scalar code for the remaining items.
+ for (; i < PART_LEN1; i++) {
+ cohde[i] =
+ (aec->sde[i][0] * aec->sde[i][0] + aec->sde[i][1] * aec->sde[i][1]) /
+ (aec->sd[i] * aec->se[i] + 1e-10f);
+ cohxd[i] =
+ (aec->sxd[i][0] * aec->sxd[i][0] + aec->sxd[i][1] * aec->sxd[i][1]) /
+ (aec->sx[i] * aec->sd[i] + 1e-10f);
+ }
+}
+
void WebRtcAec_InitAec_neon(void) {
+ WebRtcAec_FilterFar = FilterFarNEON;
+ WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON;
WebRtcAec_FilterAdaptation = FilterAdaptationNEON;
WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON;
+ WebRtcAec_SubbandCoherence = SubbandCoherenceNEON;
}
diff --git a/modules/audio_processing/aec/aec_core_sse2.c b/modules/audio_processing/aec/aec_core_sse2.c
index 8d4afdb..b1bffcb 100644
--- a/modules/audio_processing/aec/aec_core_sse2.c
+++ b/modules/audio_processing/aec/aec_core_sse2.c
@@ -12,12 +12,12 @@
* The core AEC algorithm, SSE2 version of speed-critical functions.
*/
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-
#include <emmintrin.h>
#include <math.h>
#include <string.h> // memset
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_processing/aec/aec_common.h"
#include "webrtc/modules/audio_processing/aec/aec_core_internal.h"
#include "webrtc/modules/audio_processing/aec/aec_rdft.h"
@@ -354,9 +354,6 @@
return a_exp_b;
}
-extern const float WebRtcAec_weightCurve[65];
-extern const float WebRtcAec_overDriveCurve[65];
-
static void OverdriveAndSuppressSSE2(AecCore* aec,
float hNl[PART_LEN1],
const float hNlFb,
@@ -423,9 +420,312 @@
}
}
+__inline static void _mm_add_ps_4x1(__m128 sum, float *dst) {
+ // A+B C+D
+ sum = _mm_add_ps(sum, _mm_shuffle_ps(sum, sum, _MM_SHUFFLE(0, 0, 3, 2)));
+ // A+B+C+D A+B+C+D
+ sum = _mm_add_ps(sum, _mm_shuffle_ps(sum, sum, _MM_SHUFFLE(1, 1, 1, 1)));
+ _mm_store_ss(dst, sum);
+}
+static int PartitionDelay(const AecCore* aec) {
+ // Measures the energy in each filter partition and returns the partition with
+ // highest energy.
+ // TODO(bjornv): Spread computational cost by computing one partition per
+ // block?
+ float wfEnMax = 0;
+ int i;
+ int delay = 0;
+
+ for (i = 0; i < aec->num_partitions; i++) {
+ int j;
+ int pos = i * PART_LEN1;
+ float wfEn = 0;
+ __m128 vec_wfEn = _mm_set1_ps(0.0f);
+ // vectorized code (four at once)
+ for (j = 0; j + 3 < PART_LEN1; j += 4) {
+ const __m128 vec_wfBuf0 = _mm_loadu_ps(&aec->wfBuf[0][pos + j]);
+ const __m128 vec_wfBuf1 = _mm_loadu_ps(&aec->wfBuf[1][pos + j]);
+ vec_wfEn = _mm_add_ps(vec_wfEn, _mm_mul_ps(vec_wfBuf0, vec_wfBuf0));
+ vec_wfEn = _mm_add_ps(vec_wfEn, _mm_mul_ps(vec_wfBuf1, vec_wfBuf1));
+ }
+ _mm_add_ps_4x1(vec_wfEn, &wfEn);
+
+ // scalar code for the remaining items.
+ for (; j < PART_LEN1; j++) {
+ wfEn += aec->wfBuf[0][pos + j] * aec->wfBuf[0][pos + j] +
+ aec->wfBuf[1][pos + j] * aec->wfBuf[1][pos + j];
+ }
+
+ if (wfEn > wfEnMax) {
+ wfEnMax = wfEn;
+ delay = i;
+ }
+ }
+ return delay;
+}
+
+// Updates the following smoothed Power Spectral Densities (PSD):
+// - sd : near-end
+// - se : residual echo
+// - sx : far-end
+// - sde : cross-PSD of near-end and residual echo
+// - sxd : cross-PSD of near-end and far-end
+//
+// In addition to updating the PSDs, also the filter diverge state is determined
+// upon actions are taken.
+static void SmoothedPSD(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float dfw[2][PART_LEN1],
+ float xfw[2][PART_LEN1]) {
+ // Power estimate smoothing coefficients.
+ const float* ptrGCoh = aec->extended_filter_enabled
+ ? WebRtcAec_kExtendedSmoothingCoefficients[aec->mult - 1]
+ : WebRtcAec_kNormalSmoothingCoefficients[aec->mult - 1];
+ int i;
+ float sdSum = 0, seSum = 0;
+ const __m128 vec_15 = _mm_set1_ps(WebRtcAec_kMinFarendPSD);
+ const __m128 vec_GCoh0 = _mm_set1_ps(ptrGCoh[0]);
+ const __m128 vec_GCoh1 = _mm_set1_ps(ptrGCoh[1]);
+ __m128 vec_sdSum = _mm_set1_ps(0.0f);
+ __m128 vec_seSum = _mm_set1_ps(0.0f);
+
+ for (i = 0; i + 3 < PART_LEN1; i += 4) {
+ const __m128 vec_dfw0 = _mm_loadu_ps(&dfw[0][i]);
+ const __m128 vec_dfw1 = _mm_loadu_ps(&dfw[1][i]);
+ const __m128 vec_efw0 = _mm_loadu_ps(&efw[0][i]);
+ const __m128 vec_efw1 = _mm_loadu_ps(&efw[1][i]);
+ const __m128 vec_xfw0 = _mm_loadu_ps(&xfw[0][i]);
+ const __m128 vec_xfw1 = _mm_loadu_ps(&xfw[1][i]);
+ __m128 vec_sd = _mm_mul_ps(_mm_loadu_ps(&aec->sd[i]), vec_GCoh0);
+ __m128 vec_se = _mm_mul_ps(_mm_loadu_ps(&aec->se[i]), vec_GCoh0);
+ __m128 vec_sx = _mm_mul_ps(_mm_loadu_ps(&aec->sx[i]), vec_GCoh0);
+ __m128 vec_dfw_sumsq = _mm_mul_ps(vec_dfw0, vec_dfw0);
+ __m128 vec_efw_sumsq = _mm_mul_ps(vec_efw0, vec_efw0);
+ __m128 vec_xfw_sumsq = _mm_mul_ps(vec_xfw0, vec_xfw0);
+ vec_dfw_sumsq = _mm_add_ps(vec_dfw_sumsq, _mm_mul_ps(vec_dfw1, vec_dfw1));
+ vec_efw_sumsq = _mm_add_ps(vec_efw_sumsq, _mm_mul_ps(vec_efw1, vec_efw1));
+ vec_xfw_sumsq = _mm_add_ps(vec_xfw_sumsq, _mm_mul_ps(vec_xfw1, vec_xfw1));
+ vec_xfw_sumsq = _mm_max_ps(vec_xfw_sumsq, vec_15);
+ vec_sd = _mm_add_ps(vec_sd, _mm_mul_ps(vec_dfw_sumsq, vec_GCoh1));
+ vec_se = _mm_add_ps(vec_se, _mm_mul_ps(vec_efw_sumsq, vec_GCoh1));
+ vec_sx = _mm_add_ps(vec_sx, _mm_mul_ps(vec_xfw_sumsq, vec_GCoh1));
+ _mm_storeu_ps(&aec->sd[i], vec_sd);
+ _mm_storeu_ps(&aec->se[i], vec_se);
+ _mm_storeu_ps(&aec->sx[i], vec_sx);
+
+ {
+ const __m128 vec_3210 = _mm_loadu_ps(&aec->sde[i][0]);
+ const __m128 vec_7654 = _mm_loadu_ps(&aec->sde[i + 2][0]);
+ __m128 vec_a = _mm_shuffle_ps(vec_3210, vec_7654,
+ _MM_SHUFFLE(2, 0, 2, 0));
+ __m128 vec_b = _mm_shuffle_ps(vec_3210, vec_7654,
+ _MM_SHUFFLE(3, 1, 3, 1));
+ __m128 vec_dfwefw0011 = _mm_mul_ps(vec_dfw0, vec_efw0);
+ __m128 vec_dfwefw0110 = _mm_mul_ps(vec_dfw0, vec_efw1);
+ vec_a = _mm_mul_ps(vec_a, vec_GCoh0);
+ vec_b = _mm_mul_ps(vec_b, vec_GCoh0);
+ vec_dfwefw0011 = _mm_add_ps(vec_dfwefw0011,
+ _mm_mul_ps(vec_dfw1, vec_efw1));
+ vec_dfwefw0110 = _mm_sub_ps(vec_dfwefw0110,
+ _mm_mul_ps(vec_dfw1, vec_efw0));
+ vec_a = _mm_add_ps(vec_a, _mm_mul_ps(vec_dfwefw0011, vec_GCoh1));
+ vec_b = _mm_add_ps(vec_b, _mm_mul_ps(vec_dfwefw0110, vec_GCoh1));
+ _mm_storeu_ps(&aec->sde[i][0], _mm_unpacklo_ps(vec_a, vec_b));
+ _mm_storeu_ps(&aec->sde[i + 2][0], _mm_unpackhi_ps(vec_a, vec_b));
+ }
+
+ {
+ const __m128 vec_3210 = _mm_loadu_ps(&aec->sxd[i][0]);
+ const __m128 vec_7654 = _mm_loadu_ps(&aec->sxd[i + 2][0]);
+ __m128 vec_a = _mm_shuffle_ps(vec_3210, vec_7654,
+ _MM_SHUFFLE(2, 0, 2, 0));
+ __m128 vec_b = _mm_shuffle_ps(vec_3210, vec_7654,
+ _MM_SHUFFLE(3, 1, 3, 1));
+ __m128 vec_dfwxfw0011 = _mm_mul_ps(vec_dfw0, vec_xfw0);
+ __m128 vec_dfwxfw0110 = _mm_mul_ps(vec_dfw0, vec_xfw1);
+ vec_a = _mm_mul_ps(vec_a, vec_GCoh0);
+ vec_b = _mm_mul_ps(vec_b, vec_GCoh0);
+ vec_dfwxfw0011 = _mm_add_ps(vec_dfwxfw0011,
+ _mm_mul_ps(vec_dfw1, vec_xfw1));
+ vec_dfwxfw0110 = _mm_sub_ps(vec_dfwxfw0110,
+ _mm_mul_ps(vec_dfw1, vec_xfw0));
+ vec_a = _mm_add_ps(vec_a, _mm_mul_ps(vec_dfwxfw0011, vec_GCoh1));
+ vec_b = _mm_add_ps(vec_b, _mm_mul_ps(vec_dfwxfw0110, vec_GCoh1));
+ _mm_storeu_ps(&aec->sxd[i][0], _mm_unpacklo_ps(vec_a, vec_b));
+ _mm_storeu_ps(&aec->sxd[i + 2][0], _mm_unpackhi_ps(vec_a, vec_b));
+ }
+
+ vec_sdSum = _mm_add_ps(vec_sdSum, vec_sd);
+ vec_seSum = _mm_add_ps(vec_seSum, vec_se);
+ }
+
+ _mm_add_ps_4x1(vec_sdSum, &sdSum);
+ _mm_add_ps_4x1(vec_seSum, &seSum);
+
+ for (; i < PART_LEN1; i++) {
+ aec->sd[i] = ptrGCoh[0] * aec->sd[i] +
+ ptrGCoh[1] * (dfw[0][i] * dfw[0][i] + dfw[1][i] * dfw[1][i]);
+ aec->se[i] = ptrGCoh[0] * aec->se[i] +
+ ptrGCoh[1] * (efw[0][i] * efw[0][i] + efw[1][i] * efw[1][i]);
+ // We threshold here to protect against the ill-effects of a zero farend.
+ // The threshold is not arbitrarily chosen, but balances protection and
+ // adverse interaction with the algorithm's tuning.
+ // TODO(bjornv): investigate further why this is so sensitive.
+ aec->sx[i] =
+ ptrGCoh[0] * aec->sx[i] +
+ ptrGCoh[1] * WEBRTC_SPL_MAX(
+ xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i],
+ WebRtcAec_kMinFarendPSD);
+
+ aec->sde[i][0] =
+ ptrGCoh[0] * aec->sde[i][0] +
+ ptrGCoh[1] * (dfw[0][i] * efw[0][i] + dfw[1][i] * efw[1][i]);
+ aec->sde[i][1] =
+ ptrGCoh[0] * aec->sde[i][1] +
+ ptrGCoh[1] * (dfw[0][i] * efw[1][i] - dfw[1][i] * efw[0][i]);
+
+ aec->sxd[i][0] =
+ ptrGCoh[0] * aec->sxd[i][0] +
+ ptrGCoh[1] * (dfw[0][i] * xfw[0][i] + dfw[1][i] * xfw[1][i]);
+ aec->sxd[i][1] =
+ ptrGCoh[0] * aec->sxd[i][1] +
+ ptrGCoh[1] * (dfw[0][i] * xfw[1][i] - dfw[1][i] * xfw[0][i]);
+
+ sdSum += aec->sd[i];
+ seSum += aec->se[i];
+ }
+
+ // Divergent filter safeguard.
+ aec->divergeState = (aec->divergeState ? 1.05f : 1.0f) * seSum > sdSum;
+
+ if (aec->divergeState)
+ memcpy(efw, dfw, sizeof(efw[0][0]) * 2 * PART_LEN1);
+
+ // Reset if error is significantly larger than nearend (13 dB).
+ if (!aec->extended_filter_enabled && seSum > (19.95f * sdSum))
+ memset(aec->wfBuf, 0, sizeof(aec->wfBuf));
+}
+
+// Window time domain data to be used by the fft.
+__inline static void WindowData(float* x_windowed, const float* x) {
+ int i;
+ for (i = 0; i < PART_LEN; i += 4) {
+ const __m128 vec_Buf1 = _mm_loadu_ps(&x[i]);
+ const __m128 vec_Buf2 = _mm_loadu_ps(&x[PART_LEN + i]);
+ const __m128 vec_sqrtHanning = _mm_load_ps(&WebRtcAec_sqrtHanning[i]);
+ // A B C D
+ __m128 vec_sqrtHanning_rev =
+ _mm_loadu_ps(&WebRtcAec_sqrtHanning[PART_LEN - i - 3]);
+ // D C B A
+ vec_sqrtHanning_rev =
+ _mm_shuffle_ps(vec_sqrtHanning_rev, vec_sqrtHanning_rev,
+ _MM_SHUFFLE(0, 1, 2, 3));
+ _mm_storeu_ps(&x_windowed[i], _mm_mul_ps(vec_Buf1, vec_sqrtHanning));
+ _mm_storeu_ps(&x_windowed[PART_LEN + i],
+ _mm_mul_ps(vec_Buf2, vec_sqrtHanning_rev));
+ }
+}
+
+// Puts fft output data into a complex valued array.
+__inline static void StoreAsComplex(const float* data,
+ float data_complex[2][PART_LEN1]) {
+ int i;
+ for (i = 0; i < PART_LEN; i += 4) {
+ const __m128 vec_fft0 = _mm_loadu_ps(&data[2 * i]);
+ const __m128 vec_fft4 = _mm_loadu_ps(&data[2 * i + 4]);
+ const __m128 vec_a = _mm_shuffle_ps(vec_fft0, vec_fft4,
+ _MM_SHUFFLE(2, 0, 2, 0));
+ const __m128 vec_b = _mm_shuffle_ps(vec_fft0, vec_fft4,
+ _MM_SHUFFLE(3, 1, 3, 1));
+ _mm_storeu_ps(&data_complex[0][i], vec_a);
+ _mm_storeu_ps(&data_complex[1][i], vec_b);
+ }
+ // fix beginning/end values
+ data_complex[1][0] = 0;
+ data_complex[1][PART_LEN] = 0;
+ data_complex[0][0] = data[0];
+ data_complex[0][PART_LEN] = data[1];
+}
+
+static void SubbandCoherenceSSE2(AecCore* aec,
+ float efw[2][PART_LEN1],
+ float xfw[2][PART_LEN1],
+ float* fft,
+ float* cohde,
+ float* cohxd) {
+ float dfw[2][PART_LEN1];
+ int i;
+
+ if (aec->delayEstCtr == 0)
+ aec->delayIdx = PartitionDelay(aec);
+
+ // Use delayed far.
+ memcpy(xfw,
+ aec->xfwBuf + aec->delayIdx * PART_LEN1,
+ sizeof(xfw[0][0]) * 2 * PART_LEN1);
+
+ // Windowed near fft
+ WindowData(fft, aec->dBuf);
+ aec_rdft_forward_128(fft);
+ StoreAsComplex(fft, dfw);
+
+ // Windowed error fft
+ WindowData(fft, aec->eBuf);
+ aec_rdft_forward_128(fft);
+ StoreAsComplex(fft, efw);
+
+ SmoothedPSD(aec, efw, dfw, xfw);
+
+ {
+ const __m128 vec_1eminus10 = _mm_set1_ps(1e-10f);
+
+ // Subband coherence
+ for (i = 0; i + 3 < PART_LEN1; i += 4) {
+ const __m128 vec_sd = _mm_loadu_ps(&aec->sd[i]);
+ const __m128 vec_se = _mm_loadu_ps(&aec->se[i]);
+ const __m128 vec_sx = _mm_loadu_ps(&aec->sx[i]);
+ const __m128 vec_sdse = _mm_add_ps(vec_1eminus10,
+ _mm_mul_ps(vec_sd, vec_se));
+ const __m128 vec_sdsx = _mm_add_ps(vec_1eminus10,
+ _mm_mul_ps(vec_sd, vec_sx));
+ const __m128 vec_sde_3210 = _mm_loadu_ps(&aec->sde[i][0]);
+ const __m128 vec_sde_7654 = _mm_loadu_ps(&aec->sde[i + 2][0]);
+ const __m128 vec_sxd_3210 = _mm_loadu_ps(&aec->sxd[i][0]);
+ const __m128 vec_sxd_7654 = _mm_loadu_ps(&aec->sxd[i + 2][0]);
+ const __m128 vec_sde_0 = _mm_shuffle_ps(vec_sde_3210, vec_sde_7654,
+ _MM_SHUFFLE(2, 0, 2, 0));
+ const __m128 vec_sde_1 = _mm_shuffle_ps(vec_sde_3210, vec_sde_7654,
+ _MM_SHUFFLE(3, 1, 3, 1));
+ const __m128 vec_sxd_0 = _mm_shuffle_ps(vec_sxd_3210, vec_sxd_7654,
+ _MM_SHUFFLE(2, 0, 2, 0));
+ const __m128 vec_sxd_1 = _mm_shuffle_ps(vec_sxd_3210, vec_sxd_7654,
+ _MM_SHUFFLE(3, 1, 3, 1));
+ __m128 vec_cohde = _mm_mul_ps(vec_sde_0, vec_sde_0);
+ __m128 vec_cohxd = _mm_mul_ps(vec_sxd_0, vec_sxd_0);
+ vec_cohde = _mm_add_ps(vec_cohde, _mm_mul_ps(vec_sde_1, vec_sde_1));
+ vec_cohde = _mm_div_ps(vec_cohde, vec_sdse);
+ vec_cohxd = _mm_add_ps(vec_cohxd, _mm_mul_ps(vec_sxd_1, vec_sxd_1));
+ vec_cohxd = _mm_div_ps(vec_cohxd, vec_sdsx);
+ _mm_storeu_ps(&cohde[i], vec_cohde);
+ _mm_storeu_ps(&cohxd[i], vec_cohxd);
+ }
+
+ // scalar code for the remaining items.
+ for (; i < PART_LEN1; i++) {
+ cohde[i] =
+ (aec->sde[i][0] * aec->sde[i][0] + aec->sde[i][1] * aec->sde[i][1]) /
+ (aec->sd[i] * aec->se[i] + 1e-10f);
+ cohxd[i] =
+ (aec->sxd[i][0] * aec->sxd[i][0] + aec->sxd[i][1] * aec->sxd[i][1]) /
+ (aec->sx[i] * aec->sd[i] + 1e-10f);
+ }
+ }
+}
+
void WebRtcAec_InitAec_SSE2(void) {
WebRtcAec_FilterFar = FilterFarSSE2;
WebRtcAec_ScaleErrorSignal = ScaleErrorSignalSSE2;
WebRtcAec_FilterAdaptation = FilterAdaptationSSE2;
WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressSSE2;
+ WebRtcAec_SubbandCoherence = SubbandCoherenceSSE2;
}
diff --git a/modules/audio_processing/aec/aec_rdft.c b/modules/audio_processing/aec/aec_rdft.c
index 7731b37..51be034 100644
--- a/modules/audio_processing/aec/aec_rdft.c
+++ b/modules/audio_processing/aec/aec_rdft.c
@@ -26,95 +26,102 @@
#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
#include "webrtc/typedefs.h"
-// constants shared by all paths (C, SSE2).
-float rdft_w[64];
-// constants used by the C path.
-float rdft_wk3ri_first[32];
-float rdft_wk3ri_second[32];
-// constants used by SSE2 but initialized in C path.
-ALIGN16_BEG float ALIGN16_END rdft_wk1r[32];
-ALIGN16_BEG float ALIGN16_END rdft_wk2r[32];
-ALIGN16_BEG float ALIGN16_END rdft_wk3r[32];
-ALIGN16_BEG float ALIGN16_END rdft_wk1i[32];
-ALIGN16_BEG float ALIGN16_END rdft_wk2i[32];
-ALIGN16_BEG float ALIGN16_END rdft_wk3i[32];
-ALIGN16_BEG float ALIGN16_END cftmdl_wk1r[4];
-
-static int ip[16];
-
-static void bitrv2_32(int* ip, float* a) {
- const int n = 32;
- int j, j1, k, k1, m, m2;
- float xr, xi, yr, yi;
-
- ip[0] = 0;
- {
- int l = n;
- m = 1;
- while ((m << 3) < l) {
- l >>= 1;
- for (j = 0; j < m; j++) {
- ip[m + j] = ip[j] + l;
- }
- m <<= 1;
- }
- }
- m2 = 2 * m;
- for (k = 0; k < m; k++) {
- for (j = 0; j < k; j++) {
- j1 = 2 * j + ip[k];
- k1 = 2 * k + ip[j];
- xr = a[j1];
- xi = a[j1 + 1];
- yr = a[k1];
- yi = a[k1 + 1];
- a[j1] = yr;
- a[j1 + 1] = yi;
- a[k1] = xr;
- a[k1 + 1] = xi;
- j1 += m2;
- k1 += 2 * m2;
- xr = a[j1];
- xi = a[j1 + 1];
- yr = a[k1];
- yi = a[k1 + 1];
- a[j1] = yr;
- a[j1 + 1] = yi;
- a[k1] = xr;
- a[k1 + 1] = xi;
- j1 += m2;
- k1 -= m2;
- xr = a[j1];
- xi = a[j1 + 1];
- yr = a[k1];
- yi = a[k1 + 1];
- a[j1] = yr;
- a[j1 + 1] = yi;
- a[k1] = xr;
- a[k1 + 1] = xi;
- j1 += m2;
- k1 += 2 * m2;
- xr = a[j1];
- xi = a[j1 + 1];
- yr = a[k1];
- yi = a[k1 + 1];
- a[j1] = yr;
- a[j1 + 1] = yi;
- a[k1] = xr;
- a[k1 + 1] = xi;
- }
- j1 = 2 * k + m2 + ip[k];
- k1 = j1 + m2;
- xr = a[j1];
- xi = a[j1 + 1];
- yr = a[k1];
- yi = a[k1 + 1];
- a[j1] = yr;
- a[j1 + 1] = yi;
- a[k1] = xr;
- a[k1 + 1] = xi;
- }
-}
+// These tables used to be computed at run-time. For example, refer to:
+// https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/audio_processing/aec/aec_rdft.c?r=6564
+// to see the initialization code.
+const float rdft_w[64] = {
+ 1.0000000000f, 0.0000000000f, 0.7071067691f, 0.7071067691f,
+ 0.9238795638f, 0.3826834559f, 0.3826834559f, 0.9238795638f,
+ 0.9807852507f, 0.1950903237f, 0.5555702448f, 0.8314695954f,
+ 0.8314695954f, 0.5555702448f, 0.1950903237f, 0.9807852507f,
+ 0.9951847196f, 0.0980171412f, 0.6343933344f, 0.7730104327f,
+ 0.8819212914f, 0.4713967443f, 0.2902846634f, 0.9569403529f,
+ 0.9569403529f, 0.2902846634f, 0.4713967443f, 0.8819212914f,
+ 0.7730104327f, 0.6343933344f, 0.0980171412f, 0.9951847196f,
+ 0.7071067691f, 0.4993977249f, 0.4975923598f, 0.4945882559f,
+ 0.4903926253f, 0.4850156307f, 0.4784701765f, 0.4707720280f,
+ 0.4619397819f, 0.4519946277f, 0.4409606457f, 0.4288643003f,
+ 0.4157347977f, 0.4016037583f, 0.3865052164f, 0.3704755902f,
+ 0.3535533845f, 0.3357794881f, 0.3171966672f, 0.2978496552f,
+ 0.2777851224f, 0.2570513785f, 0.2356983721f, 0.2137775421f,
+ 0.1913417280f, 0.1684449315f, 0.1451423317f, 0.1214900985f,
+ 0.0975451618f, 0.0733652338f, 0.0490085706f, 0.0245338380f,
+};
+const float rdft_wk3ri_first[16] = {
+ 1.000000000f, 0.000000000f, 0.382683456f, 0.923879564f,
+ 0.831469536f, 0.555570245f, -0.195090353f, 0.980785251f,
+ 0.956940353f, 0.290284693f, 0.098017156f, 0.995184720f,
+ 0.634393334f, 0.773010492f, -0.471396863f, 0.881921172f,
+};
+const float rdft_wk3ri_second[16] = {
+ -0.707106769f, 0.707106769f, -0.923879564f, -0.382683456f,
+ -0.980785251f, 0.195090353f, -0.555570245f, -0.831469536f,
+ -0.881921172f, 0.471396863f, -0.773010492f, -0.634393334f,
+ -0.995184720f, -0.098017156f, -0.290284693f, -0.956940353f,
+};
+ALIGN16_BEG const float ALIGN16_END rdft_wk1r[32] = {
+ 1.000000000f, 1.000000000f, 0.707106769f, 0.707106769f,
+ 0.923879564f, 0.923879564f, 0.382683456f, 0.382683456f,
+ 0.980785251f, 0.980785251f, 0.555570245f, 0.555570245f,
+ 0.831469595f, 0.831469595f, 0.195090324f, 0.195090324f,
+ 0.995184720f, 0.995184720f, 0.634393334f, 0.634393334f,
+ 0.881921291f, 0.881921291f, 0.290284663f, 0.290284663f,
+ 0.956940353f, 0.956940353f, 0.471396744f, 0.471396744f,
+ 0.773010433f, 0.773010433f, 0.098017141f, 0.098017141f,
+};
+ALIGN16_BEG const float ALIGN16_END rdft_wk2r[32] = {
+ 1.000000000f, 1.000000000f, -0.000000000f, -0.000000000f,
+ 0.707106769f, 0.707106769f, -0.707106769f, -0.707106769f,
+ 0.923879564f, 0.923879564f, -0.382683456f, -0.382683456f,
+ 0.382683456f, 0.382683456f, -0.923879564f, -0.923879564f,
+ 0.980785251f, 0.980785251f, -0.195090324f, -0.195090324f,
+ 0.555570245f, 0.555570245f, -0.831469595f, -0.831469595f,
+ 0.831469595f, 0.831469595f, -0.555570245f, -0.555570245f,
+ 0.195090324f, 0.195090324f, -0.980785251f, -0.980785251f,
+};
+ALIGN16_BEG const float ALIGN16_END rdft_wk3r[32] = {
+ 1.000000000f, 1.000000000f, -0.707106769f, -0.707106769f,
+ 0.382683456f, 0.382683456f, -0.923879564f, -0.923879564f,
+ 0.831469536f, 0.831469536f, -0.980785251f, -0.980785251f,
+ -0.195090353f, -0.195090353f, -0.555570245f, -0.555570245f,
+ 0.956940353f, 0.956940353f, -0.881921172f, -0.881921172f,
+ 0.098017156f, 0.098017156f, -0.773010492f, -0.773010492f,
+ 0.634393334f, 0.634393334f, -0.995184720f, -0.995184720f,
+ -0.471396863f, -0.471396863f, -0.290284693f, -0.290284693f,
+};
+ALIGN16_BEG const float ALIGN16_END rdft_wk1i[32] = {
+ -0.000000000f, 0.000000000f, -0.707106769f, 0.707106769f,
+ -0.382683456f, 0.382683456f, -0.923879564f, 0.923879564f,
+ -0.195090324f, 0.195090324f, -0.831469595f, 0.831469595f,
+ -0.555570245f, 0.555570245f, -0.980785251f, 0.980785251f,
+ -0.098017141f, 0.098017141f, -0.773010433f, 0.773010433f,
+ -0.471396744f, 0.471396744f, -0.956940353f, 0.956940353f,
+ -0.290284663f, 0.290284663f, -0.881921291f, 0.881921291f,
+ -0.634393334f, 0.634393334f, -0.995184720f, 0.995184720f,
+};
+ALIGN16_BEG const float ALIGN16_END rdft_wk2i[32] = {
+ -0.000000000f, 0.000000000f, -1.000000000f, 1.000000000f,
+ -0.707106769f, 0.707106769f, -0.707106769f, 0.707106769f,
+ -0.382683456f, 0.382683456f, -0.923879564f, 0.923879564f,
+ -0.923879564f, 0.923879564f, -0.382683456f, 0.382683456f,
+ -0.195090324f, 0.195090324f, -0.980785251f, 0.980785251f,
+ -0.831469595f, 0.831469595f, -0.555570245f, 0.555570245f,
+ -0.555570245f, 0.555570245f, -0.831469595f, 0.831469595f,
+ -0.980785251f, 0.980785251f, -0.195090324f, 0.195090324f,
+};
+ALIGN16_BEG const float ALIGN16_END rdft_wk3i[32] = {
+ -0.000000000f, 0.000000000f, -0.707106769f, 0.707106769f,
+ -0.923879564f, 0.923879564f, 0.382683456f, -0.382683456f,
+ -0.555570245f, 0.555570245f, -0.195090353f, 0.195090353f,
+ -0.980785251f, 0.980785251f, 0.831469536f, -0.831469536f,
+ -0.290284693f, 0.290284693f, -0.471396863f, 0.471396863f,
+ -0.995184720f, 0.995184720f, 0.634393334f, -0.634393334f,
+ -0.773010492f, 0.773010492f, 0.098017156f, -0.098017156f,
+ -0.881921172f, 0.881921172f, 0.956940353f, -0.956940353f,
+};
+ALIGN16_BEG const float ALIGN16_END cftmdl_wk1r[4] = {
+ 0.707106769f, 0.707106769f, 0.707106769f, -0.707106769f,
+};
static void bitrv2_128_C(float* a) {
/*
@@ -190,103 +197,15 @@
}
}
-static void makewt_32(void) {
- const int nw = 32;
- int j, nwh;
- float delta, x, y;
-
- ip[0] = nw;
- ip[1] = 1;
- nwh = nw >> 1;
- delta = atanf(1.0f) / nwh;
- rdft_w[0] = 1;
- rdft_w[1] = 0;
- rdft_w[nwh] = cosf(delta * nwh);
- rdft_w[nwh + 1] = rdft_w[nwh];
- for (j = 2; j < nwh; j += 2) {
- x = cosf(delta * j);
- y = sinf(delta * j);
- rdft_w[j] = x;
- rdft_w[j + 1] = y;
- rdft_w[nw - j] = y;
- rdft_w[nw - j + 1] = x;
- }
- bitrv2_32(ip + 2, rdft_w);
-
- // pre-calculate constants used by cft1st_128 and cftmdl_128...
- cftmdl_wk1r[0] = rdft_w[2];
- cftmdl_wk1r[1] = rdft_w[2];
- cftmdl_wk1r[2] = rdft_w[2];
- cftmdl_wk1r[3] = -rdft_w[2];
- {
- int k1;
-
- for (k1 = 0, j = 0; j < 128; j += 16, k1 += 2) {
- const int k2 = 2 * k1;
- const float wk2r = rdft_w[k1 + 0];
- const float wk2i = rdft_w[k1 + 1];
- float wk1r, wk1i;
- // ... scalar version.
- wk1r = rdft_w[k2 + 0];
- wk1i = rdft_w[k2 + 1];
- rdft_wk3ri_first[k1 + 0] = wk1r - 2 * wk2i * wk1i;
- rdft_wk3ri_first[k1 + 1] = 2 * wk2i * wk1r - wk1i;
- wk1r = rdft_w[k2 + 2];
- wk1i = rdft_w[k2 + 3];
- rdft_wk3ri_second[k1 + 0] = wk1r - 2 * wk2r * wk1i;
- rdft_wk3ri_second[k1 + 1] = 2 * wk2r * wk1r - wk1i;
- // ... vector version.
- rdft_wk1r[k2 + 0] = rdft_w[k2 + 0];
- rdft_wk1r[k2 + 1] = rdft_w[k2 + 0];
- rdft_wk1r[k2 + 2] = rdft_w[k2 + 2];
- rdft_wk1r[k2 + 3] = rdft_w[k2 + 2];
- rdft_wk2r[k2 + 0] = rdft_w[k1 + 0];
- rdft_wk2r[k2 + 1] = rdft_w[k1 + 0];
- rdft_wk2r[k2 + 2] = -rdft_w[k1 + 1];
- rdft_wk2r[k2 + 3] = -rdft_w[k1 + 1];
- rdft_wk3r[k2 + 0] = rdft_wk3ri_first[k1 + 0];
- rdft_wk3r[k2 + 1] = rdft_wk3ri_first[k1 + 0];
- rdft_wk3r[k2 + 2] = rdft_wk3ri_second[k1 + 0];
- rdft_wk3r[k2 + 3] = rdft_wk3ri_second[k1 + 0];
- rdft_wk1i[k2 + 0] = -rdft_w[k2 + 1];
- rdft_wk1i[k2 + 1] = rdft_w[k2 + 1];
- rdft_wk1i[k2 + 2] = -rdft_w[k2 + 3];
- rdft_wk1i[k2 + 3] = rdft_w[k2 + 3];
- rdft_wk2i[k2 + 0] = -rdft_w[k1 + 1];
- rdft_wk2i[k2 + 1] = rdft_w[k1 + 1];
- rdft_wk2i[k2 + 2] = -rdft_w[k1 + 0];
- rdft_wk2i[k2 + 3] = rdft_w[k1 + 0];
- rdft_wk3i[k2 + 0] = -rdft_wk3ri_first[k1 + 1];
- rdft_wk3i[k2 + 1] = rdft_wk3ri_first[k1 + 1];
- rdft_wk3i[k2 + 2] = -rdft_wk3ri_second[k1 + 1];
- rdft_wk3i[k2 + 3] = rdft_wk3ri_second[k1 + 1];
- }
- }
-}
-
-static void makect_32(void) {
- float* c = rdft_w + 32;
- const int nc = 32;
- int j, nch;
- float delta;
-
- ip[1] = nc;
- nch = nc >> 1;
- delta = atanf(1.0f) / nch;
- c[0] = cosf(delta * nch);
- c[nch] = 0.5f * c[0];
- for (j = 1; j < nch; j++) {
- c[j] = 0.5f * cosf(delta * j);
- c[nc - j] = 0.5f * sinf(delta * j);
- }
-}
-
static void cft1st_128_C(float* a) {
const int n = 128;
int j, k1, k2;
float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+ // The processing of the first set of elements was simplified in C to avoid
+ // some operations (multiplication by zero or one, addition of two elements
+ // multiplied by the same weight, ...).
x0r = a[0] + a[2];
x0i = a[1] + a[3];
x1r = a[0] - a[2];
@@ -660,7 +579,7 @@
#if defined(MIPS_FPU_LE)
aec_rdft_init_mips();
#endif
- // init library constants.
- makewt_32();
- makect_32();
+#if defined(WEBRTC_DETECT_ARM_NEON) || defined(WEBRTC_ARCH_ARM_NEON)
+ aec_rdft_init_neon();
+#endif
}
diff --git a/modules/audio_processing/aec/aec_rdft.h b/modules/audio_processing/aec/aec_rdft.h
index 795c57d..e72c721 100644
--- a/modules/audio_processing/aec/aec_rdft.h
+++ b/modules/audio_processing/aec/aec_rdft.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_SOURCE_AEC_RDFT_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_SOURCE_AEC_RDFT_H_
+#include "webrtc/modules/audio_processing/aec/aec_common.h"
+
// These intrinsics were unavailable before VS 2008.
// TODO(andrew): move to a common file.
#if defined(_MSC_VER) && _MSC_VER < 1500
@@ -19,27 +21,19 @@
static __inline __m128i _mm_castps_si128(__m128 a) { return *(__m128i*)&a; }
#endif
-#ifdef _MSC_VER /* visual c++ */
-#define ALIGN16_BEG __declspec(align(16))
-#define ALIGN16_END
-#else /* gcc or icc */
-#define ALIGN16_BEG
-#define ALIGN16_END __attribute__((aligned(16)))
-#endif
-
-// constants shared by all paths (C, SSE2).
-extern float rdft_w[64];
-// constants used by the C path.
-extern float rdft_wk3ri_first[32];
-extern float rdft_wk3ri_second[32];
-// constants used by SSE2 but initialized in C path.
-extern ALIGN16_BEG float ALIGN16_END rdft_wk1r[32];
-extern ALIGN16_BEG float ALIGN16_END rdft_wk2r[32];
-extern ALIGN16_BEG float ALIGN16_END rdft_wk3r[32];
-extern ALIGN16_BEG float ALIGN16_END rdft_wk1i[32];
-extern ALIGN16_BEG float ALIGN16_END rdft_wk2i[32];
-extern ALIGN16_BEG float ALIGN16_END rdft_wk3i[32];
-extern ALIGN16_BEG float ALIGN16_END cftmdl_wk1r[4];
+// Constants shared by all paths (C, SSE2, NEON).
+extern const float rdft_w[64];
+// Constants used by the C path.
+extern const float rdft_wk3ri_first[16];
+extern const float rdft_wk3ri_second[16];
+// Constants used by SSE2 and NEON but initialized in the C path.
+extern ALIGN16_BEG const float ALIGN16_END rdft_wk1r[32];
+extern ALIGN16_BEG const float ALIGN16_END rdft_wk2r[32];
+extern ALIGN16_BEG const float ALIGN16_END rdft_wk3r[32];
+extern ALIGN16_BEG const float ALIGN16_END rdft_wk1i[32];
+extern ALIGN16_BEG const float ALIGN16_END rdft_wk2i[32];
+extern ALIGN16_BEG const float ALIGN16_END rdft_wk3i[32];
+extern ALIGN16_BEG const float ALIGN16_END cftmdl_wk1r[4];
// code path selection function pointers
typedef void (*rft_sub_128_t)(float* a);
@@ -60,5 +54,8 @@
#if defined(MIPS_FPU_LE)
void aec_rdft_init_mips(void);
#endif
+#if defined(WEBRTC_DETECT_ARM_NEON) || defined(WEBRTC_ARCH_ARM_NEON)
+void aec_rdft_init_neon(void);
+#endif
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_SOURCE_AEC_RDFT_H_
diff --git a/modules/audio_processing/aec/aec_rdft_mips.c b/modules/audio_processing/aec/aec_rdft_mips.c
index a0dac5f..6e51d3a 100644
--- a/modules/audio_processing/aec/aec_rdft_mips.c
+++ b/modules/audio_processing/aec/aec_rdft_mips.c
@@ -11,7 +11,7 @@
#include "webrtc/modules/audio_processing/aec/aec_rdft.h"
#include "webrtc/typedefs.h"
-static void bitrv2_128_mips(float *a) {
+static void bitrv2_128_mips(float* a) {
// n is 128
float xr, xi, yr, yi;
@@ -268,259 +268,258 @@
a[119] = xi;
}
-static void cft1st_128_mips(float *a) {
- float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
- float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
-
- float f0, f1, f2, f3, f4, f5, f6, f7;
+static void cft1st_128_mips(float* a) {
+ float f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14;
int a_ptr, p1_rdft, p2_rdft, count;
+ float* first = rdft_wk3ri_first;
+ float* second = rdft_wk3ri_second;
__asm __volatile (
- ".set push \n\t"
- ".set noreorder \n\t"
- // first 16
- "lwc1 %[f0], 0(%[a]) \n\t"
- "lwc1 %[f1], 4(%[a]) \n\t"
- "lwc1 %[f2], 8(%[a]) \n\t"
- "lwc1 %[f3], 12(%[a]) \n\t"
- "lwc1 %[f4], 16(%[a]) \n\t"
- "lwc1 %[f5], 20(%[a]) \n\t"
- "lwc1 %[f6], 24(%[a]) \n\t"
- "lwc1 %[f7], 28(%[a]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "sub.s %[f4], %[x0r], %[x2r] \n\t"
- "sub.s %[f5], %[x0i], %[x2i] \n\t"
- "sub.s %[f2], %[x1r], %[x3i] \n\t"
- "add.s %[f3], %[x1i], %[x3r] \n\t"
- "add.s %[f6], %[x1r], %[x3i] \n\t"
- "sub.s %[f7], %[x1i], %[x3r] \n\t"
- "swc1 %[f0], 0(%[a]) \n\t"
- "swc1 %[f1], 4(%[a]) \n\t"
- "swc1 %[f2], 8(%[a]) \n\t"
- "swc1 %[f3], 12(%[a]) \n\t"
- "swc1 %[f4], 16(%[a]) \n\t"
- "swc1 %[f5], 20(%[a]) \n\t"
- "swc1 %[f6], 24(%[a]) \n\t"
- "swc1 %[f7], 28(%[a]) \n\t"
- "lwc1 %[f0], 32(%[a]) \n\t"
- "lwc1 %[f1], 36(%[a]) \n\t"
- "lwc1 %[f2], 40(%[a]) \n\t"
- "lwc1 %[f3], 44(%[a]) \n\t"
- "lwc1 %[f4], 48(%[a]) \n\t"
- "lwc1 %[f5], 52(%[a]) \n\t"
- "lwc1 %[f6], 56(%[a]) \n\t"
- "lwc1 %[f7], 60(%[a]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "lwc1 %[wk2r], 8(%[rdft_w]) \n\t"
- "add.s %[f3], %[x1i], %[x3r] \n\t"
- "sub.s %[f2], %[x1r], %[x3i] \n\t"
- "add.s %[f6], %[x3i], %[x1r] \n\t"
- "sub.s %[f7], %[x3r], %[x1i] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "sub.s %[x1r], %[f2], %[f3] \n\t"
- "add.s %[x1i], %[f3], %[f2] \n\t"
- "sub.s %[x3r], %[f7], %[f6] \n\t"
- "add.s %[x3i], %[f7], %[f6] \n\t"
- "sub.s %[f4], %[x0r], %[x2r] \n\t"
- "mul.s %[f2], %[wk2r], %[x1r] \n\t"
- "mul.s %[f3], %[wk2r], %[x1i] \n\t"
- "mul.s %[f6], %[wk2r], %[x3r] \n\t"
- "mul.s %[f7], %[wk2r], %[x3i] \n\t"
- "sub.s %[f5], %[x2i], %[x0i] \n\t"
- "swc1 %[f0], 32(%[a]) \n\t"
- "swc1 %[f1], 36(%[a]) \n\t"
- "swc1 %[f2], 40(%[a]) \n\t"
- "swc1 %[f3], 44(%[a]) \n\t"
- "swc1 %[f5], 48(%[a]) \n\t"
- "swc1 %[f4], 52(%[a]) \n\t"
- "swc1 %[f6], 56(%[a]) \n\t"
- "swc1 %[f7], 60(%[a]) \n\t"
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ // first 8
+ "lwc1 %[f0], 0(%[a]) \n\t"
+ "lwc1 %[f1], 4(%[a]) \n\t"
+ "lwc1 %[f2], 8(%[a]) \n\t"
+ "lwc1 %[f3], 12(%[a]) \n\t"
+ "lwc1 %[f4], 16(%[a]) \n\t"
+ "lwc1 %[f5], 20(%[a]) \n\t"
+ "lwc1 %[f6], 24(%[a]) \n\t"
+ "lwc1 %[f7], 28(%[a]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "add.s %[f7], %[f8], %[f2] \n\t"
+ "sub.s %[f8], %[f8], %[f2] \n\t"
+ "sub.s %[f2], %[f1], %[f4] \n\t"
+ "add.s %[f1], %[f1], %[f4] \n\t"
+ "add.s %[f4], %[f6], %[f3] \n\t"
+ "sub.s %[f6], %[f6], %[f3] \n\t"
+ "sub.s %[f3], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "swc1 %[f7], 0(%[a]) \n\t"
+ "swc1 %[f8], 16(%[a]) \n\t"
+ "swc1 %[f2], 28(%[a]) \n\t"
+ "swc1 %[f1], 12(%[a]) \n\t"
+ "swc1 %[f4], 4(%[a]) \n\t"
+ "swc1 %[f6], 20(%[a]) \n\t"
+ "swc1 %[f3], 8(%[a]) \n\t"
+ "swc1 %[f0], 24(%[a]) \n\t"
+ // second 8
+ "lwc1 %[f0], 32(%[a]) \n\t"
+ "lwc1 %[f1], 36(%[a]) \n\t"
+ "lwc1 %[f2], 40(%[a]) \n\t"
+ "lwc1 %[f3], 44(%[a]) \n\t"
+ "lwc1 %[f4], 48(%[a]) \n\t"
+ "lwc1 %[f5], 52(%[a]) \n\t"
+ "lwc1 %[f6], 56(%[a]) \n\t"
+ "lwc1 %[f7], 60(%[a]) \n\t"
+ "add.s %[f8], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "add.s %[f7], %[f4], %[f1] \n\t"
+ "sub.s %[f4], %[f4], %[f1] \n\t"
+ "add.s %[f1], %[f3], %[f8] \n\t"
+ "sub.s %[f3], %[f3], %[f8] \n\t"
+ "sub.s %[f8], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "add.s %[f5], %[f6], %[f2] \n\t"
+ "sub.s %[f6], %[f2], %[f6] \n\t"
+ "lwc1 %[f9], 8(%[rdft_w]) \n\t"
+ "sub.s %[f2], %[f8], %[f7] \n\t"
+ "add.s %[f8], %[f8], %[f7] \n\t"
+ "sub.s %[f7], %[f4], %[f0] \n\t"
+ "add.s %[f4], %[f4], %[f0] \n\t"
// prepare for loop
- "addiu %[a_ptr], %[a], 64 \n\t"
- "addiu %[p1_rdft], %[rdft_w], 8 \n\t"
- "addiu %[p2_rdft], %[rdft_w], 16 \n\t"
- "addiu %[count], $zero, 7 \n\t"
+ "addiu %[a_ptr], %[a], 64 \n\t"
+ "addiu %[p1_rdft], %[rdft_w], 8 \n\t"
+ "addiu %[p2_rdft], %[rdft_w], 16 \n\t"
+ "addiu %[count], $zero, 7 \n\t"
+ // finish second 8
+ "mul.s %[f2], %[f9], %[f2] \n\t"
+ "mul.s %[f8], %[f9], %[f8] \n\t"
+ "mul.s %[f7], %[f9], %[f7] \n\t"
+ "mul.s %[f4], %[f9], %[f4] \n\t"
+ "swc1 %[f1], 32(%[a]) \n\t"
+ "swc1 %[f3], 52(%[a]) \n\t"
+ "swc1 %[f5], 36(%[a]) \n\t"
+ "swc1 %[f6], 48(%[a]) \n\t"
+ "swc1 %[f2], 40(%[a]) \n\t"
+ "swc1 %[f8], 44(%[a]) \n\t"
+ "swc1 %[f7], 56(%[a]) \n\t"
+ "swc1 %[f4], 60(%[a]) \n\t"
// loop
- "1: \n\t"
- "lwc1 %[f0], 0(%[a_ptr]) \n\t"
- "lwc1 %[f1], 4(%[a_ptr]) \n\t"
- "lwc1 %[f2], 8(%[a_ptr]) \n\t"
- "lwc1 %[f3], 12(%[a_ptr]) \n\t"
- "lwc1 %[f4], 16(%[a_ptr]) \n\t"
- "lwc1 %[f5], 20(%[a_ptr]) \n\t"
- "lwc1 %[f6], 24(%[a_ptr]) \n\t"
- "lwc1 %[f7], 28(%[a_ptr]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "lwc1 %[wk2i], 4(%[p1_rdft]) \n\t"
- "sub.s %[f0], %[x0r], %[x2r] \n\t"
- "sub.s %[f1], %[x0i], %[x2i] \n\t"
- "add.s %[f2], %[x1i], %[x3r] \n\t"
- "sub.s %[f3], %[x1r], %[x3i] \n\t"
- "lwc1 %[wk1r], 0(%[p2_rdft]) \n\t"
- "add.s %[f4], %[x1r], %[x3i] \n\t"
- "sub.s %[f5], %[x1i], %[x3r] \n\t"
- "lwc1 %[wk3r], 8(%[first]) \n\t"
- "mul.s %[x3r], %[wk2r], %[f0] \n\t"
- "mul.s %[x3i], %[wk2r], %[f1] \n\t"
- "mul.s %[x1r], %[wk1r], %[f3] \n\t"
- "mul.s %[x1i], %[wk1r], %[f2] \n\t"
- "lwc1 %[wk1i], 4(%[p2_rdft]) \n\t"
- "mul.s %[f6], %[wk3r], %[f4] \n\t"
- "mul.s %[f7], %[wk3r], %[f5] \n\t"
- "lwc1 %[wk3i], 12(%[first]) \n\t"
-#if !defined(MIPS32_R2_LE)
- "mul.s %[wk1r], %[wk2i], %[f1] \n\t"
- "mul.s %[f0], %[wk2i], %[f0] \n\t"
- "sub.s %[x3r], %[x3r], %[wk1r] \n\t"
- "add.s %[x3i], %[x3i], %[f0] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "mul.s %[x0r], %[wk1i], %[f2] \n\t"
- "mul.s %[f3], %[wk1i], %[f3] \n\t"
- "mul.s %[x2r], %[wk3i], %[f5] \n\t"
- "mul.s %[f4], %[wk3i], %[f4] \n\t"
- "sub.s %[x1r], %[x1r], %[x0r] \n\t"
- "add.s %[x1i], %[x1i], %[f3] \n\t"
- "sub.s %[f6], %[f6], %[x2r] \n\t"
- "add.s %[f7], %[f7], %[f4] \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "nmsub.s %[x3r], %[x3r], %[wk2i], %[f1] \n\t"
- "madd.s %[x3i], %[x3i], %[wk2i], %[f0] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "nmsub.s %[x1r], %[x1r], %[wk1i], %[f2] \n\t"
- "madd.s %[x1i], %[x1i], %[wk1i], %[f3] \n\t"
- "nmsub.s %[f6], %[f6], %[wk3i], %[f5] \n\t"
- "madd.s %[f7], %[f7], %[wk3i], %[f4] \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
- "swc1 %[f0], 0(%[a_ptr]) \n\t"
- "swc1 %[f1], 4(%[a_ptr]) \n\t"
- "swc1 %[x1r], 8(%[a_ptr]) \n\t"
- "swc1 %[x1i], 12(%[a_ptr]) \n\t"
- "swc1 %[x3r], 16(%[a_ptr]) \n\t"
- "swc1 %[x3i], 20(%[a_ptr]) \n\t"
- "swc1 %[f6], 24(%[a_ptr]) \n\t"
- "swc1 %[f7], 28(%[a_ptr]) \n\t"
- "lwc1 %[f0], 32(%[a_ptr]) \n\t"
- "lwc1 %[f1], 36(%[a_ptr]) \n\t"
- "lwc1 %[f2], 40(%[a_ptr]) \n\t"
- "lwc1 %[f3], 44(%[a_ptr]) \n\t"
- "lwc1 %[f4], 48(%[a_ptr]) \n\t"
- "lwc1 %[f5], 52(%[a_ptr]) \n\t"
- "lwc1 %[f6], 56(%[a_ptr]) \n\t"
- "lwc1 %[f7], 60(%[a_ptr]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "lwc1 %[wk1r], 8(%[p2_rdft]) \n\t"
- "sub.s %[f0], %[x0r], %[x2r] \n\t"
- "sub.s %[f1], %[x0i], %[x2i] \n\t"
- "add.s %[f2], %[x1i], %[x3r] \n\t"
- "sub.s %[f3], %[x1r], %[x3i] \n\t"
- "add.s %[f4], %[x1r], %[x3i] \n\t"
- "sub.s %[f5], %[x1i], %[x3r] \n\t"
- "lwc1 %[wk3r], 8(%[second]) \n\t"
- "mul.s %[x3r], %[wk2i], %[f0] \n\t"
- "mul.s %[x3i], %[wk2i], %[f1] \n\t"
- "mul.s %[x1r], %[wk1r], %[f3] \n\t"
- "mul.s %[x1i], %[wk1r], %[f2] \n\t"
- "mul.s %[f6], %[wk3r], %[f4] \n\t"
- "mul.s %[f7], %[wk3r], %[f5] \n\t"
- "lwc1 %[wk1i], 12(%[p2_rdft]) \n\t"
- "lwc1 %[wk3i], 12(%[second]) \n\t"
-#if !defined(MIPS32_R2_LE)
- "mul.s %[wk1r], %[wk2r], %[f1] \n\t"
- "mul.s %[f0], %[wk2r], %[f0] \n\t"
- "add.s %[x3r], %[x3r], %[wk1r] \n\t"
- "neg.s %[x3r], %[x3r] \n\t"
- "sub.s %[x3i], %[f0], %[x3i] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "mul.s %[x0r], %[wk1i], %[f2] \n\t"
- "mul.s %[f3], %[wk1i], %[f3] \n\t"
- "mul.s %[x2r], %[wk3i], %[f5] \n\t"
- "mul.s %[f4], %[wk3i], %[f4] \n\t"
- "sub.s %[x1r], %[x1r], %[x0r] \n\t"
- "add.s %[x1i], %[x1i], %[f3] \n\t"
- "sub.s %[f6], %[f6], %[x2r] \n\t"
- "add.s %[f7], %[f7], %[f4] \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "nmadd.s %[x3r], %[x3r], %[wk2r], %[f1] \n\t"
- "msub.s %[x3i], %[x3i], %[wk2r], %[f0] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "nmsub.s %[x1r], %[x1r], %[wk1i], %[f2] \n\t"
- "madd.s %[x1i], %[x1i], %[wk1i], %[f3] \n\t"
- "nmsub.s %[f6], %[f6], %[wk3i], %[f5] \n\t"
- "madd.s %[f7], %[f7], %[wk3i], %[f4] \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
- "addiu %[count], %[count], -1 \n\t"
- "lwc1 %[wk2r], 8(%[p1_rdft]) \n\t"
- "addiu %[a_ptr], %[a_ptr], 64 \n\t"
- "addiu %[p1_rdft], %[p1_rdft], 8 \n\t"
- "addiu %[p2_rdft], %[p2_rdft], 16 \n\t"
- "addiu %[first], %[first], 8 \n\t"
- "swc1 %[f0], -32(%[a_ptr]) \n\t"
- "swc1 %[f1], -28(%[a_ptr]) \n\t"
- "swc1 %[x1r], -24(%[a_ptr]) \n\t"
- "swc1 %[x1i], -20(%[a_ptr]) \n\t"
- "swc1 %[x3r], -16(%[a_ptr]) \n\t"
- "swc1 %[x3i], -12(%[a_ptr]) \n\t"
- "swc1 %[f6], -8(%[a_ptr]) \n\t"
- "swc1 %[f7], -4(%[a_ptr]) \n\t"
- "bgtz %[count], 1b \n\t"
- " addiu %[second], %[second], 8 \n\t"
- ".set pop \n\t"
+ "1: \n\t"
+ "lwc1 %[f0], 0(%[a_ptr]) \n\t"
+ "lwc1 %[f1], 4(%[a_ptr]) \n\t"
+ "lwc1 %[f2], 8(%[a_ptr]) \n\t"
+ "lwc1 %[f3], 12(%[a_ptr]) \n\t"
+ "lwc1 %[f4], 16(%[a_ptr]) \n\t"
+ "lwc1 %[f5], 20(%[a_ptr]) \n\t"
+ "lwc1 %[f6], 24(%[a_ptr]) \n\t"
+ "lwc1 %[f7], 28(%[a_ptr]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "lwc1 %[f10], 4(%[p1_rdft]) \n\t"
+ "lwc1 %[f11], 0(%[p2_rdft]) \n\t"
+ "lwc1 %[f12], 4(%[p2_rdft]) \n\t"
+ "lwc1 %[f13], 8(%[first]) \n\t"
+ "lwc1 %[f14], 12(%[first]) \n\t"
+ "add.s %[f7], %[f8], %[f2] \n\t"
+ "sub.s %[f8], %[f8], %[f2] \n\t"
+ "add.s %[f2], %[f6], %[f3] \n\t"
+ "sub.s %[f6], %[f6], %[f3] \n\t"
+ "add.s %[f3], %[f0], %[f5] \n\t"
+ "sub.s %[f0], %[f0], %[f5] \n\t"
+ "add.s %[f5], %[f1], %[f4] \n\t"
+ "sub.s %[f1], %[f1], %[f4] \n\t"
+ "swc1 %[f7], 0(%[a_ptr]) \n\t"
+ "swc1 %[f2], 4(%[a_ptr]) \n\t"
+ "mul.s %[f4], %[f9], %[f8] \n\t"
+#if defined(MIPS32_R2_LE)
+ "mul.s %[f8], %[f10], %[f8] \n\t"
+ "mul.s %[f7], %[f11], %[f0] \n\t"
+ "mul.s %[f0], %[f12], %[f0] \n\t"
+ "mul.s %[f2], %[f13], %[f3] \n\t"
+ "mul.s %[f3], %[f14], %[f3] \n\t"
+ "nmsub.s %[f4], %[f4], %[f10], %[f6] \n\t"
+ "madd.s %[f8], %[f8], %[f9], %[f6] \n\t"
+ "nmsub.s %[f7], %[f7], %[f12], %[f5] \n\t"
+ "madd.s %[f0], %[f0], %[f11], %[f5] \n\t"
+ "nmsub.s %[f2], %[f2], %[f14], %[f1] \n\t"
+ "madd.s %[f3], %[f3], %[f13], %[f1] \n\t"
+#else
+ "mul.s %[f7], %[f10], %[f6] \n\t"
+ "mul.s %[f6], %[f9], %[f6] \n\t"
+ "mul.s %[f8], %[f10], %[f8] \n\t"
+ "mul.s %[f2], %[f11], %[f0] \n\t"
+ "mul.s %[f11], %[f11], %[f5] \n\t"
+ "mul.s %[f5], %[f12], %[f5] \n\t"
+ "mul.s %[f0], %[f12], %[f0] \n\t"
+ "mul.s %[f12], %[f13], %[f3] \n\t"
+ "mul.s %[f13], %[f13], %[f1] \n\t"
+ "mul.s %[f1], %[f14], %[f1] \n\t"
+ "mul.s %[f3], %[f14], %[f3] \n\t"
+ "sub.s %[f4], %[f4], %[f7] \n\t"
+ "add.s %[f8], %[f6], %[f8] \n\t"
+ "sub.s %[f7], %[f2], %[f5] \n\t"
+ "add.s %[f0], %[f11], %[f0] \n\t"
+ "sub.s %[f2], %[f12], %[f1] \n\t"
+ "add.s %[f3], %[f13], %[f3] \n\t"
+#endif
+ "swc1 %[f4], 16(%[a_ptr]) \n\t"
+ "swc1 %[f8], 20(%[a_ptr]) \n\t"
+ "swc1 %[f7], 8(%[a_ptr]) \n\t"
+ "swc1 %[f0], 12(%[a_ptr]) \n\t"
+ "swc1 %[f2], 24(%[a_ptr]) \n\t"
+ "swc1 %[f3], 28(%[a_ptr]) \n\t"
+ "lwc1 %[f0], 32(%[a_ptr]) \n\t"
+ "lwc1 %[f1], 36(%[a_ptr]) \n\t"
+ "lwc1 %[f2], 40(%[a_ptr]) \n\t"
+ "lwc1 %[f3], 44(%[a_ptr]) \n\t"
+ "lwc1 %[f4], 48(%[a_ptr]) \n\t"
+ "lwc1 %[f5], 52(%[a_ptr]) \n\t"
+ "lwc1 %[f6], 56(%[a_ptr]) \n\t"
+ "lwc1 %[f7], 60(%[a_ptr]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "lwc1 %[f11], 8(%[p2_rdft]) \n\t"
+ "lwc1 %[f12], 12(%[p2_rdft]) \n\t"
+ "lwc1 %[f13], 8(%[second]) \n\t"
+ "lwc1 %[f14], 12(%[second]) \n\t"
+ "add.s %[f7], %[f8], %[f2] \n\t"
+ "sub.s %[f8], %[f2], %[f8] \n\t"
+ "add.s %[f2], %[f6], %[f3] \n\t"
+ "sub.s %[f6], %[f3], %[f6] \n\t"
+ "add.s %[f3], %[f0], %[f5] \n\t"
+ "sub.s %[f0], %[f0], %[f5] \n\t"
+ "add.s %[f5], %[f1], %[f4] \n\t"
+ "sub.s %[f1], %[f1], %[f4] \n\t"
+ "swc1 %[f7], 32(%[a_ptr]) \n\t"
+ "swc1 %[f2], 36(%[a_ptr]) \n\t"
+ "mul.s %[f4], %[f10], %[f8] \n\t"
+#if defined(MIPS32_R2_LE)
+ "mul.s %[f10], %[f10], %[f6] \n\t"
+ "mul.s %[f7], %[f11], %[f0] \n\t"
+ "mul.s %[f11], %[f11], %[f5] \n\t"
+ "mul.s %[f2], %[f13], %[f3] \n\t"
+ "mul.s %[f13], %[f13], %[f1] \n\t"
+ "madd.s %[f4], %[f4], %[f9], %[f6] \n\t"
+ "nmsub.s %[f10], %[f10], %[f9], %[f8] \n\t"
+ "nmsub.s %[f7], %[f7], %[f12], %[f5] \n\t"
+ "madd.s %[f11], %[f11], %[f12], %[f0] \n\t"
+ "nmsub.s %[f2], %[f2], %[f14], %[f1] \n\t"
+ "madd.s %[f13], %[f13], %[f14], %[f3] \n\t"
+#else
+ "mul.s %[f2], %[f9], %[f6] \n\t"
+ "mul.s %[f10], %[f10], %[f6] \n\t"
+ "mul.s %[f9], %[f9], %[f8] \n\t"
+ "mul.s %[f7], %[f11], %[f0] \n\t"
+ "mul.s %[f8], %[f12], %[f5] \n\t"
+ "mul.s %[f11], %[f11], %[f5] \n\t"
+ "mul.s %[f12], %[f12], %[f0] \n\t"
+ "mul.s %[f5], %[f13], %[f3] \n\t"
+ "mul.s %[f0], %[f14], %[f1] \n\t"
+ "mul.s %[f13], %[f13], %[f1] \n\t"
+ "mul.s %[f14], %[f14], %[f3] \n\t"
+ "add.s %[f4], %[f4], %[f2] \n\t"
+ "sub.s %[f10], %[f10], %[f9] \n\t"
+ "sub.s %[f7], %[f7], %[f8] \n\t"
+ "add.s %[f11], %[f11], %[f12] \n\t"
+ "sub.s %[f2], %[f5], %[f0] \n\t"
+ "add.s %[f13], %[f13], %[f14] \n\t"
+#endif
+ "swc1 %[f4], 48(%[a_ptr]) \n\t"
+ "swc1 %[f10], 52(%[a_ptr]) \n\t"
+ "swc1 %[f7], 40(%[a_ptr]) \n\t"
+ "swc1 %[f11], 44(%[a_ptr]) \n\t"
+ "swc1 %[f2], 56(%[a_ptr]) \n\t"
+ "swc1 %[f13], 60(%[a_ptr]) \n\t"
+ "addiu %[count], %[count], -1 \n\t"
+ "lwc1 %[f9], 8(%[p1_rdft]) \n\t"
+ "addiu %[a_ptr], %[a_ptr], 64 \n\t"
+ "addiu %[p1_rdft], %[p1_rdft], 8 \n\t"
+ "addiu %[p2_rdft], %[p2_rdft], 16 \n\t"
+ "addiu %[first], %[first], 8 \n\t"
+ "bgtz %[count], 1b \n\t"
+ " addiu %[second], %[second], 8 \n\t"
+ ".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [x0r] "=&f" (x0r), [x0i] "=&f" (x0i), [x1r] "=&f" (x1r),
- [x1i] "=&f" (x1i), [x2r] "=&f" (x2r), [x2i] "=&f" (x2i),
- [x3r] "=&f" (x3r), [x3i] "=&f" (x3i), [wk1r] "=&f" (wk1r),
- [wk1i] "=&f" (wk1i), [wk2r] "=&f" (wk2r), [wk2i] "=&f" (wk2i),
- [wk3r] "=&f" (wk3r), [wk3i] "=&f" (wk3i), [a_ptr] "=&r" (a_ptr),
- [p1_rdft] "=&r" (p1_rdft), [p2_rdft] "=&r" (p2_rdft),
- [count] "=&r" (count)
- : [a] "r" (a), [rdft_w] "r" (rdft_w), [first] "r" (rdft_wk3ri_first),
- [second] "r" (rdft_wk3ri_second)
+ [f8] "=&f" (f8), [f9] "=&f" (f9), [f10] "=&f" (f10), [f11] "=&f" (f11),
+ [f12] "=&f" (f12), [f13] "=&f" (f13), [f14] "=&f" (f14),
+ [a_ptr] "=&r" (a_ptr), [p1_rdft] "=&r" (p1_rdft), [first] "+r" (first),
+ [p2_rdft] "=&r" (p2_rdft), [count] "=&r" (count), [second] "+r" (second)
+ : [a] "r" (a), [rdft_w] "r" (rdft_w)
: "memory"
);
}
-static void cftmdl_128_mips(float *a) {
- float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
- float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
- float f0, f1, f2, f3, f4, f5, f6, f7;
+static void cftmdl_128_mips(float* a) {
+ float f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14;
int tmp_a, count;
-
__asm __volatile (
".set push \n\t"
".set noreorder \n\t"
@@ -529,202 +528,196 @@
"1: \n\t"
"addiu %[count], %[count], -1 \n\t"
"lwc1 %[f0], 0(%[tmp_a]) \n\t"
- "lwc1 %[f1], 4(%[tmp_a]) \n\t"
"lwc1 %[f2], 32(%[tmp_a]) \n\t"
- "lwc1 %[f3], 36(%[tmp_a]) \n\t"
"lwc1 %[f4], 64(%[tmp_a]) \n\t"
- "lwc1 %[f5], 68(%[tmp_a]) \n\t"
"lwc1 %[f6], 96(%[tmp_a]) \n\t"
+ "lwc1 %[f1], 4(%[tmp_a]) \n\t"
+ "lwc1 %[f3], 36(%[tmp_a]) \n\t"
+ "lwc1 %[f5], 68(%[tmp_a]) \n\t"
"lwc1 %[f7], 100(%[tmp_a]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "sub.s %[f4], %[x0r], %[x2r] \n\t"
- "sub.s %[f5], %[x0i], %[x2i] \n\t"
- "sub.s %[f2], %[x1r], %[x3i] \n\t"
- "add.s %[f3], %[x1i], %[x3r] \n\t"
- "add.s %[f6], %[x1r], %[x3i] \n\t"
- "sub.s %[f7], %[x1i], %[x3r] \n\t"
- "swc1 %[f0], 0(%[tmp_a]) \n\t"
- "swc1 %[f1], 4(%[tmp_a]) \n\t"
- "swc1 %[f2], 32(%[tmp_a]) \n\t"
- "swc1 %[f3], 36(%[tmp_a]) \n\t"
- "swc1 %[f4], 64(%[tmp_a]) \n\t"
- "swc1 %[f5], 68(%[tmp_a]) \n\t"
- "swc1 %[f6], 96(%[tmp_a]) \n\t"
- "swc1 %[f7], 100(%[tmp_a]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "add.s %[f7], %[f8], %[f2] \n\t"
+ "sub.s %[f8], %[f8], %[f2] \n\t"
+ "add.s %[f2], %[f1], %[f4] \n\t"
+ "sub.s %[f1], %[f1], %[f4] \n\t"
+ "add.s %[f4], %[f6], %[f3] \n\t"
+ "sub.s %[f6], %[f6], %[f3] \n\t"
+ "sub.s %[f3], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "swc1 %[f7], 0(%[tmp_a]) \n\t"
+ "swc1 %[f8], 64(%[tmp_a]) \n\t"
+ "swc1 %[f2], 36(%[tmp_a]) \n\t"
+ "swc1 %[f1], 100(%[tmp_a]) \n\t"
+ "swc1 %[f4], 4(%[tmp_a]) \n\t"
+ "swc1 %[f6], 68(%[tmp_a]) \n\t"
+ "swc1 %[f3], 32(%[tmp_a]) \n\t"
+ "swc1 %[f0], 96(%[tmp_a]) \n\t"
"bgtz %[count], 1b \n\t"
" addiu %[tmp_a], %[tmp_a], 8 \n\t"
".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [x0r] "=&f" (x0r), [x0i] "=&f" (x0i), [x1r] "=&f" (x1r),
- [x1i] "=&f" (x1i), [x2r] "=&f" (x2r), [x2i] "=&f" (x2i),
- [x3r] "=&f" (x3r), [x3i] "=&f" (x3i), [tmp_a] "=&r" (tmp_a),
- [count] "=&r" (count)
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
: [a] "r" (a)
: "memory"
);
- wk2r = rdft_w[2];
+ f9 = rdft_w[2];
__asm __volatile (
- ".set push \n\t"
- ".set noreorder \n\t"
- "addiu %[tmp_a], %[a], 128 \n\t"
- "addiu %[count], $zero, 4 \n\t"
- "1: \n\t"
- "addiu %[count], %[count], -1 \n\t"
- "lwc1 %[f0], 0(%[tmp_a]) \n\t"
- "lwc1 %[f1], 4(%[tmp_a]) \n\t"
- "lwc1 %[f2], 32(%[tmp_a]) \n\t"
- "lwc1 %[f3], 36(%[tmp_a]) \n\t"
- "lwc1 %[f4], 64(%[tmp_a]) \n\t"
- "lwc1 %[f5], 68(%[tmp_a]) \n\t"
- "lwc1 %[f6], 96(%[tmp_a]) \n\t"
- "lwc1 %[f7], 100(%[tmp_a]) \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[f0], %[x1r], %[x3i] \n\t"
- "add.s %[f1], %[x1i], %[x3r] \n\t"
- "sub.s %[f2], %[x3r], %[x1i] \n\t"
- "add.s %[f3], %[x3i], %[x1r] \n\t"
- "add.s %[f4], %[x0r], %[x2r] \n\t"
- "add.s %[f5], %[x0i], %[x2i] \n\t"
- "sub.s %[f6], %[f0], %[f1] \n\t"
- "add.s %[f0], %[f0], %[f1] \n\t"
- "sub.s %[f7], %[f2], %[f3] \n\t"
- "add.s %[f2], %[f2], %[f3] \n\t"
- "sub.s %[f1], %[x2i], %[x0i] \n\t"
- "mul.s %[f6], %[f6], %[wk2r] \n\t"
- "mul.s %[f0], %[f0], %[wk2r] \n\t"
- "sub.s %[f3], %[x0r], %[x2r] \n\t"
- "mul.s %[f7], %[f7], %[wk2r] \n\t"
- "mul.s %[f2], %[f2], %[wk2r] \n\t"
- "swc1 %[f4], 0(%[tmp_a]) \n\t"
- "swc1 %[f5], 4(%[tmp_a]) \n\t"
- "swc1 %[f6], 32(%[tmp_a]) \n\t"
- "swc1 %[f0], 36(%[tmp_a]) \n\t"
- "swc1 %[f1], 64(%[tmp_a]) \n\t"
- "swc1 %[f3], 68(%[tmp_a]) \n\t"
- "swc1 %[f7], 96(%[tmp_a]) \n\t"
- "swc1 %[f2], 100(%[tmp_a]) \n\t"
- "bgtz %[count], 1b \n\t"
- " addiu %[tmp_a], %[tmp_a], 8 \n\t"
- ".set pop \n\t"
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[tmp_a], %[a], 128 \n\t"
+ "addiu %[count], $zero, 4 \n\t"
+ "1: \n\t"
+ "addiu %[count], %[count], -1 \n\t"
+ "lwc1 %[f0], 0(%[tmp_a]) \n\t"
+ "lwc1 %[f2], 32(%[tmp_a]) \n\t"
+ "lwc1 %[f5], 68(%[tmp_a]) \n\t"
+ "lwc1 %[f7], 100(%[tmp_a]) \n\t"
+ "lwc1 %[f1], 4(%[tmp_a]) \n\t"
+ "lwc1 %[f3], 36(%[tmp_a]) \n\t"
+ "lwc1 %[f4], 64(%[tmp_a]) \n\t"
+ "lwc1 %[f6], 96(%[tmp_a]) \n\t"
+ "sub.s %[f8], %[f0], %[f2] \n\t"
+ "add.s %[f0], %[f0], %[f2] \n\t"
+ "sub.s %[f2], %[f5], %[f7] \n\t"
+ "add.s %[f5], %[f5], %[f7] \n\t"
+ "sub.s %[f7], %[f1], %[f3] \n\t"
+ "add.s %[f1], %[f1], %[f3] \n\t"
+ "sub.s %[f3], %[f4], %[f6] \n\t"
+ "add.s %[f4], %[f4], %[f6] \n\t"
+ "sub.s %[f6], %[f8], %[f2] \n\t"
+ "add.s %[f8], %[f8], %[f2] \n\t"
+ "add.s %[f2], %[f5], %[f1] \n\t"
+ "sub.s %[f5], %[f5], %[f1] \n\t"
+ "add.s %[f1], %[f3], %[f7] \n\t"
+ "sub.s %[f3], %[f3], %[f7] \n\t"
+ "add.s %[f7], %[f0], %[f4] \n\t"
+ "sub.s %[f0], %[f0], %[f4] \n\t"
+ "sub.s %[f4], %[f6], %[f1] \n\t"
+ "add.s %[f6], %[f6], %[f1] \n\t"
+ "sub.s %[f1], %[f3], %[f8] \n\t"
+ "add.s %[f3], %[f3], %[f8] \n\t"
+ "mul.s %[f4], %[f4], %[f9] \n\t"
+ "mul.s %[f6], %[f6], %[f9] \n\t"
+ "mul.s %[f1], %[f1], %[f9] \n\t"
+ "mul.s %[f3], %[f3], %[f9] \n\t"
+ "swc1 %[f7], 0(%[tmp_a]) \n\t"
+ "swc1 %[f2], 4(%[tmp_a]) \n\t"
+ "swc1 %[f5], 64(%[tmp_a]) \n\t"
+ "swc1 %[f0], 68(%[tmp_a]) \n\t"
+ "swc1 %[f4], 32(%[tmp_a]) \n\t"
+ "swc1 %[f6], 36(%[tmp_a]) \n\t"
+ "swc1 %[f1], 96(%[tmp_a]) \n\t"
+ "swc1 %[f3], 100(%[tmp_a]) \n\t"
+ "bgtz %[count], 1b \n\t"
+ " addiu %[tmp_a], %[tmp_a], 8 \n\t"
+ ".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [x0r] "=&f" (x0r), [x0i] "=&f" (x0i), [x1r] "=&f" (x1r),
- [x1i] "=&f" (x1i), [x2r] "=&f" (x2r), [x2i] "=&f" (x2i),
- [x3r] "=&f" (x3r), [x3i] "=&f" (x3i), [tmp_a] "=&r" (tmp_a),
- [count] "=&r" (count)
- : [a] "r" (a), [wk2r] "f" (wk2r)
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
+ : [a] "r" (a), [f9] "f" (f9)
: "memory"
);
- wk2i = rdft_w[3];
- wk1r = rdft_w[4];
- wk1i = rdft_w[5];
- wk3r = rdft_wk3ri_first[2];
- wk3i = rdft_wk3ri_first[3];
+ f10 = rdft_w[3];
+ f11 = rdft_w[4];
+ f12 = rdft_w[5];
+ f13 = rdft_wk3ri_first[2];
+ f14 = rdft_wk3ri_first[3];
__asm __volatile (
- ".set push \n\t"
- ".set noreorder \n\t"
- "addiu %[tmp_a], %[a], 256 \n\t"
- "addiu %[count], $zero, 4 \n\t"
- "1: \n\t"
- "addiu %[count], %[count], -1 \n\t"
- "lwc1 %[f0], 0(%[tmp_a]) \n\t"
- "lwc1 %[f1], 4(%[tmp_a]) \n\t"
- "lwc1 %[f2], 32(%[tmp_a]) \n\t"
- "lwc1 %[f3], 36(%[tmp_a]) \n\t"
- "lwc1 %[f4], 64(%[tmp_a]) \n\t"
- "lwc1 %[f5], 68(%[tmp_a]) \n\t"
- "lwc1 %[f6], 96(%[tmp_a]) \n\t"
- "lwc1 %[f7], 100(%[tmp_a]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "sub.s %[f0], %[x0r], %[x2r] \n\t"
- "sub.s %[f1], %[x0i], %[x2i] \n\t"
- "add.s %[f2], %[x1i], %[x3r] \n\t"
- "sub.s %[f3], %[x1r], %[x3i] \n\t"
- "add.s %[f4], %[x1r], %[x3i] \n\t"
- "sub.s %[f5], %[x1i], %[x3r] \n\t"
- "mul.s %[x3r], %[wk2r], %[f0] \n\t"
- "mul.s %[x3i], %[wk2r], %[f1] \n\t"
- "mul.s %[x1r], %[wk1r], %[f3] \n\t"
- "mul.s %[x1i], %[wk1r], %[f2] \n\t"
- "mul.s %[f6], %[wk3r], %[f4] \n\t"
- "mul.s %[f7], %[wk3r], %[f5] \n\t"
-#if !defined(MIPS32_R2_LE)
- "mul.s %[f1], %[wk2i], %[f1] \n\t"
- "mul.s %[f0], %[wk2i], %[f0] \n\t"
- "sub.s %[x3r], %[x3r], %[f1] \n\t"
- "add.s %[x3i], %[x3i], %[f0] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "mul.s %[f2], %[wk1i], %[f2] \n\t"
- "mul.s %[f3], %[wk1i], %[f3] \n\t"
- "mul.s %[f5], %[wk3i], %[f5] \n\t"
- "mul.s %[f4], %[wk3i], %[f4] \n\t"
- "sub.s %[x1r], %[x1r], %[f2] \n\t"
- "add.s %[x1i], %[x1i], %[f3] \n\t"
- "sub.s %[f6], %[f6], %[f5] \n\t"
- "add.s %[f7], %[f7], %[f4] \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "nmsub.s %[x3r], %[x3r], %[wk2i], %[f1] \n\t"
- "madd.s %[x3i], %[x3i], %[wk2i], %[f0] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "nmsub.s %[x1r], %[x1r], %[wk1i], %[f2] \n\t"
- "madd.s %[x1i], %[x1i], %[wk1i], %[f3] \n\t"
- "nmsub.s %[f6], %[f6], %[wk3i], %[f5] \n\t"
- "madd.s %[f7], %[f7], %[wk3i], %[f4] \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
- "swc1 %[f0], 0(%[tmp_a]) \n\t"
- "swc1 %[f1], 4(%[tmp_a]) \n\t"
- "swc1 %[x1r], 32(%[tmp_a]) \n\t"
- "swc1 %[x1i], 36(%[tmp_a]) \n\t"
- "swc1 %[x3r], 64(%[tmp_a]) \n\t"
- "swc1 %[x3i], 68(%[tmp_a]) \n\t"
- "swc1 %[f6], 96(%[tmp_a]) \n\t"
- "swc1 %[f7], 100(%[tmp_a]) \n\t"
- "bgtz %[count], 1b \n\t"
- " addiu %[tmp_a], %[tmp_a], 8 \n\t"
- ".set pop \n\t"
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[tmp_a], %[a], 256 \n\t"
+ "addiu %[count], $zero, 4 \n\t"
+ "1: \n\t"
+ "addiu %[count], %[count], -1 \n\t"
+ "lwc1 %[f0], 0(%[tmp_a]) \n\t"
+ "lwc1 %[f2], 32(%[tmp_a]) \n\t"
+ "lwc1 %[f4], 64(%[tmp_a]) \n\t"
+ "lwc1 %[f6], 96(%[tmp_a]) \n\t"
+ "lwc1 %[f1], 4(%[tmp_a]) \n\t"
+ "lwc1 %[f3], 36(%[tmp_a]) \n\t"
+ "lwc1 %[f5], 68(%[tmp_a]) \n\t"
+ "lwc1 %[f7], 100(%[tmp_a]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "sub.s %[f7], %[f8], %[f2] \n\t"
+ "add.s %[f8], %[f8], %[f2] \n\t"
+ "add.s %[f2], %[f1], %[f4] \n\t"
+ "sub.s %[f1], %[f1], %[f4] \n\t"
+ "sub.s %[f4], %[f6], %[f3] \n\t"
+ "add.s %[f6], %[f6], %[f3] \n\t"
+ "sub.s %[f3], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "swc1 %[f8], 0(%[tmp_a]) \n\t"
+ "swc1 %[f6], 4(%[tmp_a]) \n\t"
+ "mul.s %[f5], %[f9], %[f7] \n\t"
+#if defined(MIPS32_R2_LE)
+ "mul.s %[f7], %[f10], %[f7] \n\t"
+ "mul.s %[f8], %[f11], %[f3] \n\t"
+ "mul.s %[f3], %[f12], %[f3] \n\t"
+ "mul.s %[f6], %[f13], %[f0] \n\t"
+ "mul.s %[f0], %[f14], %[f0] \n\t"
+ "nmsub.s %[f5], %[f5], %[f10], %[f4] \n\t"
+ "madd.s %[f7], %[f7], %[f9], %[f4] \n\t"
+ "nmsub.s %[f8], %[f8], %[f12], %[f2] \n\t"
+ "madd.s %[f3], %[f3], %[f11], %[f2] \n\t"
+ "nmsub.s %[f6], %[f6], %[f14], %[f1] \n\t"
+ "madd.s %[f0], %[f0], %[f13], %[f1] \n\t"
+ "swc1 %[f5], 64(%[tmp_a]) \n\t"
+ "swc1 %[f7], 68(%[tmp_a]) \n\t"
+#else
+ "mul.s %[f8], %[f10], %[f4] \n\t"
+ "mul.s %[f4], %[f9], %[f4] \n\t"
+ "mul.s %[f7], %[f10], %[f7] \n\t"
+ "mul.s %[f6], %[f11], %[f3] \n\t"
+ "mul.s %[f3], %[f12], %[f3] \n\t"
+ "sub.s %[f5], %[f5], %[f8] \n\t"
+ "mul.s %[f8], %[f12], %[f2] \n\t"
+ "mul.s %[f2], %[f11], %[f2] \n\t"
+ "add.s %[f7], %[f4], %[f7] \n\t"
+ "mul.s %[f4], %[f13], %[f0] \n\t"
+ "mul.s %[f0], %[f14], %[f0] \n\t"
+ "sub.s %[f8], %[f6], %[f8] \n\t"
+ "mul.s %[f6], %[f14], %[f1] \n\t"
+ "mul.s %[f1], %[f13], %[f1] \n\t"
+ "add.s %[f3], %[f2], %[f3] \n\t"
+ "swc1 %[f5], 64(%[tmp_a]) \n\t"
+ "swc1 %[f7], 68(%[tmp_a]) \n\t"
+ "sub.s %[f6], %[f4], %[f6] \n\t"
+ "add.s %[f0], %[f1], %[f0] \n\t"
+#endif
+ "swc1 %[f8], 32(%[tmp_a]) \n\t"
+ "swc1 %[f3], 36(%[tmp_a]) \n\t"
+ "swc1 %[f6], 96(%[tmp_a]) \n\t"
+ "swc1 %[f0], 100(%[tmp_a]) \n\t"
+ "bgtz %[count], 1b \n\t"
+ " addiu %[tmp_a], %[tmp_a], 8 \n\t"
+ ".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [x0r] "=&f" (x0r), [x0i] "=&f" (x0i), [x1r] "=&f" (x1r),
- [x1i] "=&f" (x1i), [x2r] "=&f" (x2r), [x2i] "=&f" (x2i),
- [x3r] "=&f" (x3r), [x3i] "=&f" (x3i), [tmp_a] "=&r" (tmp_a),
- [count] "=&r" (count)
- : [a] "r" (a), [wk1r] "f" (wk1r), [wk1i] "f" (wk1i), [wk2r] "f" (wk2r),
- [wk2i] "f" (wk2i), [wk3r] "f" (wk3r), [wk3i] "f" (wk3i)
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
+ : [a] "r" (a), [f9] "f" (f9), [f10] "f" (f10), [f11] "f" (f11),
+ [f12] "f" (f12), [f13] "f" (f13), [f14] "f" (f14)
: "memory"
);
-
- wk1r = rdft_w[6];
- wk1i = rdft_w[7];
- wk3r = rdft_wk3ri_second[2];
- wk3i = rdft_wk3ri_second[3];
-
+ f11 = rdft_w[6];
+ f12 = rdft_w[7];
+ f13 = rdft_wk3ri_second[2];
+ f14 = rdft_wk3ri_second[3];
__asm __volatile (
".set push \n\t"
".set noreorder \n\t"
@@ -740,78 +733,78 @@
"lwc1 %[f5], 68(%[tmp_a]) \n\t"
"lwc1 %[f6], 96(%[tmp_a]) \n\t"
"lwc1 %[f7], 100(%[tmp_a]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "sub.s %[f0], %[x0r], %[x2r] \n\t"
- "sub.s %[f1], %[x0i], %[x2i] \n\t"
- "add.s %[f2], %[x1i], %[x3r] \n\t"
- "sub.s %[f3], %[x1r], %[x3i] \n\t"
- "add.s %[f4], %[x1r], %[x3i] \n\t"
- "sub.s %[f5], %[x1i], %[x3r] \n\t"
- "mul.s %[x3r], %[wk2i], %[f0] \n\t"
- "mul.s %[x3i], %[wk2i], %[f1] \n\t"
- "mul.s %[x1r], %[wk1r], %[f3] \n\t"
- "mul.s %[x1i], %[wk1r], %[f2] \n\t"
- "mul.s %[f6], %[wk3r], %[f4] \n\t"
- "mul.s %[f7], %[wk3r], %[f5] \n\t"
-#if !defined(MIPS32_R2_LE)
- "mul.s %[f1], %[wk2r], %[f1] \n\t"
- "mul.s %[f0], %[wk2r], %[f0] \n\t"
- "add.s %[x3r], %[x3r], %[f1] \n\t"
- "neg.s %[x3r], %[x3r] \n\t"
- "sub.s %[x3i], %[f0], %[x3i] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "mul.s %[f2], %[wk1i], %[f2] \n\t"
- "mul.s %[f3], %[wk1i], %[f3] \n\t"
- "mul.s %[f5], %[wk3i], %[f5] \n\t"
- "mul.s %[f4], %[wk3i], %[f4] \n\t"
- "sub.s %[x1r], %[x1r], %[f2] \n\t"
- "add.s %[x1i], %[x1i], %[f3] \n\t"
- "sub.s %[f6], %[f6], %[f5] \n\t"
- "add.s %[f7], %[f7], %[f4] \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "nmadd.s %[x3r], %[x3r], %[wk2r], %[f1] \n\t"
- "msub.s %[x3i], %[x3i], %[wk2r], %[f0] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "nmsub.s %[x1r], %[x1r], %[wk1i], %[f2] \n\t"
- "madd.s %[x1i], %[x1i], %[wk1i], %[f3] \n\t"
- "nmsub.s %[f6], %[f6], %[wk3i], %[f5] \n\t"
- "madd.s %[f7], %[f7], %[wk3i], %[f4] \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
- "swc1 %[f0], 0(%[tmp_a]) \n\t"
- "swc1 %[f1], 4(%[tmp_a]) \n\t"
- "swc1 %[x1r], 32(%[tmp_a]) \n\t"
- "swc1 %[x1i], 36(%[tmp_a]) \n\t"
- "swc1 %[x3r], 64(%[tmp_a]) \n\t"
- "swc1 %[x3i], 68(%[tmp_a]) \n\t"
- "swc1 %[f6], 96(%[tmp_a]) \n\t"
- "swc1 %[f7], 100(%[tmp_a]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "sub.s %[f7], %[f2], %[f8] \n\t"
+ "add.s %[f2], %[f2], %[f8] \n\t"
+ "add.s %[f8], %[f1], %[f4] \n\t"
+ "sub.s %[f1], %[f1], %[f4] \n\t"
+ "sub.s %[f4], %[f3], %[f6] \n\t"
+ "add.s %[f3], %[f3], %[f6] \n\t"
+ "sub.s %[f6], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "swc1 %[f2], 0(%[tmp_a]) \n\t"
+ "swc1 %[f3], 4(%[tmp_a]) \n\t"
+ "mul.s %[f5], %[f10], %[f7] \n\t"
+#if defined(MIPS32_R2_LE)
+ "mul.s %[f7], %[f9], %[f7] \n\t"
+ "mul.s %[f2], %[f12], %[f8] \n\t"
+ "mul.s %[f8], %[f11], %[f8] \n\t"
+ "mul.s %[f3], %[f14], %[f1] \n\t"
+ "mul.s %[f1], %[f13], %[f1] \n\t"
+ "madd.s %[f5], %[f5], %[f9], %[f4] \n\t"
+ "msub.s %[f7], %[f7], %[f10], %[f4] \n\t"
+ "msub.s %[f2], %[f2], %[f11], %[f6] \n\t"
+ "madd.s %[f8], %[f8], %[f12], %[f6] \n\t"
+ "msub.s %[f3], %[f3], %[f13], %[f0] \n\t"
+ "madd.s %[f1], %[f1], %[f14], %[f0] \n\t"
+ "swc1 %[f5], 64(%[tmp_a]) \n\t"
+ "swc1 %[f7], 68(%[tmp_a]) \n\t"
+#else
+ "mul.s %[f2], %[f9], %[f4] \n\t"
+ "mul.s %[f4], %[f10], %[f4] \n\t"
+ "mul.s %[f7], %[f9], %[f7] \n\t"
+ "mul.s %[f3], %[f11], %[f6] \n\t"
+ "mul.s %[f6], %[f12], %[f6] \n\t"
+ "add.s %[f5], %[f5], %[f2] \n\t"
+ "sub.s %[f7], %[f4], %[f7] \n\t"
+ "mul.s %[f2], %[f12], %[f8] \n\t"
+ "mul.s %[f8], %[f11], %[f8] \n\t"
+ "mul.s %[f4], %[f14], %[f1] \n\t"
+ "mul.s %[f1], %[f13], %[f1] \n\t"
+ "sub.s %[f2], %[f3], %[f2] \n\t"
+ "mul.s %[f3], %[f13], %[f0] \n\t"
+ "mul.s %[f0], %[f14], %[f0] \n\t"
+ "add.s %[f8], %[f8], %[f6] \n\t"
+ "swc1 %[f5], 64(%[tmp_a]) \n\t"
+ "swc1 %[f7], 68(%[tmp_a]) \n\t"
+ "sub.s %[f3], %[f3], %[f4] \n\t"
+ "add.s %[f1], %[f1], %[f0] \n\t"
+#endif
+ "swc1 %[f2], 32(%[tmp_a]) \n\t"
+ "swc1 %[f8], 36(%[tmp_a]) \n\t"
+ "swc1 %[f3], 96(%[tmp_a]) \n\t"
+ "swc1 %[f1], 100(%[tmp_a]) \n\t"
"bgtz %[count], 1b \n\t"
" addiu %[tmp_a], %[tmp_a], 8 \n\t"
".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [x0r] "=&f" (x0r), [x0i] "=&f" (x0i), [x1r] "=&f" (x1r),
- [x1i] "=&f" (x1i), [x2r] "=&f" (x2r), [x2i] "=&f" (x2i),
- [x3r] "=&f" (x3r), [x3i] "=&f" (x3i), [tmp_a] "=&r" (tmp_a),
- [count] "=&r" (count)
- : [a] "r" (a), [wk1r] "f" (wk1r), [wk1i] "f" (wk1i), [wk2r] "f" (wk2r),
- [wk2i] "f" (wk2i), [wk3r] "f" (wk3r), [wk3i] "f" (wk3i)
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
+ : [a] "r" (a), [f9] "f" (f9), [f10] "f" (f10), [f11] "f" (f11),
+ [f12] "f" (f12), [f13] "f" (f13), [f14] "f" (f14)
: "memory"
);
}
-static void cftfsub_128_mips(float *a) {
- float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
- float f0, f1, f2, f3, f4, f5, f6, f7;
+static void cftfsub_128_mips(float* a) {
+ float f0, f1, f2, f3, f4, f5, f6, f7, f8;
int tmp_a, count;
cft1st_128(a);
@@ -825,55 +818,51 @@
"1: \n\t"
"addiu %[count], %[count], -1 \n\t"
"lwc1 %[f0], 0(%[tmp_a]) \n\t"
- "lwc1 %[f1], 4(%[tmp_a]) \n\t"
"lwc1 %[f2], 128(%[tmp_a]) \n\t"
- "lwc1 %[f3], 132(%[tmp_a]) \n\t"
"lwc1 %[f4], 256(%[tmp_a]) \n\t"
- "lwc1 %[f5], 260(%[tmp_a]) \n\t"
"lwc1 %[f6], 384(%[tmp_a]) \n\t"
+ "lwc1 %[f1], 4(%[tmp_a]) \n\t"
+ "lwc1 %[f3], 132(%[tmp_a]) \n\t"
+ "lwc1 %[f5], 260(%[tmp_a]) \n\t"
"lwc1 %[f7], 388(%[tmp_a]) \n\t"
- "add.s %[x0r], %[f0], %[f2] \n\t"
- "add.s %[x0i], %[f1], %[f3] \n\t"
- "add.s %[x2r], %[f4], %[f6] \n\t"
- "add.s %[x2i], %[f5], %[f7] \n\t"
- "sub.s %[x1r], %[f0], %[f2] \n\t"
- "sub.s %[x1i], %[f1], %[f3] \n\t"
- "sub.s %[x3r], %[f4], %[f6] \n\t"
- "sub.s %[x3i], %[f5], %[f7] \n\t"
- "add.s %[f0], %[x0r], %[x2r] \n\t"
- "add.s %[f1], %[x0i], %[x2i] \n\t"
- "sub.s %[f4], %[x0r], %[x2r] \n\t"
- "sub.s %[f5], %[x0i], %[x2i] \n\t"
- "sub.s %[f2], %[x1r], %[x3i] \n\t"
- "add.s %[f3], %[x1i], %[x3r] \n\t"
- "add.s %[f6], %[x1r], %[x3i] \n\t"
- "sub.s %[f7], %[x1i], %[x3r] \n\t"
- "swc1 %[f0], 0(%[tmp_a]) \n\t"
- "swc1 %[f1], 4(%[tmp_a]) \n\t"
- "swc1 %[f2], 128(%[tmp_a]) \n\t"
- "swc1 %[f3], 132(%[tmp_a]) \n\t"
- "swc1 %[f4], 256(%[tmp_a]) \n\t"
- "swc1 %[f5], 260(%[tmp_a]) \n\t"
- "swc1 %[f6], 384(%[tmp_a]) \n\t"
- "swc1 %[f7], 388(%[tmp_a]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f1], %[f3] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "add.s %[f7], %[f8], %[f2] \n\t"
+ "sub.s %[f8], %[f8], %[f2] \n\t"
+ "add.s %[f2], %[f1], %[f4] \n\t"
+ "sub.s %[f1], %[f1], %[f4] \n\t"
+ "add.s %[f4], %[f6], %[f3] \n\t"
+ "sub.s %[f6], %[f6], %[f3] \n\t"
+ "sub.s %[f3], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "swc1 %[f7], 0(%[tmp_a]) \n\t"
+ "swc1 %[f8], 256(%[tmp_a]) \n\t"
+ "swc1 %[f2], 132(%[tmp_a]) \n\t"
+ "swc1 %[f1], 388(%[tmp_a]) \n\t"
+ "swc1 %[f4], 4(%[tmp_a]) \n\t"
+ "swc1 %[f6], 260(%[tmp_a]) \n\t"
+ "swc1 %[f3], 128(%[tmp_a]) \n\t"
+ "swc1 %[f0], 384(%[tmp_a]) \n\t"
"bgtz %[count], 1b \n\t"
" addiu %[tmp_a], %[tmp_a], 8 \n\t"
".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [x0r] "=&f" (x0r), [x0i] "=&f" (x0i), [x1r] "=&f" (x1r),
- [x1i] "=&f" (x1i), [x2r] "=&f" (x2r), [x2i] "=&f" (x2i),
- [x3r] "=&f" (x3r), [x3i] "=&f" (x3i), [tmp_a] "=&r" (tmp_a),
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a),
[count] "=&r" (count)
: [a] "r" (a)
: "memory"
);
}
-static void cftbsub_128_mips(float *a) {
- float f0, f1, f2, f3, f4, f5, f6, f7;
- float f8, f9, f10, f11, f12, f13, f14, f15;
- float f16, f17, f18, f19, f20, f21, f22, f23;
+static void cftbsub_128_mips(float* a) {
+ float f0, f1, f2, f3, f4, f5, f6, f7, f8;
int tmp_a, count;
cft1st_128(a);
@@ -883,322 +872,307 @@
".set push \n\t"
".set noreorder \n\t"
"addiu %[tmp_a], %[a], 0 \n\t"
- "addiu %[count], $zero, 8 \n\t"
+ "addiu %[count], $zero, 16 \n\t"
"1: \n\t"
"addiu %[count], %[count], -1 \n\t"
"lwc1 %[f0], 0(%[tmp_a]) \n\t"
- "lwc1 %[f1], 4(%[tmp_a]) \n\t"
"lwc1 %[f2], 128(%[tmp_a]) \n\t"
- "lwc1 %[f3], 132(%[tmp_a]) \n\t"
"lwc1 %[f4], 256(%[tmp_a]) \n\t"
- "lwc1 %[f5], 260(%[tmp_a]) \n\t"
"lwc1 %[f6], 384(%[tmp_a]) \n\t"
+ "lwc1 %[f1], 4(%[tmp_a]) \n\t"
+ "lwc1 %[f3], 132(%[tmp_a]) \n\t"
+ "lwc1 %[f5], 260(%[tmp_a]) \n\t"
"lwc1 %[f7], 388(%[tmp_a]) \n\t"
- "lwc1 %[f8], 8(%[tmp_a]) \n\t"
- "lwc1 %[f9], 12(%[tmp_a]) \n\t"
- "lwc1 %[f10], 136(%[tmp_a]) \n\t"
- "lwc1 %[f11], 140(%[tmp_a]) \n\t"
- "lwc1 %[f12], 264(%[tmp_a]) \n\t"
- "lwc1 %[f13], 268(%[tmp_a]) \n\t"
- "lwc1 %[f14], 392(%[tmp_a]) \n\t"
- "lwc1 %[f15], 396(%[tmp_a]) \n\t"
- "add.s %[f16], %[f0], %[f2] \n\t"
- "add.s %[f17], %[f1], %[f3] \n\t"
- "add.s %[f18], %[f4], %[f6] \n\t"
- "add.s %[f19], %[f5], %[f7] \n\t"
- "sub.s %[f20], %[f0], %[f2] \n\t"
- "sub.s %[f21], %[f3], %[f1] \n\t"
- "sub.s %[f22], %[f4], %[f6] \n\t"
- "sub.s %[f23], %[f5], %[f7] \n\t"
- "add.s %[f0], %[f8], %[f10] \n\t"
- "add.s %[f1], %[f9], %[f11] \n\t"
- "add.s %[f2], %[f12], %[f14] \n\t"
- "add.s %[f3], %[f13], %[f15] \n\t"
- "sub.s %[f4], %[f8], %[f10] \n\t"
- "sub.s %[f5], %[f11], %[f9] \n\t"
- "sub.s %[f6], %[f12], %[f14] \n\t"
- "sub.s %[f7], %[f13], %[f15] \n\t"
- "add.s %[f8], %[f16], %[f18] \n\t"
- "add.s %[f9], %[f17], %[f19] \n\t"
- "sub.s %[f12], %[f16], %[f18] \n\t"
- "sub.s %[f13], %[f19], %[f17] \n\t"
- "sub.s %[f10], %[f20], %[f23] \n\t"
- "sub.s %[f11], %[f21], %[f22] \n\t"
- "add.s %[f14], %[f20], %[f23] \n\t"
- "add.s %[f15], %[f21], %[f22] \n\t"
- "neg.s %[f9], %[f9] \n\t"
- "add.s %[f16], %[f0], %[f2] \n\t"
- "add.s %[f17], %[f1], %[f3] \n\t"
- "sub.s %[f20], %[f0], %[f2] \n\t"
- "sub.s %[f21], %[f3], %[f1] \n\t"
- "sub.s %[f18], %[f4], %[f7] \n\t"
- "sub.s %[f19], %[f5], %[f6] \n\t"
- "add.s %[f22], %[f4], %[f7] \n\t"
- "add.s %[f23], %[f5], %[f6] \n\t"
- "neg.s %[f17], %[f17] \n\t"
- "swc1 %[f8], 0(%[tmp_a]) \n\t"
- "swc1 %[f10], 128(%[tmp_a]) \n\t"
- "swc1 %[f11], 132(%[tmp_a]) \n\t"
- "swc1 %[f12], 256(%[tmp_a]) \n\t"
- "swc1 %[f13], 260(%[tmp_a]) \n\t"
- "swc1 %[f14], 384(%[tmp_a]) \n\t"
- "swc1 %[f15], 388(%[tmp_a]) \n\t"
- "swc1 %[f9], 4(%[tmp_a]) \n\t"
- "swc1 %[f16], 8(%[tmp_a]) \n\t"
- "swc1 %[f18], 136(%[tmp_a]) \n\t"
- "swc1 %[f19], 140(%[tmp_a]) \n\t"
- "swc1 %[f20], 264(%[tmp_a]) \n\t"
- "swc1 %[f21], 268(%[tmp_a]) \n\t"
- "swc1 %[f22], 392(%[tmp_a]) \n\t"
- "swc1 %[f23], 396(%[tmp_a]) \n\t"
- "swc1 %[f17], 12(%[tmp_a]) \n\t"
+ "add.s %[f8], %[f0], %[f2] \n\t"
+ "sub.s %[f0], %[f0], %[f2] \n\t"
+ "add.s %[f2], %[f4], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "add.s %[f6], %[f1], %[f3] \n\t"
+ "sub.s %[f1], %[f3], %[f1] \n\t"
+ "add.s %[f3], %[f5], %[f7] \n\t"
+ "sub.s %[f5], %[f5], %[f7] \n\t"
+ "add.s %[f7], %[f8], %[f2] \n\t"
+ "sub.s %[f8], %[f8], %[f2] \n\t"
+ "sub.s %[f2], %[f1], %[f4] \n\t"
+ "add.s %[f1], %[f1], %[f4] \n\t"
+ "add.s %[f4], %[f3], %[f6] \n\t"
+ "sub.s %[f6], %[f3], %[f6] \n\t"
+ "sub.s %[f3], %[f0], %[f5] \n\t"
+ "add.s %[f0], %[f0], %[f5] \n\t"
+ "neg.s %[f4], %[f4] \n\t"
+ "swc1 %[f7], 0(%[tmp_a]) \n\t"
+ "swc1 %[f8], 256(%[tmp_a]) \n\t"
+ "swc1 %[f2], 132(%[tmp_a]) \n\t"
+ "swc1 %[f1], 388(%[tmp_a]) \n\t"
+ "swc1 %[f6], 260(%[tmp_a]) \n\t"
+ "swc1 %[f3], 128(%[tmp_a]) \n\t"
+ "swc1 %[f0], 384(%[tmp_a]) \n\t"
+ "swc1 %[f4], 4(%[tmp_a]) \n\t"
"bgtz %[count], 1b \n\t"
- " addiu %[tmp_a], %[tmp_a], 16 \n\t"
+ " addiu %[tmp_a], %[tmp_a], 8 \n\t"
".set pop \n\t"
: [f0] "=&f" (f0), [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3),
[f4] "=&f" (f4), [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7),
- [f8] "=&f" (f8), [f9] "=&f" (f9), [f10] "=&f" (f10), [f11] "=&f" (f11),
- [f12] "=&f" (f12), [f13] "=&f" (f13), [f14] "=&f" (f14),
- [f15] "=&f" (f15), [f16] "=&f" (f16), [f17] "=&f" (f17),
- [f18] "=&f" (f18), [f19] "=&f" (f19), [f20] "=&f" (f20),
- [f21] "=&f" (f21), [f22] "=&f" (f22), [f23] "=&f" (f23),
- [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
: [a] "r" (a)
: "memory"
);
}
-static void rftfsub_128_mips(float *a) {
- const float *c = rdft_w + 32;
- float wkr, wki, xr, xi, yr, yi;
- const float temp = 0.5f;
- float aj20=0, aj21=0, ak20=0, ak21=0, ck1=0;
- float *a1 = a;
- float *a2 = a;
- float *c1 = rdft_w + 33;
- float *c2 = c1 + 30;
+static void rftfsub_128_mips(float* a) {
+ const float* c = rdft_w + 32;
+ const float f0 = 0.5f;
+ float* a1 = &a[2];
+ float* a2 = &a[126];
+ const float* c1 = &c[1];
+ const float* c2 = &c[31];
+ float f1, f2, f3 ,f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15;
+ int count;
__asm __volatile (
".set push \n\t"
".set noreorder \n\t"
- "lwc1 %[aj20], 8(%[a2]) \n\t"
- "lwc1 %[ak20], 504(%[a1]) \n\t"
- "lwc1 %[ck1], 0(%[c2]) \n\t"
- "lwc1 %[aj21], 12(%[a2]) \n\t"
- "lwc1 %[ak21], 508(%[a1]) \n\t"
- "sub.s %[wkr], %[temp], %[ck1] \n\t"
- "sub.s %[xr], %[aj20], %[ak20] \n\t"
- "add.s %[xi], %[aj21], %[ak21] \n\t"
- "lwc1 %[wki], 0(%[c1]) \n\t"
- "addiu %[c2], %[c2],-4 \n\t"
- "mul.s %[yr], %[wkr], %[xr] \n\t"
- "mul.s %[yi], %[wkr], %[xi] \n\t"
+ "lwc1 %[f6], 0(%[c2]) \n\t"
+ "lwc1 %[f1], 0(%[a1]) \n\t"
+ "lwc1 %[f2], 0(%[a2]) \n\t"
+ "lwc1 %[f3], 4(%[a1]) \n\t"
+ "lwc1 %[f4], 4(%[a2]) \n\t"
+ "lwc1 %[f5], 0(%[c1]) \n\t"
+ "sub.s %[f6], %[f0], %[f6] \n\t"
+ "sub.s %[f7], %[f1], %[f2] \n\t"
+ "add.s %[f8], %[f3], %[f4] \n\t"
+ "addiu %[count], $zero, 15 \n\t"
+ "mul.s %[f9], %[f6], %[f7] \n\t"
+ "mul.s %[f6], %[f6], %[f8] \n\t"
#if !defined(MIPS32_R2_LE)
- "mul.s %[xi], %[wki], %[xi] \n\t"
- "mul.s %[xr], %[wki], %[xr] \n\t"
- "sub.s %[yr], %[yr], %[xi] \n\t"
- "add.s %[yi], %[yi], %[xr] \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "nmsub.s %[yr], %[yr], %[wki], %[xi] \n\t"
- "madd.s %[yi], %[yi], %[wki], %[xr] \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
+ "mul.s %[f8], %[f5], %[f8] \n\t"
+ "mul.s %[f5], %[f5], %[f7] \n\t"
+ "sub.s %[f9], %[f9], %[f8] \n\t"
+ "add.s %[f6], %[f6], %[f5] \n\t"
+#else
+ "nmsub.s %[f9], %[f9], %[f5], %[f8] \n\t"
+ "madd.s %[f6], %[f6], %[f5], %[f7] \n\t"
+#endif
+ "sub.s %[f1], %[f1], %[f9] \n\t"
+ "add.s %[f2], %[f2], %[f9] \n\t"
+ "sub.s %[f3], %[f3], %[f6] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "swc1 %[f1], 0(%[a1]) \n\t"
+ "swc1 %[f2], 0(%[a2]) \n\t"
+ "swc1 %[f3], 4(%[a1]) \n\t"
+ "swc1 %[f4], 4(%[a2]) \n\t"
+ "addiu %[a1], %[a1], 8 \n\t"
+ "addiu %[a2], %[a2], -8 \n\t"
"addiu %[c1], %[c1], 4 \n\t"
- "sub.s %[aj20], %[aj20], %[yr] \n\t"
- "sub.s %[aj21], %[aj21], %[yi] \n\t"
- "add.s %[ak20], %[ak20], %[yr] \n\t"
- "sub.s %[ak21], %[ak21], %[yi] \n\t"
- "addiu %[a2], %[a2], 8 \n\t"
- "swc1 %[aj20], 0(%[a2]) \n\t"
- "swc1 %[aj21], 4(%[a2]) \n\t"
- "swc1 %[ak20], 504(%[a1]) \n\t"
- "swc1 %[ak21], 508(%[a1]) \n\t"
- "addiu %[a1], %[a1], -8 \n\t"
- //15x2 passes:
+ "addiu %[c2], %[c2], -4 \n\t"
"1: \n\t"
- "lwc1 %[ck1], 0(%[c2]) \n\t"
- "lwc1 %[aj20], 8(%[a2]) \n\t"
- "lwc1 %[aj21], 12(%[a2]) \n\t"
- "lwc1 %[ak20], 504(%[a1]) \n\t"
- "lwc1 %[ak21], 508(%[a1]) \n\t"
- "lwc1 $f0, -4(%[c2]) \n\t"
- "lwc1 $f2, 16(%[a2]) \n\t"
- "lwc1 $f3, 20(%[a2]) \n\t"
- "lwc1 $f8, 496(%[a1]) \n\t"
- "lwc1 $f7, 500(%[a1]) \n\t"
- "sub.s %[wkr], %[temp], %[ck1] \n\t"
- "sub.s %[xr], %[aj20], %[ak20] \n\t"
- "add.s %[xi], %[aj21], %[ak21] \n\t"
- "lwc1 %[wki], 0(%[c1]) \n\t"
- "sub.s $f0, %[temp], $f0 \n\t"
- "sub.s $f6, $f2, $f8 \n\t"
- "add.s $f4, $f3, $f7 \n\t"
- "lwc1 $f5, 4(%[c1]) \n\t"
- "mul.s %[yr], %[wkr], %[xr] \n\t"
- "mul.s %[yi], %[wkr], %[xi] \n\t"
- "mul.s $f1, $f0, $f6 \n\t"
- "mul.s $f0, $f0, $f4 \n\t"
- "addiu %[c2], %[c2], -8 \n\t"
+ "lwc1 %[f6], 0(%[c2]) \n\t"
+ "lwc1 %[f1], 0(%[a1]) \n\t"
+ "lwc1 %[f2], 0(%[a2]) \n\t"
+ "lwc1 %[f3], 4(%[a1]) \n\t"
+ "lwc1 %[f4], 4(%[a2]) \n\t"
+ "lwc1 %[f5], 0(%[c1]) \n\t"
+ "sub.s %[f6], %[f0], %[f6] \n\t"
+ "sub.s %[f7], %[f1], %[f2] \n\t"
+ "add.s %[f8], %[f3], %[f4] \n\t"
+ "lwc1 %[f10], -4(%[c2]) \n\t"
+ "lwc1 %[f11], 8(%[a1]) \n\t"
+ "lwc1 %[f12], -8(%[a2]) \n\t"
+ "mul.s %[f9], %[f6], %[f7] \n\t"
+ "mul.s %[f6], %[f6], %[f8] \n\t"
#if !defined(MIPS32_R2_LE)
- "mul.s %[xi], %[wki], %[xi] \n\t"
- "mul.s %[xr], %[wki], %[xr] \n\t"
- "mul.s $f4, $f5, $f4 \n\t"
- "mul.s $f6, $f5, $f6 \n\t"
- "sub.s %[yr], %[yr], %[xi] \n\t"
- "add.s %[yi], %[yi], %[xr] \n\t"
- "sub.s $f1, $f1, $f4 \n\t"
- "add.s $f0, $f0, $f6 \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "nmsub.s %[yr], %[yr], %[wki], %[xi] \n\t"
- "madd.s %[yi], %[yi], %[wki], %[xr] \n\t"
- "nmsub.s $f1, $f1, $f5, $f4 \n\t"
- "madd.s $f0, $f0, $f5, $f6 \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
+ "mul.s %[f8], %[f5], %[f8] \n\t"
+ "mul.s %[f5], %[f5], %[f7] \n\t"
+ "lwc1 %[f13], 12(%[a1]) \n\t"
+ "lwc1 %[f14], -4(%[a2]) \n\t"
+ "lwc1 %[f15], 4(%[c1]) \n\t"
+ "sub.s %[f9], %[f9], %[f8] \n\t"
+ "add.s %[f6], %[f6], %[f5] \n\t"
+#else
+ "lwc1 %[f13], 12(%[a1]) \n\t"
+ "lwc1 %[f14], -4(%[a2]) \n\t"
+ "lwc1 %[f15], 4(%[c1]) \n\t"
+ "nmsub.s %[f9], %[f9], %[f5], %[f8] \n\t"
+ "madd.s %[f6], %[f6], %[f5], %[f7] \n\t"
+#endif
+ "sub.s %[f10], %[f0], %[f10] \n\t"
+ "sub.s %[f5], %[f11], %[f12] \n\t"
+ "add.s %[f7], %[f13], %[f14] \n\t"
+ "sub.s %[f1], %[f1], %[f9] \n\t"
+ "add.s %[f2], %[f2], %[f9] \n\t"
+ "sub.s %[f3], %[f3], %[f6] \n\t"
+ "mul.s %[f8], %[f10], %[f5] \n\t"
+ "mul.s %[f10], %[f10], %[f7] \n\t"
+#if !defined(MIPS32_R2_LE)
+ "mul.s %[f9], %[f15], %[f7] \n\t"
+ "mul.s %[f15], %[f15], %[f5] \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "swc1 %[f1], 0(%[a1]) \n\t"
+ "swc1 %[f2], 0(%[a2]) \n\t"
+ "sub.s %[f8], %[f8], %[f9] \n\t"
+ "add.s %[f10], %[f10], %[f15] \n\t"
+#else
+ "swc1 %[f1], 0(%[a1]) \n\t"
+ "swc1 %[f2], 0(%[a2]) \n\t"
+ "sub.s %[f4], %[f4], %[f6] \n\t"
+ "nmsub.s %[f8], %[f8], %[f15], %[f7] \n\t"
+ "madd.s %[f10], %[f10], %[f15], %[f5] \n\t"
+#endif
+ "swc1 %[f3], 4(%[a1]) \n\t"
+ "swc1 %[f4], 4(%[a2]) \n\t"
+ "sub.s %[f11], %[f11], %[f8] \n\t"
+ "add.s %[f12], %[f12], %[f8] \n\t"
+ "sub.s %[f13], %[f13], %[f10] \n\t"
+ "sub.s %[f14], %[f14], %[f10] \n\t"
+ "addiu %[c2], %[c2], -8 \n\t"
"addiu %[c1], %[c1], 8 \n\t"
- "sub.s %[aj20], %[aj20], %[yr] \n\t"
- "sub.s %[aj21], %[aj21], %[yi] \n\t"
- "add.s %[ak20], %[ak20], %[yr] \n\t"
- "sub.s %[ak21], %[ak21], %[yi] \n\t"
- "sub.s $f2, $f2, $f1 \n\t"
- "sub.s $f3, $f3, $f0 \n\t"
- "add.s $f1, $f8, $f1 \n\t"
- "sub.s $f0, $f7, $f0 \n\t"
- "swc1 %[aj20], 8(%[a2]) \n\t"
- "swc1 %[aj21], 12(%[a2]) \n\t"
- "swc1 %[ak20], 504(%[a1]) \n\t"
- "swc1 %[ak21], 508(%[a1]) \n\t"
- "swc1 $f2, 16(%[a2]) \n\t"
- "swc1 $f3, 20(%[a2]) \n\t"
- "swc1 $f1, 496(%[a1]) \n\t"
- "swc1 $f0, 500(%[a1]) \n\t"
- "addiu %[a2], %[a2], 16 \n\t"
- "bne %[c2], %[c], 1b \n\t"
- " addiu %[a1], %[a1], -16 \n\t"
+ "swc1 %[f11], 8(%[a1]) \n\t"
+ "swc1 %[f12], -8(%[a2]) \n\t"
+ "swc1 %[f13], 12(%[a1]) \n\t"
+ "swc1 %[f14], -4(%[a2]) \n\t"
+ "addiu %[a1], %[a1], 16 \n\t"
+ "addiu %[count], %[count], -1 \n\t"
+ "bgtz %[count], 1b \n\t"
+ " addiu %[a2], %[a2], -16 \n\t"
".set pop \n\t"
- : [a] "+r" (a), [c] "+r" (c), [a1] "+r" (a1), [a2] "+r" (a2),
- [c1] "+r" (c1), [c2] "+r" (c2), [wkr] "=&f" (wkr), [wki] "=&f" (wki),
- [xr] "=&f" (xr), [xi] "=&f" (xi), [yr] "=&f" (yr), [yi] "=&f" (yi),
- [aj20] "=&f" (aj20), [aj21] "=&f" (aj21), [ak20] "=&f" (ak20),
- [ak21] "=&f" (ak21), [ck1] "=&f" (ck1)
- : [temp] "f" (temp)
- : "memory", "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8"
+ : [a1] "+r" (a1), [a2] "+r" (a2), [c1] "+r" (c1), [c2] "+r" (c2),
+ [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3), [f4] "=&f" (f4),
+ [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7), [f8] "=&f" (f8),
+ [f9] "=&f" (f9), [f10] "=&f" (f10), [f11] "=&f" (f11), [f12] "=&f" (f12),
+ [f13] "=&f" (f13), [f14] "=&f" (f14), [f15] "=&f" (f15),
+ [count] "=&r" (count)
+ : [f0] "f" (f0)
+ : "memory"
);
}
-static void rftbsub_128_mips(float *a) {
+static void rftbsub_128_mips(float* a) {
const float *c = rdft_w + 32;
- float wkr, wki, xr, xi, yr, yi;
+ const float f0 = 0.5f;
+ float* a1 = &a[2];
+ float* a2 = &a[126];
+ const float* c1 = &c[1];
+ const float* c2 = &c[31];
+ float f1, f2, f3 ,f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15;
+ int count;
+
a[1] = -a[1];
a[65] = -a[65];
- const float temp = 0.5f;
- float aj20=0, aj21=0, ak20=0, ak21=0, ck1=0;
- float *a1 = a;
- float *a2 = a;
- float *c1 = rdft_w + 33;
- float *c2 = c1 + 30;
__asm __volatile (
- ".set push \n\t"
- ".set noreorder \n\t"
- "lwc1 %[aj20], 8(%[a2]) \n\t"
- "lwc1 %[ak20], 504(%[a1]) \n\t"
- "lwc1 %[ck1], 0(%[c2]) \n\t"
- "lwc1 %[aj21], 12(%[a2]) \n\t"
- "lwc1 %[ak21], 508(%[a1]) \n\t"
- "sub.s %[wkr], %[temp], %[ck1] \n\t"
- "sub.s %[xr], %[aj20], %[ak20] \n\t"
- "add.s %[xi], %[aj21], %[ak21] \n\t"
- "lwc1 %[wki], 0(%[c1]) \n\t"
- "addiu %[c2], %[c2], -4 \n\t"
- "mul.s %[yr], %[wkr], %[xr] \n\t"
- "mul.s %[yi], %[wkr], %[xi] \n\t"
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "lwc1 %[f6], 0(%[c2]) \n\t"
+ "lwc1 %[f1], 0(%[a1]) \n\t"
+ "lwc1 %[f2], 0(%[a2]) \n\t"
+ "lwc1 %[f3], 4(%[a1]) \n\t"
+ "lwc1 %[f4], 4(%[a2]) \n\t"
+ "lwc1 %[f5], 0(%[c1]) \n\t"
+ "sub.s %[f6], %[f0], %[f6] \n\t"
+ "sub.s %[f7], %[f1], %[f2] \n\t"
+ "add.s %[f8], %[f3], %[f4] \n\t"
+ "addiu %[count], $zero, 15 \n\t"
+ "mul.s %[f9], %[f6], %[f7] \n\t"
+ "mul.s %[f6], %[f6], %[f8] \n\t"
#if !defined(MIPS32_R2_LE)
- "mul.s %[xi], %[wki], %[xi] \n\t"
- "mul.s %[xr], %[wki], %[xr] \n\t"
- "add.s %[yr], %[yr], %[xi] \n\t"
- "sub.s %[yi], %[yi], %[xr] \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "madd.s %[yr], %[yr], %[wki], %[xi] \n\t"
- "nmsub.s %[yi], %[yi], %[wki], %[xr] \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
- "addiu %[c1], %[c1],4 \n\t"
- "sub.s %[aj20], %[aj20], %[yr] \n\t"
- "sub.s %[aj21], %[yi], %[aj21] \n\t"
- "add.s %[ak20], %[ak20], %[yr] \n\t"
- "sub.s %[ak21], %[yi], %[ak21] \n\t"
- "addiu %[a2], %[a2], 8 \n\t"
- "swc1 %[aj20], 0(%[a2]) \n\t"
- "swc1 %[aj21], 4(%[a2]) \n\t"
- "swc1 %[ak20], 504(%[a1]) \n\t"
- "swc1 %[ak21], 508(%[a1]) \n\t"
- "addiu %[a1], %[a1], -8 \n\t"
- //15x2 passes:
- "1: \n\t"
- "lwc1 %[ck1], 0(%[c2]) \n\t"
- "lwc1 %[aj20], 8(%[a2]) \n\t"
- "lwc1 %[aj21], 12(%[a2]) \n\t"
- "lwc1 %[ak20], 504(%[a1]) \n\t"
- "lwc1 %[ak21], 508(%[a1]) \n\t"
- "lwc1 $f0, -4(%[c2]) \n\t"
- "lwc1 $f2, 16(%[a2]) \n\t"
- "lwc1 $f3, 20(%[a2]) \n\t"
- "lwc1 $f8, 496(%[a1]) \n\t"
- "lwc1 $f7, 500(%[a1]) \n\t"
- "sub.s %[wkr], %[temp], %[ck1] \n\t"
- "sub.s %[xr], %[aj20], %[ak20] \n\t"
- "add.s %[xi], %[aj21], %[ak21] \n\t"
- "lwc1 %[wki], 0(%[c1]) \n\t"
- "sub.s $f0, %[temp], $f0 \n\t"
- "sub.s $f6, $f2, $f8 \n\t"
- "add.s $f4, $f3, $f7 \n\t"
- "lwc1 $f5, 4(%[c1]) \n\t"
- "mul.s %[yr], %[wkr], %[xr] \n\t"
- "mul.s %[yi], %[wkr], %[xi] \n\t"
- "mul.s $f1, $f0, $f6 \n\t"
- "mul.s $f0, $f0, $f4 \n\t"
- "addiu %[c2], %[c2], -8 \n\t"
+ "mul.s %[f8], %[f5], %[f8] \n\t"
+ "mul.s %[f5], %[f5], %[f7] \n\t"
+ "add.s %[f9], %[f9], %[f8] \n\t"
+ "sub.s %[f6], %[f6], %[f5] \n\t"
+#else
+ "madd.s %[f9], %[f9], %[f5], %[f8] \n\t"
+ "nmsub.s %[f6], %[f6], %[f5], %[f7] \n\t"
+#endif
+ "sub.s %[f1], %[f1], %[f9] \n\t"
+ "add.s %[f2], %[f2], %[f9] \n\t"
+ "sub.s %[f3], %[f6], %[f3] \n\t"
+ "sub.s %[f4], %[f6], %[f4] \n\t"
+ "swc1 %[f1], 0(%[a1]) \n\t"
+ "swc1 %[f2], 0(%[a2]) \n\t"
+ "swc1 %[f3], 4(%[a1]) \n\t"
+ "swc1 %[f4], 4(%[a2]) \n\t"
+ "addiu %[a1], %[a1], 8 \n\t"
+ "addiu %[a2], %[a2], -8 \n\t"
+ "addiu %[c1], %[c1], 4 \n\t"
+ "addiu %[c2], %[c2], -4 \n\t"
+ "1: \n\t"
+ "lwc1 %[f6], 0(%[c2]) \n\t"
+ "lwc1 %[f1], 0(%[a1]) \n\t"
+ "lwc1 %[f2], 0(%[a2]) \n\t"
+ "lwc1 %[f3], 4(%[a1]) \n\t"
+ "lwc1 %[f4], 4(%[a2]) \n\t"
+ "lwc1 %[f5], 0(%[c1]) \n\t"
+ "sub.s %[f6], %[f0], %[f6] \n\t"
+ "sub.s %[f7], %[f1], %[f2] \n\t"
+ "add.s %[f8], %[f3], %[f4] \n\t"
+ "lwc1 %[f10], -4(%[c2]) \n\t"
+ "lwc1 %[f11], 8(%[a1]) \n\t"
+ "lwc1 %[f12], -8(%[a2]) \n\t"
+ "mul.s %[f9], %[f6], %[f7] \n\t"
+ "mul.s %[f6], %[f6], %[f8] \n\t"
#if !defined(MIPS32_R2_LE)
- "mul.s %[xi], %[wki], %[xi] \n\t"
- "mul.s %[xr], %[wki], %[xr] \n\t"
- "mul.s $f4, $f5, $f4 \n\t"
- "mul.s $f6, $f5, $f6 \n\t"
- "add.s %[yr], %[yr], %[xi] \n\t"
- "sub.s %[yi], %[yi], %[xr] \n\t"
- "add.s $f1, $f1, $f4 \n\t"
- "sub.s $f0, $f0, $f6 \n\t"
-#else // #if !defined(MIPS32_R2_LE)
- "madd.s %[yr], %[yr], %[wki], %[xi] \n\t"
- "nmsub.s %[yi], %[yi], %[wki], %[xr] \n\t"
- "madd.s $f1, $f1, $f5, $f4 \n\t"
- "nmsub.s $f0, $f0, $f5, $f6 \n\t"
-#endif // #if !defined(MIPS32_R2_LE)
- "addiu %[c1], %[c1], 8 \n\t"
- "sub.s %[aj20], %[aj20], %[yr] \n\t"
- "sub.s %[aj21], %[yi], %[aj21] \n\t"
- "add.s %[ak20], %[ak20], %[yr] \n\t"
- "sub.s %[ak21], %[yi], %[ak21] \n\t"
- "sub.s $f2, $f2, $f1 \n\t"
- "sub.s $f3, $f0, $f3 \n\t"
- "add.s $f1, $f8, $f1 \n\t"
- "sub.s $f0, $f0, $f7 \n\t"
- "swc1 %[aj20], 8(%[a2]) \n\t"
- "swc1 %[aj21], 12(%[a2]) \n\t"
- "swc1 %[ak20], 504(%[a1]) \n\t"
- "swc1 %[ak21], 508(%[a1]) \n\t"
- "swc1 $f2, 16(%[a2]) \n\t"
- "swc1 $f3, 20(%[a2]) \n\t"
- "swc1 $f1, 496(%[a1]) \n\t"
- "swc1 $f0, 500(%[a1]) \n\t"
- "addiu %[a2], %[a2], 16 \n\t"
- "bne %[c2], %[c], 1b \n\t"
- " addiu %[a1], %[a1], -16 \n\t"
- ".set pop \n\t"
- : [a] "+r" (a), [c] "+r" (c), [a1] "+r" (a1), [a2] "+r" (a2),
- [c1] "+r" (c1), [c2] "+r" (c2), [wkr] "=&f" (wkr), [wki] "=&f" (wki),
- [xr] "=&f" (xr), [xi] "=&f" (xi), [yr] "=&f" (yr), [yi] "=&f" (yi),
- [aj20] "=&f" (aj20), [aj21] "=&f" (aj21), [ak20] "=&f" (ak20),
- [ak21] "=&f" (ak21), [ck1] "=&f" (ck1)
- : [temp] "f" (temp)
- : "memory", "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8"
+ "mul.s %[f8], %[f5], %[f8] \n\t"
+ "mul.s %[f5], %[f5], %[f7] \n\t"
+ "lwc1 %[f13], 12(%[a1]) \n\t"
+ "lwc1 %[f14], -4(%[a2]) \n\t"
+ "lwc1 %[f15], 4(%[c1]) \n\t"
+ "add.s %[f9], %[f9], %[f8] \n\t"
+ "sub.s %[f6], %[f6], %[f5] \n\t"
+#else
+ "lwc1 %[f13], 12(%[a1]) \n\t"
+ "lwc1 %[f14], -4(%[a2]) \n\t"
+ "lwc1 %[f15], 4(%[c1]) \n\t"
+ "madd.s %[f9], %[f9], %[f5], %[f8] \n\t"
+ "nmsub.s %[f6], %[f6], %[f5], %[f7] \n\t"
+#endif
+ "sub.s %[f10], %[f0], %[f10] \n\t"
+ "sub.s %[f5], %[f11], %[f12] \n\t"
+ "add.s %[f7], %[f13], %[f14] \n\t"
+ "sub.s %[f1], %[f1], %[f9] \n\t"
+ "add.s %[f2], %[f2], %[f9] \n\t"
+ "sub.s %[f3], %[f6], %[f3] \n\t"
+ "mul.s %[f8], %[f10], %[f5] \n\t"
+ "mul.s %[f10], %[f10], %[f7] \n\t"
+#if !defined(MIPS32_R2_LE)
+ "mul.s %[f9], %[f15], %[f7] \n\t"
+ "mul.s %[f15], %[f15], %[f5] \n\t"
+ "sub.s %[f4], %[f6], %[f4] \n\t"
+ "swc1 %[f1], 0(%[a1]) \n\t"
+ "swc1 %[f2], 0(%[a2]) \n\t"
+ "add.s %[f8], %[f8], %[f9] \n\t"
+ "sub.s %[f10], %[f10], %[f15] \n\t"
+#else
+ "swc1 %[f1], 0(%[a1]) \n\t"
+ "swc1 %[f2], 0(%[a2]) \n\t"
+ "sub.s %[f4], %[f6], %[f4] \n\t"
+ "madd.s %[f8], %[f8], %[f15], %[f7] \n\t"
+ "nmsub.s %[f10], %[f10], %[f15], %[f5] \n\t"
+#endif
+ "swc1 %[f3], 4(%[a1]) \n\t"
+ "swc1 %[f4], 4(%[a2]) \n\t"
+ "sub.s %[f11], %[f11], %[f8] \n\t"
+ "add.s %[f12], %[f12], %[f8] \n\t"
+ "sub.s %[f13], %[f10], %[f13] \n\t"
+ "sub.s %[f14], %[f10], %[f14] \n\t"
+ "addiu %[c2], %[c2], -8 \n\t"
+ "addiu %[c1], %[c1], 8 \n\t"
+ "swc1 %[f11], 8(%[a1]) \n\t"
+ "swc1 %[f12], -8(%[a2]) \n\t"
+ "swc1 %[f13], 12(%[a1]) \n\t"
+ "swc1 %[f14], -4(%[a2]) \n\t"
+ "addiu %[a1], %[a1], 16 \n\t"
+ "addiu %[count], %[count], -1 \n\t"
+ "bgtz %[count], 1b \n\t"
+ " addiu %[a2], %[a2], -16 \n\t"
+ ".set pop \n\t"
+ : [a1] "+r" (a1), [a2] "+r" (a2), [c1] "+r" (c1), [c2] "+r" (c2),
+ [f1] "=&f" (f1), [f2] "=&f" (f2), [f3] "=&f" (f3), [f4] "=&f" (f4),
+ [f5] "=&f" (f5), [f6] "=&f" (f6), [f7] "=&f" (f7), [f8] "=&f" (f8),
+ [f9] "=&f" (f9), [f10] "=&f" (f10), [f11] "=&f" (f11), [f12] "=&f" (f12),
+ [f13] "=&f" (f13), [f14] "=&f" (f14), [f15] "=&f" (f15),
+ [count] "=&r" (count)
+ : [f0] "f" (f0)
+ : "memory"
);
}
diff --git a/modules/audio_processing/aec/aec_rdft_neon.c b/modules/audio_processing/aec/aec_rdft_neon.c
new file mode 100644
index 0000000..43b6a68
--- /dev/null
+++ b/modules/audio_processing/aec/aec_rdft_neon.c
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+/*
+ * The rdft AEC algorithm, neon version of speed-critical functions.
+ *
+ * Based on the sse2 version.
+ */
+
+
+#include "webrtc/modules/audio_processing/aec/aec_rdft.h"
+
+#include <arm_neon.h>
+
+static const ALIGN16_BEG float ALIGN16_END
+ k_swap_sign[4] = {-1.f, 1.f, -1.f, 1.f};
+
+static void cft1st_128_neon(float* a) {
+ const float32x4_t vec_swap_sign = vld1q_f32((float32_t*)k_swap_sign);
+ int j, k2;
+
+ for (k2 = 0, j = 0; j < 128; j += 16, k2 += 4) {
+ float32x4_t a00v = vld1q_f32(&a[j + 0]);
+ float32x4_t a04v = vld1q_f32(&a[j + 4]);
+ float32x4_t a08v = vld1q_f32(&a[j + 8]);
+ float32x4_t a12v = vld1q_f32(&a[j + 12]);
+ float32x4_t a01v = vcombine_f32(vget_low_f32(a00v), vget_low_f32(a08v));
+ float32x4_t a23v = vcombine_f32(vget_high_f32(a00v), vget_high_f32(a08v));
+ float32x4_t a45v = vcombine_f32(vget_low_f32(a04v), vget_low_f32(a12v));
+ float32x4_t a67v = vcombine_f32(vget_high_f32(a04v), vget_high_f32(a12v));
+ const float32x4_t wk1rv = vld1q_f32(&rdft_wk1r[k2]);
+ const float32x4_t wk1iv = vld1q_f32(&rdft_wk1i[k2]);
+ const float32x4_t wk2rv = vld1q_f32(&rdft_wk2r[k2]);
+ const float32x4_t wk2iv = vld1q_f32(&rdft_wk2i[k2]);
+ const float32x4_t wk3rv = vld1q_f32(&rdft_wk3r[k2]);
+ const float32x4_t wk3iv = vld1q_f32(&rdft_wk3i[k2]);
+ float32x4_t x0v = vaddq_f32(a01v, a23v);
+ const float32x4_t x1v = vsubq_f32(a01v, a23v);
+ const float32x4_t x2v = vaddq_f32(a45v, a67v);
+ const float32x4_t x3v = vsubq_f32(a45v, a67v);
+ const float32x4_t x3w = vrev64q_f32(x3v);
+ float32x4_t x0w;
+ a01v = vaddq_f32(x0v, x2v);
+ x0v = vsubq_f32(x0v, x2v);
+ x0w = vrev64q_f32(x0v);
+ a45v = vmulq_f32(wk2rv, x0v);
+ a45v = vmlaq_f32(a45v, wk2iv, x0w);
+ x0v = vmlaq_f32(x1v, x3w, vec_swap_sign);
+ x0w = vrev64q_f32(x0v);
+ a23v = vmulq_f32(wk1rv, x0v);
+ a23v = vmlaq_f32(a23v, wk1iv, x0w);
+ x0v = vmlsq_f32(x1v, x3w, vec_swap_sign);
+ x0w = vrev64q_f32(x0v);
+ a67v = vmulq_f32(wk3rv, x0v);
+ a67v = vmlaq_f32(a67v, wk3iv, x0w);
+ a00v = vcombine_f32(vget_low_f32(a01v), vget_low_f32(a23v));
+ a04v = vcombine_f32(vget_low_f32(a45v), vget_low_f32(a67v));
+ a08v = vcombine_f32(vget_high_f32(a01v), vget_high_f32(a23v));
+ a12v = vcombine_f32(vget_high_f32(a45v), vget_high_f32(a67v));
+ vst1q_f32(&a[j + 0], a00v);
+ vst1q_f32(&a[j + 4], a04v);
+ vst1q_f32(&a[j + 8], a08v);
+ vst1q_f32(&a[j + 12], a12v);
+ }
+}
+
+static void cftmdl_128_neon(float* a) {
+ int j;
+ const int l = 8;
+ const float32x4_t vec_swap_sign = vld1q_f32((float32_t*)k_swap_sign);
+ float32x4_t wk1rv = vld1q_f32(cftmdl_wk1r);
+
+ for (j = 0; j < l; j += 2) {
+ const float32x2_t a_00 = vld1_f32(&a[j + 0]);
+ const float32x2_t a_08 = vld1_f32(&a[j + 8]);
+ const float32x2_t a_32 = vld1_f32(&a[j + 32]);
+ const float32x2_t a_40 = vld1_f32(&a[j + 40]);
+ const float32x4_t a_00_32 = vcombine_f32(a_00, a_32);
+ const float32x4_t a_08_40 = vcombine_f32(a_08, a_40);
+ const float32x4_t x0r0_0i0_0r1_x0i1 = vaddq_f32(a_00_32, a_08_40);
+ const float32x4_t x1r0_1i0_1r1_x1i1 = vsubq_f32(a_00_32, a_08_40);
+ const float32x2_t a_16 = vld1_f32(&a[j + 16]);
+ const float32x2_t a_24 = vld1_f32(&a[j + 24]);
+ const float32x2_t a_48 = vld1_f32(&a[j + 48]);
+ const float32x2_t a_56 = vld1_f32(&a[j + 56]);
+ const float32x4_t a_16_48 = vcombine_f32(a_16, a_48);
+ const float32x4_t a_24_56 = vcombine_f32(a_24, a_56);
+ const float32x4_t x2r0_2i0_2r1_x2i1 = vaddq_f32(a_16_48, a_24_56);
+ const float32x4_t x3r0_3i0_3r1_x3i1 = vsubq_f32(a_16_48, a_24_56);
+ const float32x4_t xx0 = vaddq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);
+ const float32x4_t xx1 = vsubq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);
+ const float32x4_t x3i0_3r0_3i1_x3r1 = vrev64q_f32(x3r0_3i0_3r1_x3i1);
+ const float32x4_t x1_x3_add =
+ vmlaq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);
+ const float32x4_t x1_x3_sub =
+ vmlsq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);
+ const float32x2_t yy0_a = vdup_lane_f32(vget_high_f32(x1_x3_add), 0);
+ const float32x2_t yy0_s = vdup_lane_f32(vget_high_f32(x1_x3_sub), 0);
+ const float32x4_t yy0_as = vcombine_f32(yy0_a, yy0_s);
+ const float32x2_t yy1_a = vdup_lane_f32(vget_high_f32(x1_x3_add), 1);
+ const float32x2_t yy1_s = vdup_lane_f32(vget_high_f32(x1_x3_sub), 1);
+ const float32x4_t yy1_as = vcombine_f32(yy1_a, yy1_s);
+ const float32x4_t yy0 = vmlaq_f32(yy0_as, vec_swap_sign, yy1_as);
+ const float32x4_t yy4 = vmulq_f32(wk1rv, yy0);
+ const float32x4_t xx1_rev = vrev64q_f32(xx1);
+ const float32x4_t yy4_rev = vrev64q_f32(yy4);
+
+ vst1_f32(&a[j + 0], vget_low_f32(xx0));
+ vst1_f32(&a[j + 32], vget_high_f32(xx0));
+ vst1_f32(&a[j + 16], vget_low_f32(xx1));
+ vst1_f32(&a[j + 48], vget_high_f32(xx1_rev));
+
+ a[j + 48] = -a[j + 48];
+
+ vst1_f32(&a[j + 8], vget_low_f32(x1_x3_add));
+ vst1_f32(&a[j + 24], vget_low_f32(x1_x3_sub));
+ vst1_f32(&a[j + 40], vget_low_f32(yy4));
+ vst1_f32(&a[j + 56], vget_high_f32(yy4_rev));
+ }
+
+ {
+ const int k = 64;
+ const int k1 = 2;
+ const int k2 = 2 * k1;
+ const float32x4_t wk2rv = vld1q_f32(&rdft_wk2r[k2 + 0]);
+ const float32x4_t wk2iv = vld1q_f32(&rdft_wk2i[k2 + 0]);
+ const float32x4_t wk1iv = vld1q_f32(&rdft_wk1i[k2 + 0]);
+ const float32x4_t wk3rv = vld1q_f32(&rdft_wk3r[k2 + 0]);
+ const float32x4_t wk3iv = vld1q_f32(&rdft_wk3i[k2 + 0]);
+ wk1rv = vld1q_f32(&rdft_wk1r[k2 + 0]);
+ for (j = k; j < l + k; j += 2) {
+ const float32x2_t a_00 = vld1_f32(&a[j + 0]);
+ const float32x2_t a_08 = vld1_f32(&a[j + 8]);
+ const float32x2_t a_32 = vld1_f32(&a[j + 32]);
+ const float32x2_t a_40 = vld1_f32(&a[j + 40]);
+ const float32x4_t a_00_32 = vcombine_f32(a_00, a_32);
+ const float32x4_t a_08_40 = vcombine_f32(a_08, a_40);
+ const float32x4_t x0r0_0i0_0r1_x0i1 = vaddq_f32(a_00_32, a_08_40);
+ const float32x4_t x1r0_1i0_1r1_x1i1 = vsubq_f32(a_00_32, a_08_40);
+ const float32x2_t a_16 = vld1_f32(&a[j + 16]);
+ const float32x2_t a_24 = vld1_f32(&a[j + 24]);
+ const float32x2_t a_48 = vld1_f32(&a[j + 48]);
+ const float32x2_t a_56 = vld1_f32(&a[j + 56]);
+ const float32x4_t a_16_48 = vcombine_f32(a_16, a_48);
+ const float32x4_t a_24_56 = vcombine_f32(a_24, a_56);
+ const float32x4_t x2r0_2i0_2r1_x2i1 = vaddq_f32(a_16_48, a_24_56);
+ const float32x4_t x3r0_3i0_3r1_x3i1 = vsubq_f32(a_16_48, a_24_56);
+ const float32x4_t xx = vaddq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);
+ const float32x4_t xx1 = vsubq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);
+ const float32x4_t x3i0_3r0_3i1_x3r1 = vrev64q_f32(x3r0_3i0_3r1_x3i1);
+ const float32x4_t x1_x3_add =
+ vmlaq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);
+ const float32x4_t x1_x3_sub =
+ vmlsq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);
+ float32x4_t xx4 = vmulq_f32(wk2rv, xx1);
+ float32x4_t xx12 = vmulq_f32(wk1rv, x1_x3_add);
+ float32x4_t xx22 = vmulq_f32(wk3rv, x1_x3_sub);
+ xx4 = vmlaq_f32(xx4, wk2iv, vrev64q_f32(xx1));
+ xx12 = vmlaq_f32(xx12, wk1iv, vrev64q_f32(x1_x3_add));
+ xx22 = vmlaq_f32(xx22, wk3iv, vrev64q_f32(x1_x3_sub));
+
+ vst1_f32(&a[j + 0], vget_low_f32(xx));
+ vst1_f32(&a[j + 32], vget_high_f32(xx));
+ vst1_f32(&a[j + 16], vget_low_f32(xx4));
+ vst1_f32(&a[j + 48], vget_high_f32(xx4));
+ vst1_f32(&a[j + 8], vget_low_f32(xx12));
+ vst1_f32(&a[j + 40], vget_high_f32(xx12));
+ vst1_f32(&a[j + 24], vget_low_f32(xx22));
+ vst1_f32(&a[j + 56], vget_high_f32(xx22));
+ }
+ }
+}
+
+__inline static float32x4_t reverse_order_f32x4(float32x4_t in) {
+ // A B C D -> C D A B
+ const float32x4_t rev = vcombine_f32(vget_high_f32(in), vget_low_f32(in));
+ // C D A B -> D C B A
+ return vrev64q_f32(rev);
+}
+
+static void rftfsub_128_neon(float* a) {
+ const float* c = rdft_w + 32;
+ int j1, j2;
+ const float32x4_t mm_half = vdupq_n_f32(0.5f);
+
+ // Vectorized code (four at once).
+ // Note: commented number are indexes for the first iteration of the loop.
+ for (j1 = 1, j2 = 2; j2 + 7 < 64; j1 += 4, j2 += 8) {
+ // Load 'wk'.
+ const float32x4_t c_j1 = vld1q_f32(&c[j1]); // 1, 2, 3, 4,
+ const float32x4_t c_k1 = vld1q_f32(&c[29 - j1]); // 28, 29, 30, 31,
+ const float32x4_t wkrt = vsubq_f32(mm_half, c_k1); // 28, 29, 30, 31,
+ const float32x4_t wkr_ = reverse_order_f32x4(wkrt); // 31, 30, 29, 28,
+ const float32x4_t wki_ = c_j1; // 1, 2, 3, 4,
+ // Load and shuffle 'a'.
+ // 2, 4, 6, 8, 3, 5, 7, 9
+ float32x4x2_t a_j2_p = vld2q_f32(&a[0 + j2]);
+ // 120, 122, 124, 126, 121, 123, 125, 127,
+ const float32x4x2_t k2_0_4 = vld2q_f32(&a[122 - j2]);
+ // 126, 124, 122, 120
+ const float32x4_t a_k2_p0 = reverse_order_f32x4(k2_0_4.val[0]);
+ // 127, 125, 123, 121
+ const float32x4_t a_k2_p1 = reverse_order_f32x4(k2_0_4.val[1]);
+ // Calculate 'x'.
+ const float32x4_t xr_ = vsubq_f32(a_j2_p.val[0], a_k2_p0);
+ // 2-126, 4-124, 6-122, 8-120,
+ const float32x4_t xi_ = vaddq_f32(a_j2_p.val[1], a_k2_p1);
+ // 3-127, 5-125, 7-123, 9-121,
+ // Calculate product into 'y'.
+ // yr = wkr * xr - wki * xi;
+ // yi = wkr * xi + wki * xr;
+ const float32x4_t a_ = vmulq_f32(wkr_, xr_);
+ const float32x4_t b_ = vmulq_f32(wki_, xi_);
+ const float32x4_t c_ = vmulq_f32(wkr_, xi_);
+ const float32x4_t d_ = vmulq_f32(wki_, xr_);
+ const float32x4_t yr_ = vsubq_f32(a_, b_); // 2-126, 4-124, 6-122, 8-120,
+ const float32x4_t yi_ = vaddq_f32(c_, d_); // 3-127, 5-125, 7-123, 9-121,
+ // Update 'a'.
+ // a[j2 + 0] -= yr;
+ // a[j2 + 1] -= yi;
+ // a[k2 + 0] += yr;
+ // a[k2 + 1] -= yi;
+ // 126, 124, 122, 120,
+ const float32x4_t a_k2_p0n = vaddq_f32(a_k2_p0, yr_);
+ // 127, 125, 123, 121,
+ const float32x4_t a_k2_p1n = vsubq_f32(a_k2_p1, yi_);
+ // Shuffle in right order and store.
+ const float32x4_t a_k2_p0nr = vrev64q_f32(a_k2_p0n);
+ const float32x4_t a_k2_p1nr = vrev64q_f32(a_k2_p1n);
+ // 124, 125, 126, 127, 120, 121, 122, 123
+ const float32x4x2_t a_k2_n = vzipq_f32(a_k2_p0nr, a_k2_p1nr);
+ // 2, 4, 6, 8,
+ a_j2_p.val[0] = vsubq_f32(a_j2_p.val[0], yr_);
+ // 3, 5, 7, 9,
+ a_j2_p.val[1] = vsubq_f32(a_j2_p.val[1], yi_);
+ // 2, 3, 4, 5, 6, 7, 8, 9,
+ vst2q_f32(&a[0 + j2], a_j2_p);
+
+ vst1q_f32(&a[122 - j2], a_k2_n.val[1]);
+ vst1q_f32(&a[126 - j2], a_k2_n.val[0]);
+ }
+
+ // Scalar code for the remaining items.
+ for (; j2 < 64; j1 += 1, j2 += 2) {
+ const int k2 = 128 - j2;
+ const int k1 = 32 - j1;
+ const float wkr = 0.5f - c[k1];
+ const float wki = c[j1];
+ const float xr = a[j2 + 0] - a[k2 + 0];
+ const float xi = a[j2 + 1] + a[k2 + 1];
+ const float yr = wkr * xr - wki * xi;
+ const float yi = wkr * xi + wki * xr;
+ a[j2 + 0] -= yr;
+ a[j2 + 1] -= yi;
+ a[k2 + 0] += yr;
+ a[k2 + 1] -= yi;
+ }
+}
+
+static void rftbsub_128_neon(float* a) {
+ const float* c = rdft_w + 32;
+ int j1, j2;
+ const float32x4_t mm_half = vdupq_n_f32(0.5f);
+
+ a[1] = -a[1];
+ // Vectorized code (four at once).
+ // Note: commented number are indexes for the first iteration of the loop.
+ for (j1 = 1, j2 = 2; j2 + 7 < 64; j1 += 4, j2 += 8) {
+ // Load 'wk'.
+ const float32x4_t c_j1 = vld1q_f32(&c[j1]); // 1, 2, 3, 4,
+ const float32x4_t c_k1 = vld1q_f32(&c[29 - j1]); // 28, 29, 30, 31,
+ const float32x4_t wkrt = vsubq_f32(mm_half, c_k1); // 28, 29, 30, 31,
+ const float32x4_t wkr_ = reverse_order_f32x4(wkrt); // 31, 30, 29, 28,
+ const float32x4_t wki_ = c_j1; // 1, 2, 3, 4,
+ // Load and shuffle 'a'.
+ // 2, 4, 6, 8, 3, 5, 7, 9
+ float32x4x2_t a_j2_p = vld2q_f32(&a[0 + j2]);
+ // 120, 122, 124, 126, 121, 123, 125, 127,
+ const float32x4x2_t k2_0_4 = vld2q_f32(&a[122 - j2]);
+ // 126, 124, 122, 120
+ const float32x4_t a_k2_p0 = reverse_order_f32x4(k2_0_4.val[0]);
+ // 127, 125, 123, 121
+ const float32x4_t a_k2_p1 = reverse_order_f32x4(k2_0_4.val[1]);
+ // Calculate 'x'.
+ const float32x4_t xr_ = vsubq_f32(a_j2_p.val[0], a_k2_p0);
+ // 2-126, 4-124, 6-122, 8-120,
+ const float32x4_t xi_ = vaddq_f32(a_j2_p.val[1], a_k2_p1);
+ // 3-127, 5-125, 7-123, 9-121,
+ // Calculate product into 'y'.
+ // yr = wkr * xr - wki * xi;
+ // yi = wkr * xi + wki * xr;
+ const float32x4_t a_ = vmulq_f32(wkr_, xr_);
+ const float32x4_t b_ = vmulq_f32(wki_, xi_);
+ const float32x4_t c_ = vmulq_f32(wkr_, xi_);
+ const float32x4_t d_ = vmulq_f32(wki_, xr_);
+ const float32x4_t yr_ = vaddq_f32(a_, b_); // 2-126, 4-124, 6-122, 8-120,
+ const float32x4_t yi_ = vsubq_f32(c_, d_); // 3-127, 5-125, 7-123, 9-121,
+ // Update 'a'.
+ // a[j2 + 0] -= yr;
+ // a[j2 + 1] -= yi;
+ // a[k2 + 0] += yr;
+ // a[k2 + 1] -= yi;
+ // 126, 124, 122, 120,
+ const float32x4_t a_k2_p0n = vaddq_f32(a_k2_p0, yr_);
+ // 127, 125, 123, 121,
+ const float32x4_t a_k2_p1n = vsubq_f32(yi_, a_k2_p1);
+ // Shuffle in right order and store.
+ // 2, 3, 4, 5, 6, 7, 8, 9,
+ const float32x4_t a_k2_p0nr = vrev64q_f32(a_k2_p0n);
+ const float32x4_t a_k2_p1nr = vrev64q_f32(a_k2_p1n);
+ // 124, 125, 126, 127, 120, 121, 122, 123
+ const float32x4x2_t a_k2_n = vzipq_f32(a_k2_p0nr, a_k2_p1nr);
+ // 2, 4, 6, 8,
+ a_j2_p.val[0] = vsubq_f32(a_j2_p.val[0], yr_);
+ // 3, 5, 7, 9,
+ a_j2_p.val[1] = vsubq_f32(yi_, a_j2_p.val[1]);
+ // 2, 3, 4, 5, 6, 7, 8, 9,
+ vst2q_f32(&a[0 + j2], a_j2_p);
+
+ vst1q_f32(&a[122 - j2], a_k2_n.val[1]);
+ vst1q_f32(&a[126 - j2], a_k2_n.val[0]);
+ }
+
+ // Scalar code for the remaining items.
+ for (; j2 < 64; j1 += 1, j2 += 2) {
+ const int k2 = 128 - j2;
+ const int k1 = 32 - j1;
+ const float wkr = 0.5f - c[k1];
+ const float wki = c[j1];
+ const float xr = a[j2 + 0] - a[k2 + 0];
+ const float xi = a[j2 + 1] + a[k2 + 1];
+ const float yr = wkr * xr + wki * xi;
+ const float yi = wkr * xi - wki * xr;
+ a[j2 + 0] = a[j2 + 0] - yr;
+ a[j2 + 1] = yi - a[j2 + 1];
+ a[k2 + 0] = yr + a[k2 + 0];
+ a[k2 + 1] = yi - a[k2 + 1];
+ }
+ a[65] = -a[65];
+}
+
+void aec_rdft_init_neon(void) {
+ cft1st_128 = cft1st_128_neon;
+ cftmdl_128 = cftmdl_128_neon;
+ rftfsub_128 = rftfsub_128_neon;
+ rftbsub_128 = rftbsub_128_neon;
+}
+
diff --git a/modules/audio_processing/aec/aec_resampler.c b/modules/audio_processing/aec/aec_resampler.c
index 5382665..469b811 100644
--- a/modules/audio_processing/aec/aec_resampler.c
+++ b/modules/audio_processing/aec/aec_resampler.c
@@ -26,7 +26,7 @@
};
typedef struct {
- short buffer[kResamplerBufferSize];
+ float buffer[kResamplerBufferSize];
float position;
int deviceSampleRateHz;
@@ -71,15 +71,15 @@
}
void WebRtcAec_ResampleLinear(void* resampInst,
- const short* inspeech,
+ const float* inspeech,
int size,
float skew,
- short* outspeech,
+ float* outspeech,
int* size_out) {
resampler_t* obj = (resampler_t*)resampInst;
- short* y;
- float be, tnew, interp;
+ float* y;
+ float be, tnew;
int tn, mm;
assert(!(size < 0 || size > 2 * FRAME_LEN));
@@ -91,7 +91,7 @@
// Add new frame data in lookahead
memcpy(&obj->buffer[FRAME_LEN + kResamplingDelay],
inspeech,
- size * sizeof(short));
+ size * sizeof(inspeech[0]));
// Sample rate ratio
be = 1 + skew;
@@ -106,15 +106,7 @@
while (tn < size) {
// Interpolation
- interp = y[tn] + (tnew - tn) * (y[tn + 1] - y[tn]);
-
- if (interp > 32767) {
- interp = 32767;
- } else if (interp < -32768) {
- interp = -32768;
- }
-
- outspeech[mm] = (short)interp;
+ outspeech[mm] = y[tn] + (tnew - tn) * (y[tn + 1] - y[tn]);
mm++;
tnew = be * mm + obj->position;
@@ -127,7 +119,7 @@
// Shift buffer
memmove(obj->buffer,
&obj->buffer[size],
- (kResamplerBufferSize - size) * sizeof(short));
+ (kResamplerBufferSize - size) * sizeof(obj->buffer[0]));
}
int WebRtcAec_GetSkew(void* resampInst, int rawSkew, float* skewEst) {
diff --git a/modules/audio_processing/aec/aec_resampler.h b/modules/audio_processing/aec/aec_resampler.h
index e42c056..73e2821 100644
--- a/modules/audio_processing/aec/aec_resampler.h
+++ b/modules/audio_processing/aec/aec_resampler.h
@@ -30,10 +30,10 @@
// Resamples input using linear interpolation.
void WebRtcAec_ResampleLinear(void* resampInst,
- const short* inspeech,
+ const float* inspeech,
int size,
float skew,
- short* outspeech,
+ float* outspeech,
int* size_out);
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
diff --git a/modules/audio_processing/aec/echo_cancellation.c b/modules/audio_processing/aec/echo_cancellation.c
index ba3b924..e9e50dc 100644
--- a/modules/audio_processing/aec/echo_cancellation.c
+++ b/modules/audio_processing/aec/echo_cancellation.c
@@ -66,14 +66,14 @@
// GTP/Linux(ChromeOS): TBD, but for the moment we will trust the values.
#if defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_MAC)
#define WEBRTC_UNTRUSTED_DELAY
+#endif
-#if defined(WEBRTC_MAC)
+#if defined(WEBRTC_UNTRUSTED_DELAY) && defined(WEBRTC_MAC)
static const int kDelayDiffOffsetSamples = -160;
#else
// Not enabled for now.
static const int kDelayDiffOffsetSamples = 0;
#endif
-#endif
#if defined(WEBRTC_MAC)
static const int kFixedDelayMs = 20;
@@ -158,13 +158,6 @@
aecpc->lastError = 0;
#ifdef WEBRTC_AEC_DEBUG_DUMP
- aecpc->far_pre_buf_s16 =
- WebRtc_CreateBuffer(PART_LEN2 + kResamplerBufferSize, sizeof(int16_t));
- if (!aecpc->far_pre_buf_s16) {
- WebRtcAec_Free(aecpc);
- aecpc = NULL;
- return -1;
- }
{
char filename[64];
sprintf(filename, "aec_buf%d.dat", webrtc_aec_instance_count);
@@ -190,7 +183,6 @@
WebRtc_FreeBuffer(aecpc->far_pre_buf);
#ifdef WEBRTC_AEC_DEBUG_DUMP
- WebRtc_FreeBuffer(aecpc->far_pre_buf_s16);
fclose(aecpc->bufFile);
fclose(aecpc->skewFile);
fclose(aecpc->delayFile);
@@ -281,30 +273,17 @@
return -1;
}
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- if (WebRtc_InitBuffer(aecpc->far_pre_buf_s16) == -1) {
- aecpc->lastError = AEC_UNSPECIFIED_ERROR;
- return -1;
- }
- WebRtc_MoveReadPtr(aecpc->far_pre_buf_s16, -PART_LEN); // Start overlap.
-#endif
-
return 0;
}
// only buffer L band for farend
int32_t WebRtcAec_BufferFarend(void* aecInst,
- const int16_t* farend,
+ const float* farend,
int16_t nrOfSamples) {
aecpc_t* aecpc = aecInst;
- int32_t retVal = 0;
int newNrOfSamples = (int)nrOfSamples;
- short newFarend[MAX_RESAMP_LEN];
- const int16_t* farend_ptr = farend;
- float tmp_farend[MAX_RESAMP_LEN];
- const float* farend_float = tmp_farend;
- float skew;
- int i = 0;
+ float new_farend[MAX_RESAMP_LEN];
+ const float* farend_ptr = farend;
if (farend == NULL) {
aecpc->lastError = AEC_NULL_POINTER_ERROR;
@@ -322,53 +301,43 @@
return -1;
}
- skew = aecpc->skew;
-
if (aecpc->skewMode == kAecTrue && aecpc->resample == kAecTrue) {
// Resample and get a new number of samples
WebRtcAec_ResampleLinear(aecpc->resampler,
farend,
nrOfSamples,
- skew,
- newFarend,
+ aecpc->skew,
+ new_farend,
&newNrOfSamples);
- farend_ptr = (const int16_t*)newFarend;
+ farend_ptr = new_farend;
}
aecpc->farend_started = 1;
WebRtcAec_SetSystemDelay(aecpc->aec,
WebRtcAec_system_delay(aecpc->aec) + newNrOfSamples);
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- WebRtc_WriteBuffer(
- aecpc->far_pre_buf_s16, farend_ptr, (size_t)newNrOfSamples);
-#endif
- // Cast to float and write the time-domain data to |far_pre_buf|.
- for (i = 0; i < newNrOfSamples; i++) {
- tmp_farend[i] = (float)farend_ptr[i];
- }
- WebRtc_WriteBuffer(aecpc->far_pre_buf, farend_float, (size_t)newNrOfSamples);
+ // Write the time-domain data to |far_pre_buf|.
+ WebRtc_WriteBuffer(aecpc->far_pre_buf, farend_ptr, (size_t)newNrOfSamples);
// Transform to frequency domain if we have enough data.
while (WebRtc_available_read(aecpc->far_pre_buf) >= PART_LEN2) {
// We have enough data to pass to the FFT, hence read PART_LEN2 samples.
- WebRtc_ReadBuffer(
- aecpc->far_pre_buf, (void**)&farend_float, tmp_farend, PART_LEN2);
-
- WebRtcAec_BufferFarendPartition(aecpc->aec, farend_float);
+ {
+ float* ptmp;
+ float tmp[PART_LEN2];
+ WebRtc_ReadBuffer(aecpc->far_pre_buf, (void**)&ptmp, tmp, PART_LEN2);
+ WebRtcAec_BufferFarendPartition(aecpc->aec, ptmp);
+#ifdef WEBRTC_AEC_DEBUG_DUMP
+ WebRtc_WriteBuffer(
+ WebRtcAec_far_time_buf(aecpc->aec), &ptmp[PART_LEN], 1);
+#endif
+ }
// Rewind |far_pre_buf| PART_LEN samples for overlap before continuing.
WebRtc_MoveReadPtr(aecpc->far_pre_buf, -PART_LEN);
-#ifdef WEBRTC_AEC_DEBUG_DUMP
- WebRtc_ReadBuffer(
- aecpc->far_pre_buf_s16, (void**)&farend_ptr, newFarend, PART_LEN2);
- WebRtc_WriteBuffer(
- WebRtcAec_far_time_buf(aecpc->aec), &farend_ptr[PART_LEN], 1);
- WebRtc_MoveReadPtr(aecpc->far_pre_buf_s16, -PART_LEN);
-#endif
}
- return retVal;
+ return 0;
}
int32_t WebRtcAec_Process(void* aecInst,
@@ -798,12 +767,11 @@
int32_t skew) {
int i;
const int num_frames = num_samples / FRAME_LEN;
-#if defined(WEBRTC_UNTRUSTED_DELAY)
const int delay_diff_offset = kDelayDiffOffsetSamples;
+#if defined(WEBRTC_UNTRUSTED_DELAY)
reported_delay_ms = kFixedDelayMs;
#else
// This is the usual mode where we trust the reported system delay values.
- const int delay_diff_offset = 0;
// Due to the longer filter, we no longer add 10 ms to the reported delay
// to reduce chance of non-causality. Instead we apply a minimum here to avoid
// issues with the read pointer jumping around needlessly.
diff --git a/modules/audio_processing/aec/echo_cancellation_internal.h b/modules/audio_processing/aec/echo_cancellation_internal.h
index e939c42..91f8bab 100644
--- a/modules/audio_processing/aec/echo_cancellation_internal.h
+++ b/modules/audio_processing/aec/echo_cancellation_internal.h
@@ -42,7 +42,6 @@
short lastDelayDiff;
#ifdef WEBRTC_AEC_DEBUG_DUMP
- RingBuffer* far_pre_buf_s16; // Time domain far-end pre-buffer in int16_t.
FILE* bufFile;
FILE* delayFile;
FILE* skewFile;
diff --git a/modules/audio_processing/aec/include/echo_cancellation.h b/modules/audio_processing/aec/include/echo_cancellation.h
index dc64a34..0cf6a5a 100644
--- a/modules/audio_processing/aec/include/echo_cancellation.h
+++ b/modules/audio_processing/aec/include/echo_cancellation.h
@@ -114,7 +114,7 @@
* Inputs Description
* -------------------------------------------------------------------
* void* aecInst Pointer to the AEC instance
- * int16_t* farend In buffer containing one frame of
+ * const float* farend In buffer containing one frame of
* farend signal for L band
* int16_t nrOfSamples Number of samples in farend buffer
*
@@ -124,7 +124,7 @@
* -1: error
*/
int32_t WebRtcAec_BufferFarend(void* aecInst,
- const int16_t* farend,
+ const float* farend,
int16_t nrOfSamples);
/*
diff --git a/modules/audio_processing/aec/system_delay_unittest.cc b/modules/audio_processing/aec/system_delay_unittest.cc
index a13d476..f81ce47 100644
--- a/modules/audio_processing/aec/system_delay_unittest.cc
+++ b/modules/audio_processing/aec/system_delay_unittest.cc
@@ -47,7 +47,7 @@
int samples_per_frame_;
// Dummy input/output speech data.
static const int kSamplesPerChunk = 160;
- int16_t far_[kSamplesPerChunk];
+ float far_[kSamplesPerChunk];
float near_[kSamplesPerChunk];
float out_[kSamplesPerChunk];
};
@@ -55,9 +55,10 @@
SystemDelayTest::SystemDelayTest()
: handle_(NULL), self_(NULL), samples_per_frame_(0) {
// Dummy input data are set with more or less arbitrary non-zero values.
- memset(far_, 1, sizeof(far_));
- for (int i = 0; i < kSamplesPerChunk; i++)
+ for (int i = 0; i < kSamplesPerChunk; i++) {
+ far_[i] = 257.0;
near_[i] = 514.0;
+ }
memset(out_, 0, sizeof(out_));
}
@@ -248,7 +249,8 @@
}
}
-TEST_F(SystemDelayTest, CorrectDelayAfterStableBufferBuildUp) {
+TEST_F(SystemDelayTest,
+ DISABLED_ON_ANDROID(CorrectDelayAfterStableBufferBuildUp)) {
// In this test we start by establishing the device buffer size during stable
// conditions, but with an empty internal far-end buffer. Once that is done we
// verify that the system delay is increased correctly until we have reach an
@@ -332,7 +334,7 @@
}
}
-TEST_F(SystemDelayTest, CorrectDelayDuringDrift) {
+TEST_F(SystemDelayTest, DISABLED_ON_ANDROID(CorrectDelayDuringDrift)) {
// This drift test should verify that the system delay is never exceeding the
// device buffer. The drift is simulated by decreasing the reported device
// buffer size by 1 ms every 100 ms. If the device buffer size goes below 30
@@ -366,7 +368,7 @@
}
}
-TEST_F(SystemDelayTest, ShouldRecoverAfterGlitch) {
+TEST_F(SystemDelayTest, DISABLED_ON_ANDROID(ShouldRecoverAfterGlitch)) {
// This glitch test should verify that the system delay recovers if there is
// a glitch in data. The data glitch is constructed as 200 ms of buffering
// after which the stable procedure continues. The glitch is never reported by
diff --git a/modules/audio_processing/aecm/Android.mk b/modules/audio_processing/aecm/Android.mk
deleted file mode 100644
index fc11383..0000000
--- a/modules/audio_processing/aecm/Android.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-#############################
-# Build the non-neon library.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_aecm
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- echo_control_mobile.c \
- aecm_core.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../utility \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- $(LOCAL_PATH)/../../../system_wrappers/interface \
- external/webrtc
-
-LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-#########################
-# Build the neon library.
-ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_aecm_neon
-LOCAL_MODULE_TAGS := optional
-
-AECM_ASM_HEADER := $(intermediates)/aecm_core_neon_offsets.h
-AECM_ASM_HEADER_DIR := $(intermediates)
-
-# Generate a header file aecm_core_neon_offsets.h which will be included in
-# assembly file aecm_core_neon.S, from file aecm_core_neon_offsets.c.
-$(AECM_ASM_HEADER): $(LOCAL_PATH)/../../../build/generate_asm_header.py \
- $(LOCAL_PATH)/aecm_core_neon_offsets.c
- @python $^ --compiler=$(TARGET_CC) --options="$(addprefix -I, \
- $(LOCAL_INCLUDES)) $(addprefix -isystem , $(TARGET_C_INCLUDES)) -S" \
- --dir=$(AECM_ASM_HEADER_DIR)
-
-LOCAL_GENERATED_SOURCES := $(AECM_ASM_HEADER)
-LOCAL_SRC_FILES := aecm_core_neon.S
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- -mfpu=neon \
- -mfloat-abi=softfp \
- -flax-vector-conversions
-
-LOCAL_C_INCLUDES := \
- $(AECM_ASM_HEADER_DIR) \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- external/webrtc
-
-LOCAL_INCLUDES := $(LOCAL_C_INCLUDES)
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
diff --git a/modules/audio_processing/aecm/aecm_core.c b/modules/audio_processing/aecm/aecm_core.c
index 0f34874..340eacf 100644
--- a/modules/audio_processing/aecm/aecm_core.c
+++ b/modules/audio_processing/aecm/aecm_core.c
@@ -330,8 +330,7 @@
echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],
far_spectrum[i]);
(*far_energy) += (uint32_t)(far_spectrum[i]);
- (*echo_energy_adapt) += WEBRTC_SPL_UMUL_16_16(aecm->channelAdapt16[i],
- far_spectrum[i]);
+ *echo_energy_adapt += aecm->channelAdapt16[i] * far_spectrum[i];
(*echo_energy_stored) += (uint32_t)echo_est[i];
}
}
@@ -706,6 +705,15 @@
return retVal;
}
+// ExtractFractionPart(a, zeros)
+//
+// returns the fraction part of |a|, with |zeros| number of leading zeros, as an
+// int16_t scaled to Q8. There is no sanity check of |a| in the sense that the
+// number of zeros match.
+static int16_t ExtractFractionPart(uint32_t a, int zeros) {
+ return (int16_t)(((a << zeros) & 0x7FFFFFFF) >> 23);
+}
+
// WebRtcAecm_CalcEnergies(...)
//
// This function calculates the log of energies for nearend, farend and estimated
@@ -751,9 +759,7 @@
if (nearEner)
{
zeros = WebRtcSpl_NormU32(nearEner);
- frac = (int16_t)WEBRTC_SPL_RSHIFT_U32(
- (WEBRTC_SPL_LSHIFT_U32(nearEner, zeros) & 0x7FFFFFFF),
- 23);
+ frac = ExtractFractionPart(nearEner, zeros);
// log2 in Q8
tmp16 += WEBRTC_SPL_LSHIFT_W16((31 - zeros), 8) + frac;
tmp16 -= WEBRTC_SPL_LSHIFT_W16(aecm->dfaNoisyQDomain, 8);
@@ -774,8 +780,7 @@
if (tmpFar)
{
zeros = WebRtcSpl_NormU32(tmpFar);
- frac = (int16_t)WEBRTC_SPL_RSHIFT_U32((WEBRTC_SPL_LSHIFT_U32(tmpFar, zeros)
- & 0x7FFFFFFF), 23);
+ frac = ExtractFractionPart(tmpFar, zeros);
// log2 in Q8
tmp16 += WEBRTC_SPL_LSHIFT_W16((31 - zeros), 8) + frac;
tmp16 -= WEBRTC_SPL_LSHIFT_W16(far_q, 8);
@@ -787,8 +792,7 @@
if (tmpAdapt)
{
zeros = WebRtcSpl_NormU32(tmpAdapt);
- frac = (int16_t)WEBRTC_SPL_RSHIFT_U32((WEBRTC_SPL_LSHIFT_U32(tmpAdapt, zeros)
- & 0x7FFFFFFF), 23);
+ frac = ExtractFractionPart(tmpAdapt, zeros);
//log2 in Q8
tmp16 += WEBRTC_SPL_LSHIFT_W16((31 - zeros), 8) + frac;
tmp16 -= WEBRTC_SPL_LSHIFT_W16(RESOLUTION_CHANNEL16 + far_q, 8);
@@ -800,8 +804,7 @@
if (tmpStored)
{
zeros = WebRtcSpl_NormU32(tmpStored);
- frac = (int16_t)WEBRTC_SPL_RSHIFT_U32((WEBRTC_SPL_LSHIFT_U32(tmpStored, zeros)
- & 0x7FFFFFFF), 23);
+ frac = ExtractFractionPart(tmpStored, zeros);
//log2 in Q8
tmp16 += WEBRTC_SPL_LSHIFT_W16((31 - zeros), 8) + frac;
tmp16 -= WEBRTC_SPL_LSHIFT_W16(RESOLUTION_CHANNEL16 + far_q, 8);
@@ -1067,8 +1070,8 @@
{
tmp32no2 = WEBRTC_SPL_SHIFT_W32(tmp32no2, shift2ResChan);
}
- aecm->channelAdapt32[i] = WEBRTC_SPL_ADD_SAT_W32(aecm->channelAdapt32[i],
- tmp32no2);
+ aecm->channelAdapt32[i] =
+ WebRtcSpl_AddSatW32(aecm->channelAdapt32[i], tmp32no2);
if (aecm->channelAdapt32[i] < 0)
{
// We can never have negative channel gain
diff --git a/modules/audio_processing/aecm/aecm_core_c.c b/modules/audio_processing/aecm/aecm_core_c.c
index f8491e9..c1cc7eb 100644
--- a/modules/audio_processing/aecm/aecm_core_c.c
+++ b/modules/audio_processing/aecm/aecm_core_c.c
@@ -270,7 +270,7 @@
tmp16no2 = WEBRTC_SPL_ABS_W16(freq_signal[i].imag);
tmp32no1 = WEBRTC_SPL_MUL_16_16(tmp16no1, tmp16no1);
tmp32no2 = WEBRTC_SPL_MUL_16_16(tmp16no2, tmp16no2);
- tmp32no2 = WEBRTC_SPL_ADD_SAT_W32(tmp32no1, tmp32no2);
+ tmp32no2 = WebRtcSpl_AddSatW32(tmp32no1, tmp32no2);
#endif // WEBRTC_ARCH_ARM_V7
tmp32no1 = WebRtcSpl_SqrtFloor(tmp32no2);
@@ -328,7 +328,7 @@
int16_t zeros32, zeros16;
int16_t zerosDBufNoisy, zerosDBufClean, zerosXBuf;
int far_q;
- int16_t resolutionDiff, qDomainDiff;
+ int16_t resolutionDiff, qDomainDiff, dfa_clean_q_domain_diff;
const int kMinPrefBand = 4;
const int kMaxPrefBand = 24;
@@ -460,8 +460,7 @@
// Far end signal through channel estimate in Q8
// How much can we shift right to preserve resolution
tmp32no1 = echoEst32[i] - aecm->echoFilt[i];
- aecm->echoFilt[i] += WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL_32_16(tmp32no1,
- 50), 8);
+ aecm->echoFilt[i] += (tmp32no1 * 50) >> 8;
zeros32 = WebRtcSpl_NormW32(aecm->echoFilt[i]) + 1;
zeros16 = WebRtcSpl_NormW16(supGain) + 1;
@@ -499,29 +498,28 @@
}
zeros16 = WebRtcSpl_NormW16(aecm->nearFilt[i]);
- if ((zeros16 < (aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld))
- & (aecm->nearFilt[i]))
- {
- tmp16no1 = WEBRTC_SPL_SHIFT_W16(aecm->nearFilt[i], zeros16);
- qDomainDiff = zeros16 - aecm->dfaCleanQDomain + aecm->dfaCleanQDomainOld;
- } else
- {
- tmp16no1 = WEBRTC_SPL_SHIFT_W16(aecm->nearFilt[i],
- aecm->dfaCleanQDomain -
- aecm->dfaCleanQDomainOld);
+ assert(zeros16 >= 0); // |zeros16| is a norm, hence non-negative.
+ dfa_clean_q_domain_diff = aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld;
+ if (zeros16 < dfa_clean_q_domain_diff && aecm->nearFilt[i]) {
+ tmp16no1 = aecm->nearFilt[i] << zeros16;
+ qDomainDiff = zeros16 - dfa_clean_q_domain_diff;
+ tmp16no2 = ptrDfaClean[i] >> -qDomainDiff;
+ } else {
+ tmp16no1 = dfa_clean_q_domain_diff < 0
+ ? aecm->nearFilt[i] >> -dfa_clean_q_domain_diff
+ : aecm->nearFilt[i] << dfa_clean_q_domain_diff;
qDomainDiff = 0;
+ tmp16no2 = ptrDfaClean[i];
}
- tmp16no2 = WEBRTC_SPL_SHIFT_W16(ptrDfaClean[i], qDomainDiff);
tmp32no1 = (int32_t)(tmp16no2 - tmp16no1);
tmp16no2 = (int16_t)WEBRTC_SPL_RSHIFT_W32(tmp32no1, 4);
tmp16no2 += tmp16no1;
zeros16 = WebRtcSpl_NormW16(tmp16no2);
- if ((tmp16no2) & (-qDomainDiff > zeros16))
- {
+ if ((tmp16no2) & (-qDomainDiff > zeros16)) {
aecm->nearFilt[i] = WEBRTC_SPL_WORD16_MAX;
- } else
- {
- aecm->nearFilt[i] = WEBRTC_SPL_SHIFT_W16(tmp16no2, -qDomainDiff);
+ } else {
+ aecm->nearFilt[i] = qDomainDiff < 0 ? tmp16no2 << -qDomainDiff
+ : tmp16no2 >> qDomainDiff;
}
// Wiener filter coefficients, resulting hnl in Q14
@@ -785,8 +783,8 @@
for (i = 0; i < PART_LEN1; i++)
{
- out[i].real = WEBRTC_SPL_ADD_SAT_W16(out[i].real, uReal[i]);
- out[i].imag = WEBRTC_SPL_ADD_SAT_W16(out[i].imag, uImag[i]);
+ out[i].real = WebRtcSpl_AddSatW16(out[i].real, uReal[i]);
+ out[i].imag = WebRtcSpl_AddSatW16(out[i].imag, uImag[i]);
}
}
diff --git a/modules/audio_processing/aecm/aecm_core_mips.c b/modules/audio_processing/aecm/aecm_core_mips.c
index 6a231b3..909a52e 100644
--- a/modules/audio_processing/aecm/aecm_core_mips.c
+++ b/modules/audio_processing/aecm/aecm_core_mips.c
@@ -512,8 +512,7 @@
echo_est[PART_LEN] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[PART_LEN],
far_spectrum[PART_LEN]);
par1 += (uint32_t)(far_spectrum[PART_LEN]);
- par2 += WEBRTC_SPL_UMUL_16_16(aecm->channelAdapt16[PART_LEN],
- far_spectrum[PART_LEN]);
+ par2 += aecm->channelAdapt16[PART_LEN] * far_spectrum[PART_LEN];
par3 += (uint32_t)echo_est[PART_LEN];
(*far_energy) = par1;
@@ -693,7 +692,7 @@
tmp16no2 = WEBRTC_SPL_ABS_W16(freq_signal[i].imag);
tmp32no1 = WEBRTC_SPL_MUL_16_16(tmp16no1, tmp16no1);
tmp32no2 = WEBRTC_SPL_MUL_16_16(tmp16no2, tmp16no2);
- tmp32no2 = WEBRTC_SPL_ADD_SAT_W32(tmp32no1, tmp32no2);
+ tmp32no2 = WebRtcSpl_AddSatW32(tmp32no1, tmp32no2);
tmp32no1 = WebRtcSpl_SqrtFloor(tmp32no2);
freq_signal_abs[i] = (uint16_t)tmp32no1;
@@ -836,7 +835,7 @@
int16_t zeros32, zeros16;
int16_t zerosDBufNoisy, zerosDBufClean, zerosXBuf;
int far_q;
- int16_t resolutionDiff, qDomainDiff;
+ int16_t resolutionDiff, qDomainDiff, dfa_clean_q_domain_diff;
const int kMinPrefBand = 4;
const int kMaxPrefBand = 24;
@@ -970,8 +969,7 @@
// Far end signal through channel estimate in Q8
// How much can we shift right to preserve resolution
tmp32no1 = echoEst32[i] - aecm->echoFilt[i];
- aecm->echoFilt[i] += WEBRTC_SPL_RSHIFT_W32(
- WEBRTC_SPL_MUL_32_16(tmp32no1, 50), 8);
+ aecm->echoFilt[i] += (tmp32no1 * 50) >> 8;
zeros32 = WebRtcSpl_NormW32(aecm->echoFilt[i]) + 1;
zeros16 = WebRtcSpl_NormW16(supGain) + 1;
@@ -1002,15 +1000,16 @@
}
zeros16 = WebRtcSpl_NormW16(aecm->nearFilt[i]);
- if ((zeros16 < (aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld))
- & (aecm->nearFilt[i])) {
- tmp16no1 = WEBRTC_SPL_SHIFT_W16(aecm->nearFilt[i], zeros16);
- qDomainDiff = zeros16 - aecm->dfaCleanQDomain + aecm->dfaCleanQDomainOld;
- tmp16no2 = WEBRTC_SPL_SHIFT_W16(ptrDfaClean[i], qDomainDiff);
+ assert(zeros16 >= 0); // |zeros16| is a norm, hence non-negative.
+ dfa_clean_q_domain_diff = aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld;
+ if (zeros16 < dfa_clean_q_domain_diff && aecm->nearFilt[i]) {
+ tmp16no1 = aecm->nearFilt[i] << zeros16;
+ qDomainDiff = zeros16 - dfa_clean_q_domain_diff;
+ tmp16no2 = ptrDfaClean[i] >> -qDomainDiff;
} else {
- tmp16no1 = WEBRTC_SPL_SHIFT_W16(aecm->nearFilt[i],
- aecm->dfaCleanQDomain
- - aecm->dfaCleanQDomainOld);
+ tmp16no1 = dfa_clean_q_domain_diff < 0
+ ? aecm->nearFilt[i] >> -dfa_clean_q_domain_diff
+ : aecm->nearFilt[i] << dfa_clean_q_domain_diff;
qDomainDiff = 0;
tmp16no2 = ptrDfaClean[i];
}
@@ -1022,7 +1021,8 @@
if ((tmp16no2) & (-qDomainDiff > zeros16)) {
aecm->nearFilt[i] = WEBRTC_SPL_WORD16_MAX;
} else {
- aecm->nearFilt[i] = WEBRTC_SPL_SHIFT_W16(tmp16no2, -qDomainDiff);
+ aecm->nearFilt[i] = qDomainDiff < 0 ? tmp16no2 << -qDomainDiff
+ : tmp16no2 >> qDomainDiff;
}
// Wiener filter coefficients, resulting hnl in Q14
@@ -1483,7 +1483,7 @@
"mul %[tmp321], %[tmp321], %[tmp161] \n\t"
"sra %[nrsh1], %[tmp32], 14 \n\t"
"sra %[nrsh2], %[tmp321], 14 \n\t"
- : [nrsh1] "=r" (nrsh1), [nrsh2] "=r" (nrsh2)
+ : [nrsh1] "=&r" (nrsh1), [nrsh2] "=r" (nrsh2)
: [tmp16] "r" (tmp16), [tmp161] "r" (tmp161), [tmp32] "r" (tmp32),
[tmp321] "r" (tmp321)
: "memory", "hi", "lo"
diff --git a/modules/audio_processing/aecm/aecm_core_neon.c b/modules/audio_processing/aecm/aecm_core_neon.c
index 484ad71..4031790 100644
--- a/modules/audio_processing/aecm/aecm_core_neon.c
+++ b/modules/audio_processing/aecm/aecm_core_neon.c
@@ -267,8 +267,7 @@
__asm __volatile("vadd.u32 q8, q10" : : : "q10", "q8");
__asm __volatile("vadd.u32 q8, q11" : : : "q11", "q8");
- // echo_energy_adapt += WEBRTC_SPL_UMUL_16_16(
- // aecm->channelAdapt16[i], far_spectrum[i]);
+ // echo_energy_adapt += aecm->channelAdapt16[i] * far_spectrum[i];
__asm __volatile("vld1.16 {d24, d25}, [%0, :128]" : : "r"(&aecm->channelAdapt16[i]) : "q12");
__asm __volatile("vmull.u16 q10, d26, d24" : : : "q12", "q13", "q10");
__asm __volatile("vmull.u16 q11, d27, d25" : : : "q12", "q13", "q11");
@@ -292,8 +291,8 @@
echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i], far_spectrum[i]);
*echo_energy_stored = echo_energy_stored_r + (uint32_t)echo_est[i];
*far_energy = far_energy_r + (uint32_t)(far_spectrum[i]);
- *echo_energy_adapt = echo_energy_adapt_r + WEBRTC_SPL_UMUL_16_16(
- aecm->channelAdapt16[i], far_spectrum[i]);
+ *echo_energy_adapt = echo_energy_adapt_r +
+ aecm->channelAdapt16[i] * far_spectrum[i];
}
void WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore_t* aecm,
diff --git a/modules/audio_processing/agc/Android.mk b/modules/audio_processing/agc/Android.mk
deleted file mode 100644
index 35a7136..0000000
--- a/modules/audio_processing/agc/Android.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_agc
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- analog_agc.c \
- digital_agc.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_processing/agc/analog_agc.c b/modules/audio_processing/agc/analog_agc.c
index 4f110cc..32929dd 100644
--- a/modules/audio_processing/agc/analog_agc.c
+++ b/modules/audio_processing/agc/analog_agc.c
@@ -19,7 +19,7 @@
#include <assert.h>
#include <stdlib.h>
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
#include "webrtc/modules/audio_processing/agc/analog_agc.h"
@@ -139,10 +139,10 @@
L = 8;
} else
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_mic, frame %d: Invalid number of samples\n\n",
- (stt->fcount + 1));
+ stt->fcount + 1);
#endif
return -1;
}
@@ -160,10 +160,10 @@
L = 16;
} else
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_mic, frame %d: Invalid number of samples\n\n",
- (stt->fcount + 1));
+ stt->fcount + 1);
#endif
return -1;
}
@@ -177,10 +177,10 @@
L = 16;
} else
{
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_mic, frame %d: Invalid sample rate\n\n",
- (stt->fcount + 1));
+ stt->fcount + 1);
#endif
return -1;
}
@@ -208,7 +208,7 @@
tmp16 = (int16_t)(stt->micVol - stt->maxAnalog);
tmp32 = WEBRTC_SPL_MUL_16_16(GAIN_TBL_LEN - 1, tmp16);
tmp16 = (int16_t)(stt->maxLevel - stt->maxAnalog);
- targetGainIdx = (uint16_t)WEBRTC_SPL_DIV(tmp32, tmp16);
+ targetGainIdx = tmp32 / tmp16;
assert(targetGainIdx < GAIN_TBL_LEN);
/* Increment through the table towards the target gain.
@@ -343,7 +343,7 @@
{
if ((samples != 80) && (samples != 160))
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_far_end, frame %d: Invalid number of samples\n\n",
stt->fcount);
@@ -355,7 +355,7 @@
{
if ((samples != 160) && (samples != 320))
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_far_end, frame %d: Invalid number of samples\n\n",
stt->fcount);
@@ -367,7 +367,7 @@
{
if ((samples != 160) && (samples != 320))
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_far_end, frame %d: Invalid number of samples\n\n",
stt->fcount);
@@ -377,7 +377,7 @@
subFrames = 160;
} else
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->add_far_end, frame %d: Invalid sample rate\n\n",
stt->fcount + 1);
@@ -657,10 +657,12 @@
stt->micVol = *inMicLevel;
}
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "\t\tAGC->zeroCntrl, frame %d: 500 ms under threshold, micVol:\n",
- stt->fcount, stt->micVol);
+ "\t\tAGC->zeroCntrl, frame %d: 500 ms under threshold,"
+ " micVol: %d\n",
+ stt->fcount,
+ stt->micVol);
#endif
stt->activeSpeech = 0;
@@ -771,14 +773,18 @@
if (inMicLevelTmp > stt->maxAnalog)
{
-#ifdef AGC_DEBUG //test log
- fprintf(stt->fpt, "\tAGC->ProcessAnalog, frame %d: micLvl > maxAnalog\n", stt->fcount);
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ fprintf(stt->fpt,
+ "\tAGC->ProcessAnalog, frame %d: micLvl > maxAnalog\n",
+ stt->fcount);
#endif
return -1;
} else if (inMicLevelTmp < stt->minLevel)
{
-#ifdef AGC_DEBUG //test log
- fprintf(stt->fpt, "\tAGC->ProcessAnalog, frame %d: micLvl < minLevel\n", stt->fcount);
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ fprintf(stt->fpt,
+ "\tAGC->ProcessAnalog, frame %d: micLvl < minLevel\n",
+ stt->fcount);
#endif
return -1;
}
@@ -813,9 +819,10 @@
#ifdef MIC_LEVEL_FEEDBACK
//stt->numBlocksMicLvlSat = 0;
#endif
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "\tAGC->ProcessAnalog, frame %d: micLvl < minLevel by manual decrease, raise vol\n",
+ "\tAGC->ProcessAnalog, frame %d: micLvl < minLevel by manual"
+ " decrease, raise vol\n",
stt->fcount);
#endif
}
@@ -871,10 +878,11 @@
}
inMicLevelTmp = stt->micVol;
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"\tAGC->ProcessAnalog, frame %d: saturated, micVol = %d\n",
- stt->fcount, stt->micVol);
+ stt->fcount,
+ stt->micVol);
#endif
if (stt->micVol < stt->minOutput)
@@ -1011,10 +1019,13 @@
#ifdef MIC_LEVEL_FEEDBACK
//stt->numBlocksMicLvlSat = 0;
#endif
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "\tAGC->ProcessAnalog, frame %d: measure > 2ndUpperLim, micVol = %d, maxLevel = %d\n",
- stt->fcount, stt->micVol, stt->maxLevel);
+ "\tAGC->ProcessAnalog, frame %d: measure >"
+ " 2ndUpperLim, micVol = %d, maxLevel = %d\n",
+ stt->fcount,
+ stt->micVol,
+ stt->maxLevel);
#endif
}
} else if (stt->Rxx160_LPw32 > stt->upperLimit)
@@ -1054,10 +1065,13 @@
#ifdef MIC_LEVEL_FEEDBACK
//stt->numBlocksMicLvlSat = 0;
#endif
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "\tAGC->ProcessAnalog, frame %d: measure > UpperLim, micVol = %d, maxLevel = %d\n",
- stt->fcount, stt->micVol, stt->maxLevel);
+ "\tAGC->ProcessAnalog, frame %d: measure >"
+ " UpperLim, micVol = %d, maxLevel = %d\n",
+ stt->fcount,
+ stt->micVol,
+ stt->maxLevel);
#endif
}
} else if (stt->Rxx160_LPw32 < stt->lowerSecondaryLimit)
@@ -1078,8 +1092,7 @@
tmp32 = WEBRTC_SPL_LSHIFT_W32(inMicLevelTmp - stt->minLevel, 14);
if (stt->maxInit != stt->minLevel)
{
- volNormFIX = (int16_t)WEBRTC_SPL_DIV(tmp32,
- (stt->maxInit - stt->minLevel));
+ volNormFIX = tmp32 / (stt->maxInit - stt->minLevel);
}
/* Find correct curve */
@@ -1114,10 +1127,12 @@
fprintf(stderr, "Sat mic Level: %d\n", stt->numBlocksMicLvlSat);
}
#endif
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "\tAGC->ProcessAnalog, frame %d: measure < 2ndLowerLim, micVol = %d\n",
- stt->fcount, stt->micVol);
+ "\tAGC->ProcessAnalog, frame %d: measure <"
+ " 2ndLowerLim, micVol = %d\n",
+ stt->fcount,
+ stt->micVol);
#endif
}
} else if (stt->Rxx160_LPw32 < stt->lowerLimit)
@@ -1138,8 +1153,7 @@
tmp32 = WEBRTC_SPL_LSHIFT_W32(inMicLevelTmp - stt->minLevel, 14);
if (stt->maxInit != stt->minLevel)
{
- volNormFIX = (int16_t)WEBRTC_SPL_DIV(tmp32,
- (stt->maxInit - stt->minLevel));
+ volNormFIX = tmp32 / (stt->maxInit - stt->minLevel);
}
/* Find correct curve */
@@ -1174,10 +1188,11 @@
fprintf(stderr, "Sat mic Level: %d\n", stt->numBlocksMicLvlSat);
}
#endif
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"\tAGC->ProcessAnalog, frame %d: measure < LowerLim, micVol = %d\n",
- stt->fcount, stt->micVol);
+ stt->fcount,
+ stt->micVol);
#endif
}
@@ -1274,9 +1289,10 @@
{
if ((samples != 80) && (samples != 160))
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "AGC->Process, frame %d: Invalid number of samples\n\n", stt->fcount);
+ "AGC->Process, frame %d: Invalid number of samples\n\n",
+ stt->fcount);
#endif
return -1;
}
@@ -1285,9 +1301,10 @@
{
if ((samples != 160) && (samples != 320))
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "AGC->Process, frame %d: Invalid number of samples\n\n", stt->fcount);
+ "AGC->Process, frame %d: Invalid number of samples\n\n",
+ stt->fcount);
#endif
return -1;
}
@@ -1296,18 +1313,20 @@
{
if ((samples != 160) && (samples != 320))
{
-#ifdef AGC_DEBUG //test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "AGC->Process, frame %d: Invalid number of samples\n\n", stt->fcount);
+ "AGC->Process, frame %d: Invalid number of samples\n\n",
+ stt->fcount);
#endif
return -1;
}
subFrames = 160;
} else
{
-#ifdef AGC_DEBUG// test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
- "AGC->Process, frame %d: Invalid sample rate\n\n", stt->fcount);
+ "AGC->Process, frame %d: Invalid sample rate\n\n",
+ stt->fcount);
#endif
return -1;
}
@@ -1343,7 +1362,7 @@
}
}
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->fcount++;
#endif
@@ -1352,8 +1371,10 @@
if (WebRtcAgc_ProcessDigital(&stt->digitalAgc, &in_near[i], &in_near_H[i], &out[i], &out_H[i],
stt->fs, stt->lowLevelSignal) == -1)
{
-#ifdef AGC_DEBUG//test log
- fprintf(stt->fpt, "AGC->Process, frame %d: Error from DigAGC\n\n", stt->fcount);
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ fprintf(stt->fpt,
+ "AGC->Process, frame %d: Error from DigAGC\n\n",
+ stt->fcount);
#endif
return -1;
}
@@ -1366,8 +1387,14 @@
return -1;
}
}
-#ifdef AGC_DEBUG//test log
- fprintf(stt->agcLog, "%5d\t%d\t%d\t%d\n", stt->fcount, inMicLevelTmp, *outMicLevel, stt->maxLevel, stt->micVol);
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ fprintf(stt->agcLog,
+ "%5d\t%d\t%d\t%d\t%d\n",
+ stt->fcount,
+ inMicLevelTmp,
+ *outMicLevel,
+ stt->maxLevel,
+ stt->micVol);
#endif
/* update queue */
@@ -1443,8 +1470,10 @@
if (WebRtcAgc_CalculateGainTable(&(stt->digitalAgc.gainTable[0]), stt->compressionGaindB,
stt->targetLevelDbfs, stt->limiterEnable, stt->analogTarget) == -1)
{
-#ifdef AGC_DEBUG//test log
- fprintf(stt->fpt, "AGC->set_config, frame %d: Error from calcGainTable\n\n", stt->fcount);
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ fprintf(stt->fpt,
+ "AGC->set_config, frame %d: Error from calcGainTable\n\n",
+ stt->fcount);
#endif
return -1;
}
@@ -1500,7 +1529,7 @@
return -1;
}
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->fpt = fopen("./agc_test_log.txt", "wt");
stt->agcLog = fopen("./agc_debug_log.txt", "wt");
stt->digitalAgc.logFile = fopen("./agc_log.txt", "wt");
@@ -1517,7 +1546,7 @@
Agc_t *stt;
stt = (Agc_t *)state;
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fclose(stt->fpt);
fclose(stt->agcLog);
fclose(stt->digitalAgc.logFile);
@@ -1555,13 +1584,13 @@
* 2 - Digital Automatic Gain Control [-targetLevelDbfs (default -3 dBOv)]
* 3 - Fixed Digital Gain [compressionGaindB (default 8 dB)]
*/
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->fcount = 0;
fprintf(stt->fpt, "AGC->Init\n");
#endif
if (agcMode < kAgcModeUnchanged || agcMode > kAgcModeFixedDigital)
{
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt, "AGC->Init: error, incorrect mode\n\n");
#endif
return -1;
@@ -1618,10 +1647,12 @@
stt->numBlocksMicLvlSat = 0;
stt->micLvlSat = 0;
#endif
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt,
"AGC->Init: minLevel = %d, maxAnalog = %d, maxLevel = %d\n",
- stt->minLevel, stt->maxAnalog, stt->maxLevel);
+ stt->minLevel,
+ stt->maxAnalog,
+ stt->maxLevel);
#endif
/* Minimum output volume is 4% higher than the available lowest volume level */
@@ -1689,13 +1720,13 @@
/* Only positive values are allowed that are not too large */
if ((minLevel >= maxLevel) || (maxLevel & 0xFC000000))
{
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt, "minLevel, maxLevel value(s) are invalid\n\n");
#endif
return -1;
} else
{
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
fprintf(stt->fpt, "\n");
#endif
return 0;
diff --git a/modules/audio_processing/agc/analog_agc.h b/modules/audio_processing/agc/analog_agc.h
index b036f44..19b324f 100644
--- a/modules/audio_processing/agc/analog_agc.h
+++ b/modules/audio_processing/agc/analog_agc.h
@@ -15,9 +15,8 @@
#include "webrtc/modules/audio_processing/agc/include/gain_control.h"
#include "webrtc/typedefs.h"
-//#define AGC_DEBUG
//#define MIC_LEVEL_FEEDBACK
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
@@ -122,10 +121,10 @@
AgcVad_t vadMic;
DigitalAgc_t digitalAgc;
-#ifdef AGC_DEBUG
- FILE* fpt;
- FILE* agcLog;
- int32_t fcount;
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ FILE* fpt;
+ FILE* agcLog;
+ int32_t fcount;
#endif
int16_t lowLevelSignal;
diff --git a/modules/audio_processing/agc/digital_agc.c b/modules/audio_processing/agc/digital_agc.c
index 4b169c1..da087ca 100644
--- a/modules/audio_processing/agc/digital_agc.c
+++ b/modules/audio_processing/agc/digital_agc.c
@@ -16,7 +16,7 @@
#include <assert.h>
#include <string.h>
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
@@ -153,8 +153,8 @@
intPart = (uint16_t)WEBRTC_SPL_RSHIFT_U32(absInLevel, 14);
fracPart = (uint16_t)(absInLevel & 0x00003FFF); // extract the fractional part
tmpU16 = kGenFuncTable[intPart + 1] - kGenFuncTable[intPart]; // Q8
- tmpU32no1 = WEBRTC_SPL_UMUL_16_16(tmpU16, fracPart); // Q22
- tmpU32no1 += WEBRTC_SPL_LSHIFT_U32((uint32_t)kGenFuncTable[intPart], 14); // Q22
+ tmpU32no1 = tmpU16 * fracPart; // Q22
+ tmpU32no1 += (uint32_t)kGenFuncTable[intPart] << 14; // Q22
logApprox = WEBRTC_SPL_RSHIFT_U32(tmpU32no1, 8); // Q14
// Compensate for negative exponent using the relation:
// log2(1 + 2^-x) = log2(1 + 2^x) - x
@@ -187,7 +187,7 @@
}
}
numFIX = WEBRTC_SPL_LSHIFT_W32(WEBRTC_SPL_MUL_16_U16(maxGain, constMaxGain), 6); // Q14
- numFIX -= WEBRTC_SPL_MUL_32_16((int32_t)logApprox, diffGain); // Q14
+ numFIX -= (int32_t)logApprox * diffGain; // Q14
// Calculate ratio
// Shift |numFIX| as much as possible.
@@ -210,7 +210,7 @@
{
numFIX += WEBRTC_SPL_RSHIFT_W32(tmp32no1, 1);
}
- y32 = WEBRTC_SPL_DIV(numFIX, tmp32no1); // in Q14
+ y32 = numFIX / tmp32no1; // in Q14
if (limiterEnable && (i < limiterIdx))
{
tmp32 = WEBRTC_SPL_MUL_16_U16(i - 1, kLog10_2); // Q14
@@ -237,13 +237,13 @@
{
tmp16 = WEBRTC_SPL_LSHIFT_W16(2, 14) - constLinApprox;
tmp32no2 = WEBRTC_SPL_LSHIFT_W32(1, 14) - fracPart;
- tmp32no2 = WEBRTC_SPL_MUL_32_16(tmp32no2, tmp16);
+ tmp32no2 *= tmp16;
tmp32no2 = WEBRTC_SPL_RSHIFT_W32(tmp32no2, 13);
tmp32no2 = WEBRTC_SPL_LSHIFT_W32(1, 14) - tmp32no2;
} else
{
tmp16 = constLinApprox - WEBRTC_SPL_LSHIFT_W16(1, 14);
- tmp32no2 = WEBRTC_SPL_MUL_32_16(fracPart, tmp16);
+ tmp32no2 = fracPart * tmp16;
tmp32no2 = WEBRTC_SPL_RSHIFT_W32(tmp32no2, 13);
}
fracPart = (uint16_t)tmp32no2;
@@ -274,7 +274,7 @@
stt->gain = 65536;
stt->gatePrevious = 0;
stt->agcMode = agcMode;
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->frameCounter = 0;
#endif
@@ -310,7 +310,7 @@
int32_t gain32, delta;
int16_t logratio;
int16_t lower_thr, upper_thr;
- int16_t zeros, zeros_fast, frac;
+ int16_t zeros = 0, zeros_fast, frac = 0;
int16_t decay;
int16_t gate, gain_adj;
int16_t k, n;
@@ -397,9 +397,14 @@
decay = 0;
}
}
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->frameCounter++;
- fprintf(stt->logFile, "%5.2f\t%d\t%d\t%d\t", (float)(stt->frameCounter) / 100, logratio, decay, stt->vadNearend.stdLongTerm);
+ fprintf(stt->logFile,
+ "%5.2f\t%d\t%d\t%d\t",
+ (float)(stt->frameCounter) / 100,
+ logratio,
+ decay,
+ stt->vadNearend.stdLongTerm);
#endif
// Find max amplitude per sub frame
// iterate over sub frames
@@ -461,10 +466,15 @@
frac = (int16_t)WEBRTC_SPL_RSHIFT_W32(tmp32, 19); // Q12
tmp32 = WEBRTC_SPL_MUL((stt->gainTable[zeros-1] - stt->gainTable[zeros]), frac);
gains[k + 1] = stt->gainTable[zeros] + WEBRTC_SPL_RSHIFT_W32(tmp32, 12);
-#ifdef AGC_DEBUG
- if (k == 0)
- {
- fprintf(stt->logFile, "%d\t%d\t%d\t%d\t%d\n", env[0], cur_level, stt->capacitorFast, stt->capacitorSlow, zeros);
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ if (k == 0) {
+ fprintf(stt->logFile,
+ "%d\t%d\t%d\t%d\t%d\n",
+ env[0],
+ cur_level,
+ stt->capacitorFast,
+ stt->capacitorSlow,
+ zeros);
}
#endif
}
@@ -755,14 +765,14 @@
// update long-term estimate of mean energy level (Q10)
tmp32 = WEBRTC_SPL_MUL_16_16(state->meanLongTerm, state->counter) + (int32_t)dB;
- state->meanLongTerm = WebRtcSpl_DivW32W16ResW16(tmp32,
- WEBRTC_SPL_ADD_SAT_W16(state->counter, 1));
+ state->meanLongTerm = WebRtcSpl_DivW32W16ResW16(
+ tmp32, WebRtcSpl_AddSatW16(state->counter, 1));
// update long-term estimate of variance in energy level (Q8)
tmp32 = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL_16_16(dB, dB), 12);
tmp32 += WEBRTC_SPL_MUL(state->varianceLongTerm, state->counter);
- state->varianceLongTerm = WebRtcSpl_DivW32W16(tmp32,
- WEBRTC_SPL_ADD_SAT_W16(state->counter, 1));
+ state->varianceLongTerm = WebRtcSpl_DivW32W16(
+ tmp32, WebRtcSpl_AddSatW16(state->counter, 1));
// update long-term estimate of standard deviation in energy level (Q10)
tmp32 = WEBRTC_SPL_MUL_16_16(state->meanLongTerm, state->meanLongTerm);
diff --git a/modules/audio_processing/agc/digital_agc.h b/modules/audio_processing/agc/digital_agc.h
index 6bd086f..3dcd937 100644
--- a/modules/audio_processing/agc/digital_agc.h
+++ b/modules/audio_processing/agc/digital_agc.h
@@ -11,7 +11,7 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MAIN_SOURCE_DIGITAL_AGC_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MAIN_SOURCE_DIGITAL_AGC_H_
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
@@ -46,9 +46,9 @@
int16_t agcMode;
AgcVad_t vadNearend;
AgcVad_t vadFarend;
-#ifdef AGC_DEBUG
- FILE* logFile;
- int frameCounter;
+#ifdef WEBRTC_AGC_DEBUG_DUMP
+ FILE* logFile;
+ int frameCounter;
#endif
} DigitalAgc_t;
diff --git a/modules/audio_processing/audio_buffer.cc b/modules/audio_processing/audio_buffer.cc
index b0f1eb6..2bbd771 100644
--- a/modules/audio_processing/audio_buffer.cc
+++ b/modules/audio_processing/audio_buffer.cc
@@ -51,7 +51,6 @@
return -1;
}
-
void StereoToMono(const float* left, const float* right, float* out,
int samples_per_channel) {
for (int i = 0; i < samples_per_channel; ++i) {
@@ -71,8 +70,9 @@
// One int16_t and one float ChannelBuffer that are kept in sync. The sync is
// broken when someone requests write access to either ChannelBuffer, and
// reestablished when someone requests the outdated ChannelBuffer. It is
-// therefore safe to use the return value of ibuf() and fbuf() until the next
-// call to the other method.
+// therefore safe to use the return value of ibuf_const() and fbuf_const()
+// until the next call to ibuf() or fbuf(), and the return value of ibuf() and
+// fbuf() until the next call to any of the other functions.
class IFChannelBuffer {
public:
IFChannelBuffer(int samples_per_channel, int num_channels)
@@ -81,19 +81,24 @@
fvalid_(true),
fbuf_(samples_per_channel, num_channels) {}
- ChannelBuffer<int16_t>* ibuf() {
+ ChannelBuffer<int16_t>* ibuf() { return ibuf(false); }
+ ChannelBuffer<float>* fbuf() { return fbuf(false); }
+ const ChannelBuffer<int16_t>* ibuf_const() { return ibuf(true); }
+ const ChannelBuffer<float>* fbuf_const() { return fbuf(true); }
+
+ private:
+ ChannelBuffer<int16_t>* ibuf(bool readonly) {
RefreshI();
- fvalid_ = false;
+ fvalid_ = readonly;
return &ibuf_;
}
- ChannelBuffer<float>* fbuf() {
+ ChannelBuffer<float>* fbuf(bool readonly) {
RefreshF();
- ivalid_ = false;
+ ivalid_ = readonly;
return &fbuf_;
}
- private:
void RefreshF() {
if (!fvalid_) {
assert(ivalid_);
@@ -126,24 +131,6 @@
ChannelBuffer<float> fbuf_;
};
-class SplitChannelBuffer {
- public:
- SplitChannelBuffer(int samples_per_split_channel, int num_channels)
- : low_(samples_per_split_channel, num_channels),
- high_(samples_per_split_channel, num_channels) {
- }
- ~SplitChannelBuffer() {}
-
- int16_t* low_channel(int i) { return low_.ibuf()->channel(i); }
- int16_t* high_channel(int i) { return high_.ibuf()->channel(i); }
- float* low_channel_f(int i) { return low_.fbuf()->channel(i); }
- float* high_channel_f(int i) { return high_.fbuf()->channel(i); }
-
- private:
- IFChannelBuffer low_;
- IFChannelBuffer high_;
-};
-
AudioBuffer::AudioBuffer(int input_samples_per_channel,
int num_input_channels,
int process_samples_per_channel,
@@ -155,8 +142,7 @@
num_proc_channels_(num_process_channels),
output_samples_per_channel_(output_samples_per_channel),
samples_per_split_channel_(proc_samples_per_channel_),
- num_mixed_channels_(0),
- num_mixed_low_pass_channels_(0),
+ mixed_low_pass_valid_(false),
reference_copied_(false),
activity_(AudioFrame::kVadUnknown),
keyboard_data_(NULL),
@@ -200,8 +186,10 @@
if (proc_samples_per_channel_ == kSamplesPer32kHzChannel) {
samples_per_split_channel_ = kSamplesPer16kHzChannel;
- split_channels_.reset(new SplitChannelBuffer(samples_per_split_channel_,
- num_proc_channels_));
+ split_channels_low_.reset(new IFChannelBuffer(samples_per_split_channel_,
+ num_proc_channels_));
+ split_channels_high_.reset(new IFChannelBuffer(samples_per_split_channel_,
+ num_proc_channels_));
filter_states_.reset(new SplitFilterStates[num_proc_channels_]);
}
}
@@ -278,74 +266,102 @@
void AudioBuffer::InitForNewData() {
keyboard_data_ = NULL;
- num_mixed_channels_ = 0;
- num_mixed_low_pass_channels_ = 0;
+ mixed_low_pass_valid_ = false;
reference_copied_ = false;
activity_ = AudioFrame::kVadUnknown;
}
const int16_t* AudioBuffer::data(int channel) const {
- assert(channel >= 0 && channel < num_proc_channels_);
- return channels_->ibuf()->channel(channel);
+ return channels_->ibuf_const()->channel(channel);
}
int16_t* AudioBuffer::data(int channel) {
- const AudioBuffer* t = this;
- return const_cast<int16_t*>(t->data(channel));
+ mixed_low_pass_valid_ = false;
+ return channels_->ibuf()->channel(channel);
+}
+
+const float* AudioBuffer::data_f(int channel) const {
+ return channels_->fbuf_const()->channel(channel);
}
float* AudioBuffer::data_f(int channel) {
- assert(channel >= 0 && channel < num_proc_channels_);
+ mixed_low_pass_valid_ = false;
return channels_->fbuf()->channel(channel);
}
const int16_t* AudioBuffer::low_pass_split_data(int channel) const {
- assert(channel >= 0 && channel < num_proc_channels_);
- return split_channels_.get() ? split_channels_->low_channel(channel)
- : data(channel);
+ return split_channels_low_.get()
+ ? split_channels_low_->ibuf_const()->channel(channel)
+ : data(channel);
}
int16_t* AudioBuffer::low_pass_split_data(int channel) {
- const AudioBuffer* t = this;
- return const_cast<int16_t*>(t->low_pass_split_data(channel));
+ mixed_low_pass_valid_ = false;
+ return split_channels_low_.get()
+ ? split_channels_low_->ibuf()->channel(channel)
+ : data(channel);
+}
+
+const float* AudioBuffer::low_pass_split_data_f(int channel) const {
+ return split_channels_low_.get()
+ ? split_channels_low_->fbuf_const()->channel(channel)
+ : data_f(channel);
}
float* AudioBuffer::low_pass_split_data_f(int channel) {
- assert(channel >= 0 && channel < num_proc_channels_);
- return split_channels_.get() ? split_channels_->low_channel_f(channel)
- : data_f(channel);
+ mixed_low_pass_valid_ = false;
+ return split_channels_low_.get()
+ ? split_channels_low_->fbuf()->channel(channel)
+ : data_f(channel);
}
const int16_t* AudioBuffer::high_pass_split_data(int channel) const {
- assert(channel >= 0 && channel < num_proc_channels_);
- return split_channels_.get() ? split_channels_->high_channel(channel) : NULL;
+ return split_channels_high_.get()
+ ? split_channels_high_->ibuf_const()->channel(channel)
+ : NULL;
}
int16_t* AudioBuffer::high_pass_split_data(int channel) {
- const AudioBuffer* t = this;
- return const_cast<int16_t*>(t->high_pass_split_data(channel));
+ return split_channels_high_.get()
+ ? split_channels_high_->ibuf()->channel(channel)
+ : NULL;
+}
+
+const float* AudioBuffer::high_pass_split_data_f(int channel) const {
+ return split_channels_high_.get()
+ ? split_channels_high_->fbuf_const()->channel(channel)
+ : NULL;
}
float* AudioBuffer::high_pass_split_data_f(int channel) {
- assert(channel >= 0 && channel < num_proc_channels_);
- return split_channels_.get() ? split_channels_->high_channel_f(channel)
- : NULL;
+ return split_channels_high_.get()
+ ? split_channels_high_->fbuf()->channel(channel)
+ : NULL;
}
-const int16_t* AudioBuffer::mixed_data(int channel) const {
- assert(channel >= 0 && channel < num_mixed_channels_);
+const int16_t* AudioBuffer::mixed_low_pass_data() {
+ // Currently only mixing stereo to mono is supported.
+ assert(num_proc_channels_ == 1 || num_proc_channels_ == 2);
- return mixed_channels_->channel(channel);
-}
+ if (num_proc_channels_ == 1) {
+ return low_pass_split_data(0);
+ }
-const int16_t* AudioBuffer::mixed_low_pass_data(int channel) const {
- assert(channel >= 0 && channel < num_mixed_low_pass_channels_);
-
- return mixed_low_pass_channels_->channel(channel);
+ if (!mixed_low_pass_valid_) {
+ if (!mixed_low_pass_channels_.get()) {
+ mixed_low_pass_channels_.reset(
+ new ChannelBuffer<int16_t>(samples_per_split_channel_, 1));
+ }
+ StereoToMono(low_pass_split_data(0),
+ low_pass_split_data(1),
+ mixed_low_pass_channels_->data(),
+ samples_per_split_channel_);
+ mixed_low_pass_valid_ = true;
+ }
+ return mixed_low_pass_channels_->data();
}
const int16_t* AudioBuffer::low_pass_reference(int channel) const {
- assert(channel >= 0 && channel < num_proc_channels_);
if (!reference_copied_) {
return NULL;
}
@@ -390,19 +406,32 @@
// TODO(andrew): Do deinterleaving and mixing in one step?
void AudioBuffer::DeinterleaveFrom(AudioFrame* frame) {
assert(proc_samples_per_channel_ == input_samples_per_channel_);
- assert(num_proc_channels_ == num_input_channels_);
- assert(frame->num_channels_ == num_proc_channels_);
+ assert(frame->num_channels_ == num_input_channels_);
assert(frame->samples_per_channel_ == proc_samples_per_channel_);
InitForNewData();
activity_ = frame->vad_activity_;
- int16_t* interleaved = frame->data_;
- for (int i = 0; i < num_proc_channels_; i++) {
- int16_t* deinterleaved = channels_->ibuf()->channel(i);
- int interleaved_idx = i;
- for (int j = 0; j < proc_samples_per_channel_; j++) {
- deinterleaved[j] = interleaved[interleaved_idx];
- interleaved_idx += num_proc_channels_;
+ if (num_input_channels_ == 2 && num_proc_channels_ == 1) {
+ // Downmix directly; no explicit deinterleaving needed.
+ int16_t* downmixed = channels_->ibuf()->channel(0);
+ for (int i = 0; i < input_samples_per_channel_; ++i) {
+ // HACK(ajm): The downmixing in the int16_t path is in practice never
+ // called from production code. We do this weird scaling to and from float
+ // to satisfy tests checking for bit-exactness with the float path.
+ float downmix_float = (ScaleToFloat(frame->data_[i * 2]) +
+ ScaleToFloat(frame->data_[i * 2 + 1])) / 2;
+ downmixed[i] = ScaleAndRoundToInt16(downmix_float);
+ }
+ } else {
+ assert(num_proc_channels_ == num_input_channels_);
+ int16_t* interleaved = frame->data_;
+ for (int i = 0; i < num_proc_channels_; ++i) {
+ int16_t* deinterleaved = channels_->ibuf()->channel(i);
+ int interleaved_idx = i;
+ for (int j = 0; j < proc_samples_per_channel_; ++j) {
+ deinterleaved[j] = interleaved[interleaved_idx];
+ interleaved_idx += num_proc_channels_;
+ }
}
}
}
@@ -429,42 +458,6 @@
}
}
-void AudioBuffer::CopyAndMix(int num_mixed_channels) {
- // We currently only support the stereo to mono case.
- assert(num_proc_channels_ == 2);
- assert(num_mixed_channels == 1);
- if (!mixed_channels_.get()) {
- mixed_channels_.reset(
- new ChannelBuffer<int16_t>(proc_samples_per_channel_,
- num_mixed_channels));
- }
-
- StereoToMono(channels_->ibuf()->channel(0),
- channels_->ibuf()->channel(1),
- mixed_channels_->channel(0),
- proc_samples_per_channel_);
-
- num_mixed_channels_ = num_mixed_channels;
-}
-
-void AudioBuffer::CopyAndMixLowPass(int num_mixed_channels) {
- // We currently only support the stereo to mono case.
- assert(num_proc_channels_ == 2);
- assert(num_mixed_channels == 1);
- if (!mixed_low_pass_channels_.get()) {
- mixed_low_pass_channels_.reset(
- new ChannelBuffer<int16_t>(samples_per_split_channel_,
- num_mixed_channels));
- }
-
- StereoToMono(low_pass_split_data(0),
- low_pass_split_data(1),
- mixed_low_pass_channels_->channel(0),
- samples_per_split_channel_);
-
- num_mixed_low_pass_channels_ = num_mixed_channels;
-}
-
void AudioBuffer::CopyLowPassToReference() {
reference_copied_ = true;
if (!low_pass_reference_channels_.get()) {
diff --git a/modules/audio_processing/audio_buffer.h b/modules/audio_processing/audio_buffer.h
index 67e4f48..acf5753 100644
--- a/modules/audio_processing/audio_buffer.h
+++ b/modules/audio_processing/audio_buffer.h
@@ -23,7 +23,6 @@
namespace webrtc {
class PushSincResampler;
-class SplitChannelBuffer;
class IFChannelBuffer;
struct SplitFilterStates {
@@ -56,21 +55,28 @@
int samples_per_split_channel() const;
int samples_per_keyboard_channel() const;
+ // Sample array accessors. Channels are guaranteed to be stored contiguously
+ // in memory. Prefer to use the const variants of each accessor when
+ // possible, since they incur less float<->int16 conversion overhead.
int16_t* data(int channel);
const int16_t* data(int channel) const;
int16_t* low_pass_split_data(int channel);
const int16_t* low_pass_split_data(int channel) const;
int16_t* high_pass_split_data(int channel);
const int16_t* high_pass_split_data(int channel) const;
- const int16_t* mixed_data(int channel) const;
- const int16_t* mixed_low_pass_data(int channel) const;
+ // Returns a pointer to the low-pass data downmixed to mono. If this data
+ // isn't already available it re-calculates it.
+ const int16_t* mixed_low_pass_data();
const int16_t* low_pass_reference(int channel) const;
// Float versions of the accessors, with automatic conversion back and forth
// as necessary. The range of the numbers are the same as for int16_t.
float* data_f(int channel);
+ const float* data_f(int channel) const;
float* low_pass_split_data_f(int channel);
+ const float* low_pass_split_data_f(int channel) const;
float* high_pass_split_data_f(int channel);
+ const float* high_pass_split_data_f(int channel) const;
const float* keyboard_data() const;
@@ -81,7 +87,6 @@
// Use for int16 interleaved data.
void DeinterleaveFrom(AudioFrame* audioFrame);
- void InterleaveTo(AudioFrame* audioFrame) const;
// If |data_changed| is false, only the non-audio data members will be copied
// to |frame|.
void InterleaveTo(AudioFrame* frame, bool data_changed) const;
@@ -93,9 +98,6 @@
void CopyTo(int samples_per_channel,
AudioProcessing::ChannelLayout layout,
float* const* data);
-
- void CopyAndMix(int num_mixed_channels);
- void CopyAndMixLowPass(int num_mixed_channels);
void CopyLowPassToReference();
private:
@@ -108,16 +110,15 @@
const int num_proc_channels_;
const int output_samples_per_channel_;
int samples_per_split_channel_;
- int num_mixed_channels_;
- int num_mixed_low_pass_channels_;
+ bool mixed_low_pass_valid_;
bool reference_copied_;
AudioFrame::VADActivity activity_;
const float* keyboard_data_;
scoped_ptr<IFChannelBuffer> channels_;
- scoped_ptr<SplitChannelBuffer> split_channels_;
+ scoped_ptr<IFChannelBuffer> split_channels_low_;
+ scoped_ptr<IFChannelBuffer> split_channels_high_;
scoped_ptr<SplitFilterStates[]> filter_states_;
- scoped_ptr<ChannelBuffer<int16_t> > mixed_channels_;
scoped_ptr<ChannelBuffer<int16_t> > mixed_low_pass_channels_;
scoped_ptr<ChannelBuffer<int16_t> > low_pass_reference_channels_;
scoped_ptr<ChannelBuffer<float> > input_buffer_;
diff --git a/modules/audio_processing/audio_processing.gypi b/modules/audio_processing/audio_processing.gypi
index b1d18c5..e6fbafc 100644
--- a/modules/audio_processing/audio_processing.gypi
+++ b/modules/audio_processing/audio_processing.gypi
@@ -9,6 +9,7 @@
{
'variables': {
'audio_processing_dependencies': [
+ '<(webrtc_root)/base/base.gyp:rtc_base_approved',
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
],
@@ -21,6 +22,7 @@
'variables': {
# Outputs some low-level debug files.
'aec_debug_dump%': 0,
+ 'agc_debug_dump%': 0,
# Disables the usual mode where we trust the reported system delay
# values the AEC receives. The corresponding define is set appropriately
@@ -93,6 +95,9 @@
['aec_untrusted_delay_for_testing==1', {
'defines': ['WEBRTC_UNTRUSTED_DELAY',],
}],
+ ['agc_debug_dump==1', {
+ 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
+ }],
['enable_protobuf==1', {
'dependencies': ['audioproc_debug_proto'],
'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
@@ -107,7 +112,7 @@
'ns/nsx_defines.h',
],
'conditions': [
- ['target_arch=="mipsel"', {
+ ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
'sources': [
'ns/nsx_core_mips.c',
],
@@ -134,7 +139,7 @@
['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
'dependencies': ['audio_processing_neon',],
}],
- ['target_arch=="mipsel"', {
+ ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
'sources': [
'aecm/aecm_core_mips.c',
],
@@ -200,6 +205,7 @@
],
'sources': [
'aec/aec_core_neon.c',
+ 'aec/aec_rdft_neon.c',
'aecm/aecm_core_neon.c',
'ns/nsx_core_neon.c',
],
@@ -221,6 +227,13 @@
],
'includes!': ['../../build/arm_neon.gypi',],
}],
+ # Disable LTO in audio_processing_neon target due to compiler bug
+ ['use_lto==1', {
+ 'cflags!': [
+ '-flto',
+ '-ffat-lto-objects',
+ ],
+ }],
],
}],
}],
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index de387ed..d6e2906 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -12,6 +12,7 @@
#include <assert.h>
+#include "webrtc/base/platform_file.h"
#include "webrtc/common_audio/include/audio_util.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
#include "webrtc/modules/audio_processing/audio_buffer.h"
@@ -257,10 +258,9 @@
}
}
- // TODO(ajm): Enable this.
- // Always downmix the reverse stream to mono for analysis.
- //rev_proc_format_.set(rev_proc_rate, 1);
- rev_proc_format_.set(rev_proc_rate, rev_in_format_.num_channels());
+ // Always downmix the reverse stream to mono for analysis. This has been
+ // demonstrated to work well for AEC in most practical scenarios.
+ rev_proc_format_.set(rev_proc_rate, 1);
if (fwd_proc_format_.rate() == kSampleRate32kHz) {
split_rate_ = kSampleRate16kHz;
@@ -303,10 +303,6 @@
(*it)->SetExtraOptions(config);
}
-int AudioProcessingImpl::EnableExperimentalNs(bool enable) {
- return kNoError;
-}
-
int AudioProcessingImpl::input_sample_rate_hz() const {
CriticalSectionScoped crit_scoped(crit_);
return fwd_in_format_.rate();
@@ -371,7 +367,8 @@
if (debug_file_->Open()) {
event_msg_->set_type(audioproc::Event::STREAM);
audioproc::Stream* msg = event_msg_->mutable_stream();
- const size_t channel_size = sizeof(float) * samples_per_channel;
+ const size_t channel_size =
+ sizeof(float) * fwd_in_format_.samples_per_channel();
for (int i = 0; i < fwd_in_format_.num_channels(); ++i)
msg->add_input_channel(src[i], channel_size);
}
@@ -388,7 +385,8 @@
#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
if (debug_file_->Open()) {
audioproc::Stream* msg = event_msg_->mutable_stream();
- const size_t channel_size = sizeof(float) * samples_per_channel;
+ const size_t channel_size =
+ sizeof(float) * fwd_out_format_.samples_per_channel();
for (int i = 0; i < fwd_proc_format_.num_channels(); ++i)
msg->add_output_channel(dest[i], channel_size);
RETURN_ON_ERR(WriteMessageToDebugFile());
@@ -484,6 +482,7 @@
RETURN_ON_ERR(high_pass_filter_->ProcessCaptureAudio(ca));
RETURN_ON_ERR(gain_control_->AnalyzeCaptureAudio(ca));
+ RETURN_ON_ERR(noise_suppression_->AnalyzeCaptureAudio(ca));
RETURN_ON_ERR(echo_cancellation_->ProcessCaptureAudio(ca));
if (echo_control_mobile_->is_enabled() && noise_suppression_->is_enabled()) {
@@ -537,7 +536,8 @@
if (debug_file_->Open()) {
event_msg_->set_type(audioproc::Event::REVERSE_STREAM);
audioproc::ReverseStream* msg = event_msg_->mutable_reverse_stream();
- const size_t channel_size = sizeof(float) * samples_per_channel;
+ const size_t channel_size =
+ sizeof(float) * rev_in_format_.samples_per_channel();
for (int i = 0; i < num_channels; ++i)
msg->add_channel(data[i], channel_size);
RETURN_ON_ERR(WriteMessageToDebugFile());
@@ -717,6 +717,12 @@
#endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
}
+int AudioProcessingImpl::StartDebugRecordingForPlatformFile(
+ rtc::PlatformFile handle) {
+ FILE* stream = rtc::FdopenPlatformFileForWriting(handle);
+ return StartDebugRecording(stream);
+}
+
int AudioProcessingImpl::StopDebugRecording() {
CriticalSectionScoped crit_scoped(crit_);
diff --git a/modules/audio_processing/audio_processing_impl.h b/modules/audio_processing/audio_processing_impl.h
index d34f305..0817f47 100644
--- a/modules/audio_processing/audio_processing_impl.h
+++ b/modules/audio_processing/audio_processing_impl.h
@@ -92,10 +92,6 @@
ChannelLayout output_layout,
ChannelLayout reverse_layout) OVERRIDE;
virtual void SetExtraOptions(const Config& config) OVERRIDE;
- virtual int EnableExperimentalNs(bool enable) OVERRIDE;
- virtual bool experimental_ns_enabled() const OVERRIDE {
- return false;
- }
virtual int set_sample_rate_hz(int rate) OVERRIDE;
virtual int input_sample_rate_hz() const OVERRIDE;
virtual int sample_rate_hz() const OVERRIDE;
@@ -129,6 +125,8 @@
virtual int StartDebugRecording(
const char filename[kMaxFilenameSize]) OVERRIDE;
virtual int StartDebugRecording(FILE* handle) OVERRIDE;
+ virtual int StartDebugRecordingForPlatformFile(
+ rtc::PlatformFile handle) OVERRIDE;
virtual int StopDebugRecording() OVERRIDE;
virtual EchoCancellation* echo_cancellation() const OVERRIDE;
virtual EchoControlMobile* echo_control_mobile() const OVERRIDE;
diff --git a/modules/audio_processing/audio_processing_tests.gypi b/modules/audio_processing/audio_processing_tests.gypi
index 82aa7fd..99b80f2 100644
--- a/modules/audio_processing/audio_processing_tests.gypi
+++ b/modules/audio_processing/audio_processing_tests.gypi
@@ -41,6 +41,7 @@
'dependencies': [
'audioproc_debug_proto',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
+ '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
],
'sources': [ 'test/unpack.cc', ],
diff --git a/modules/audio_processing/common.h b/modules/audio_processing/common.h
index 42454df..98c6241 100644
--- a/modules/audio_processing/common.h
+++ b/modules/audio_processing/common.h
@@ -14,6 +14,7 @@
#include <assert.h>
#include <string.h>
+#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
@@ -42,33 +43,67 @@
channels_(new T*[num_channels]),
samples_per_channel_(samples_per_channel),
num_channels_(num_channels) {
- memset(data_.get(), 0, sizeof(T) * samples_per_channel * num_channels);
- for (int i = 0; i < num_channels; ++i)
- channels_[i] = &data_[i * samples_per_channel];
+ Initialize();
}
+
+ ChannelBuffer(const T* data, int samples_per_channel, int num_channels)
+ : data_(new T[samples_per_channel * num_channels]),
+ channels_(new T*[num_channels]),
+ samples_per_channel_(samples_per_channel),
+ num_channels_(num_channels) {
+ Initialize();
+ memcpy(data_.get(), data, length() * sizeof(T));
+ }
+
+ ChannelBuffer(const T* const* channels, int samples_per_channel,
+ int num_channels)
+ : data_(new T[samples_per_channel * num_channels]),
+ channels_(new T*[num_channels]),
+ samples_per_channel_(samples_per_channel),
+ num_channels_(num_channels) {
+ Initialize();
+ for (int i = 0; i < num_channels_; ++i)
+ CopyFrom(channels[i], i);
+ }
+
~ChannelBuffer() {}
void CopyFrom(const void* channel_ptr, int i) {
- assert(i < num_channels_);
+ DCHECK_LT(i, num_channels_);
memcpy(channels_[i], channel_ptr, samples_per_channel_ * sizeof(T));
}
T* data() { return data_.get(); }
- T* channel(int i) {
- assert(i < num_channels_);
+ const T* data() const { return data_.get(); }
+
+ const T* channel(int i) const {
+ DCHECK_GE(i, 0);
+ DCHECK_LT(i, num_channels_);
return channels_[i];
}
- T** channels() { return channels_.get(); }
+ T* channel(int i) {
+ const ChannelBuffer<T>* t = this;
+ return const_cast<T*>(t->channel(i));
+ }
- int samples_per_channel() { return samples_per_channel_; }
- int num_channels() { return num_channels_; }
- int length() { return samples_per_channel_ * num_channels_; }
+ T* const* channels() { return channels_.get(); }
+ const T* const* channels() const { return channels_.get(); }
+
+ int samples_per_channel() const { return samples_per_channel_; }
+ int num_channels() const { return num_channels_; }
+ int length() const { return samples_per_channel_ * num_channels_; }
private:
+ void Initialize() {
+ memset(data_.get(), 0, sizeof(T) * length());
+ for (int i = 0; i < num_channels_; ++i)
+ channels_[i] = &data_[i * samples_per_channel_];
+ }
+
scoped_ptr<T[]> data_;
scoped_ptr<T*[]> channels_;
- int samples_per_channel_;
- int num_channels_;
+ const int samples_per_channel_;
+ const int num_channels_;
};
} // namespace webrtc
diff --git a/modules/audio_processing/echo_cancellation_impl.cc b/modules/audio_processing/echo_cancellation_impl.cc
index e770f9f..47b4f18 100644
--- a/modules/audio_processing/echo_cancellation_impl.cc
+++ b/modules/audio_processing/echo_cancellation_impl.cc
@@ -89,7 +89,7 @@
Handle* my_handle = static_cast<Handle*>(handle(handle_index));
err = WebRtcAec_BufferFarend(
my_handle,
- audio->low_pass_split_data(j),
+ audio->low_pass_split_data_f(j),
static_cast<int16_t>(audio->samples_per_split_channel()));
if (err != apm_->kNoError) {
diff --git a/modules/audio_processing/gain_control_impl.cc b/modules/audio_processing/gain_control_impl.cc
index a67b67e..cf7df16 100644
--- a/modules/audio_processing/gain_control_impl.cc
+++ b/modules/audio_processing/gain_control_impl.cc
@@ -59,17 +59,11 @@
assert(audio->samples_per_split_channel() <= 160);
- const int16_t* mixed_data = audio->low_pass_split_data(0);
- if (audio->num_channels() > 1) {
- audio->CopyAndMixLowPass(1);
- mixed_data = audio->mixed_low_pass_data(0);
- }
-
for (int i = 0; i < num_handles(); i++) {
Handle* my_handle = static_cast<Handle*>(handle(i));
int err = WebRtcAgc_AddFarend(
my_handle,
- mixed_data,
+ audio->mixed_low_pass_data(),
static_cast<int16_t>(audio->samples_per_split_channel()));
if (err != apm_->kNoError) {
diff --git a/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.darwin-arm.mk b/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.darwin-arm.mk
index 8d19294..85c2778 100644
--- a/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.darwin-arm.mk
+++ b/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.darwin-arm.mk
@@ -6,7 +6,6 @@
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gen_aecm_core_neon_offsets_h_gyp
LOCAL_MODULE_STEM := gen_aecm_core_neon_offsets_h
LOCAL_MODULE_SUFFIX := .stamp
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -48,7 +47,8 @@
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_GENERATED_SOURCES :=
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_shared_intermediate_dir)/audio_processing/asm_offsets/aecm_core_neon_offsets.o
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
@@ -60,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +73,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +94,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +102,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +118,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -162,23 +164,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,13 +195,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -220,7 +223,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -237,12 +239,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -281,19 +286,20 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
diff --git a/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.linux-arm.mk b/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.linux-arm.mk
index 8d19294..85c2778 100644
--- a/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.linux-arm.mk
+++ b/modules/audio_processing/gen_aecm_core_neon_offsets_h.target.linux-arm.mk
@@ -6,7 +6,6 @@
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gen_aecm_core_neon_offsets_h_gyp
LOCAL_MODULE_STEM := gen_aecm_core_neon_offsets_h
LOCAL_MODULE_SUFFIX := .stamp
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -48,7 +47,8 @@
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_GENERATED_SOURCES :=
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_shared_intermediate_dir)/audio_processing/asm_offsets/aecm_core_neon_offsets.o
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
@@ -60,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +73,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +94,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +102,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +118,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -162,23 +164,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,13 +195,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -220,7 +223,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -237,12 +239,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -281,19 +286,20 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
diff --git a/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.darwin-arm.mk b/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.darwin-arm.mk
index f766dea..10648cd 100644
--- a/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.darwin-arm.mk
+++ b/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.darwin-arm.mk
@@ -6,7 +6,6 @@
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gen_nsx_core_neon_offsets_h_gyp
LOCAL_MODULE_STEM := gen_nsx_core_neon_offsets_h
LOCAL_MODULE_SUFFIX := .stamp
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -48,7 +47,8 @@
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_GENERATED_SOURCES :=
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_shared_intermediate_dir)/audio_processing/asm_offsets/nsx_core_neon_offsets.o
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
@@ -60,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +73,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +94,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +102,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +118,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -162,23 +164,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,13 +195,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -220,7 +223,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -237,12 +239,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -281,19 +286,20 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
diff --git a/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.linux-arm.mk b/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.linux-arm.mk
index f766dea..10648cd 100644
--- a/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.linux-arm.mk
+++ b/modules/audio_processing/gen_nsx_core_neon_offsets_h.target.linux-arm.mk
@@ -6,7 +6,6 @@
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_gen_nsx_core_neon_offsets_h_gyp
LOCAL_MODULE_STEM := gen_nsx_core_neon_offsets_h
LOCAL_MODULE_SUFFIX := .stamp
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -48,7 +47,8 @@
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
-LOCAL_GENERATED_SOURCES :=
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_shared_intermediate_dir)/audio_processing/asm_offsets/nsx_core_neon_offsets.o
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
@@ -60,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +73,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +94,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +102,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +118,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -162,23 +164,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,13 +195,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -220,7 +223,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -237,12 +239,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -281,19 +286,20 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 77c3f3a..10d2b8b 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -14,6 +14,7 @@
#include <stddef.h> // size_t
#include <stdio.h> // FILE
+#include "webrtc/base/platform_file.h"
#include "webrtc/common.h"
#include "webrtc/typedefs.h"
@@ -73,6 +74,14 @@
bool enabled;
};
+// Use to enable experimental noise suppression. It can be set in the
+// constructor or using AudioProcessing::SetExtraOptions().
+struct ExperimentalNs {
+ ExperimentalNs() : enabled(false) {}
+ explicit ExperimentalNs(bool enabled) : enabled(enabled) {}
+ bool enabled;
+};
+
static const int kAudioProcMaxNativeSampleRateHz = 32000;
// The Audio Processing Module (APM) provides a collection of voice processing
@@ -201,9 +210,6 @@
// ensures the options are applied immediately.
virtual void SetExtraOptions(const Config& config) = 0;
- virtual int EnableExperimentalNs(bool enable) = 0;
- virtual bool experimental_ns_enabled() const = 0;
-
// DEPRECATED.
// TODO(ajm): Remove after Chromium has upgraded to using Initialize().
virtual int set_sample_rate_hz(int rate) = 0;
@@ -320,6 +326,13 @@
// of |handle| and closes it at StopDebugRecording().
virtual int StartDebugRecording(FILE* handle) = 0;
+ // Same as above but uses an existing PlatformFile handle. Takes ownership
+ // of |handle| and closes it at StopDebugRecording().
+ // TODO(xians): Make this interface pure virtual.
+ virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) {
+ return -1;
+ }
+
// Stops recording debugging information, and closes the file. Recording
// cannot be resumed in the same file (without overwriting it).
virtual int StopDebugRecording() = 0;
diff --git a/modules/audio_processing/include/mock_audio_processing.h b/modules/audio_processing/include/mock_audio_processing.h
index c1ac23a..8258bb6 100644
--- a/modules/audio_processing/include/mock_audio_processing.h
+++ b/modules/audio_processing/include/mock_audio_processing.h
@@ -186,10 +186,6 @@
ChannelLayout reverse_layout));
MOCK_METHOD1(SetExtraOptions,
void(const Config& config));
- MOCK_METHOD1(EnableExperimentalNs,
- int(bool enable));
- MOCK_CONST_METHOD0(experimental_ns_enabled,
- bool());
MOCK_METHOD1(set_sample_rate_hz,
int(int rate));
MOCK_CONST_METHOD0(input_sample_rate_hz,
diff --git a/modules/audio_processing/lib_core_neon_offsets.target.darwin-arm.mk b/modules/audio_processing/lib_core_neon_offsets.target.darwin-arm.mk
index cfe351c..d4aad36 100644
--- a/modules/audio_processing/lib_core_neon_offsets.target.darwin-arm.mk
+++ b/modules/audio_processing/lib_core_neon_offsets.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := lib_core_neon_offsets
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,23 +135,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +194,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +210,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,68 +257,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing/lib_core_neon_offsets.target.linux-arm.mk b/modules/audio_processing/lib_core_neon_offsets.target.linux-arm.mk
index cfe351c..d4aad36 100644
--- a/modules/audio_processing/lib_core_neon_offsets.target.linux-arm.mk
+++ b/modules/audio_processing/lib_core_neon_offsets.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := lib_core_neon_offsets
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,23 +135,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +194,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +210,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,68 +257,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing/noise_suppression_impl.cc b/modules/audio_processing/noise_suppression_impl.cc
index eea0a04..ab8dada 100644
--- a/modules/audio_processing/noise_suppression_impl.cc
+++ b/modules/audio_processing/noise_suppression_impl.cc
@@ -55,6 +55,27 @@
NoiseSuppressionImpl::~NoiseSuppressionImpl() {}
+int NoiseSuppressionImpl::AnalyzeCaptureAudio(AudioBuffer* audio) {
+#if defined(WEBRTC_NS_FLOAT)
+ if (!is_component_enabled()) {
+ return apm_->kNoError;
+ }
+ assert(audio->samples_per_split_channel() <= 160);
+ assert(audio->num_channels() == num_handles());
+
+ for (int i = 0; i < num_handles(); ++i) {
+ Handle* my_handle = static_cast<Handle*>(handle(i));
+
+ int err = WebRtcNs_Analyze(my_handle,
+ audio->low_pass_split_data_f(i));
+ if (err != apm_->kNoError) {
+ return GetHandleError(my_handle);
+ }
+ }
+#endif
+ return apm_->kNoError;
+}
+
int NoiseSuppressionImpl::ProcessCaptureAudio(AudioBuffer* audio) {
int err = apm_->kNoError;
@@ -64,16 +85,16 @@
assert(audio->samples_per_split_channel() <= 160);
assert(audio->num_channels() == num_handles());
- for (int i = 0; i < num_handles(); i++) {
+ for (int i = 0; i < num_handles(); ++i) {
Handle* my_handle = static_cast<Handle*>(handle(i));
#if defined(WEBRTC_NS_FLOAT)
- err = WebRtcNs_Process(static_cast<Handle*>(handle(i)),
+ err = WebRtcNs_Process(my_handle,
audio->low_pass_split_data_f(i),
audio->high_pass_split_data_f(i),
audio->low_pass_split_data_f(i),
audio->high_pass_split_data_f(i));
#elif defined(WEBRTC_NS_FIXED)
- err = WebRtcNsx_Process(static_cast<Handle*>(handle(i)),
+ err = WebRtcNsx_Process(my_handle,
audio->low_pass_split_data(i),
audio->high_pass_split_data(i),
audio->low_pass_split_data(i),
diff --git a/modules/audio_processing/noise_suppression_impl.h b/modules/audio_processing/noise_suppression_impl.h
index cadbbd9..14abe66 100644
--- a/modules/audio_processing/noise_suppression_impl.h
+++ b/modules/audio_processing/noise_suppression_impl.h
@@ -26,6 +26,7 @@
CriticalSectionWrapper* crit);
virtual ~NoiseSuppressionImpl();
+ int AnalyzeCaptureAudio(AudioBuffer* audio);
int ProcessCaptureAudio(AudioBuffer* audio);
// NoiseSuppression implementation.
diff --git a/modules/audio_processing/ns/Android.mk b/modules/audio_processing/ns/Android.mk
deleted file mode 100644
index 70e3376..0000000
--- a/modules/audio_processing/ns/Android.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-#############################
-# Build the non-neon library.
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_ns
-LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := \
- noise_suppression_x.c \
- nsx_core.c
-
-# Files for floating point.
-# noise_suppression.c ns_core.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../utility \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- $(LOCAL_PATH)/../../../system_wrappers/interface \
- external/webrtc
-
-LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-#############################
-# Build the neon library.
-ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_ns_neon
-LOCAL_MODULE_TAGS := optional
-NS_ASM_HEADER := $(intermediates)/ns_core_neon_offsets.h
-NS_ASM_HEADER_DIR := $(intermediates)
-
-# Generate a header file nsx_core_neon_offsets.h which will be included in
-# assembly file nsx_core_neon.S, from file nsx_core_neon_offsets.c.
-$(NS_ASM_HEADER): $(LOCAL_PATH)/../../../build/generate_asm_header.py \
- $(LOCAL_PATH)/nsx_core_neon_offsets.c
- @python $^ --compiler=$(TARGET_CC) --options="$(addprefix -I, \
- $(LOCAL_INCLUDES)) $(addprefix -isystem , $(TARGET_C_INCLUDES)) -S" \
- --dir=$(NS_ASM_HEADER_DIR)
-
-LOCAL_GENERATED_SOURCES := $(NS_ASM_HEADER)
-LOCAL_SRC_FILES := nsx_core_neon.S
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- -mfpu=neon \
- -mfloat-abi=softfp \
- -flax-vector-conversions
-
-LOCAL_C_INCLUDES := \
- $(NS_ASM_HEADER_DIR) \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- external/webrtc
-
-LOCAL_INCLUDES := $(LOCAL_C_INCLUDES)
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
diff --git a/modules/audio_processing/ns/defines.h b/modules/audio_processing/ns/defines.h
index d253967..893f6c1 100644
--- a/modules/audio_processing/ns/defines.h
+++ b/modules/audio_processing/ns/defines.h
@@ -11,10 +11,6 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
-//#define PROCESS_FLOW_0 // Use the traditional method.
-//#define PROCESS_FLOW_1 // Use traditional with DD estimate of prior SNR.
-#define PROCESS_FLOW_2 // Use the new method of speech/noise classification.
-
#define BLOCKL_MAX 160 // max processing block length: 160
#define ANAL_BLOCKL_MAX 256 // max analysis block length: 256
#define HALF_ANAL_BLOCKL 129 // half max analysis block length + 1
@@ -27,7 +23,6 @@
#define FACTOR (float)40.0
#define WIDTH (float)0.01
-#define SMOOTH (float)0.75 // filter smoothing
// Length of fft work arrays.
#define IP_LENGTH (ANAL_BLOCKL_MAX >> 1) // must be at least ceil(2 + sqrt(ANAL_BLOCKL_MAX/2))
#define W_LENGTH (ANAL_BLOCKL_MAX >> 1)
diff --git a/modules/audio_processing/ns/include/noise_suppression.h b/modules/audio_processing/ns/include/noise_suppression.h
index 3cf889e..093f118 100644
--- a/modules/audio_processing/ns/include/noise_suppression.h
+++ b/modules/audio_processing/ns/include/noise_suppression.h
@@ -79,6 +79,21 @@
*/
int WebRtcNs_set_policy(NsHandle* NS_inst, int mode);
+/*
+ * This functions estimates the background noise for the inserted speech frame.
+ * The input and output signals should always be 10ms (80 or 160 samples).
+ *
+ * Input
+ * - NS_inst : Noise suppression instance.
+ * - spframe : Pointer to speech frame buffer for L band
+ *
+ * Output:
+ * - NS_inst : Updated NS instance
+ *
+ * Return value : 0 - OK
+ * -1 - Error
+ */
+int WebRtcNs_Analyze(NsHandle* NS_inst, float* spframe);
/*
* This functions does Noise Suppression for the inserted speech frame. The
diff --git a/modules/audio_processing/ns/noise_suppression.c b/modules/audio_processing/ns/noise_suppression.c
index 075ab88..0015e38 100644
--- a/modules/audio_processing/ns/noise_suppression.c
+++ b/modules/audio_processing/ns/noise_suppression.c
@@ -42,6 +42,9 @@
return WebRtcNs_set_policy_core((NSinst_t*) NS_inst, mode);
}
+int WebRtcNs_Analyze(NsHandle* NS_inst, float* spframe) {
+ return WebRtcNs_AnalyzeCore((NSinst_t*) NS_inst, spframe);
+}
int WebRtcNs_Process(NsHandle* NS_inst, float* spframe, float* spframe_H,
float* outframe, float* outframe_H) {
diff --git a/modules/audio_processing/ns/ns_core.c b/modules/audio_processing/ns/ns_core.c
index ec267ae..285e404 100644
--- a/modules/audio_processing/ns/ns_core.c
+++ b/modules/audio_processing/ns/ns_core.c
@@ -10,8 +10,8 @@
#include <math.h>
#include <string.h>
-//#include <stdio.h>
#include <stdlib.h>
+
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
#include "webrtc/modules/audio_processing/ns/include/noise_suppression.h"
#include "webrtc/modules/audio_processing/ns/ns_core.h"
@@ -20,37 +20,40 @@
// Set Feature Extraction Parameters
void WebRtcNs_set_feature_extraction_parameters(NSinst_t* inst) {
- //bin size of histogram
- inst->featureExtractionParams.binSizeLrt = (float)0.1;
+ // bin size of histogram
+ inst->featureExtractionParams.binSizeLrt = (float)0.1;
inst->featureExtractionParams.binSizeSpecFlat = (float)0.05;
inst->featureExtractionParams.binSizeSpecDiff = (float)0.1;
- //range of histogram over which lrt threshold is computed
+ // range of histogram over which lrt threshold is computed
inst->featureExtractionParams.rangeAvgHistLrt = (float)1.0;
- //scale parameters: multiply dominant peaks of the histograms by scale factor to obtain
- // thresholds for prior model
- inst->featureExtractionParams.factor1ModelPars = (float)1.20; //for lrt and spectral diff
- inst->featureExtractionParams.factor2ModelPars = (float)0.9; //for spectral_flatness:
+ // scale parameters: multiply dominant peaks of the histograms by scale factor
+ // to obtain thresholds for prior model
+ inst->featureExtractionParams.factor1ModelPars =
+ (float)1.20; // for lrt and spectral diff
+ inst->featureExtractionParams.factor2ModelPars =
+ (float)0.9; // for spectral_flatness:
// used when noise is flatter than speech
- //peak limit for spectral flatness (varies between 0 and 1)
+ // peak limit for spectral flatness (varies between 0 and 1)
inst->featureExtractionParams.thresPosSpecFlat = (float)0.6;
- //limit on spacing of two highest peaks in histogram: spacing determined by bin size
- inst->featureExtractionParams.limitPeakSpacingSpecFlat =
+ // limit on spacing of two highest peaks in histogram: spacing determined by
+ // bin size
+ inst->featureExtractionParams.limitPeakSpacingSpecFlat =
2 * inst->featureExtractionParams.binSizeSpecFlat;
inst->featureExtractionParams.limitPeakSpacingSpecDiff =
2 * inst->featureExtractionParams.binSizeSpecDiff;
- //limit on relevance of second peak:
+ // limit on relevance of second peak:
inst->featureExtractionParams.limitPeakWeightsSpecFlat = (float)0.5;
inst->featureExtractionParams.limitPeakWeightsSpecDiff = (float)0.5;
// fluctuation limit of lrt feature
inst->featureExtractionParams.thresFluctLrt = (float)0.05;
- //limit on the max and min values for the feature thresholds
+ // limit on the max and min values for the feature thresholds
inst->featureExtractionParams.maxLrt = (float)1.0;
inst->featureExtractionParams.minLrt = (float)0.20;
@@ -60,19 +63,19 @@
inst->featureExtractionParams.maxSpecDiff = (float)1.0;
inst->featureExtractionParams.minSpecDiff = (float)0.16;
- //criteria of weight of histogram peak to accept/reject feature
- inst->featureExtractionParams.thresWeightSpecFlat = (int)(0.3
- * (inst->modelUpdatePars[1])); //for spectral flatness
- inst->featureExtractionParams.thresWeightSpecDiff = (int)(0.3
- * (inst->modelUpdatePars[1])); //for spectral difference
+ // criteria of weight of histogram peak to accept/reject feature
+ inst->featureExtractionParams.thresWeightSpecFlat =
+ (int)(0.3 * (inst->modelUpdatePars[1])); // for spectral flatness
+ inst->featureExtractionParams.thresWeightSpecDiff =
+ (int)(0.3 * (inst->modelUpdatePars[1])); // for spectral difference
}
// Initialize state
int WebRtcNs_InitCore(NSinst_t* inst, uint32_t fs) {
int i;
- //We only support 10ms frames
+ // We only support 10ms frames
- //check for valid pointer
+ // check for valid pointer
if (inst == NULL) {
return -1;
}
@@ -106,20 +109,21 @@
inst->window = kBlocks160w256;
inst->outLen = 0;
}
- inst->magnLen = inst->anaLen / 2 + 1; // Number of frequency bins
+ inst->magnLen = inst->anaLen / 2 + 1; // Number of frequency bins
// Initialize fft work arrays.
- inst->ip[0] = 0; // Setting this triggers initialization.
+ inst->ip[0] = 0; // Setting this triggers initialization.
memset(inst->dataBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);
WebRtc_rdft(inst->anaLen, 1, inst->dataBuf, inst->ip, inst->wfft);
+ memset(inst->analyzeBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);
memset(inst->dataBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);
memset(inst->syntBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);
- //for HB processing
+ // for HB processing
memset(inst->dataBufHB, 0, sizeof(float) * ANAL_BLOCKL_MAX);
- //for quantile noise estimation
+ // for quantile noise estimation
memset(inst->quantile, 0, sizeof(float) * HALF_ANAL_BLOCKL);
for (i = 0; i < SIMULT * HALF_ANAL_BLOCKL; i++) {
inst->lquantile[i] = (float)8.0;
@@ -127,7 +131,8 @@
}
for (i = 0; i < SIMULT; i++) {
- inst->counter[i] = (int)floor((float)(END_STARTUP_LONG * (i + 1)) / (float)SIMULT);
+ inst->counter[i] =
+ (int)floor((float)(END_STARTUP_LONG * (i + 1)) / (float)SIMULT);
}
inst->updates = 0;
@@ -140,52 +145,63 @@
// Set the aggressiveness: default
inst->aggrMode = 0;
- //initialize variables for new method
- inst->priorSpeechProb = (float)0.5; //prior prob for speech/noise
+ // initialize variables for new method
+ inst->priorSpeechProb = (float)0.5; // prior prob for speech/noise
for (i = 0; i < HALF_ANAL_BLOCKL; i++) {
- inst->magnPrev[i] = (float)0.0; //previous mag spectrum
- inst->noisePrev[i] = (float)0.0; //previous noise-spectrum
- inst->logLrtTimeAvg[i] = LRT_FEATURE_THR; //smooth LR ratio (same as threshold)
- inst->magnAvgPause[i] = (float)0.0; //conservative noise spectrum estimate
- inst->speechProbHB[i] = (float)0.0; //for estimation of HB in second pass
- inst->initMagnEst[i] = (float)0.0; //initial average mag spectrum
+ inst->magnPrev[i] = (float)0.0; // previous mag spectrum
+ inst->noisePrev[i] = (float)0.0; // previous noise-spectrum
+ inst->logLrtTimeAvg[i] =
+ LRT_FEATURE_THR; // smooth LR ratio (same as threshold)
+ inst->magnAvgPause[i] = (float)0.0; // conservative noise spectrum estimate
+ inst->speechProb[i] = (float)0.0; // for estimation of HB in second pass
+ inst->initMagnEst[i] = (float)0.0; // initial average mag spectrum
}
- //feature quantities
- inst->featureData[0] = SF_FEATURE_THR; //spectral flatness (start on threshold)
- inst->featureData[1] = (float)0.0; //spectral entropy: not used in this version
- inst->featureData[2] = (float)0.0; //spectral variance: not used in this version
- inst->featureData[3] = LRT_FEATURE_THR; //average lrt factor (start on threshold)
- inst->featureData[4] = SF_FEATURE_THR; //spectral template diff (start on threshold)
- inst->featureData[5] = (float)0.0; //normalization for spectral-diff
- inst->featureData[6] = (float)0.0; //window time-average of input magnitude spectrum
+ // feature quantities
+ inst->featureData[0] =
+ SF_FEATURE_THR; // spectral flatness (start on threshold)
+ inst->featureData[1] =
+ (float)0.0; // spectral entropy: not used in this version
+ inst->featureData[2] =
+ (float)0.0; // spectral variance: not used in this version
+ inst->featureData[3] =
+ LRT_FEATURE_THR; // average lrt factor (start on threshold)
+ inst->featureData[4] =
+ SF_FEATURE_THR; // spectral template diff (start on threshold)
+ inst->featureData[5] = (float)0.0; // normalization for spectral-diff
+ inst->featureData[6] =
+ (float)0.0; // window time-average of input magnitude spectrum
- //histogram quantities: used to estimate/update thresholds for features
+ // histogram quantities: used to estimate/update thresholds for features
for (i = 0; i < HIST_PAR_EST; i++) {
inst->histLrt[i] = 0;
inst->histSpecFlat[i] = 0;
inst->histSpecDiff[i] = 0;
}
- inst->blockInd = -1; //frame counter
- inst->priorModelPars[0] = LRT_FEATURE_THR; //default threshold for lrt feature
- inst->priorModelPars[1] = (float)0.5; //threshold for spectral flatness:
+ inst->blockInd = -1; // frame counter
+ inst->priorModelPars[0] =
+ LRT_FEATURE_THR; // default threshold for lrt feature
+ inst->priorModelPars[1] = (float)0.5; // threshold for spectral flatness:
// determined on-line
- inst->priorModelPars[2] = (float)1.0; //sgn_map par for spectral measure:
+ inst->priorModelPars[2] = (float)1.0; // sgn_map par for spectral measure:
// 1 for flatness measure
- inst->priorModelPars[3] = (float)0.5; //threshold for template-difference feature:
+ inst->priorModelPars[3] =
+ (float)0.5; // threshold for template-difference feature:
// determined on-line
- inst->priorModelPars[4] = (float)1.0; //default weighting parameter for lrt feature
- inst->priorModelPars[5] = (float)0.0; //default weighting parameter for
+ inst->priorModelPars[4] =
+ (float)1.0; // default weighting parameter for lrt feature
+ inst->priorModelPars[5] = (float)0.0; // default weighting parameter for
// spectral flatness feature
- inst->priorModelPars[6] = (float)0.0; //default weighting parameter for
+ inst->priorModelPars[6] = (float)0.0; // default weighting parameter for
// spectral difference feature
- inst->modelUpdatePars[0] = 2; //update flag for parameters:
+ inst->modelUpdatePars[0] = 2; // update flag for parameters:
// 0 no update, 1=update once, 2=update every window
- inst->modelUpdatePars[1] = 500; //window for update
- inst->modelUpdatePars[2] = 0; //counter for update of conservative noise spectrum
- //counter if the feature thresholds are updated during the sequence
+ inst->modelUpdatePars[1] = 500; // window for update
+ inst->modelUpdatePars[2] =
+ 0; // counter for update of conservative noise spectrum
+ // counter if the feature thresholds are updated during the sequence
inst->modelUpdatePars[3] = inst->modelUpdatePars[1];
inst->signalEnergy = 0.0;
@@ -194,12 +210,11 @@
inst->pinkNoiseNumerator = 0.0;
inst->pinkNoiseExp = 0.0;
- WebRtcNs_set_feature_extraction_parameters(inst); // Set feature configuration
+ WebRtcNs_set_feature_extraction_parameters(inst);
- //default mode
+ // default mode
WebRtcNs_set_policy_core(inst, 0);
-
memset(inst->outBuf, 0, sizeof(float) * 3 * BLOCKL_MAX);
inst->initFlag = 1;
@@ -218,17 +233,17 @@
inst->denoiseBound = (float)0.5;
inst->gainmap = 0;
} else if (mode == 1) {
- //inst->overdrive = (float)1.25;
+ // inst->overdrive = (float)1.25;
inst->overdrive = (float)1.0;
inst->denoiseBound = (float)0.25;
inst->gainmap = 1;
} else if (mode == 2) {
- //inst->overdrive = (float)1.25;
+ // inst->overdrive = (float)1.25;
inst->overdrive = (float)1.1;
inst->denoiseBound = (float)0.125;
inst->gainmap = 1;
} else if (mode == 3) {
- //inst->overdrive = (float)1.30;
+ // inst->overdrive = (float)1.30;
inst->overdrive = (float)1.25;
inst->denoiseBound = (float)0.09;
inst->gainmap = 1;
@@ -264,17 +279,19 @@
// update log quantile estimate
if (lmagn[i] > inst->lquantile[offset + i]) {
- inst->lquantile[offset + i] += QUANTILE * delta
- / (float)(inst->counter[s] + 1);
+ inst->lquantile[offset + i] +=
+ QUANTILE * delta / (float)(inst->counter[s] + 1);
} else {
- inst->lquantile[offset + i] -= ((float)1.0 - QUANTILE) * delta
- / (float)(inst->counter[s] + 1);
+ inst->lquantile[offset + i] -=
+ ((float)1.0 - QUANTILE) * delta / (float)(inst->counter[s] + 1);
}
// update density estimate
if (fabs(lmagn[i] - inst->lquantile[offset + i]) < WIDTH) {
- inst->density[offset + i] = ((float)inst->counter[s] * inst->density[offset
- + i] + (float)1.0 / ((float)2.0 * WIDTH)) / (float)(inst->counter[s] + 1);
+ inst->density[offset + i] =
+ ((float)inst->counter[s] * inst->density[offset + i] +
+ (float)1.0 / ((float)2.0 * WIDTH)) /
+ (float)(inst->counter[s] + 1);
}
} // end loop over magnitude spectrum
@@ -304,57 +321,66 @@
}
// Extract thresholds for feature parameters
-// histograms are computed over some window_size (given by inst->modelUpdatePars[1])
+// histograms are computed over some window_size (given by
+// inst->modelUpdatePars[1])
// thresholds and weights are extracted every window
-// flag 0 means update histogram only, flag 1 means compute the thresholds/weights
+// flag 0 means update histogram only, flag 1 means compute the
+// thresholds/weights
// threshold and weights are returned in: inst->priorModelPars
void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
int i, useFeatureSpecFlat, useFeatureSpecDiff, numHistLrt;
int maxPeak1, maxPeak2;
- int weightPeak1SpecFlat, weightPeak2SpecFlat, weightPeak1SpecDiff, weightPeak2SpecDiff;
+ int weightPeak1SpecFlat, weightPeak2SpecFlat, weightPeak1SpecDiff,
+ weightPeak2SpecDiff;
float binMid, featureSum;
float posPeak1SpecFlat, posPeak2SpecFlat, posPeak1SpecDiff, posPeak2SpecDiff;
float fluctLrt, avgHistLrt, avgSquareHistLrt, avgHistLrtCompl;
- //3 features: lrt, flatness, difference
- //lrt_feature = inst->featureData[3];
- //flat_feature = inst->featureData[0];
- //diff_feature = inst->featureData[4];
+ // 3 features: lrt, flatness, difference
+ // lrt_feature = inst->featureData[3];
+ // flat_feature = inst->featureData[0];
+ // diff_feature = inst->featureData[4];
- //update histograms
+ // update histograms
if (flag == 0) {
// LRT
- if ((inst->featureData[3] < HIST_PAR_EST * inst->featureExtractionParams.binSizeLrt)
- && (inst->featureData[3] >= 0.0)) {
- i = (int)(inst->featureData[3] / inst->featureExtractionParams.binSizeLrt);
+ if ((inst->featureData[3] <
+ HIST_PAR_EST * inst->featureExtractionParams.binSizeLrt) &&
+ (inst->featureData[3] >= 0.0)) {
+ i = (int)(inst->featureData[3] /
+ inst->featureExtractionParams.binSizeLrt);
inst->histLrt[i]++;
}
// Spectral flatness
- if ((inst->featureData[0] < HIST_PAR_EST
- * inst->featureExtractionParams.binSizeSpecFlat)
- && (inst->featureData[0] >= 0.0)) {
- i = (int)(inst->featureData[0] / inst->featureExtractionParams.binSizeSpecFlat);
+ if ((inst->featureData[0] <
+ HIST_PAR_EST * inst->featureExtractionParams.binSizeSpecFlat) &&
+ (inst->featureData[0] >= 0.0)) {
+ i = (int)(inst->featureData[0] /
+ inst->featureExtractionParams.binSizeSpecFlat);
inst->histSpecFlat[i]++;
}
// Spectral difference
- if ((inst->featureData[4] < HIST_PAR_EST
- * inst->featureExtractionParams.binSizeSpecDiff)
- && (inst->featureData[4] >= 0.0)) {
- i = (int)(inst->featureData[4] / inst->featureExtractionParams.binSizeSpecDiff);
+ if ((inst->featureData[4] <
+ HIST_PAR_EST * inst->featureExtractionParams.binSizeSpecDiff) &&
+ (inst->featureData[4] >= 0.0)) {
+ i = (int)(inst->featureData[4] /
+ inst->featureExtractionParams.binSizeSpecDiff);
inst->histSpecDiff[i]++;
}
}
// extract parameters for speech/noise probability
if (flag == 1) {
- //lrt feature: compute the average over inst->featureExtractionParams.rangeAvgHistLrt
+ // lrt feature: compute the average over
+ // inst->featureExtractionParams.rangeAvgHistLrt
avgHistLrt = 0.0;
avgHistLrtCompl = 0.0;
avgSquareHistLrt = 0.0;
numHistLrt = 0;
for (i = 0; i < HIST_PAR_EST; i++) {
- binMid = ((float)i + (float)0.5) * inst->featureExtractionParams.binSizeLrt;
+ binMid =
+ ((float)i + (float)0.5) * inst->featureExtractionParams.binSizeLrt;
if (binMid <= inst->featureExtractionParams.rangeAvgHistLrt) {
avgHistLrt += inst->histLrt[i] * binMid;
numHistLrt += inst->histLrt[i];
@@ -370,11 +396,11 @@
fluctLrt = avgSquareHistLrt - avgHistLrt * avgHistLrtCompl;
// get threshold for lrt feature:
if (fluctLrt < inst->featureExtractionParams.thresFluctLrt) {
- //very low fluct, so likely noise
+ // very low fluct, so likely noise
inst->priorModelPars[0] = inst->featureExtractionParams.maxLrt;
} else {
- inst->priorModelPars[0] = inst->featureExtractionParams.factor1ModelPars
- * avgHistLrt;
+ inst->priorModelPars[0] =
+ inst->featureExtractionParams.factor1ModelPars * avgHistLrt;
// check if value is within min/max range
if (inst->priorModelPars[0] < inst->featureExtractionParams.minLrt) {
inst->priorModelPars[0] = inst->featureExtractionParams.minLrt;
@@ -385,8 +411,8 @@
}
// done with lrt feature
- //
- // for spectral flatness and spectral difference: compute the main peaks of histogram
+ // for spectral flatness and spectral difference: compute the main peaks of
+ // histogram
maxPeak1 = 0;
maxPeak2 = 0;
posPeak1SpecFlat = 0.0;
@@ -396,7 +422,8 @@
// peaks for flatness
for (i = 0; i < HIST_PAR_EST; i++) {
- binMid = ((float)i + (float)0.5) * inst->featureExtractionParams.binSizeSpecFlat;
+ binMid = ((float)i + (float)0.5) *
+ inst->featureExtractionParams.binSizeSpecFlat;
if (inst->histSpecFlat[i] > maxPeak1) {
// Found new "first" peak
maxPeak2 = maxPeak1;
@@ -414,7 +441,7 @@
}
}
- //compute two peaks for spectral difference
+ // compute two peaks for spectral difference
maxPeak1 = 0;
maxPeak2 = 0;
posPeak1SpecDiff = 0.0;
@@ -423,7 +450,8 @@
weightPeak2SpecDiff = 0;
// peaks for spectral difference
for (i = 0; i < HIST_PAR_EST; i++) {
- binMid = ((float)i + (float)0.5) * inst->featureExtractionParams.binSizeSpecDiff;
+ binMid = ((float)i + (float)0.5) *
+ inst->featureExtractionParams.binSizeSpecDiff;
if (inst->histSpecDiff[i] > maxPeak1) {
// Found new "first" peak
maxPeak2 = maxPeak1;
@@ -444,25 +472,26 @@
// for spectrum flatness feature
useFeatureSpecFlat = 1;
// merge the two peaks if they are close
- if ((fabs(posPeak2SpecFlat - posPeak1SpecFlat)
- < inst->featureExtractionParams.limitPeakSpacingSpecFlat)
- && (weightPeak2SpecFlat
- > inst->featureExtractionParams.limitPeakWeightsSpecFlat
- * weightPeak1SpecFlat)) {
+ if ((fabs(posPeak2SpecFlat - posPeak1SpecFlat) <
+ inst->featureExtractionParams.limitPeakSpacingSpecFlat) &&
+ (weightPeak2SpecFlat >
+ inst->featureExtractionParams.limitPeakWeightsSpecFlat *
+ weightPeak1SpecFlat)) {
weightPeak1SpecFlat += weightPeak2SpecFlat;
posPeak1SpecFlat = (float)0.5 * (posPeak1SpecFlat + posPeak2SpecFlat);
}
- //reject if weight of peaks is not large enough, or peak value too small
- if (weightPeak1SpecFlat < inst->featureExtractionParams.thresWeightSpecFlat
- || posPeak1SpecFlat < inst->featureExtractionParams.thresPosSpecFlat) {
+ // reject if weight of peaks is not large enough, or peak value too small
+ if (weightPeak1SpecFlat <
+ inst->featureExtractionParams.thresWeightSpecFlat ||
+ posPeak1SpecFlat < inst->featureExtractionParams.thresPosSpecFlat) {
useFeatureSpecFlat = 0;
}
// if selected, get the threshold
if (useFeatureSpecFlat == 1) {
// compute the threshold
- inst->priorModelPars[1] = inst->featureExtractionParams.factor2ModelPars
- * posPeak1SpecFlat;
- //check if value is within min/max range
+ inst->priorModelPars[1] =
+ inst->featureExtractionParams.factor2ModelPars * posPeak1SpecFlat;
+ // check if value is within min/max range
if (inst->priorModelPars[1] < inst->featureExtractionParams.minSpecFlat) {
inst->priorModelPars[1] = inst->featureExtractionParams.minSpecFlat;
}
@@ -475,22 +504,23 @@
// for template feature
useFeatureSpecDiff = 1;
// merge the two peaks if they are close
- if ((fabs(posPeak2SpecDiff - posPeak1SpecDiff)
- < inst->featureExtractionParams.limitPeakSpacingSpecDiff)
- && (weightPeak2SpecDiff
- > inst->featureExtractionParams.limitPeakWeightsSpecDiff
- * weightPeak1SpecDiff)) {
+ if ((fabs(posPeak2SpecDiff - posPeak1SpecDiff) <
+ inst->featureExtractionParams.limitPeakSpacingSpecDiff) &&
+ (weightPeak2SpecDiff >
+ inst->featureExtractionParams.limitPeakWeightsSpecDiff *
+ weightPeak1SpecDiff)) {
weightPeak1SpecDiff += weightPeak2SpecDiff;
posPeak1SpecDiff = (float)0.5 * (posPeak1SpecDiff + posPeak2SpecDiff);
}
// get the threshold value
- inst->priorModelPars[3] = inst->featureExtractionParams.factor1ModelPars
- * posPeak1SpecDiff;
- //reject if weight of peaks is not large enough
- if (weightPeak1SpecDiff < inst->featureExtractionParams.thresWeightSpecDiff) {
+ inst->priorModelPars[3] =
+ inst->featureExtractionParams.factor1ModelPars * posPeak1SpecDiff;
+ // reject if weight of peaks is not large enough
+ if (weightPeak1SpecDiff <
+ inst->featureExtractionParams.thresWeightSpecDiff) {
useFeatureSpecDiff = 0;
}
- //check if value is within min/max range
+ // check if value is within min/max range
if (inst->priorModelPars[3] < inst->featureExtractionParams.minSpecDiff) {
inst->priorModelPars[3] = inst->featureExtractionParams.minSpecDiff;
}
@@ -530,7 +560,7 @@
// spectral flatness is returned in inst->featureData[0]
void WebRtcNs_ComputeSpectralFlatness(NSinst_t* inst, float* magnIn) {
int i;
- int shiftLP = 1; //option to remove first bin(s) from spectral measures
+ int shiftLP = 1; // option to remove first bin(s) from spectral measures
float avgSpectralFlatnessNum, avgSpectralFlatnessDen, spectralTmp;
// comute spectral measures
@@ -540,7 +570,8 @@
for (i = 0; i < shiftLP; i++) {
avgSpectralFlatnessDen -= magnIn[i];
}
- // compute log of ratio of the geometric to arithmetic mean: check for log(0) case
+ // compute log of ratio of the geometric to arithmetic mean: check for log(0)
+ // case
for (i = shiftLP; i < inst->magnLen; i++) {
if (magnIn[i] > 0.0) {
avgSpectralFlatnessNum += (float)log(magnIn[i]);
@@ -549,24 +580,26 @@
return;
}
}
- //normalize
+ // normalize
avgSpectralFlatnessDen = avgSpectralFlatnessDen / inst->magnLen;
avgSpectralFlatnessNum = avgSpectralFlatnessNum / inst->magnLen;
- //ratio and inverse log: check for case of log(0)
+ // ratio and inverse log: check for case of log(0)
spectralTmp = (float)exp(avgSpectralFlatnessNum) / avgSpectralFlatnessDen;
- //time-avg update of spectral flatness feature
+ // time-avg update of spectral flatness feature
inst->featureData[0] += SPECT_FL_TAVG * (spectralTmp - inst->featureData[0]);
// done with flatness feature
}
-// Compute the difference measure between input spectrum and a template/learned noise spectrum
+// Compute the difference measure between input spectrum and a template/learned
+// noise spectrum
// magnIn is the input spectrum
// the reference/template spectrum is inst->magnAvgPause[i]
// returns (normalized) spectral difference in inst->featureData[4]
void WebRtcNs_ComputeSpectralDifference(NSinst_t* inst, float* magnIn) {
- // avgDiffNormMagn = var(magnIn) - cov(magnIn, magnAvgPause)^2 / var(magnAvgPause)
+ // avgDiffNormMagn = var(magnIn) - cov(magnIn, magnAvgPause)^2 /
+ // var(magnAvgPause)
int i;
float avgPause, avgMagn, covMagnPause, varPause, varMagn, avgDiffNormMagn;
@@ -574,7 +607,7 @@
avgMagn = inst->sumMagn;
// compute average quantities
for (i = 0; i < inst->magnLen; i++) {
- //conservative smooth noise spectrum from pause frames
+ // conservative smooth noise spectrum from pause frames
avgPause += inst->magnAvgPause[i];
}
avgPause = avgPause / ((float)inst->magnLen);
@@ -586,7 +619,8 @@
// compute variance and covariance quantities
for (i = 0; i < inst->magnLen; i++) {
covMagnPause += (magnIn[i] - avgMagn) * (inst->magnAvgPause[i] - avgPause);
- varPause += (inst->magnAvgPause[i] - avgPause) * (inst->magnAvgPause[i] - avgPause);
+ varPause +=
+ (inst->magnAvgPause[i] - avgPause) * (inst->magnAvgPause[i] - avgPause);
varMagn += (magnIn[i] - avgMagn) * (magnIn[i] - avgMagn);
}
covMagnPause = covMagnPause / ((float)inst->magnLen);
@@ -595,19 +629,24 @@
// update of average magnitude spectrum
inst->featureData[6] += inst->signalEnergy;
- avgDiffNormMagn = varMagn - (covMagnPause * covMagnPause) / (varPause + (float)0.0001);
+ avgDiffNormMagn =
+ varMagn - (covMagnPause * covMagnPause) / (varPause + (float)0.0001);
// normalize and compute time-avg update of difference feature
- avgDiffNormMagn = (float)(avgDiffNormMagn / (inst->featureData[5] + (float)0.0001));
- inst->featureData[4] += SPECT_DIFF_TAVG * (avgDiffNormMagn - inst->featureData[4]);
+ avgDiffNormMagn =
+ (float)(avgDiffNormMagn / (inst->featureData[5] + (float)0.0001));
+ inst->featureData[4] +=
+ SPECT_DIFF_TAVG * (avgDiffNormMagn - inst->featureData[4]);
}
// Compute speech/noise probability
// speech/noise probability is returned in: probSpeechFinal
-//magn is the input magnitude spectrum
-//noise is the noise spectrum
-//snrLocPrior is the prior snr for each freq.
-//snr loc_post is the post snr for each freq.
-void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snrLocPrior,
+// magn is the input magnitude spectrum
+// noise is the noise spectrum
+// snrLocPrior is the prior snr for each freq.
+// snr loc_post is the post snr for each freq.
+void WebRtcNs_SpeechNoiseProb(NSinst_t* inst,
+ float* probSpeechFinal,
+ float* snrLocPrior,
float* snrLocPost) {
int i, sgnMap;
float invLrt, gainPrior, indPrior;
@@ -619,19 +658,19 @@
float widthPrior, widthPrior0, widthPrior1, widthPrior2;
widthPrior0 = WIDTH_PR_MAP;
- widthPrior1 = (float)2.0 * WIDTH_PR_MAP; //width for pause region:
+ widthPrior1 = (float)2.0 * WIDTH_PR_MAP; // width for pause region:
// lower range, so increase width in tanh map
- widthPrior2 = (float)2.0 * WIDTH_PR_MAP; //for spectral-difference measure
+ widthPrior2 = (float)2.0 * WIDTH_PR_MAP; // for spectral-difference measure
- //threshold parameters for features
+ // threshold parameters for features
threshPrior0 = inst->priorModelPars[0];
threshPrior1 = inst->priorModelPars[1];
threshPrior2 = inst->priorModelPars[3];
- //sign for flatness feature
+ // sign for flatness feature
sgnMap = (int)(inst->priorModelPars[2]);
- //weight parameters for features
+ // weight parameters for features
weightIndPrior0 = inst->priorModelPars[4];
weightIndPrior1 = inst->priorModelPars[5];
weightIndPrior2 = inst->priorModelPars[6];
@@ -643,8 +682,8 @@
tmpFloat1 = (float)1.0 + (float)2.0 * snrLocPrior[i];
tmpFloat2 = (float)2.0 * snrLocPrior[i] / (tmpFloat1 + (float)0.0001);
besselTmp = (snrLocPost[i] + (float)1.0) * tmpFloat2;
- inst->logLrtTimeAvg[i] += LRT_TAVG * (besselTmp - (float)log(tmpFloat1)
- - inst->logLrtTimeAvg[i]);
+ inst->logLrtTimeAvg[i] +=
+ LRT_TAVG * (besselTmp - (float)log(tmpFloat1) - inst->logLrtTimeAvg[i]);
logLrtTimeAvgKsum += inst->logLrtTimeAvg[i];
}
logLrtTimeAvgKsum = (float)logLrtTimeAvgKsum / (inst->magnLen);
@@ -652,23 +691,24 @@
// done with computation of LR factor
//
- //compute the indicator functions
+ // compute the indicator functions
//
// average lrt feature
widthPrior = widthPrior0;
- //use larger width in tanh map for pause regions
+ // use larger width in tanh map for pause regions
if (logLrtTimeAvgKsum < threshPrior0) {
widthPrior = widthPrior1;
}
// compute indicator function: sigmoid map
- indicator0 = (float)0.5 * ((float)tanh(widthPrior *
- (logLrtTimeAvgKsum - threshPrior0)) + (float)1.0);
+ indicator0 = (float)0.5 *
+ ((float)tanh(widthPrior * (logLrtTimeAvgKsum - threshPrior0)) +
+ (float)1.0);
- //spectral flatness feature
+ // spectral flatness feature
tmpFloat1 = inst->featureData[0];
widthPrior = widthPrior0;
- //use larger width in tanh map for pause regions
+ // use larger width in tanh map for pause regions
if (sgnMap == 1 && (tmpFloat1 > threshPrior1)) {
widthPrior = widthPrior1;
}
@@ -676,26 +716,29 @@
widthPrior = widthPrior1;
}
// compute indicator function: sigmoid map
- indicator1 = (float)0.5 * ((float)tanh((float)sgnMap *
- widthPrior * (threshPrior1 - tmpFloat1)) + (float)1.0);
+ indicator1 =
+ (float)0.5 *
+ ((float)tanh((float)sgnMap * widthPrior * (threshPrior1 - tmpFloat1)) +
+ (float)1.0);
- //for template spectrum-difference
+ // for template spectrum-difference
tmpFloat1 = inst->featureData[4];
widthPrior = widthPrior0;
- //use larger width in tanh map for pause regions
+ // use larger width in tanh map for pause regions
if (tmpFloat1 < threshPrior2) {
widthPrior = widthPrior2;
}
// compute indicator function: sigmoid map
- indicator2 = (float)0.5 * ((float)tanh(widthPrior * (tmpFloat1 - threshPrior2))
- + (float)1.0);
+ indicator2 =
+ (float)0.5 *
+ ((float)tanh(widthPrior * (tmpFloat1 - threshPrior2)) + (float)1.0);
- //combine the indicator function with the feature weights
- indPrior = weightIndPrior0 * indicator0 + weightIndPrior1 * indicator1 + weightIndPrior2
- * indicator2;
+ // combine the indicator function with the feature weights
+ indPrior = weightIndPrior0 * indicator0 + weightIndPrior1 * indicator1 +
+ weightIndPrior2 * indicator2;
// done with computing indicator function
- //compute the prior probability
+ // compute the prior probability
inst->priorSpeechProb += PRIOR_UPDATE * (indPrior - inst->priorSpeechProb);
// make sure probabilities are within range: keep floor to 0.01
if (inst->priorSpeechProb > 1.0) {
@@ -705,8 +748,9 @@
inst->priorSpeechProb = (float)0.01;
}
- //final speech probability: combine prior model with LR factor:
- gainPrior = ((float)1.0 - inst->priorSpeechProb) / (inst->priorSpeechProb + (float)0.0001);
+ // final speech probability: combine prior model with LR factor:
+ gainPrior = ((float)1.0 - inst->priorSpeechProb) /
+ (inst->priorSpeechProb + (float)0.0001);
for (i = 0; i < inst->magnLen; i++) {
invLrt = (float)exp(-inst->logLrtTimeAvg[i]);
invLrt = (float)gainPrior * invLrt;
@@ -714,48 +758,311 @@
}
}
+int WebRtcNs_AnalyzeCore(NSinst_t* inst, float* speechFrame) {
+ int i;
+ const int kStartBand = 5; // Skip first frequency bins during estimation.
+ int updateParsFlag;
+ float energy;
+ float signalEnergy, sumMagn;
+ float tmpFloat1, tmpFloat2, tmpFloat3, probSpeech, probNonSpeech;
+ float gammaNoiseTmp, gammaNoiseOld;
+ float noiseUpdateTmp, fTmp;
+ float winData[ANAL_BLOCKL_MAX];
+ float magn[HALF_ANAL_BLOCKL], noise[HALF_ANAL_BLOCKL];
+ float snrLocPost[HALF_ANAL_BLOCKL], snrLocPrior[HALF_ANAL_BLOCKL];
+ float real[ANAL_BLOCKL_MAX], imag[HALF_ANAL_BLOCKL];
+ // Variables during startup
+ float sum_log_i = 0.0;
+ float sum_log_i_square = 0.0;
+ float sum_log_magn = 0.0;
+ float sum_log_i_log_magn = 0.0;
+ float parametric_exp = 0.0;
+ float parametric_num = 0.0;
+
+ // Check that initiation has been done
+ if (inst->initFlag != 1) {
+ return (-1);
+ }
+ //
+ updateParsFlag = inst->modelUpdatePars[0];
+ //
+
+ // update analysis buffer for L band
+ memcpy(inst->analyzeBuf,
+ inst->analyzeBuf + inst->blockLen10ms,
+ sizeof(float) * (inst->anaLen - inst->blockLen10ms));
+ memcpy(inst->analyzeBuf + inst->anaLen - inst->blockLen10ms,
+ speechFrame,
+ sizeof(float) * inst->blockLen10ms);
+
+ // check if processing needed
+ if (inst->outLen == 0) {
+ // windowing
+ energy = 0.0;
+ for (i = 0; i < inst->anaLen; i++) {
+ winData[i] = inst->window[i] * inst->analyzeBuf[i];
+ energy += winData[i] * winData[i];
+ }
+ if (energy == 0.0) {
+ // we want to avoid updating statistics in this case:
+ // Updating feature statistics when we have zeros only will cause
+ // thresholds to move towards zero signal situations. This in turn has the
+ // effect that once the signal is "turned on" (non-zero values) everything
+ // will be treated as speech and there is no noise suppression effect.
+ // Depending on the duration of the inactive signal it takes a
+ // considerable amount of time for the system to learn what is noise and
+ // what is speech.
+ return 0;
+ }
+
+ //
+ inst->blockInd++; // Update the block index only when we process a block.
+ // FFT
+ WebRtc_rdft(inst->anaLen, 1, winData, inst->ip, inst->wfft);
+
+ imag[0] = 0;
+ real[0] = winData[0];
+ magn[0] = (float)(fabs(real[0]) + 1.0f);
+ imag[inst->magnLen - 1] = 0;
+ real[inst->magnLen - 1] = winData[1];
+ magn[inst->magnLen - 1] = (float)(fabs(real[inst->magnLen - 1]) + 1.0f);
+ signalEnergy = (float)(real[0] * real[0]) +
+ (float)(real[inst->magnLen - 1] * real[inst->magnLen - 1]);
+ sumMagn = magn[0] + magn[inst->magnLen - 1];
+ if (inst->blockInd < END_STARTUP_SHORT) {
+ tmpFloat2 = log((float)(inst->magnLen - 1));
+ sum_log_i = tmpFloat2;
+ sum_log_i_square = tmpFloat2 * tmpFloat2;
+ tmpFloat1 = log(magn[inst->magnLen - 1]);
+ sum_log_magn = tmpFloat1;
+ sum_log_i_log_magn = tmpFloat2 * tmpFloat1;
+ }
+ for (i = 1; i < inst->magnLen - 1; i++) {
+ real[i] = winData[2 * i];
+ imag[i] = winData[2 * i + 1];
+ // magnitude spectrum
+ fTmp = real[i] * real[i];
+ fTmp += imag[i] * imag[i];
+ signalEnergy += fTmp;
+ magn[i] = ((float)sqrt(fTmp)) + 1.0f;
+ sumMagn += magn[i];
+ if (inst->blockInd < END_STARTUP_SHORT) {
+ if (i >= kStartBand) {
+ tmpFloat2 = log((float)i);
+ sum_log_i += tmpFloat2;
+ sum_log_i_square += tmpFloat2 * tmpFloat2;
+ tmpFloat1 = log(magn[i]);
+ sum_log_magn += tmpFloat1;
+ sum_log_i_log_magn += tmpFloat2 * tmpFloat1;
+ }
+ }
+ }
+ signalEnergy = signalEnergy / ((float)inst->magnLen);
+ inst->signalEnergy = signalEnergy;
+ inst->sumMagn = sumMagn;
+
+ // compute spectral flatness on input spectrum
+ WebRtcNs_ComputeSpectralFlatness(inst, magn);
+ // quantile noise estimate
+ WebRtcNs_NoiseEstimation(inst, magn, noise);
+ // compute simplified noise model during startup
+ if (inst->blockInd < END_STARTUP_SHORT) {
+ // Estimate White noise
+ inst->whiteNoiseLevel +=
+ sumMagn / ((float)inst->magnLen) * inst->overdrive;
+ // Estimate Pink noise parameters
+ tmpFloat1 = sum_log_i_square * ((float)(inst->magnLen - kStartBand));
+ tmpFloat1 -= (sum_log_i * sum_log_i);
+ tmpFloat2 =
+ (sum_log_i_square * sum_log_magn - sum_log_i * sum_log_i_log_magn);
+ tmpFloat3 = tmpFloat2 / tmpFloat1;
+ // Constrain the estimated spectrum to be positive
+ if (tmpFloat3 < 0.0f) {
+ tmpFloat3 = 0.0f;
+ }
+ inst->pinkNoiseNumerator += tmpFloat3;
+ tmpFloat2 = (sum_log_i * sum_log_magn);
+ tmpFloat2 -= ((float)(inst->magnLen - kStartBand)) * sum_log_i_log_magn;
+ tmpFloat3 = tmpFloat2 / tmpFloat1;
+ // Constrain the pink noise power to be in the interval [0, 1];
+ if (tmpFloat3 < 0.0f) {
+ tmpFloat3 = 0.0f;
+ }
+ if (tmpFloat3 > 1.0f) {
+ tmpFloat3 = 1.0f;
+ }
+ inst->pinkNoiseExp += tmpFloat3;
+
+ // Calculate frequency independent parts of parametric noise estimate.
+ if (inst->pinkNoiseExp > 0.0f) {
+ // Use pink noise estimate
+ parametric_num =
+ exp(inst->pinkNoiseNumerator / (float)(inst->blockInd + 1));
+ parametric_num *= (float)(inst->blockInd + 1);
+ parametric_exp = inst->pinkNoiseExp / (float)(inst->blockInd + 1);
+ }
+ for (i = 0; i < inst->magnLen; i++) {
+ // Estimate the background noise using the white and pink noise
+ // parameters
+ if (inst->pinkNoiseExp == 0.0f) {
+ // Use white noise estimate
+ inst->parametricNoise[i] = inst->whiteNoiseLevel;
+ } else {
+ // Use pink noise estimate
+ float use_band = (float)(i < kStartBand ? kStartBand : i);
+ inst->parametricNoise[i] =
+ parametric_num / pow(use_band, parametric_exp);
+ }
+ // Weight quantile noise with modeled noise
+ noise[i] *= (inst->blockInd);
+ tmpFloat2 =
+ inst->parametricNoise[i] * (END_STARTUP_SHORT - inst->blockInd);
+ noise[i] += (tmpFloat2 / (float)(inst->blockInd + 1));
+ noise[i] /= END_STARTUP_SHORT;
+ }
+ }
+ // compute average signal during END_STARTUP_LONG time:
+ // used to normalize spectral difference measure
+ if (inst->blockInd < END_STARTUP_LONG) {
+ inst->featureData[5] *= inst->blockInd;
+ inst->featureData[5] += signalEnergy;
+ inst->featureData[5] /= (inst->blockInd + 1);
+ }
+
+ // start processing at frames == converged+1
+ // STEP 1: compute prior and post snr based on quantile noise est
+ // compute DD estimate of prior SNR: needed for new method
+ for (i = 0; i < inst->magnLen; i++) {
+ // post snr
+ snrLocPost[i] = (float)0.0;
+ if (magn[i] > noise[i]) {
+ snrLocPost[i] = magn[i] / (noise[i] + (float)0.0001) - (float)1.0;
+ }
+ // previous post snr
+ // previous estimate: based on previous frame with gain filter
+ inst->previousEstimateStsa[i] = inst->magnPrev[i] /
+ (inst->noisePrev[i] + (float)0.0001) *
+ (inst->smooth[i]);
+ // DD estimate is sum of two terms: current estimate and previous estimate
+ // directed decision update of snrPrior
+ snrLocPrior[i] = DD_PR_SNR * inst->previousEstimateStsa[i] +
+ ((float)1.0 - DD_PR_SNR) * snrLocPost[i];
+ // post and prior snr needed for step 2
+ } // end of loop over freqs
+ // done with step 1: dd computation of prior and post snr
+
+ // STEP 2: compute speech/noise likelihood
+ // compute difference of input spectrum with learned/estimated noise
+ // spectrum
+ WebRtcNs_ComputeSpectralDifference(inst, magn);
+ // compute histograms for parameter decisions (thresholds and weights for
+ // features)
+ // parameters are extracted once every window time
+ // (=inst->modelUpdatePars[1])
+ if (updateParsFlag >= 1) {
+ // counter update
+ inst->modelUpdatePars[3]--;
+ // update histogram
+ if (inst->modelUpdatePars[3] > 0) {
+ WebRtcNs_FeatureParameterExtraction(inst, 0);
+ }
+ // compute model parameters
+ if (inst->modelUpdatePars[3] == 0) {
+ WebRtcNs_FeatureParameterExtraction(inst, 1);
+ inst->modelUpdatePars[3] = inst->modelUpdatePars[1];
+ // if wish to update only once, set flag to zero
+ if (updateParsFlag == 1) {
+ inst->modelUpdatePars[0] = 0;
+ } else {
+ // update every window:
+ // get normalization for spectral difference for next window estimate
+ inst->featureData[6] =
+ inst->featureData[6] / ((float)inst->modelUpdatePars[1]);
+ inst->featureData[5] =
+ (float)0.5 * (inst->featureData[6] + inst->featureData[5]);
+ inst->featureData[6] = (float)0.0;
+ }
+ }
+ }
+ // compute speech/noise probability
+ WebRtcNs_SpeechNoiseProb(inst, inst->speechProb, snrLocPrior, snrLocPost);
+ // time-avg parameter for noise update
+ gammaNoiseTmp = NOISE_UPDATE;
+ for (i = 0; i < inst->magnLen; i++) {
+ probSpeech = inst->speechProb[i];
+ probNonSpeech = (float)1.0 - probSpeech;
+ // temporary noise update:
+ // use it for speech frames if update value is less than previous
+ noiseUpdateTmp =
+ gammaNoiseTmp * inst->noisePrev[i] +
+ ((float)1.0 - gammaNoiseTmp) *
+ (probNonSpeech * magn[i] + probSpeech * inst->noisePrev[i]);
+ //
+ // time-constant based on speech/noise state
+ gammaNoiseOld = gammaNoiseTmp;
+ gammaNoiseTmp = NOISE_UPDATE;
+ // increase gamma (i.e., less noise update) for frame likely to be speech
+ if (probSpeech > PROB_RANGE) {
+ gammaNoiseTmp = SPEECH_UPDATE;
+ }
+ // conservative noise update
+ if (probSpeech < PROB_RANGE) {
+ inst->magnAvgPause[i] +=
+ GAMMA_PAUSE * (magn[i] - inst->magnAvgPause[i]);
+ }
+ // noise update
+ if (gammaNoiseTmp == gammaNoiseOld) {
+ noise[i] = noiseUpdateTmp;
+ } else {
+ noise[i] =
+ gammaNoiseTmp * inst->noisePrev[i] +
+ ((float)1.0 - gammaNoiseTmp) *
+ (probNonSpeech * magn[i] + probSpeech * inst->noisePrev[i]);
+ // allow for noise update downwards:
+ // if noise update decreases the noise, it is safe, so allow it to
+ // happen
+ if (noiseUpdateTmp < noise[i]) {
+ noise[i] = noiseUpdateTmp;
+ }
+ }
+ } // end of freq loop
+ // done with step 2: noise update
+
+ // keep track of noise spectrum for next frame
+ for (i = 0; i < inst->magnLen; i++) {
+ inst->noisePrev[i] = noise[i];
+ }
+ } // end of if inst->outLen == 0
+
+ return 0;
+}
+
int WebRtcNs_ProcessCore(NSinst_t* inst,
float* speechFrame,
float* speechFrameHB,
float* outFrame,
float* outFrameHB) {
// main routine for noise reduction
+ int flagHB = 0;
+ int i;
- int flagHB = 0;
- int i;
- const int kStartBand = 5; // Skip first frequency bins during estimation.
- int updateParsFlag;
-
- float energy1, energy2, gain, factor, factor1, factor2;
- float signalEnergy, sumMagn;
- float snrPrior, currentEstimateStsa;
- float tmpFloat1, tmpFloat2, tmpFloat3, probSpeech, probNonSpeech;
- float gammaNoiseTmp, gammaNoiseOld;
- float noiseUpdateTmp, fTmp;
- float fout[BLOCKL_MAX];
- float winData[ANAL_BLOCKL_MAX];
- float magn[HALF_ANAL_BLOCKL], noise[HALF_ANAL_BLOCKL];
- float theFilter[HALF_ANAL_BLOCKL], theFilterTmp[HALF_ANAL_BLOCKL];
- float snrLocPost[HALF_ANAL_BLOCKL], snrLocPrior[HALF_ANAL_BLOCKL];
- float probSpeechFinal[HALF_ANAL_BLOCKL] = { 0 };
- float previousEstimateStsa[HALF_ANAL_BLOCKL];
- float real[ANAL_BLOCKL_MAX], imag[HALF_ANAL_BLOCKL];
- // Variables during startup
- float sum_log_i = 0.0;
- float sum_log_i_square = 0.0;
- float sum_log_magn = 0.0;
- float sum_log_i_log_magn = 0.0;
- float parametric_noise = 0.0;
- float parametric_exp = 0.0;
- float parametric_num = 0.0;
+ float energy1, energy2, gain, factor, factor1, factor2;
+ float snrPrior, currentEstimateStsa;
+ float tmpFloat1, tmpFloat2;
+ float fTmp;
+ float fout[BLOCKL_MAX];
+ float winData[ANAL_BLOCKL_MAX];
+ float magn[HALF_ANAL_BLOCKL];
+ float theFilter[HALF_ANAL_BLOCKL], theFilterTmp[HALF_ANAL_BLOCKL];
+ float real[ANAL_BLOCKL_MAX], imag[HALF_ANAL_BLOCKL];
// SWB variables
- int deltaBweHB = 1;
- int deltaGainHB = 1;
- float decayBweHB = 1.0;
- float gainMapParHB = 1.0;
- float gainTimeDomainHB = 1.0;
- float avgProbSpeechHB, avgProbSpeechHBTmp, avgFilterGainHB, gainModHB;
+ int deltaBweHB = 1;
+ int deltaGainHB = 1;
+ float decayBweHB = 1.0;
+ float gainMapParHB = 1.0;
+ float gainTimeDomainHB = 1.0;
+ float avgProbSpeechHB, avgProbSpeechHBTmp, avgFilterGainHB, gainModHB;
// Check that initiation has been done
if (inst->initFlag != 1) {
@@ -771,21 +1078,22 @@
deltaBweHB = (int)inst->magnLen / 4;
deltaGainHB = deltaBweHB;
}
- //
- updateParsFlag = inst->modelUpdatePars[0];
- //
// update analysis buffer for L band
- memcpy(inst->dataBuf, inst->dataBuf + inst->blockLen10ms,
+ memcpy(inst->dataBuf,
+ inst->dataBuf + inst->blockLen10ms,
sizeof(float) * (inst->anaLen - inst->blockLen10ms));
- memcpy(inst->dataBuf + inst->anaLen - inst->blockLen10ms, speechFrame,
+ memcpy(inst->dataBuf + inst->anaLen - inst->blockLen10ms,
+ speechFrame,
sizeof(float) * inst->blockLen10ms);
if (flagHB == 1) {
// update analysis buffer for H band
- memcpy(inst->dataBufHB, inst->dataBufHB + inst->blockLen10ms,
+ memcpy(inst->dataBufHB,
+ inst->dataBufHB + inst->blockLen10ms,
sizeof(float) * (inst->anaLen - inst->blockLen10ms));
- memcpy(inst->dataBufHB + inst->anaLen - inst->blockLen10ms, speechFrameHB,
+ memcpy(inst->dataBufHB + inst->anaLen - inst->blockLen10ms,
+ speechFrameHB,
sizeof(float) * inst->blockLen10ms);
}
@@ -799,22 +1107,16 @@
}
if (energy1 == 0.0) {
// synthesize the special case of zero input
- // we want to avoid updating statistics in this case:
- // Updating feature statistics when we have zeros only will cause thresholds to
- // move towards zero signal situations. This in turn has the effect that once the
- // signal is "turned on" (non-zero values) everything will be treated as speech
- // and there is no noise suppression effect. Depending on the duration of the
- // inactive signal it takes a considerable amount of time for the system to learn
- // what is noise and what is speech.
-
// read out fully processed segment
for (i = inst->windShift; i < inst->blockLen + inst->windShift; i++) {
fout[i - inst->windShift] = inst->syntBuf[i];
}
// update synthesis buffer
- memcpy(inst->syntBuf, inst->syntBuf + inst->blockLen,
+ memcpy(inst->syntBuf,
+ inst->syntBuf + inst->blockLen,
sizeof(float) * (inst->anaLen - inst->blockLen));
- memset(inst->syntBuf + inst->anaLen - inst->blockLen, 0,
+ memset(inst->syntBuf + inst->anaLen - inst->blockLen,
+ 0,
sizeof(float) * inst->blockLen);
// out buffer
@@ -837,8 +1139,6 @@
return 0;
}
- //
- inst->blockInd++; // Update the block index only when we process a block.
// FFT
WebRtc_rdft(inst->anaLen, 1, winData, inst->ip, inst->wfft);
@@ -848,18 +1148,9 @@
imag[inst->magnLen - 1] = 0;
real[inst->magnLen - 1] = winData[1];
magn[inst->magnLen - 1] = (float)(fabs(real[inst->magnLen - 1]) + 1.0f);
- signalEnergy = (float)(real[0] * real[0]) +
- (float)(real[inst->magnLen - 1] * real[inst->magnLen - 1]);
- sumMagn = magn[0] + magn[inst->magnLen - 1];
if (inst->blockInd < END_STARTUP_SHORT) {
inst->initMagnEst[0] += magn[0];
inst->initMagnEst[inst->magnLen - 1] += magn[inst->magnLen - 1];
- tmpFloat2 = log((float)(inst->magnLen - 1));
- sum_log_i = tmpFloat2;
- sum_log_i_square = tmpFloat2 * tmpFloat2;
- tmpFloat1 = log(magn[inst->magnLen - 1]);
- sum_log_magn = tmpFloat1;
- sum_log_i_log_magn = tmpFloat2 * tmpFloat1;
}
for (i = 1; i < inst->magnLen - 1; i++) {
real[i] = winData[2 * i];
@@ -867,225 +1158,30 @@
// magnitude spectrum
fTmp = real[i] * real[i];
fTmp += imag[i] * imag[i];
- signalEnergy += fTmp;
magn[i] = ((float)sqrt(fTmp)) + 1.0f;
- sumMagn += magn[i];
if (inst->blockInd < END_STARTUP_SHORT) {
inst->initMagnEst[i] += magn[i];
- if (i >= kStartBand) {
- tmpFloat2 = log((float)i);
- sum_log_i += tmpFloat2;
- sum_log_i_square += tmpFloat2 * tmpFloat2;
- tmpFloat1 = log(magn[i]);
- sum_log_magn += tmpFloat1;
- sum_log_i_log_magn += tmpFloat2 * tmpFloat1;
- }
}
}
- signalEnergy = signalEnergy / ((float)inst->magnLen);
- inst->signalEnergy = signalEnergy;
- inst->sumMagn = sumMagn;
- //compute spectral flatness on input spectrum
- WebRtcNs_ComputeSpectralFlatness(inst, magn);
- // quantile noise estimate
- WebRtcNs_NoiseEstimation(inst, magn, noise);
- //compute simplified noise model during startup
- if (inst->blockInd < END_STARTUP_SHORT) {
- // Estimate White noise
- inst->whiteNoiseLevel += sumMagn / ((float)inst->magnLen) * inst->overdrive;
- // Estimate Pink noise parameters
- tmpFloat1 = sum_log_i_square * ((float)(inst->magnLen - kStartBand));
- tmpFloat1 -= (sum_log_i * sum_log_i);
- tmpFloat2 = (sum_log_i_square * sum_log_magn - sum_log_i * sum_log_i_log_magn);
- tmpFloat3 = tmpFloat2 / tmpFloat1;
- // Constrain the estimated spectrum to be positive
- if (tmpFloat3 < 0.0f) {
- tmpFloat3 = 0.0f;
- }
- inst->pinkNoiseNumerator += tmpFloat3;
- tmpFloat2 = (sum_log_i * sum_log_magn);
- tmpFloat2 -= ((float)(inst->magnLen - kStartBand)) * sum_log_i_log_magn;
- tmpFloat3 = tmpFloat2 / tmpFloat1;
- // Constrain the pink noise power to be in the interval [0, 1];
- if (tmpFloat3 < 0.0f) {
- tmpFloat3 = 0.0f;
- }
- if (tmpFloat3 > 1.0f) {
- tmpFloat3 = 1.0f;
- }
- inst->pinkNoiseExp += tmpFloat3;
-
- // Calculate frequency independent parts of parametric noise estimate.
- if (inst->pinkNoiseExp == 0.0f) {
- // Use white noise estimate
- parametric_noise = inst->whiteNoiseLevel;
- } else {
- // Use pink noise estimate
- parametric_num = exp(inst->pinkNoiseNumerator / (float)(inst->blockInd + 1));
- parametric_num *= (float)(inst->blockInd + 1);
- parametric_exp = inst->pinkNoiseExp / (float)(inst->blockInd + 1);
- parametric_noise = parametric_num / pow((float)kStartBand, parametric_exp);
- }
- for (i = 0; i < inst->magnLen; i++) {
- // Estimate the background noise using the white and pink noise parameters
- if ((inst->pinkNoiseExp > 0.0f) && (i >= kStartBand)) {
- // Use pink noise estimate
- parametric_noise = parametric_num / pow((float)i, parametric_exp);
- }
- theFilterTmp[i] = (inst->initMagnEst[i] - inst->overdrive * parametric_noise);
- theFilterTmp[i] /= (inst->initMagnEst[i] + (float)0.0001);
- // Weight quantile noise with modeled noise
- noise[i] *= (inst->blockInd);
- tmpFloat2 = parametric_noise * (END_STARTUP_SHORT - inst->blockInd);
- noise[i] += (tmpFloat2 / (float)(inst->blockInd + 1));
- noise[i] /= END_STARTUP_SHORT;
- }
- }
- //compute average signal during END_STARTUP_LONG time:
- // used to normalize spectral difference measure
- if (inst->blockInd < END_STARTUP_LONG) {
- inst->featureData[5] *= inst->blockInd;
- inst->featureData[5] += signalEnergy;
- inst->featureData[5] /= (inst->blockInd + 1);
- }
-
-#ifdef PROCESS_FLOW_0
- if (inst->blockInd > END_STARTUP_LONG) {
- //option: average the quantile noise: for check with AEC2
- for (i = 0; i < inst->magnLen; i++) {
- noise[i] = (float)0.6 * inst->noisePrev[i] + (float)0.4 * noise[i];
- }
- for (i = 0; i < inst->magnLen; i++) {
- // Wiener with over sub-substraction:
- theFilter[i] = (magn[i] - inst->overdrive * noise[i]) / (magn[i] + (float)0.0001);
- }
- }
-#else
- //start processing at frames == converged+1
- //
- // STEP 1: compute prior and post snr based on quantile noise est
- //
-
- // compute DD estimate of prior SNR: needed for new method
- for (i = 0; i < inst->magnLen; i++) {
- // post snr
- snrLocPost[i] = (float)0.0;
- if (magn[i] > noise[i]) {
- snrLocPost[i] = magn[i] / (noise[i] + (float)0.0001) - (float)1.0;
- }
- // previous post snr
- // previous estimate: based on previous frame with gain filter
- previousEstimateStsa[i] = inst->magnPrev[i] / (inst->noisePrev[i] + (float)0.0001)
- * (inst->smooth[i]);
- // DD estimate is sum of two terms: current estimate and previous estimate
- // directed decision update of snrPrior
- snrLocPrior[i] = DD_PR_SNR * previousEstimateStsa[i] + ((float)1.0 - DD_PR_SNR)
- * snrLocPost[i];
- // post and prior snr needed for step 2
- } // end of loop over freqs
-#ifdef PROCESS_FLOW_1
- for (i = 0; i < inst->magnLen; i++) {
- // gain filter
- tmpFloat1 = inst->overdrive + snrLocPrior[i];
- tmpFloat2 = (float)snrLocPrior[i] / tmpFloat1;
- theFilter[i] = (float)tmpFloat2;
- } // end of loop over freqs
-#endif
- // done with step 1: dd computation of prior and post snr
-
- //
- //STEP 2: compute speech/noise likelihood
- //
-#ifdef PROCESS_FLOW_2
- // compute difference of input spectrum with learned/estimated noise spectrum
- WebRtcNs_ComputeSpectralDifference(inst, magn);
- // compute histograms for parameter decisions (thresholds and weights for features)
- // parameters are extracted once every window time (=inst->modelUpdatePars[1])
- if (updateParsFlag >= 1) {
- // counter update
- inst->modelUpdatePars[3]--;
- // update histogram
- if (inst->modelUpdatePars[3] > 0) {
- WebRtcNs_FeatureParameterExtraction(inst, 0);
- }
- // compute model parameters
- if (inst->modelUpdatePars[3] == 0) {
- WebRtcNs_FeatureParameterExtraction(inst, 1);
- inst->modelUpdatePars[3] = inst->modelUpdatePars[1];
- // if wish to update only once, set flag to zero
- if (updateParsFlag == 1) {
- inst->modelUpdatePars[0] = 0;
- } else {
- // update every window:
- // get normalization for spectral difference for next window estimate
- inst->featureData[6] = inst->featureData[6]
- / ((float)inst->modelUpdatePars[1]);
- inst->featureData[5] = (float)0.5 * (inst->featureData[6]
- + inst->featureData[5]);
- inst->featureData[6] = (float)0.0;
- }
- }
- }
- // compute speech/noise probability
- WebRtcNs_SpeechNoiseProb(inst, probSpeechFinal, snrLocPrior, snrLocPost);
- // time-avg parameter for noise update
- gammaNoiseTmp = NOISE_UPDATE;
- for (i = 0; i < inst->magnLen; i++) {
- probSpeech = probSpeechFinal[i];
- probNonSpeech = (float)1.0 - probSpeech;
- // temporary noise update:
- // use it for speech frames if update value is less than previous
- noiseUpdateTmp = gammaNoiseTmp * inst->noisePrev[i] + ((float)1.0 - gammaNoiseTmp)
- * (probNonSpeech * magn[i] + probSpeech * inst->noisePrev[i]);
- //
- // time-constant based on speech/noise state
- gammaNoiseOld = gammaNoiseTmp;
- gammaNoiseTmp = NOISE_UPDATE;
- // increase gamma (i.e., less noise update) for frame likely to be speech
- if (probSpeech > PROB_RANGE) {
- gammaNoiseTmp = SPEECH_UPDATE;
- }
- // conservative noise update
- if (probSpeech < PROB_RANGE) {
- inst->magnAvgPause[i] += GAMMA_PAUSE * (magn[i] - inst->magnAvgPause[i]);
- }
- // noise update
- if (gammaNoiseTmp == gammaNoiseOld) {
- noise[i] = noiseUpdateTmp;
- } else {
- noise[i] = gammaNoiseTmp * inst->noisePrev[i] + ((float)1.0 - gammaNoiseTmp)
- * (probNonSpeech * magn[i] + probSpeech * inst->noisePrev[i]);
- // allow for noise update downwards:
- // if noise update decreases the noise, it is safe, so allow it to happen
- if (noiseUpdateTmp < noise[i]) {
- noise[i] = noiseUpdateTmp;
- }
- }
- } // end of freq loop
- // done with step 2: noise update
-
- //
- // STEP 3: compute dd update of prior snr and post snr based on new noise estimate
- //
+ // Compute dd update of prior snr and post snr based on new noise estimate
for (i = 0; i < inst->magnLen; i++) {
// post and prior snr
currentEstimateStsa = (float)0.0;
- if (magn[i] > noise[i]) {
- currentEstimateStsa = magn[i] / (noise[i] + (float)0.0001) - (float)1.0;
+ if (magn[i] > inst->noisePrev[i]) {
+ currentEstimateStsa =
+ magn[i] / (inst->noisePrev[i] + (float)0.0001) - (float)1.0;
}
- // DD estimate is sume of two terms: current estimate and previous estimate
+ // DD estimate is sume of two terms: current estimate and previous
+ // estimate
// directed decision update of snrPrior
- snrPrior = DD_PR_SNR * previousEstimateStsa[i] + ((float)1.0 - DD_PR_SNR)
- * currentEstimateStsa;
+ snrPrior = DD_PR_SNR * inst->previousEstimateStsa[i] +
+ ((float)1.0 - DD_PR_SNR) * currentEstimateStsa;
// gain filter
tmpFloat1 = inst->overdrive + snrPrior;
tmpFloat2 = (float)snrPrior / tmpFloat1;
theFilter[i] = (float)tmpFloat2;
} // end of loop over freqs
- // done with step3
-#endif
-#endif
for (i = 0; i < inst->magnLen; i++) {
// flooring bottom
@@ -1097,6 +1193,9 @@
theFilter[i] = 1.0;
}
if (inst->blockInd < END_STARTUP_SHORT) {
+ theFilterTmp[i] =
+ (inst->initMagnEst[i] - inst->overdrive * inst->parametricNoise[i]);
+ theFilterTmp[i] /= (inst->initMagnEst[i] + (float)0.0001);
// flooring bottom
if (theFilterTmp[i] < inst->denoiseBound) {
theFilterTmp[i] = inst->denoiseBound;
@@ -1112,18 +1211,12 @@
theFilter[i] /= (END_STARTUP_SHORT);
}
// smoothing
-#ifdef PROCESS_FLOW_0
- inst->smooth[i] *= SMOOTH; // value set to 0.7 in define.h file
- inst->smooth[i] += ((float)1.0 - SMOOTH) * theFilter[i];
-#else
inst->smooth[i] = theFilter[i];
-#endif
real[i] *= inst->smooth[i];
imag[i] *= inst->smooth[i];
}
- // keep track of noise and magn spectrum for next frame
+ // keep track of magn spectrum for next frame
for (i = 0; i < inst->magnLen; i++) {
- inst->noisePrev[i] = noise[i];
inst->magnPrev[i] = magn[i];
}
// back to time domain
@@ -1136,10 +1229,10 @@
WebRtc_rdft(inst->anaLen, -1, winData, inst->ip, inst->wfft);
for (i = 0; i < inst->anaLen; i++) {
- real[i] = 2.0f * winData[i] / inst->anaLen; // fft scaling
+ real[i] = 2.0f * winData[i] / inst->anaLen; // fft scaling
}
- //scale factor: only do it after END_STARTUP_LONG time
+ // scale factor: only do it after END_STARTUP_LONG time
factor = (float)1.0;
if (inst->gainmap == 1 && inst->blockInd > END_STARTUP_LONG) {
factor1 = (float)1.0;
@@ -1151,7 +1244,6 @@
}
gain = (float)sqrt(energy2 / (energy1 + (float)1.0));
-#ifdef PROCESS_FLOW_2
// scaling for new version
if (gain > B_LIM) {
factor1 = (float)1.0 + (float)1.3 * (gain - B_LIM);
@@ -1160,27 +1252,17 @@
}
}
if (gain < B_LIM) {
- //don't reduce scale too much for pause regions:
+ // don't reduce scale too much for pause regions:
// attenuation here should be controlled by flooring
if (gain <= inst->denoiseBound) {
gain = inst->denoiseBound;
}
factor2 = (float)1.0 - (float)0.3 * (B_LIM - gain);
}
- //combine both scales with speech/noise prob:
+ // combine both scales with speech/noise prob:
// note prior (priorSpeechProb) is not frequency dependent
- factor = inst->priorSpeechProb * factor1 + ((float)1.0 - inst->priorSpeechProb)
- * factor2;
-#else
- if (gain > B_LIM) {
- factor = (float)1.0 + (float)1.3 * (gain - B_LIM);
- } else {
- factor = (float)1.0 + (float)2.0 * (gain - B_LIM);
- }
- if (gain * factor > (float)1.0) {
- factor = (float)1.0 / gain;
- }
-#endif
+ factor = inst->priorSpeechProb * factor1 +
+ ((float)1.0 - inst->priorSpeechProb) * factor2;
} // out of inst->gainmap==1
// synthesis
@@ -1192,9 +1274,11 @@
fout[i - inst->windShift] = inst->syntBuf[i];
}
// update synthesis buffer
- memcpy(inst->syntBuf, inst->syntBuf + inst->blockLen,
+ memcpy(inst->syntBuf,
+ inst->syntBuf + inst->blockLen,
sizeof(float) * (inst->anaLen - inst->blockLen));
- memset(inst->syntBuf + inst->anaLen - inst->blockLen, 0,
+ memset(inst->syntBuf + inst->anaLen - inst->blockLen,
+ 0,
sizeof(float) * inst->blockLen);
// out buffer
@@ -1209,27 +1293,26 @@
for (i = 0; i < inst->blockLen10ms; i++) {
fout[i] = inst->outBuf[i];
}
- memcpy(inst->outBuf, inst->outBuf + inst->blockLen10ms,
+ memcpy(inst->outBuf,
+ inst->outBuf + inst->blockLen10ms,
sizeof(float) * (inst->outLen - inst->blockLen10ms));
- memset(inst->outBuf + inst->outLen - inst->blockLen10ms, 0,
+ memset(inst->outBuf + inst->outLen - inst->blockLen10ms,
+ 0,
sizeof(float) * inst->blockLen10ms);
inst->outLen -= inst->blockLen10ms;
}
for (i = 0; i < inst->blockLen10ms; ++i)
- outFrame[i] = WEBRTC_SPL_SAT(
- WEBRTC_SPL_WORD16_MAX, fout[i], WEBRTC_SPL_WORD16_MIN);
+ outFrame[i] =
+ WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, fout[i], WEBRTC_SPL_WORD16_MIN);
// for time-domain gain of HB
if (flagHB == 1) {
- for (i = 0; i < inst->magnLen; i++) {
- inst->speechProbHB[i] = probSpeechFinal[i];
- }
// average speech prob from low band
// avg over second half (i.e., 4->8kHz) of freq. spectrum
avgProbSpeechHB = 0.0;
for (i = inst->magnLen - deltaBweHB - 1; i < inst->magnLen - 1; i++) {
- avgProbSpeechHB += inst->speechProbHB[i];
+ avgProbSpeechHB += inst->speechProb[i];
}
avgProbSpeechHB = avgProbSpeechHB / ((float)deltaBweHB);
// average filter gain from low band
@@ -1241,14 +1324,16 @@
avgFilterGainHB = avgFilterGainHB / ((float)(deltaGainHB));
avgProbSpeechHBTmp = (float)2.0 * avgProbSpeechHB - (float)1.0;
// gain based on speech prob:
- gainModHB = (float)0.5 * ((float)1.0 + (float)tanh(gainMapParHB * avgProbSpeechHBTmp));
- //combine gain with low band gain
+ gainModHB = (float)0.5 *
+ ((float)1.0 + (float)tanh(gainMapParHB * avgProbSpeechHBTmp));
+ // combine gain with low band gain
gainTimeDomainHB = (float)0.5 * gainModHB + (float)0.5 * avgFilterGainHB;
if (avgProbSpeechHB >= (float)0.5) {
- gainTimeDomainHB = (float)0.25 * gainModHB + (float)0.75 * avgFilterGainHB;
+ gainTimeDomainHB =
+ (float)0.25 * gainModHB + (float)0.75 * avgFilterGainHB;
}
gainTimeDomainHB = gainTimeDomainHB * decayBweHB;
- //make sure gain is within flooring range
+ // make sure gain is within flooring range
// flooring bottom
if (gainTimeDomainHB < inst->denoiseBound) {
gainTimeDomainHB = inst->denoiseBound;
@@ -1257,11 +1342,11 @@
if (gainTimeDomainHB > (float)1.0) {
gainTimeDomainHB = 1.0;
}
- //apply gain
+ // apply gain
for (i = 0; i < inst->blockLen10ms; i++) {
float o = gainTimeDomainHB * inst->dataBufHB[i];
- outFrameHB[i] = WEBRTC_SPL_SAT(
- WEBRTC_SPL_WORD16_MAX, o, WEBRTC_SPL_WORD16_MIN);
+ outFrameHB[i] =
+ WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, o, WEBRTC_SPL_WORD16_MIN);
}
} // end of H band gain computation
//
diff --git a/modules/audio_processing/ns/ns_core.h b/modules/audio_processing/ns/ns_core.h
index 785239e..c5ca13f 100644
--- a/modules/audio_processing/ns/ns_core.h
+++ b/modules/audio_processing/ns/ns_core.h
@@ -8,106 +8,108 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NS_CORE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NS_CORE_H_
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
+#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
#include "webrtc/modules/audio_processing/ns/defines.h"
typedef struct NSParaExtract_t_ {
-
- //bin size of histogram
+ // bin size of histogram
float binSizeLrt;
float binSizeSpecFlat;
float binSizeSpecDiff;
- //range of histogram over which lrt threshold is computed
+ // range of histogram over which lrt threshold is computed
float rangeAvgHistLrt;
- //scale parameters: multiply dominant peaks of the histograms by scale factor to obtain
- //thresholds for prior model
- float factor1ModelPars; //for lrt and spectral difference
- float factor2ModelPars; //for spectral_flatness: used when noise is flatter than speech
- //peak limit for spectral flatness (varies between 0 and 1)
+ // scale parameters: multiply dominant peaks of the histograms by scale factor
+ // to obtain thresholds for prior model
+ float factor1ModelPars; // for lrt and spectral difference
+ float factor2ModelPars; // for spectral_flatness: used when noise is flatter
+ // than speech
+ // peak limit for spectral flatness (varies between 0 and 1)
float thresPosSpecFlat;
- //limit on spacing of two highest peaks in histogram: spacing determined by bin size
+ // limit on spacing of two highest peaks in histogram: spacing determined by
+ // bin size
float limitPeakSpacingSpecFlat;
float limitPeakSpacingSpecDiff;
- //limit on relevance of second peak:
+ // limit on relevance of second peak:
float limitPeakWeightsSpecFlat;
float limitPeakWeightsSpecDiff;
- //limit on fluctuation of lrt feature
+ // limit on fluctuation of lrt feature
float thresFluctLrt;
- //limit on the max and min values for the feature thresholds
+ // limit on the max and min values for the feature thresholds
float maxLrt;
float minLrt;
float maxSpecFlat;
float minSpecFlat;
float maxSpecDiff;
float minSpecDiff;
- //criteria of weight of histogram peak to accept/reject feature
+ // criteria of weight of histogram peak to accept/reject feature
int thresWeightSpecFlat;
int thresWeightSpecDiff;
} NSParaExtract_t;
typedef struct NSinst_t_ {
+ uint32_t fs;
+ int blockLen;
+ int blockLen10ms;
+ int windShift;
+ int outLen;
+ int anaLen;
+ int magnLen;
+ int aggrMode;
+ const float* window;
+ float analyzeBuf[ANAL_BLOCKL_MAX];
+ float dataBuf[ANAL_BLOCKL_MAX];
+ float syntBuf[ANAL_BLOCKL_MAX];
+ float outBuf[3 * BLOCKL_MAX];
- uint32_t fs;
- int blockLen;
- int blockLen10ms;
- int windShift;
- int outLen;
- int anaLen;
- int magnLen;
- int aggrMode;
- const float* window;
- float dataBuf[ANAL_BLOCKL_MAX];
- float syntBuf[ANAL_BLOCKL_MAX];
- float outBuf[3 * BLOCKL_MAX];
-
- int initFlag;
+ int initFlag;
// parameters for quantile noise estimation
- float density[SIMULT* HALF_ANAL_BLOCKL];
- float lquantile[SIMULT* HALF_ANAL_BLOCKL];
- float quantile[HALF_ANAL_BLOCKL];
- int counter[SIMULT];
- int updates;
+ float density[SIMULT * HALF_ANAL_BLOCKL];
+ float lquantile[SIMULT * HALF_ANAL_BLOCKL];
+ float quantile[HALF_ANAL_BLOCKL];
+ int counter[SIMULT];
+ int updates;
// parameters for Wiener filter
- float smooth[HALF_ANAL_BLOCKL];
- float overdrive;
- float denoiseBound;
- int gainmap;
+ float previousEstimateStsa[HALF_ANAL_BLOCKL];
+ float smooth[HALF_ANAL_BLOCKL];
+ float overdrive;
+ float denoiseBound;
+ int gainmap;
// fft work arrays.
- int ip[IP_LENGTH];
- float wfft[W_LENGTH];
+ int ip[IP_LENGTH];
+ float wfft[W_LENGTH];
// parameters for new method: some not needed, will reduce/cleanup later
- int32_t blockInd; //frame index counter
- int modelUpdatePars[4]; //parameters for updating or estimating
+ int32_t blockInd; // frame index counter
+ int modelUpdatePars[4]; // parameters for updating or estimating
// thresholds/weights for prior model
- float priorModelPars[7]; //parameters for prior model
- float noisePrev[HALF_ANAL_BLOCKL]; //noise spectrum from previous frame
- float magnPrev[HALF_ANAL_BLOCKL]; //magnitude spectrum of previous frame
- float logLrtTimeAvg[HALF_ANAL_BLOCKL]; //log lrt factor with time-smoothing
- float priorSpeechProb; //prior speech/noise probability
- float featureData[7]; //data for features
- float magnAvgPause[HALF_ANAL_BLOCKL]; //conservative noise spectrum estimate
- float signalEnergy; //energy of magn
- float sumMagn; //sum of magn
- float whiteNoiseLevel; //initial noise estimate
- float initMagnEst[HALF_ANAL_BLOCKL]; //initial magnitude spectrum estimate
- float pinkNoiseNumerator; //pink noise parameter: numerator
- float pinkNoiseExp; //pink noise parameter: power of freq
- NSParaExtract_t featureExtractionParams; //parameters for feature extraction
- //histograms for parameter estimation
- int histLrt[HIST_PAR_EST];
- int histSpecFlat[HIST_PAR_EST];
- int histSpecDiff[HIST_PAR_EST];
- //quantities for high band estimate
- float speechProbHB[HALF_ANAL_BLOCKL]; //final speech/noise prob: prior + LRT
- float dataBufHB[ANAL_BLOCKL_MAX]; //buffering data for HB
+ float priorModelPars[7]; // parameters for prior model
+ float noisePrev[HALF_ANAL_BLOCKL]; // noise spectrum from previous frame
+ float magnPrev[HALF_ANAL_BLOCKL]; // magnitude spectrum of previous frame
+ float logLrtTimeAvg[HALF_ANAL_BLOCKL]; // log lrt factor with time-smoothing
+ float priorSpeechProb; // prior speech/noise probability
+ float featureData[7]; // data for features
+ float magnAvgPause[HALF_ANAL_BLOCKL]; // conservative noise spectrum estimate
+ float signalEnergy; // energy of magn
+ float sumMagn; // sum of magn
+ float whiteNoiseLevel; // initial noise estimate
+ float initMagnEst[HALF_ANAL_BLOCKL]; // initial magnitude spectrum estimate
+ float pinkNoiseNumerator; // pink noise parameter: numerator
+ float pinkNoiseExp; // pink noise parameter: power of freq
+ float parametricNoise[HALF_ANAL_BLOCKL];
+ NSParaExtract_t featureExtractionParams; // parameters for feature extraction
+ // histograms for parameter estimation
+ int histLrt[HIST_PAR_EST];
+ int histSpecFlat[HIST_PAR_EST];
+ int histSpecDiff[HIST_PAR_EST];
+ // quantities for high band estimate
+ float speechProb[HALF_ANAL_BLOCKL]; // final speech/noise prob: prior + LRT
+ float dataBufHB[ANAL_BLOCKL_MAX]; // buffering data for HB
} NSinst_t;
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -136,7 +138,7 @@
*
* Input:
* - inst : Instance that should be initialized
- * - mode : 0: Mild (6 dB), 1: Medium (10 dB), 2: Aggressive (15 dB)
+ * - mode : 0: Mild (6dB), 1: Medium (10dB), 2: Aggressive (15dB)
*
* Output:
* - NS_inst : Initialized instance
@@ -147,6 +149,23 @@
int WebRtcNs_set_policy_core(NSinst_t* inst, int mode);
/****************************************************************************
+ * WebRtcNs_AnalyzeCore
+ *
+ * Estimate the background noise.
+ *
+ * Input:
+ * - inst : Instance that should be initialized
+ * - speechFrame : Input speech frame for lower band
+ *
+ * Output:
+ * - inst : Updated instance
+ *
+ * Return value : 0 - OK
+ * -1 - Error
+ */
+int WebRtcNs_AnalyzeCore(NSinst_t* inst, float* speechFrame);
+
+/****************************************************************************
* WebRtcNs_ProcessCore
*
* Do noise suppression.
@@ -164,16 +183,13 @@
* Return value : 0 - OK
* -1 - Error
*/
-
-
int WebRtcNs_ProcessCore(NSinst_t* inst,
float* inFrameLow,
float* inFrameHigh,
float* outFrameLow,
float* outFrameHigh);
-
#ifdef __cplusplus
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NS_CORE_H_
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
diff --git a/modules/audio_processing/ns/nsx_core.c b/modules/audio_processing/ns/nsx_core.c
index 2c8270f..930c2c2 100644
--- a/modules/audio_processing/ns/nsx_core.c
+++ b/modules/audio_processing/ns/nsx_core.c
@@ -503,8 +503,8 @@
tmp32 = WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(tmp16a, gain_factor, 13); // Q0
// Down shift with rounding
tmp16b = WebRtcSpl_SatW32ToW16(tmp32); // Q0
- inst->synthesisBuffer[i] = WEBRTC_SPL_ADD_SAT_W16(inst->synthesisBuffer[i],
- tmp16b); // Q0
+ inst->synthesisBuffer[i] = WebRtcSpl_AddSatW16(inst->synthesisBuffer[i],
+ tmp16b); // Q0
}
// read out fully processed segment
@@ -620,7 +620,7 @@
}
// Shift fractional part to Q(minNorm-stages)
tmp32no2 = WEBRTC_SPL_SHIFT_W32(tmp32no2, int_part - 11);
- *noise_estimate_avg = WEBRTC_SPL_LSHIFT_U32(1, int_part) + (uint32_t)tmp32no2;
+ *noise_estimate_avg = (1 << int_part) + (uint32_t)tmp32no2;
// Scale up to initMagnEst, which is not block averaged
*noise_estimate = (*noise_estimate_avg) * (uint32_t)(inst->blockIndex + 1);
}
@@ -864,8 +864,8 @@
// Guard against division by zero
// If timeAvgMagnEnergy == 0 we have no normalizing statistics and
// therefore can't update the histogram
- histIndex = WEBRTC_SPL_UDIV((inst->featureSpecDiff * 5) >> inst->stages,
- inst->timeAvgMagnEnergy);
+ histIndex = ((inst->featureSpecDiff * 5) >> inst->stages) /
+ inst->timeAvgMagnEnergy;
}
if (histIndex < HIST_PAR_EST) {
inst->histSpecDiff[histIndex]++;
@@ -885,14 +885,14 @@
tmp32 = WEBRTC_SPL_MUL_16_16(inst->histLrt[i], j);
avgHistLrtFX += tmp32;
numHistLrt += inst->histLrt[i];
- avgSquareHistLrtFX += WEBRTC_SPL_MUL_32_16(tmp32, j);
+ avgSquareHistLrtFX += tmp32 * j;
}
avgHistLrtComplFX = avgHistLrtFX;
for (; i < HIST_PAR_EST; i++) {
j = (2 * i + 1);
tmp32 = WEBRTC_SPL_MUL_16_16(inst->histLrt[i], j);
avgHistLrtComplFX += tmp32;
- avgSquareHistLrtFX += WEBRTC_SPL_MUL_32_16(tmp32, j);
+ avgSquareHistLrtFX += tmp32 * j;
}
fluctLrtFX = WEBRTC_SPL_MUL(avgSquareHistLrtFX, numHistLrt);
fluctLrtFX -= WEBRTC_SPL_MUL(avgHistLrtFX, avgHistLrtComplFX);
@@ -1083,7 +1083,7 @@
//time average update of spectral flatness feature
tmp32 = currentSpectralFlatness - (int32_t)inst->featureSpecFlat; // Q10
- tmp32 = WEBRTC_SPL_MUL_32_16(SPECT_FLAT_TAVG_Q14, tmp32); // Q24
+ tmp32 *= SPECT_FLAT_TAVG_Q14; // Q24
inst->featureSpecFlat = (uint32_t)((int32_t)inst->featureSpecFlat
+ WEBRTC_SPL_RSHIFT_W32(tmp32, 14)); // Q10
// done with flatness feature
@@ -1135,7 +1135,7 @@
tmp16no1 = (int16_t)((int32_t)magnIn[i] - avgMagnFX);
tmp32no2 = inst->avgMagnPause[i] - avgPauseFX;
varMagnUFX += (uint32_t)WEBRTC_SPL_MUL_16_16(tmp16no1, tmp16no1); // Q(2*qMagn)
- tmp32no1 = WEBRTC_SPL_MUL_32_16(tmp32no2, tmp16no1); // Q(prevQMagn+qMagn)
+ tmp32no1 = tmp32no2 * tmp16no1; // Q(prevQMagn+qMagn)
covMagnPauseFX += tmp32no1; // Q(prevQMagn+qMagn)
tmp32no1 = WEBRTC_SPL_RSHIFT_W32(tmp32no2, nShifts); // Q(prevQMagn-minPause)
varPauseUFX += (uint32_t)WEBRTC_SPL_MUL(tmp32no1, tmp32no1); // Q(2*(prevQMagn-minPause))
@@ -1149,7 +1149,7 @@
tmpU32no1 = (uint32_t)WEBRTC_SPL_ABS_W32(covMagnPauseFX); // Q(prevQMagn+qMagn)
norm32 = WebRtcSpl_NormU32(tmpU32no1) - 16;
if (norm32 > 0) {
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32(tmpU32no1, norm32); // Q(prevQMagn+qMagn+norm32)
+ tmpU32no1 <<= norm32; // Q(prevQMagn+qMagn+norm32)
} else {
tmpU32no1 = WEBRTC_SPL_RSHIFT_U32(tmpU32no1, -norm32); // Q(prevQMagn+qMagn+norm32)
}
@@ -1163,7 +1163,7 @@
}
if (varPauseUFX > 0) {
// Q(2*(qMagn+norm32-16+minPause))
- tmpU32no1 = WEBRTC_SPL_UDIV(tmpU32no2, varPauseUFX);
+ tmpU32no1 = tmpU32no2 / varPauseUFX;
tmpU32no1 = WEBRTC_SPL_RSHIFT_U32(tmpU32no1, nShifts);
// Q(2*qMagn)
@@ -1493,8 +1493,7 @@
}
assert(inst->energyIn > 0);
- energyRatio = (int16_t)WEBRTC_SPL_DIV(energyOut
- + WEBRTC_SPL_RSHIFT_W32(inst->energyIn, 1), inst->energyIn); // Q8
+ energyRatio = (energyOut + inst->energyIn / 2) / inst->energyIn; // Q8
// Limit the ratio to [0, 1] in Q8, i.e., [0, 256]
energyRatio = WEBRTC_SPL_SAT(256, energyRatio, 0);
@@ -1661,7 +1660,7 @@
// numerator = (initMagnEst - noise_estimate * overdrive)
// Result in Q(8+minNorm-stages)
tmpU32no1 = WEBRTC_SPL_UMUL_32_16(noise_estimate, inst->overdrive);
- numerator = WEBRTC_SPL_LSHIFT_U32(inst->initMagnEst[i], 8);
+ numerator = inst->initMagnEst[i] << 8;
if (numerator > tmpU32no1) {
// Suppression filter coefficient larger than zero, so calculate.
numerator -= tmpU32no1;
@@ -1672,7 +1671,7 @@
nShifts = WEBRTC_SPL_SAT(6, nShifts, 0);
// Shift numerator to Q(nShifts+8+minNorm-stages)
- numerator = WEBRTC_SPL_LSHIFT_U32(numerator, nShifts);
+ numerator <<= nShifts;
// Shift denominator to Q(nShifts-6+minNorm-stages)
tmpU32no1 = WEBRTC_SPL_RSHIFT_U32(inst->initMagnEst[i], 6 - nShifts);
@@ -1681,7 +1680,7 @@
// we don't need any division.
tmpU32no1 = 1;
}
- tmpU32no2 = WEBRTC_SPL_UDIV(numerator, tmpU32no1); // Q14
+ tmpU32no2 = numerator / tmpU32no1; // Q14
noiseSupFilterTmp[i] = (uint16_t)WEBRTC_SPL_SAT(16384, tmpU32no2,
(uint32_t)(inst->denoiseBound)); // Q14
}
@@ -1711,7 +1710,7 @@
// Add them together and divide by startup length
noiseU32[i] = WebRtcSpl_DivU32U16(tmpU32no1 + tmpU32no2, END_STARTUP_SHORT);
// Shift back if necessary
- noiseU32[i] = WEBRTC_SPL_LSHIFT_U32(noiseU32[i], nShifts);
+ noiseU32[i] <<= nShifts;
}
// Update new Q-domain for 'noiseU32'
qNoise = q_domain_to_use;
@@ -1754,17 +1753,17 @@
// calculate post SNR: output in Q11
postLocSnr[i] = 2048; // 1.0 in Q11
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32((uint32_t)magnU16[i], 6); // Q(6+qMagn)
+ tmpU32no1 = (uint32_t)magnU16[i] << 6; // Q(6+qMagn)
if (postShifts < 0) {
tmpU32no2 = WEBRTC_SPL_RSHIFT_U32(noiseU32[i], -postShifts); // Q(6+qMagn)
} else {
- tmpU32no2 = WEBRTC_SPL_LSHIFT_U32(noiseU32[i], postShifts); // Q(6+qMagn)
+ tmpU32no2 = noiseU32[i] << postShifts; // Q(6+qMagn)
}
if (tmpU32no1 > tmpU32no2) {
// Current magnitude larger than noise
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32(tmpU32no1, 11); // Q(17+qMagn)
+ tmpU32no1 <<= 11; // Q(17+qMagn)
if (tmpU32no2 > 0) {
- tmpU32no1 = WEBRTC_SPL_UDIV(tmpU32no1, tmpU32no2); // Q11
+ tmpU32no1 /= tmpU32no2; // Q11
postLocSnr[i] = WEBRTC_SPL_MIN(satMax, tmpU32no1); // Q11
} else {
postLocSnr[i] = satMax;
@@ -1772,12 +1771,13 @@
}
// calculate prevNearSnr[i] and save for later instead of recalculating it later
- nearMagnEst = WEBRTC_SPL_UMUL_16_16(inst->prevMagnU16[i], inst->noiseSupFilter[i]); // Q(prevQMagn+14)
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32(nearMagnEst, 3); // Q(prevQMagn+17)
+ // |nearMagnEst| in Q(prevQMagn + 14)
+ nearMagnEst = inst->prevMagnU16[i] * inst->noiseSupFilter[i];
+ tmpU32no1 = nearMagnEst << 3; // Q(prevQMagn+17)
tmpU32no2 = WEBRTC_SPL_RSHIFT_U32(inst->prevNoiseU32[i], nShifts); // Q(prevQMagn+6)
if (tmpU32no2 > 0) {
- tmpU32no1 = WEBRTC_SPL_UDIV(tmpU32no1, tmpU32no2); // Q11
+ tmpU32no1 /= tmpU32no2; // Q11
tmpU32no1 = WEBRTC_SPL_MIN(satMax, tmpU32no1); // Q11
} else {
tmpU32no1 = satMax; // Q11
@@ -1829,12 +1829,12 @@
norm32no1++;
}
tmpU32no3 = WEBRTC_SPL_UMUL(tmpU32no3, tmpU32no2);
- tmpU32no3 = WEBRTC_SPL_UDIV(tmpU32no3, inst->timeAvgMagnEnergy);
+ tmpU32no3 /= inst->timeAvgMagnEnergy;
if (WebRtcSpl_NormU32(tmpU32no3) < norm32no1) {
inst->featureSpecDiff = 0x007FFFFF;
} else {
inst->featureSpecDiff = WEBRTC_SPL_MIN(0x007FFFFF,
- WEBRTC_SPL_LSHIFT_U32(tmpU32no3, norm32no1));
+ tmpU32no3 << norm32no1);
}
}
@@ -1859,7 +1859,7 @@
if (postShifts < 0) {
tmpU32no2 = WEBRTC_SPL_RSHIFT_U32(magnU16[i], -postShifts); // Q(prevQNoise)
} else {
- tmpU32no2 = WEBRTC_SPL_LSHIFT_U32(magnU16[i], postShifts); // Q(prevQNoise)
+ tmpU32no2 = (uint32_t)magnU16[i] << postShifts; // Q(prevQNoise)
}
if (prevNoiseU16[i] > tmpU32no2) {
sign = -1;
@@ -1940,12 +1940,12 @@
if (nonSpeechProbFinal[i] > ONE_MINUS_PROB_RANGE_Q8) {
if (nShifts < 0) {
tmp32no1 = (int32_t)magnU16[i] - tmp32no2; // Q(qMagn)
- tmp32no1 = WEBRTC_SPL_MUL_32_16(tmp32no1, ONE_MINUS_GAMMA_PAUSE_Q8); // Q(8+prevQMagn+nShifts)
+ tmp32no1 *= ONE_MINUS_GAMMA_PAUSE_Q8; // Q(8+prevQMagn+nShifts)
tmp32no1 = WEBRTC_SPL_RSHIFT_W32(tmp32no1 + 128, 8); // Q(qMagn)
} else {
tmp32no1 = WEBRTC_SPL_LSHIFT_W32((int32_t)magnU16[i], nShifts)
- inst->avgMagnPause[i]; // Q(qMagn+nShifts)
- tmp32no1 = WEBRTC_SPL_MUL_32_16(tmp32no1, ONE_MINUS_GAMMA_PAUSE_Q8); // Q(8+prevQMagn+nShifts)
+ tmp32no1 *= ONE_MINUS_GAMMA_PAUSE_Q8; // Q(8+prevQMagn+nShifts)
tmp32no1 = WEBRTC_SPL_RSHIFT_W32(tmp32no1 + (128 << nShifts), 8 + nShifts); // Q(qMagn)
}
tmp32no2 += tmp32no1; // Q(qMagn)
@@ -1980,21 +1980,21 @@
if (nShifts < 0) {
// This case is equivalent with magn < noise which implies curNearSnr = 0;
tmpMagnU32 = (uint32_t)magnU16[i]; // Q(qMagn)
- tmpNoiseU32 = WEBRTC_SPL_LSHIFT_U32(noiseU32[i], -nShifts); // Q(qMagn)
+ tmpNoiseU32 = noiseU32[i] << -nShifts; // Q(qMagn)
} else if (nShifts > 17) {
- tmpMagnU32 = WEBRTC_SPL_LSHIFT_U32(magnU16[i], 17); // Q(qMagn+17)
+ tmpMagnU32 = (uint32_t)magnU16[i] << 17; // Q(qMagn+17)
tmpNoiseU32 = WEBRTC_SPL_RSHIFT_U32(noiseU32[i], nShifts - 17); // Q(qMagn+17)
} else {
- tmpMagnU32 = WEBRTC_SPL_LSHIFT_U32((uint32_t)magnU16[i], nShifts); // Q(qNoise_prev+11)
+ tmpMagnU32 = (uint32_t)magnU16[i] << nShifts; // Q(qNoise_prev+11)
tmpNoiseU32 = noiseU32[i]; // Q(qNoise_prev+11)
}
if (tmpMagnU32 > tmpNoiseU32) {
tmpU32no1 = tmpMagnU32 - tmpNoiseU32; // Q(qCur)
norm32no2 = WEBRTC_SPL_MIN(11, WebRtcSpl_NormU32(tmpU32no1));
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32(tmpU32no1, norm32no2); // Q(qCur+norm32no2)
+ tmpU32no1 <<= norm32no2; // Q(qCur+norm32no2)
tmpU32no2 = WEBRTC_SPL_RSHIFT_U32(tmpNoiseU32, 11 - norm32no2); // Q(qCur+norm32no2-11)
if (tmpU32no2 > 0) {
- tmpU32no1 = WEBRTC_SPL_UDIV(tmpU32no1, tmpU32no2); // Q11
+ tmpU32no1 /= tmpU32no2; // Q11
}
curNearSnr = WEBRTC_SPL_MIN(satMax, tmpU32no1); // Q11
}
@@ -2011,17 +2011,15 @@
tmpU32no1 = (uint32_t)(inst->overdrive)
+ WEBRTC_SPL_RSHIFT_U32(priorSnr + 8192, 14); // Q8
assert(inst->overdrive > 0);
- tmpU16no1 = (uint16_t)WEBRTC_SPL_UDIV(priorSnr + (tmpU32no1 >> 1), tmpU32no1); // Q14
+ tmpU16no1 = (priorSnr + tmpU32no1 / 2) / tmpU32no1; // Q14
inst->noiseSupFilter[i] = WEBRTC_SPL_SAT(16384, tmpU16no1, inst->denoiseBound); // 16384 = Q14(1.0) // Q14
// Weight in the parametric Wiener filter during startup
if (inst->blockIndex < END_STARTUP_SHORT) {
// Weight the two suppression filters
- tmpU32no1 = WEBRTC_SPL_UMUL_16_16(inst->noiseSupFilter[i],
- (uint16_t)inst->blockIndex);
- tmpU32no2 = WEBRTC_SPL_UMUL_16_16(noiseSupFilterTmp[i],
- (uint16_t)(END_STARTUP_SHORT
- - inst->blockIndex));
+ tmpU32no1 = inst->noiseSupFilter[i] * inst->blockIndex;
+ tmpU32no2 = noiseSupFilterTmp[i] *
+ (END_STARTUP_SHORT - inst->blockIndex);
tmpU32no1 += tmpU32no2;
inst->noiseSupFilter[i] = (uint16_t)WebRtcSpl_DivU32U16(tmpU32no1,
END_STARTUP_SHORT);
@@ -2034,7 +2032,7 @@
inst->prevQMagn = qMagn;
if (norm32no1 > 5) {
for (i = 0; i < inst->magnLen; i++) {
- inst->prevNoiseU32[i] = WEBRTC_SPL_LSHIFT_U32(noiseU32[i], norm32no1 - 5); // Q(qNoise+11)
+ inst->prevNoiseU32[i] = noiseU32[i] << (norm32no1 - 5); // Q(qNoise+11)
inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn)
}
} else {
diff --git a/modules/audio_processing/ns/nsx_core_c.c b/modules/audio_processing/ns/nsx_core_c.c
index 452b96e..2fce49b 100644
--- a/modules/audio_processing/ns/nsx_core_c.c
+++ b/modules/audio_processing/ns/nsx_core_c.c
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <assert.h>
+
#include "webrtc/modules/audio_processing/ns/include/noise_suppression_x.h"
#include "webrtc/modules/audio_processing/ns/nsx_core.h"
@@ -39,16 +41,16 @@
for (i = 0; i < inst->magnLen; i++) {
besselTmpFX32 = (int32_t)postLocSnr[i]; // Q11
normTmp = WebRtcSpl_NormU32(postLocSnr[i]);
- num = WEBRTC_SPL_LSHIFT_U32(postLocSnr[i], normTmp); // Q(11+normTmp)
+ num = postLocSnr[i] << normTmp; // Q(11+normTmp)
if (normTmp > 10) {
- den = WEBRTC_SPL_LSHIFT_U32(priorLocSnr[i], normTmp - 11); // Q(normTmp)
+ den = priorLocSnr[i] << (normTmp - 11); // Q(normTmp)
} else {
den = WEBRTC_SPL_RSHIFT_U32(priorLocSnr[i], 11 - normTmp); // Q(normTmp)
}
if (den > 0) {
- besselTmpFX32 -= WEBRTC_SPL_UDIV(num, den); // Q11
+ besselTmpFX32 -= num / den; // Q11
} else {
- besselTmpFX32 -= num; // Q11
+ besselTmpFX32 = 0;
}
// inst->logLrtTimeAvg[i] += LRT_TAVG * (besselTmp - log(snrLocPrior)
@@ -62,8 +64,7 @@
frac32 = tmp32 + 37;
// tmp32 = log2(priorLocSnr[i])
tmp32 = (int32_t)(((31 - zeros) << 12) + frac32) - (11 << 12); // Q12
- logTmp = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL_32_16(tmp32, 178), 8);
- // log2(priorLocSnr[i])*log(2)
+ logTmp = (tmp32 * 178) >> 8; // log2(priorLocSnr[i])*log(2)
tmp32no1 = WEBRTC_SPL_RSHIFT_W32(logTmp + inst->logLrtTimeAvgW32[i], 1);
// Q12
inst->logLrtTimeAvgW32[i] += (besselTmpFX32 - tmp32no1); // Q12
@@ -122,11 +123,7 @@
//widthPrior = widthPrior * 2.0;
nShifts++;
}
- tmp32no1 = (int32_t)WebRtcSpl_DivU32U16(WEBRTC_SPL_LSHIFT_U32(tmpU32no2,
- nShifts), 25);
- //Q14
- tmpU32no1 = WebRtcSpl_DivU32U16(WEBRTC_SPL_LSHIFT_U32(tmpU32no2, nShifts),
- 25); //Q14
+ tmpU32no1 = WebRtcSpl_DivU32U16(tmpU32no2 << nShifts, 25); // Q14
// compute indicator function: sigmoid map
// FLOAT code
// indicator1 = 0.5 * (tanh(sgnMap * widthPrior *
@@ -152,20 +149,18 @@
if (inst->featureSpecDiff) {
normTmp = WEBRTC_SPL_MIN(20 - inst->stages,
WebRtcSpl_NormU32(inst->featureSpecDiff));
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32(inst->featureSpecDiff, normTmp);
- // Q(normTmp-2*stages)
+ assert(normTmp >= 0);
+ tmpU32no1 = inst->featureSpecDiff << normTmp; // Q(normTmp-2*stages)
tmpU32no2 = WEBRTC_SPL_RSHIFT_U32(inst->timeAvgMagnEnergy,
20 - inst->stages - normTmp);
if (tmpU32no2 > 0) {
// Q(20 - inst->stages)
- tmpU32no1 = WEBRTC_SPL_UDIV(tmpU32no1, tmpU32no2);
+ tmpU32no1 /= tmpU32no2;
} else {
tmpU32no1 = (uint32_t)(0x7fffffff);
}
}
- tmpU32no3 = WEBRTC_SPL_UDIV(WEBRTC_SPL_LSHIFT_U32(inst->thresholdSpecDiff,
- 17),
- 25);
+ tmpU32no3 = (inst->thresholdSpecDiff << 17) / 25;
tmpU32no2 = tmpU32no1 - tmpU32no3;
nShifts = 1;
tmpIndFX = 16384; // Q14(1.0)
@@ -248,14 +243,12 @@
if (normTmp + normTmp2 < 15) {
invLrtFX = WEBRTC_SPL_RSHIFT_W32(invLrtFX, 15 - normTmp2 - normTmp);
// Q(normTmp+normTmp2-7)
- tmp32no1 = WEBRTC_SPL_MUL_32_16(invLrtFX,
- (16384 - inst->priorNonSpeechProb));
+ tmp32no1 = invLrtFX * (16384 - inst->priorNonSpeechProb);
// Q(normTmp+normTmp2+7)
invLrtFX = WEBRTC_SPL_SHIFT_W32(tmp32no1, 7 - normTmp - normTmp2);
// Q14
} else {
- tmp32no1 = WEBRTC_SPL_MUL_32_16(invLrtFX,
- (16384 - inst->priorNonSpeechProb));
+ tmp32no1 = invLrtFX * (16384 - inst->priorNonSpeechProb);
// Q22
invLrtFX = WEBRTC_SPL_RSHIFT_W32(tmp32no1, 8); // Q14
}
@@ -263,8 +256,8 @@
tmp32no1 = WEBRTC_SPL_LSHIFT_W32((int32_t)inst->priorNonSpeechProb,
8); // Q22
- nonSpeechProbFinal[i] = (uint16_t)WEBRTC_SPL_DIV(tmp32no1,
- (int32_t)inst->priorNonSpeechProb + invLrtFX); // Q8
+ nonSpeechProbFinal[i] = tmp32no1 /
+ (inst->priorNonSpeechProb + invLrtFX); // Q8
}
}
}
diff --git a/modules/audio_processing/ns/nsx_core_mips.c b/modules/audio_processing/ns/nsx_core_mips.c
index ccb0c37..47b1b5f 100644
--- a/modules/audio_processing/ns/nsx_core_mips.c
+++ b/modules/audio_processing/ns/nsx_core_mips.c
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <assert.h>
+
#include "webrtc/modules/audio_processing/ns/include/noise_suppression_x.h"
#include "webrtc/modules/audio_processing/ns/nsx_core.h"
@@ -74,6 +76,7 @@
"sra %[r7], %[r7], 19 \n\t"
"movz %[r3], %[r8], %[r6] \n\t"
"subu %[r0], %[r0], %[r3] \n\t"
+ "movn %[r0], $0, %[r6] \n\t"
"mul %[r1], %[r1], %[const_5412] \n\t"
"sra %[r1], %[r1], 12 \n\t"
"addu %[r7], %[r7], %[r1] \n\t"
@@ -154,11 +157,7 @@
//widthPrior = widthPrior * 2.0;
nShifts++;
}
- tmp32no1 = (int32_t)WebRtcSpl_DivU32U16(WEBRTC_SPL_LSHIFT_U32(tmpU32no2,
- nShifts), 25);
- //Q14
- tmpU32no1 = WebRtcSpl_DivU32U16(WEBRTC_SPL_LSHIFT_U32(tmpU32no2, nShifts),
- 25); //Q14
+ tmpU32no1 = WebRtcSpl_DivU32U16(tmpU32no2 << nShifts, 25); //Q14
// compute indicator function: sigmoid map
// FLOAT code
// indicator1 = 0.5 * (tanh(sgnMap * widthPrior *
@@ -184,20 +183,18 @@
if (inst->featureSpecDiff) {
normTmp = WEBRTC_SPL_MIN(20 - inst->stages,
WebRtcSpl_NormU32(inst->featureSpecDiff));
- tmpU32no1 = WEBRTC_SPL_LSHIFT_U32(inst->featureSpecDiff, normTmp);
- // Q(normTmp-2*stages)
+ assert(normTmp >= 0);
+ tmpU32no1 = inst->featureSpecDiff << normTmp; // Q(normTmp-2*stages)
tmpU32no2 = WEBRTC_SPL_RSHIFT_U32(inst->timeAvgMagnEnergy,
20 - inst->stages - normTmp);
if (tmpU32no2 > 0) {
// Q(20 - inst->stages)
- tmpU32no1 = WEBRTC_SPL_UDIV(tmpU32no1, tmpU32no2);
+ tmpU32no1 /= tmpU32no2;
} else {
tmpU32no1 = (uint32_t)(0x7fffffff);
}
}
- tmpU32no3 = WEBRTC_SPL_UDIV(WEBRTC_SPL_LSHIFT_U32(inst->thresholdSpecDiff,
- 17),
- 25);
+ tmpU32no3 = (inst->thresholdSpecDiff << 17) / 25;
tmpU32no2 = tmpU32no1 - tmpU32no3;
nShifts = 1;
tmpIndFX = 16384; // Q14(1.0)
diff --git a/modules/audio_processing/ns/nsx_core_neon.S b/modules/audio_processing/ns/nsx_core_neon.S
index e403742..38b2466 100644
--- a/modules/audio_processing/ns/nsx_core_neon.S
+++ b/modules/audio_processing/ns/nsx_core_neon.S
@@ -12,6 +12,8 @@
@ This file contains some functions in NS, optimized for ARM Neon
@ platforms. Reference C code is in file nsx_core.c. Bit-exact.
+.syntax unified
+
#include "nsx_core_neon_offsets.h"
#include "webrtc/modules/audio_processing/ns/nsx_defines.h"
#include "webrtc/system_wrappers/interface/asm_defines.h"
@@ -119,7 +121,7 @@
LOOP_SET_LMAGN:
ldrh r2, [r1], #2 @ magn[i]
cmp r2, #0
- streqh r3, [r12], #2 @ lmagn[i] = logval;
+ strheq r3, [r12], #2 @ lmagn[i] = logval;
beq CHECK_LMAGN_COUNTER
clz r6, r2
@@ -267,7 +269,7 @@
mov r0, r12, lsr #1 @ tmp16no1
mov r12, #3
smulbb r12, r0, r12 @ tmp16no2
- sub r2, r12, lsr #1
+ sub r2, r2, r12, lsr #1
cmp r3, r2
ldrgt r2, [sp]
ldrgt r3, [sp]
@@ -275,7 +277,7 @@
UPDATE_LOG_QUANTILE_ESTIMATE_BIGGER_LMAGN:
add r3, r12, #2
- add r2, r3, lsr #2
+ add r2, r2, r3, lsr #2
UPDATE_LOG_QUANTILE_ESTIMATE_STORE:
vmov.s16 r0, d25[0] @ countProd
diff --git a/modules/audio_processing/ns/nsx_core_neon.c b/modules/audio_processing/ns/nsx_core_neon.c
index 1fc8a86..4dbad9e 100644
--- a/modules/audio_processing/ns/nsx_core_neon.c
+++ b/modules/audio_processing/ns/nsx_core_neon.c
@@ -363,6 +363,8 @@
// Filter the data in the frequency domain, and create spectrum.
void WebRtcNsx_PrepareSpectrumNeon(NsxInst_t* inst, int16_t* freq_buf) {
+ assert(inst->magnLen % 8 == 1);
+ assert(inst->anaLen2 % 16 == 0);
// (1) Filtering.
@@ -374,49 +376,38 @@
// (int16_t)(inst->noiseSupFilter[i]), 14); // Q(normData-stages)
// }
- int16_t* ptr_real = &inst->real[0];
- int16_t* ptr_imag = &inst->imag[0];
- uint16_t* ptr_noiseSupFilter = &inst->noiseSupFilter[0];
+ int16_t* preal = &inst->real[0];
+ int16_t* pimag = &inst->imag[0];
+ int16_t* pns_filter = (int16_t*)&inst->noiseSupFilter[0];
+ int16_t* pimag_end = pimag + inst->magnLen - 4;
- // Filter the rest in the frequency domain.
- for (; ptr_real < &inst->real[inst->magnLen - 1];) {
- // Loop unrolled once. Both pointers are incremented by 4 twice.
- __asm__ __volatile__(
- "vld1.16 d20, [%[ptr_real]]\n\t"
- "vld1.16 d22, [%[ptr_imag]]\n\t"
- "vld1.16 d23, [%[ptr_noiseSupFilter]]!\n\t"
- "vmull.s16 q10, d20, d23\n\t"
- "vmull.s16 q11, d22, d23\n\t"
- "vshrn.s32 d20, q10, #14\n\t"
- "vshrn.s32 d22, q11, #14\n\t"
- "vst1.16 d20, [%[ptr_real]]!\n\t"
- "vst1.16 d22, [%[ptr_imag]]!\n\t"
+ while (pimag < pimag_end) {
+ int16x8_t real = vld1q_s16(preal);
+ int16x8_t imag = vld1q_s16(pimag);
+ int16x8_t ns_filter = vld1q_s16(pns_filter);
- "vld1.16 d18, [%[ptr_real]]\n\t"
- "vld1.16 d24, [%[ptr_imag]]\n\t"
- "vld1.16 d25, [%[ptr_noiseSupFilter]]!\n\t"
- "vmull.s16 q9, d18, d25\n\t"
- "vmull.s16 q12, d24, d25\n\t"
- "vshrn.s32 d18, q9, #14\n\t"
- "vshrn.s32 d24, q12, #14\n\t"
- "vst1.16 d18, [%[ptr_real]]!\n\t"
- "vst1.16 d24, [%[ptr_imag]]!\n\t"
+ int32x4_t tmp_r_0 = vmull_s16(vget_low_s16(real), vget_low_s16(ns_filter));
+ int32x4_t tmp_i_0 = vmull_s16(vget_low_s16(imag), vget_low_s16(ns_filter));
+ int32x4_t tmp_r_1 = vmull_s16(vget_high_s16(real),
+ vget_high_s16(ns_filter));
+ int32x4_t tmp_i_1 = vmull_s16(vget_high_s16(imag),
+ vget_high_s16(ns_filter));
- // Specify constraints.
- :[ptr_imag]"+r"(ptr_imag),
- [ptr_real]"+r"(ptr_real),
- [ptr_noiseSupFilter]"+r"(ptr_noiseSupFilter)
- :
- :"d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25",
- "q9", "q10", "q11", "q12"
- );
+ int16x4_t result_r_0 = vshrn_n_s32(tmp_r_0, 14);
+ int16x4_t result_i_0 = vshrn_n_s32(tmp_i_0, 14);
+ int16x4_t result_r_1 = vshrn_n_s32(tmp_r_1, 14);
+ int16x4_t result_i_1 = vshrn_n_s32(tmp_i_1, 14);
+
+ vst1q_s16(preal, vcombine_s16(result_r_0, result_r_1));
+ vst1q_s16(pimag, vcombine_s16(result_i_0, result_i_1));
+ preal += 8;
+ pimag += 8;
+ pns_filter += 8;
}
- // Filter the last pair of elements in the frequency domain.
- *ptr_real = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT(*ptr_real,
- (int16_t)(*ptr_noiseSupFilter), 14); // Q(normData-stages)
- *ptr_imag = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT(*ptr_imag,
- (int16_t)(*ptr_noiseSupFilter), 14); // Q(normData-stages)
+ // Filter the last element
+ *preal = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT(*preal, *pns_filter, 14);
+ *pimag = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT(*pimag, *pns_filter, 14);
// (2) Create spectrum.
@@ -424,74 +415,36 @@
// freq_buf[0] = inst->real[0];
// freq_buf[1] = -inst->imag[0];
// for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) {
- // tmp16 = (inst->anaLen << 1) - j;
// freq_buf[j] = inst->real[i];
// freq_buf[j + 1] = -inst->imag[i];
- // freq_buf[tmp16] = inst->real[i];
- // freq_buf[tmp16 + 1] = inst->imag[i];
// }
// freq_buf[inst->anaLen] = inst->real[inst->anaLen2];
// freq_buf[inst->anaLen + 1] = -inst->imag[inst->anaLen2];
- freq_buf[0] = inst->real[0];
- freq_buf[1] = -inst->imag[0];
+ preal = &inst->real[0];
+ pimag = &inst->imag[0];
+ pimag_end = pimag + inst->anaLen2;
+ int16_t * freq_buf_start = freq_buf;
+ while (pimag < pimag_end) {
+ // loop unroll
+ int16x8x2_t real_imag_0;
+ int16x8x2_t real_imag_1;
+ real_imag_0.val[1] = vld1q_s16(pimag);
+ real_imag_0.val[0] = vld1q_s16(preal);
+ preal += 8;
+ pimag += 8;
+ real_imag_1.val[1] = vld1q_s16(pimag);
+ real_imag_1.val[0] = vld1q_s16(preal);
+ preal += 8;
+ pimag += 8;
- int offset = -16;
- int16_t* ptr_realImag1 = &freq_buf[2];
- int16_t* ptr_realImag2 = ptr_realImag2 = &freq_buf[(inst->anaLen << 1) - 8];
- ptr_real = &inst->real[1];
- ptr_imag = &inst->imag[1];
- for (; ptr_real < &inst->real[inst->anaLen2 - 11];) {
- // Loop unrolled once. All pointers are incremented twice.
- __asm__ __volatile__(
- "vld1.16 d22, [%[ptr_real]]!\n\t"
- "vld1.16 d23, [%[ptr_imag]]!\n\t"
- // Negate and interleave:
- "vmov.s16 d20, d22\n\t"
- "vneg.s16 d21, d23\n\t"
- "vzip.16 d20, d21\n\t"
- // Write 8 elements to &freq_buf[j]
- "vst1.16 {d20, d21}, [%[ptr_realImag1]]!\n\t"
- // Interleave and reverse elements:
- "vzip.16 d22, d23\n\t"
- "vrev64.32 d18, d23\n\t"
- "vrev64.32 d19, d22\n\t"
- // Write 8 elements to &freq_buf[tmp16]
- "vst1.16 {d18, d19}, [%[ptr_realImag2]], %[offset]\n\t"
-
- "vld1.16 d22, [%[ptr_real]]!\n\t"
- "vld1.16 d23, [%[ptr_imag]]!\n\t"
- // Negate and interleave:
- "vmov.s16 d20, d22\n\t"
- "vneg.s16 d21, d23\n\t"
- "vzip.16 d20, d21\n\t"
- // Write 8 elements to &freq_buf[j]
- "vst1.16 {d20, d21}, [%[ptr_realImag1]]!\n\t"
- // Interleave and reverse elements:
- "vzip.16 d22, d23\n\t"
- "vrev64.32 d18, d23\n\t"
- "vrev64.32 d19, d22\n\t"
- // Write 8 elements to &freq_buf[tmp16]
- "vst1.16 {d18, d19}, [%[ptr_realImag2]], %[offset]\n\t"
-
- // Specify constraints.
- :[ptr_imag]"+r"(ptr_imag),
- [ptr_real]"+r"(ptr_real),
- [ptr_realImag1]"+r"(ptr_realImag1),
- [ptr_realImag2]"+r"(ptr_realImag2)
- :[offset]"r"(offset)
- :"d18", "d19", "d20", "d21", "d22", "d23"
- );
+ real_imag_0.val[1] = vnegq_s16(real_imag_0.val[1]);
+ real_imag_1.val[1] = vnegq_s16(real_imag_1.val[1]);
+ vst2q_s16(freq_buf_start, real_imag_0);
+ freq_buf_start += 16;
+ vst2q_s16(freq_buf_start, real_imag_1);
+ freq_buf_start += 16;
}
- for (ptr_realImag2 += 6;
- ptr_real <= &inst->real[inst->anaLen2];
- ptr_real += 1, ptr_imag += 1, ptr_realImag1 += 2, ptr_realImag2 -= 2) {
- *ptr_realImag1 = *ptr_real;
- *(ptr_realImag1 + 1) = -(*ptr_imag);
- *ptr_realImag2 = *ptr_real;
- *(ptr_realImag2 + 1) = *ptr_imag;
- }
-
freq_buf[inst->anaLen] = inst->real[inst->anaLen2];
freq_buf[inst->anaLen + 1] = -inst->imag[inst->anaLen2];
}
@@ -560,7 +513,7 @@
"vmull.s16 q11, d24, d22\n\t"
// tmp16b = WebRtcSpl_SatW32ToW16(tmp32); // Q0
"vqrshrn.s32 d22, q11, #13\n\t"
- // inst->synthesisBuffer[i] = WEBRTC_SPL_ADD_SAT_W16(
+ // inst->synthesisBuffer[i] = WebRtcSpl_AddSatW16(
// inst->synthesisBuffer[i], tmp16b); // Q0
"vqadd.s16 d25, d22\n\t"
"vst1.16 d25, [%[ptr_syn]]!\n\t"
@@ -577,7 +530,7 @@
"vmull.s16 q13, d24, d26\n\t"
// tmp16b = WebRtcSpl_SatW32ToW16(tmp32); // Q0
"vqrshrn.s32 d26, q13, #13\n\t"
- // inst->synthesisBuffer[i] = WEBRTC_SPL_ADD_SAT_W16(
+ // inst->synthesisBuffer[i] = WebRtcSpl_AddSatW16(
// inst->synthesisBuffer[i], tmp16b); // Q0
"vqadd.s16 d28, d26\n\t"
"vst1.16 d28, [%[ptr_syn]]!\n\t"
diff --git a/modules/audio_processing/test/android/apmtest/jni/Android.mk b/modules/audio_processing/test/android/apmtest/jni/Android.mk
deleted file mode 100644
index eaf3c9d..0000000
--- a/modules/audio_processing/test/android/apmtest/jni/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := apmtest-activity
-LOCAL_SRC_FILES := main.c
-LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM
-LOCAL_STATIC_LIBRARIES := android_native_app_glue
-
-include $(BUILD_SHARED_LIBRARY)
-
-$(call import-module,android/native_app_glue)
diff --git a/modules/audio_processing/test/audio_processing_unittest.cc b/modules/audio_processing/test/audio_processing_unittest.cc
index 65c2d8d..a0fb303 100644
--- a/modules/audio_processing/test/audio_processing_unittest.cc
+++ b/modules/audio_processing/test/audio_processing_unittest.cc
@@ -34,24 +34,18 @@
#include "webrtc/audio_processing/unittest.pb.h"
#endif
-#if (defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)) || \
- (defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_X86_64) && !defined(NDEBUG))
-# define WEBRTC_AUDIOPROC_BIT_EXACT
-#endif
-
namespace webrtc {
namespace {
// TODO(bjornv): This is not feasible until the functionality has been
-// re-implemented; see comment at the bottom of this file.
+// re-implemented; see comment at the bottom of this file. For now, the user has
+// to hard code the |write_ref_data| value.
// When false, this will compare the output data with the results stored to
// file. This is the typical case. When the file should be updated, it can
// be set to true with the command-line switch --write_ref_data.
-#ifdef WEBRTC_AUDIOPROC_BIT_EXACT
bool write_ref_data = false;
const int kChannels[] = {1, 2};
const size_t kChannelsSize = sizeof(kChannels) / sizeof(*kChannels);
-#endif
const int kSampleRates[] = {8000, 16000, 32000};
const size_t kSampleRatesSize = sizeof(kSampleRates) / sizeof(*kSampleRates);
@@ -184,8 +178,7 @@
EXPECT_NOERR(ap->voice_detection()->Enable(true));
}
-#ifdef WEBRTC_AUDIOPROC_BIT_EXACT
-// These functions are only used by the bit-exact test.
+// These functions are only used by ApmTest.Process.
template <class T>
T AbsValue(T a) {
return a > 0 ? a: -a;
@@ -221,6 +214,7 @@
void OpenFileAndWriteMessage(const std::string filename,
const ::google::protobuf::MessageLite& msg) {
+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
FILE* file = fopen(filename.c_str(), "wb");
ASSERT_TRUE(file != NULL);
@@ -233,8 +227,11 @@
ASSERT_EQ(static_cast<size_t>(size),
fwrite(array.get(), sizeof(array[0]), size, file));
fclose(file);
+#else
+ std::cout << "Warning: Writing new reference is only allowed on Linux!"
+ << std::endl;
+#endif
}
-#endif // WEBRTC_AUDIOPROC_BIT_EXACT
std::string ResourceFilePath(std::string name, int sample_rate_hz) {
std::ostringstream ss;
@@ -754,7 +751,8 @@
for (int i = 1; i < 3; i++) {
TestChangingChannels(i, kNoErr);
EXPECT_EQ(i, apm_->num_input_channels());
- EXPECT_EQ(i, apm_->num_reverse_channels());
+ // We always force the number of reverse channels used for processing to 1.
+ EXPECT_EQ(1, apm_->num_reverse_channels());
}
}
@@ -1674,7 +1672,7 @@
const int num_output_channels = test->num_output_channels();
const int samples_per_channel = test->sample_rate() *
AudioProcessing::kChunkSizeMs / 1000;
- const int output_length = samples_per_channel * num_output_channels;
+ const int output_length = samples_per_channel * num_output_channels;
Init(test->sample_rate(), test->sample_rate(), test->sample_rate(),
num_input_channels, num_output_channels, num_render_channels, true);
@@ -1743,10 +1741,7 @@
// TODO(andrew): Add a test to process a few frames with different combinations
// of enabled components.
-// TODO(andrew): Make this test more robust such that it can be run on multiple
-// platforms. It currently requires bit-exactness.
-#ifdef WEBRTC_AUDIOPROC_BIT_EXACT
-TEST_F(ApmTest, DISABLED_ON_ANDROID(Process)) {
+TEST_F(ApmTest, Process) {
GOOGLE_PROTOBUF_VERIFY_VERSION;
audioproc::OutputData ref_data;
@@ -1860,12 +1855,34 @@
#endif
if (!write_ref_data) {
- EXPECT_EQ(test->has_echo_count(), has_echo_count);
- EXPECT_EQ(test->has_voice_count(), has_voice_count);
- EXPECT_EQ(test->is_saturated_count(), is_saturated_count);
+ const int kIntNear = 1;
+ // When running the test on a N7 we get a {2, 6} difference of
+ // |has_voice_count| and |max_output_average| is up to 18 higher.
+ // All numbers being consistently higher on N7 compare to ref_data.
+ // TODO(bjornv): If we start getting more of these offsets on Android we
+ // should consider a different approach. Either using one slack for all,
+ // or generate a separate android reference.
+#if defined(WEBRTC_ANDROID)
+ const int kHasVoiceCountOffset = 3;
+ const int kHasVoiceCountNear = 3;
+ const int kMaxOutputAverageOffset = 9;
+ const int kMaxOutputAverageNear = 9;
+#else
+ const int kHasVoiceCountOffset = 0;
+ const int kHasVoiceCountNear = kIntNear;
+ const int kMaxOutputAverageOffset = 0;
+ const int kMaxOutputAverageNear = kIntNear;
+#endif
+ EXPECT_NEAR(test->has_echo_count(), has_echo_count, kIntNear);
+ EXPECT_NEAR(test->has_voice_count(),
+ has_voice_count - kHasVoiceCountOffset,
+ kHasVoiceCountNear);
+ EXPECT_NEAR(test->is_saturated_count(), is_saturated_count, kIntNear);
- EXPECT_EQ(test->analog_level_average(), analog_level_average);
- EXPECT_EQ(test->max_output_average(), max_output_average);
+ EXPECT_NEAR(test->analog_level_average(), analog_level_average, kIntNear);
+ EXPECT_NEAR(test->max_output_average(),
+ max_output_average - kMaxOutputAverageOffset,
+ kMaxOutputAverageNear);
#if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
audioproc::Test::EchoMetrics reference = test->echo_metrics();
@@ -1878,14 +1895,16 @@
TestStats(echo_metrics.a_nlp,
reference.a_nlp());
+ const double kFloatNear = 0.0005;
audioproc::Test::DelayMetrics reference_delay = test->delay_metrics();
- EXPECT_EQ(reference_delay.median(), median);
- EXPECT_EQ(reference_delay.std(), std);
+ EXPECT_NEAR(reference_delay.median(), median, kIntNear);
+ EXPECT_NEAR(reference_delay.std(), std, kIntNear);
- EXPECT_EQ(test->rms_level(), rms_level);
+ EXPECT_NEAR(test->rms_level(), rms_level, kIntNear);
- EXPECT_FLOAT_EQ(test->ns_speech_probability_average(),
- ns_speech_prob_average);
+ EXPECT_NEAR(test->ns_speech_probability_average(),
+ ns_speech_prob_average,
+ kFloatNear);
#endif
} else {
test->set_has_echo_count(has_echo_count);
@@ -1928,8 +1947,6 @@
}
}
-#endif // WEBRTC_AUDIOPROC_BIT_EXACT
-
TEST_F(ApmTest, NoErrorsWithKeyboardChannel) {
struct ChannelFormat {
AudioProcessing::ChannelLayout in_layout;
@@ -2309,25 +2326,25 @@
#if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
INSTANTIATE_TEST_CASE_P(
CommonFormats, AudioProcessingTest, testing::Values(
- std::tr1::make_tuple(48000, 48000, 48000, 25),
- std::tr1::make_tuple(48000, 48000, 32000, 25),
- std::tr1::make_tuple(48000, 48000, 16000, 25),
- std::tr1::make_tuple(48000, 44100, 48000, 20),
- std::tr1::make_tuple(48000, 44100, 32000, 20),
- std::tr1::make_tuple(48000, 44100, 16000, 20),
- std::tr1::make_tuple(48000, 32000, 48000, 25),
- std::tr1::make_tuple(48000, 32000, 32000, 25),
- std::tr1::make_tuple(48000, 32000, 16000, 25),
- std::tr1::make_tuple(48000, 16000, 48000, 25),
- std::tr1::make_tuple(48000, 16000, 32000, 25),
- std::tr1::make_tuple(48000, 16000, 16000, 25),
+ std::tr1::make_tuple(48000, 48000, 48000, 20),
+ std::tr1::make_tuple(48000, 48000, 32000, 20),
+ std::tr1::make_tuple(48000, 48000, 16000, 20),
+ std::tr1::make_tuple(48000, 44100, 48000, 15),
+ std::tr1::make_tuple(48000, 44100, 32000, 15),
+ std::tr1::make_tuple(48000, 44100, 16000, 15),
+ std::tr1::make_tuple(48000, 32000, 48000, 20),
+ std::tr1::make_tuple(48000, 32000, 32000, 20),
+ std::tr1::make_tuple(48000, 32000, 16000, 20),
+ std::tr1::make_tuple(48000, 16000, 48000, 20),
+ std::tr1::make_tuple(48000, 16000, 32000, 20),
+ std::tr1::make_tuple(48000, 16000, 16000, 20),
std::tr1::make_tuple(44100, 48000, 48000, 20),
std::tr1::make_tuple(44100, 48000, 32000, 20),
std::tr1::make_tuple(44100, 48000, 16000, 20),
- std::tr1::make_tuple(44100, 44100, 48000, 20),
- std::tr1::make_tuple(44100, 44100, 32000, 20),
- std::tr1::make_tuple(44100, 44100, 16000, 20),
+ std::tr1::make_tuple(44100, 44100, 48000, 15),
+ std::tr1::make_tuple(44100, 44100, 32000, 15),
+ std::tr1::make_tuple(44100, 44100, 16000, 15),
std::tr1::make_tuple(44100, 32000, 48000, 20),
std::tr1::make_tuple(44100, 32000, 32000, 20),
std::tr1::make_tuple(44100, 32000, 16000, 20),
@@ -2344,9 +2361,9 @@
std::tr1::make_tuple(32000, 32000, 48000, 30),
std::tr1::make_tuple(32000, 32000, 32000, 0),
std::tr1::make_tuple(32000, 32000, 16000, 30),
- std::tr1::make_tuple(32000, 16000, 48000, 25),
- std::tr1::make_tuple(32000, 16000, 32000, 25),
- std::tr1::make_tuple(32000, 16000, 16000, 25),
+ std::tr1::make_tuple(32000, 16000, 48000, 20),
+ std::tr1::make_tuple(32000, 16000, 32000, 20),
+ std::tr1::make_tuple(32000, 16000, 16000, 20),
std::tr1::make_tuple(16000, 48000, 48000, 25),
std::tr1::make_tuple(16000, 48000, 32000, 25),
diff --git a/modules/audio_processing/test/process_test.cc b/modules/audio_processing/test/process_test.cc
index a36a072..b6d51e4 100644
--- a/modules/audio_processing/test/process_test.cc
+++ b/modules/audio_processing/test/process_test.cc
@@ -59,7 +59,7 @@
"when -ir or -i is used, the specified files will be processed directly in\n"
"a simulation mode. Otherwise the full set of legacy test files is expected\n"
"to be present in the working directory. OUT_FILE should be specified\n"
- "without extension to support both int and float output.\n\n");
+ "without extension to support both raw and wav output.\n\n");
printf("Options\n");
printf("General configuration (only used for the simulation mode):\n");
printf(" -fs SAMPLE_RATE_HZ\n");
@@ -112,6 +112,7 @@
printf(" --perf Measure performance.\n");
printf(" --quiet Suppress text output.\n");
printf(" --no_progress Suppress progress.\n");
+ printf(" --raw_output Raw output instead of WAV file.\n");
printf(" --debug_file FILE Dump a debug recording.\n");
}
@@ -167,6 +168,7 @@
bool perf_testing = false;
bool verbose = true;
bool progress = true;
+ bool raw_output = false;
int extra_delay_ms = 0;
int override_delay_ms = 0;
@@ -400,7 +402,9 @@
vad_out_filename = argv[i];
} else if (strcmp(argv[i], "-expns") == 0) {
- ASSERT_EQ(apm->kNoError, apm->EnableExperimentalNs(true));
+ Config config;
+ config.Set<ExperimentalNs>(new ExperimentalNs(true));
+ apm->SetExtraOptions(config);
} else if (strcmp(argv[i], "--noasm") == 0) {
WebRtc_GetCPUInfo = WebRtc_GetCPUInfoNoASM;
@@ -425,6 +429,9 @@
} else if (strcmp(argv[i], "--no_progress") == 0) {
progress = false;
+ } else if (strcmp(argv[i], "--raw_output") == 0) {
+ raw_output = true;
+
} else if (strcmp(argv[i], "--debug_file") == 0) {
i++;
ASSERT_LT(i, argc) << "Specify filename after --debug_file";
@@ -462,8 +469,6 @@
if (out_filename.size() == 0) {
out_filename = out_path + "out";
}
- std::string out_float_filename = out_filename + ".float";
- out_filename += ".pcm";
if (!vad_out_filename) {
vad_out_filename = vad_file_default.c_str();
@@ -484,6 +489,9 @@
FILE* aecm_echo_path_in_file = NULL;
FILE* aecm_echo_path_out_file = NULL;
+ scoped_ptr<WavFile> output_wav_file;
+ scoped_ptr<RawFile> output_raw_file;
+
if (pb_filename) {
pb_file = OpenFile(pb_filename, "rb");
} else {
@@ -603,13 +611,14 @@
samples_per_channel = msg.sample_rate() / 100;
far_frame.sample_rate_hz_ = msg.sample_rate();
- far_frame.samples_per_channel_ = samples_per_channel;
+ far_frame.samples_per_channel_ = reverse_sample_rate / 100;
far_frame.num_channels_ = msg.num_reverse_channels();
near_frame.sample_rate_hz_ = msg.sample_rate();
near_frame.samples_per_channel_ = samples_per_channel;
near_frame.num_channels_ = msg.num_input_channels();
- reverse_cb.reset(new ChannelBuffer<float>(samples_per_channel,
- msg.num_reverse_channels()));
+ reverse_cb.reset(new ChannelBuffer<float>(
+ far_frame.samples_per_channel_,
+ msg.num_reverse_channels()));
primary_cb.reset(new ChannelBuffer<float>(samples_per_channel,
msg.num_input_channels()));
@@ -625,6 +634,14 @@
printf(" Reverse channels: %d\n", msg.num_reverse_channels());
}
+ if (!raw_output) {
+ // The WAV file needs to be reset every time, because it cant change
+ // it's sample rate or number of channels.
+ output_wav_file.reset(new WavFile(out_filename + ".wav",
+ output_sample_rate,
+ msg.num_output_channels()));
+ }
+
} else if (event_msg.type() == Event::REVERSE_STREAM) {
ASSERT_TRUE(event_msg.has_reverse_stream());
ReverseStream msg = event_msg.reverse_stream();
@@ -632,7 +649,7 @@
ASSERT_TRUE(msg.has_data() ^ (msg.channel_size() > 0));
if (msg.has_data()) {
- ASSERT_EQ(sizeof(int16_t) * samples_per_channel *
+ ASSERT_EQ(sizeof(int16_t) * far_frame.samples_per_channel_ *
far_frame.num_channels_, msg.data().size());
memcpy(far_frame.data_, msg.data().data(), msg.data().size());
} else {
@@ -684,14 +701,16 @@
memcpy(near_frame.data_,
msg.input_data().data(),
msg.input_data().size());
+ near_read_bytes += msg.input_data().size();
} else {
for (int i = 0; i < msg.input_channel_size(); ++i) {
primary_cb->CopyFrom(msg.input_channel(i).data(), i);
+ near_read_bytes += msg.input_channel(i).size();
}
}
- near_read_bytes += msg.input_data().size();
if (progress && primary_count % 100 == 0) {
+ near_read_bytes = std::min(near_read_bytes, near_size_bytes);
printf("%.0f%% complete\r",
(near_read_bytes * 100.0) / near_size_bytes);
fflush(stdout);
@@ -767,19 +786,24 @@
}
}
- size_t num_samples = samples_per_channel * apm->num_output_channels();
+ const size_t samples_per_channel = output_sample_rate / 100;
if (msg.has_input_data()) {
- static FILE* out_file = OpenFile(out_filename, "wb");
- ASSERT_EQ(num_samples, fwrite(near_frame.data_,
- sizeof(*near_frame.data_),
- num_samples,
- out_file));
+ if (raw_output && !output_raw_file) {
+ output_raw_file.reset(new RawFile(out_filename + ".pcm"));
+ }
+ WriteIntData(near_frame.data_,
+ apm->num_output_channels() * samples_per_channel,
+ output_wav_file.get(),
+ output_raw_file.get());
} else {
- static FILE* out_float_file = OpenFile(out_float_filename, "wb");
- ASSERT_EQ(num_samples, fwrite(primary_cb->data(),
- sizeof(*primary_cb->data()),
- num_samples,
- out_float_file));
+ if (raw_output && !output_raw_file) {
+ output_raw_file.reset(new RawFile(out_filename + ".float"));
+ }
+ WriteFloatData(primary_cb->channels(),
+ samples_per_channel,
+ apm->num_output_channels(),
+ output_wav_file.get(),
+ output_raw_file.get());
}
}
}
@@ -849,6 +873,14 @@
near_frame.sample_rate_hz_ = sample_rate_hz;
near_frame.samples_per_channel_ = samples_per_channel;
+ if (!raw_output) {
+ // The WAV file needs to be reset every time, because it can't change
+ // it's sample rate or number of channels.
+ output_wav_file.reset(new WavFile(out_filename + ".wav",
+ sample_rate_hz,
+ num_capture_output_channels));
+ }
+
if (verbose) {
printf("Init at frame: %d (primary), %d (reverse)\n",
primary_count, reverse_count);
@@ -993,12 +1025,18 @@
}
}
- size = samples_per_channel * near_frame.num_channels_;
- static FILE* out_file = OpenFile(out_filename, "wb");
- ASSERT_EQ(size, fwrite(near_frame.data_,
- sizeof(int16_t),
- size,
- out_file));
+ if (raw_output && !output_raw_file) {
+ output_raw_file.reset(new RawFile(out_filename + ".pcm"));
+ }
+ if (!raw_output && !output_wav_file) {
+ output_wav_file.reset(new WavFile(out_filename + ".wav",
+ sample_rate_hz,
+ num_capture_output_channels));
+ }
+ WriteIntData(near_frame.data_,
+ size,
+ output_wav_file.get(),
+ output_raw_file.get());
}
else {
FAIL() << "Event " << event << " is unrecognized";
diff --git a/modules/audio_processing/test/test_utils.h b/modules/audio_processing/test/test_utils.h
index e5204da..61edd8f 100644
--- a/modules/audio_processing/test/test_utils.h
+++ b/modules/audio_processing/test/test_utils.h
@@ -8,7 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <limits>
+
#include "webrtc/audio_processing/debug.pb.h"
+#include "webrtc/common_audio/include/audio_util.h"
+#include "webrtc/common_audio/wav_writer.h"
#include "webrtc/modules/audio_processing/common.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/interface/module_common_types.h"
@@ -19,6 +23,64 @@
static const AudioProcessing::Error kNoErr = AudioProcessing::kNoError;
#define EXPECT_NOERR(expr) EXPECT_EQ(kNoErr, (expr))
+class RawFile {
+ public:
+ RawFile(const std::string& filename)
+ : file_handle_(fopen(filename.c_str(), "wb")) {}
+
+ ~RawFile() {
+ fclose(file_handle_);
+ }
+
+ void WriteSamples(const int16_t* samples, size_t num_samples) {
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+#error "Need to convert samples to little-endian when writing to PCM file"
+#endif
+ fwrite(samples, sizeof(*samples), num_samples, file_handle_);
+ }
+
+ void WriteSamples(const float* samples, size_t num_samples) {
+ fwrite(samples, sizeof(*samples), num_samples, file_handle_);
+ }
+
+ private:
+ FILE* file_handle_;
+};
+
+static inline void WriteIntData(const int16_t* data,
+ size_t length,
+ WavFile* wav_file,
+ RawFile* raw_file) {
+ if (wav_file) {
+ wav_file->WriteSamples(data, length);
+ }
+ if (raw_file) {
+ raw_file->WriteSamples(data, length);
+ }
+}
+
+static inline void WriteFloatData(const float* const* data,
+ size_t samples_per_channel,
+ int num_channels,
+ WavFile* wav_file,
+ RawFile* raw_file) {
+ size_t length = num_channels * samples_per_channel;
+ scoped_ptr<float[]> buffer(new float[length]);
+ Interleave(data, samples_per_channel, num_channels, buffer.get());
+ if (raw_file) {
+ raw_file->WriteSamples(buffer.get(), length);
+ }
+ // TODO(aluebs): Use ScaleToInt16Range() from audio_util
+ for (size_t i = 0; i < length; ++i) {
+ buffer[i] = buffer[i] > 0 ?
+ buffer[i] * std::numeric_limits<int16_t>::max() :
+ -buffer[i] * std::numeric_limits<int16_t>::min();
+ }
+ if (wav_file) {
+ wav_file->WriteSamples(buffer.get(), length);
+ }
+}
+
// Exits on failure; do not use in unit tests.
static inline FILE* OpenFile(const std::string& filename, const char* mode) {
FILE* file = fopen(filename.c_str(), mode);
diff --git a/modules/audio_processing/test/unpack.cc b/modules/audio_processing/test/unpack.cc
index c90ba82..249b668 100644
--- a/modules/audio_processing/test/unpack.cc
+++ b/modules/audio_processing/test/unpack.cc
@@ -22,17 +22,11 @@
#include "webrtc/typedefs.h"
// TODO(andrew): unpack more of the data.
-DEFINE_string(input_file, "input.pcm", "The name of the input stream file.");
-DEFINE_string(float_input_file, "input.float",
- "The name of the float input stream file.");
-DEFINE_string(output_file, "ref_out.pcm",
+DEFINE_string(input_file, "input", "The name of the input stream file.");
+DEFINE_string(output_file, "ref_out",
"The name of the reference output stream file.");
-DEFINE_string(float_output_file, "ref_out.float",
- "The name of the float reference output stream file.");
-DEFINE_string(reverse_file, "reverse.pcm",
+DEFINE_string(reverse_file, "reverse",
"The name of the reverse input stream file.");
-DEFINE_string(float_reverse_file, "reverse.float",
- "The name of the float reverse input stream file.");
DEFINE_string(delay_file, "delay.int32", "The name of the delay file.");
DEFINE_string(drift_file, "drift.int32", "The name of the drift file.");
DEFINE_string(level_file, "level.int32", "The name of the level file.");
@@ -40,6 +34,7 @@
DEFINE_string(settings_file, "settings.txt", "The name of the settings file.");
DEFINE_bool(full, false,
"Unpack the full set of files (normally not needed).");
+DEFINE_bool(raw, false, "Write raw data instead of a WAV file.");
namespace webrtc {
@@ -72,7 +67,19 @@
Event event_msg;
int frame_count = 0;
-while (ReadMessageFromFile(debug_file, &event_msg)) {
+ int reverse_samples_per_channel = 0;
+ int input_samples_per_channel = 0;
+ int output_samples_per_channel = 0;
+ int num_reverse_channels = 0;
+ int num_input_channels = 0;
+ int num_output_channels = 0;
+ scoped_ptr<WavFile> reverse_wav_file;
+ scoped_ptr<WavFile> input_wav_file;
+ scoped_ptr<WavFile> output_wav_file;
+ scoped_ptr<RawFile> reverse_raw_file;
+ scoped_ptr<RawFile> input_raw_file;
+ scoped_ptr<RawFile> output_raw_file;
+ while (ReadMessageFromFile(debug_file, &event_msg)) {
if (event_msg.type() == Event::REVERSE_STREAM) {
if (!event_msg.has_reverse_stream()) {
printf("Corrupt input file: ReverseStream missing.\n");
@@ -81,17 +88,30 @@
const ReverseStream msg = event_msg.reverse_stream();
if (msg.has_data()) {
- static FILE* reverse_file = OpenFile(FLAGS_reverse_file, "wb");
- WriteData(msg.data().data(), msg.data().size(), reverse_file,
- FLAGS_reverse_file);
-
+ if (FLAGS_raw && !reverse_raw_file) {
+ reverse_raw_file.reset(new RawFile(FLAGS_reverse_file + ".pcm"));
+ }
+ // TODO(aluebs): Replace "num_reverse_channels *
+ // reverse_samples_per_channel" with "msg.data().size() /
+ // sizeof(int16_t)" and so on when this fix in audio_processing has made
+ // it into stable: https://webrtc-codereview.appspot.com/15299004/
+ WriteIntData(reinterpret_cast<const int16_t*>(msg.data().data()),
+ num_reverse_channels * reverse_samples_per_channel,
+ reverse_wav_file.get(),
+ reverse_raw_file.get());
} else if (msg.channel_size() > 0) {
- static FILE* float_reverse_file = OpenFile(FLAGS_float_reverse_file,
- "wb");
- // TODO(ajm): Interleave multiple channels.
- assert(msg.channel_size() == 1);
- WriteData(msg.channel(0).data(), msg.channel(0).size(),
- float_reverse_file, FLAGS_reverse_file);
+ if (FLAGS_raw && !reverse_raw_file) {
+ reverse_raw_file.reset(new RawFile(FLAGS_reverse_file + ".float"));
+ }
+ scoped_ptr<const float*[]> data(new const float*[num_reverse_channels]);
+ for (int i = 0; i < num_reverse_channels; ++i) {
+ data[i] = reinterpret_cast<const float*>(msg.channel(i).data());
+ }
+ WriteFloatData(data.get(),
+ reverse_samples_per_channel,
+ num_reverse_channels,
+ reverse_wav_file.get(),
+ reverse_raw_file.get());
}
} else if (event_msg.type() == Event::STREAM) {
frame_count++;
@@ -102,30 +122,50 @@
const Stream msg = event_msg.stream();
if (msg.has_input_data()) {
- static FILE* input_file = OpenFile(FLAGS_input_file, "wb");
- WriteData(msg.input_data().data(), msg.input_data().size(),
- input_file, FLAGS_input_file);
-
+ if (FLAGS_raw && !input_raw_file) {
+ input_raw_file.reset(new RawFile(FLAGS_input_file + ".pcm"));
+ }
+ WriteIntData(reinterpret_cast<const int16_t*>(msg.input_data().data()),
+ num_input_channels * input_samples_per_channel,
+ input_wav_file.get(),
+ input_raw_file.get());
} else if (msg.input_channel_size() > 0) {
- static FILE* float_input_file = OpenFile(FLAGS_float_input_file, "wb");
- // TODO(ajm): Interleave multiple channels.
- assert(msg.input_channel_size() == 1);
- WriteData(msg.input_channel(0).data(), msg.input_channel(0).size(),
- float_input_file, FLAGS_float_input_file);
+ if (FLAGS_raw && !input_raw_file) {
+ input_raw_file.reset(new RawFile(FLAGS_input_file + ".float"));
+ }
+ scoped_ptr<const float*[]> data(new const float*[num_input_channels]);
+ for (int i = 0; i < num_input_channels; ++i) {
+ data[i] = reinterpret_cast<const float*>(msg.input_channel(i).data());
+ }
+ WriteFloatData(data.get(),
+ input_samples_per_channel,
+ num_input_channels,
+ input_wav_file.get(),
+ input_raw_file.get());
}
if (msg.has_output_data()) {
- static FILE* output_file = OpenFile(FLAGS_output_file, "wb");
- WriteData(msg.output_data().data(), msg.output_data().size(),
- output_file, FLAGS_output_file);
-
+ if (FLAGS_raw && !output_raw_file) {
+ output_raw_file.reset(new RawFile(FLAGS_output_file + ".pcm"));
+ }
+ WriteIntData(reinterpret_cast<const int16_t*>(msg.output_data().data()),
+ num_output_channels * output_samples_per_channel,
+ output_wav_file.get(),
+ output_raw_file.get());
} else if (msg.output_channel_size() > 0) {
- static FILE* float_output_file = OpenFile(FLAGS_float_output_file,
- "wb");
- // TODO(ajm): Interleave multiple channels.
- assert(msg.output_channel_size() == 1);
- WriteData(msg.output_channel(0).data(), msg.output_channel(0).size(),
- float_output_file, FLAGS_float_output_file);
+ if (FLAGS_raw && !output_raw_file) {
+ output_raw_file.reset(new RawFile(FLAGS_output_file + ".float"));
+ }
+ scoped_ptr<const float*[]> data(new const float*[num_output_channels]);
+ for (int i = 0; i < num_output_channels; ++i) {
+ data[i] =
+ reinterpret_cast<const float*>(msg.output_channel(i).data());
+ }
+ WriteFloatData(data.get(),
+ output_samples_per_channel,
+ num_output_channels,
+ output_wav_file.get(),
+ output_raw_file.get());
}
if (FLAGS_full) {
@@ -164,15 +204,47 @@
const Init msg = event_msg.init();
// These should print out zeros if they're missing.
fprintf(settings_file, "Init at frame: %d\n", frame_count);
- fprintf(settings_file, " Sample rate: %d\n", msg.sample_rate());
- fprintf(settings_file, " Input channels: %d\n",
- msg.num_input_channels());
- fprintf(settings_file, " Output channels: %d\n",
- msg.num_output_channels());
- fprintf(settings_file, " Reverse channels: %d\n",
- msg.num_reverse_channels());
+ int input_sample_rate = msg.sample_rate();
+ fprintf(settings_file, " Input sample rate: %d\n", input_sample_rate);
+ int output_sample_rate = msg.output_sample_rate();
+ fprintf(settings_file, " Output sample rate: %d\n", output_sample_rate);
+ int reverse_sample_rate = msg.reverse_sample_rate();
+ fprintf(settings_file,
+ " Reverse sample rate: %d\n",
+ reverse_sample_rate);
+ num_input_channels = msg.num_input_channels();
+ fprintf(settings_file, " Input channels: %d\n", num_input_channels);
+ num_output_channels = msg.num_output_channels();
+ fprintf(settings_file, " Output channels: %d\n", num_output_channels);
+ num_reverse_channels = msg.num_reverse_channels();
+ fprintf(settings_file, " Reverse channels: %d\n", num_reverse_channels);
fprintf(settings_file, "\n");
+
+ if (reverse_sample_rate == 0) {
+ reverse_sample_rate = input_sample_rate;
+ }
+ if (output_sample_rate == 0) {
+ output_sample_rate = input_sample_rate;
+ }
+
+ reverse_samples_per_channel = reverse_sample_rate / 100;
+ input_samples_per_channel = input_sample_rate / 100;
+ output_samples_per_channel = output_sample_rate / 100;
+
+ if (!FLAGS_raw) {
+ // The WAV files need to be reset every time, because they cant change
+ // their sample rate or number of channels.
+ reverse_wav_file.reset(new WavFile(FLAGS_reverse_file + ".wav",
+ reverse_sample_rate,
+ num_reverse_channels));
+ input_wav_file.reset(new WavFile(FLAGS_input_file + ".wav",
+ input_sample_rate,
+ num_input_channels));
+ output_wav_file.reset(new WavFile(FLAGS_output_file + ".wav",
+ output_sample_rate,
+ num_output_channels));
+ }
}
}
diff --git a/modules/audio_processing/utility/Android.mk b/modules/audio_processing/utility/Android.mk
deleted file mode 100644
index 5a4d309..0000000
--- a/modules/audio_processing/utility/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_apm_utility
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- fft4g.c \
- ring_buffer.c \
- delay_estimator.c \
- delay_estimator_wrapper.c
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audio_processing/utility/delay_estimator.c b/modules/audio_processing/utility/delay_estimator.c
index 3b20432..60c7a04 100644
--- a/modules/audio_processing/utility/delay_estimator.c
+++ b/modules/audio_processing/utility/delay_estimator.c
@@ -98,6 +98,7 @@
kMaxHitsWhenPossiblyNonCausal : kMaxHitsWhenPossiblyCausal;
int i = 0;
+ assert(self->history_size == self->farend->history_size);
// Reset |candidate_hits| if we have a new candidate.
if (candidate_delay != self->last_candidate_delay) {
self->candidate_hits = 0;
@@ -130,7 +131,7 @@
// 4. All other bins are decreased with |valley_depth|.
// TODO(bjornv): Investigate how to make this loop more efficient. Split up
// the loop? Remove parts that doesn't add too much.
- for (i = 0; i < self->farend->history_size; ++i) {
+ for (i = 0; i < self->history_size; ++i) {
int is_in_last_set = (i >= self->last_delay - 2) &&
(i <= self->last_delay + 1) && (i != candidate_delay);
int is_in_candidate_set = (i >= candidate_delay - 2) &&
@@ -277,27 +278,47 @@
// Sanity conditions fulfilled.
self = malloc(sizeof(BinaryDelayEstimatorFarend));
}
- if (self != NULL) {
- int malloc_fail = 0;
-
- self->history_size = history_size;
-
- // Allocate memory for history buffers.
- self->binary_far_history = malloc(history_size * sizeof(uint32_t));
- malloc_fail |= (self->binary_far_history == NULL);
-
- self->far_bit_counts = malloc(history_size * sizeof(int));
- malloc_fail |= (self->far_bit_counts == NULL);
-
- if (malloc_fail) {
- WebRtc_FreeBinaryDelayEstimatorFarend(self);
- self = NULL;
- }
+ if (self == NULL) {
+ return NULL;
}
+ self->history_size = 0;
+ self->binary_far_history = NULL;
+ self->far_bit_counts = NULL;
+ if (WebRtc_AllocateFarendBufferMemory(self, history_size) == 0) {
+ WebRtc_FreeBinaryDelayEstimatorFarend(self);
+ self = NULL;
+ }
return self;
}
+int WebRtc_AllocateFarendBufferMemory(BinaryDelayEstimatorFarend* self,
+ int history_size) {
+ assert(self != NULL);
+ // (Re-)Allocate memory for history buffers.
+ self->binary_far_history =
+ realloc(self->binary_far_history,
+ history_size * sizeof(*self->binary_far_history));
+ self->far_bit_counts = realloc(self->far_bit_counts,
+ history_size * sizeof(*self->far_bit_counts));
+ if ((self->binary_far_history == NULL) || (self->far_bit_counts == NULL)) {
+ history_size = 0;
+ }
+ // Fill with zeros if we have expanded the buffers.
+ if (history_size > self->history_size) {
+ int size_diff = history_size - self->history_size;
+ memset(&self->binary_far_history[self->history_size],
+ 0,
+ sizeof(*self->binary_far_history) * size_diff);
+ memset(&self->far_bit_counts[self->history_size],
+ 0,
+ sizeof(*self->far_bit_counts) * size_diff);
+ }
+ self->history_size = history_size;
+
+ return self->history_size;
+}
+
void WebRtc_InitBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self) {
assert(self != NULL);
memset(self->binary_far_history, 0, sizeof(uint32_t) * self->history_size);
@@ -385,51 +406,84 @@
// Sanity conditions fulfilled.
self = malloc(sizeof(BinaryDelayEstimator));
}
+ if (self == NULL) {
+ return NULL;
+ }
- if (self != NULL) {
- int malloc_fail = 0;
+ self->farend = farend;
+ self->near_history_size = max_lookahead + 1;
+ self->history_size = 0;
+ self->robust_validation_enabled = 0; // Disabled by default.
+ self->allowed_offset = 0;
- self->farend = farend;
- self->near_history_size = max_lookahead + 1;
- self->robust_validation_enabled = 0; // Disabled by default.
- self->allowed_offset = 0;
+ self->lookahead = max_lookahead;
- self->lookahead = max_lookahead;
-
- // Allocate memory for spectrum buffers. The extra array element in
- // |mean_bit_counts| and |histogram| is a dummy element only used while
- // |last_delay| == -2, i.e., before we have a valid estimate.
- self->mean_bit_counts =
- malloc((farend->history_size + 1) * sizeof(int32_t));
- malloc_fail |= (self->mean_bit_counts == NULL);
-
- self->bit_counts = malloc(farend->history_size * sizeof(int32_t));
- malloc_fail |= (self->bit_counts == NULL);
-
- // Allocate memory for history buffers.
- self->binary_near_history = malloc((max_lookahead + 1) * sizeof(uint32_t));
- malloc_fail |= (self->binary_near_history == NULL);
-
- self->histogram = malloc((farend->history_size + 1) * sizeof(float));
- malloc_fail |= (self->histogram == NULL);
-
- if (malloc_fail) {
- WebRtc_FreeBinaryDelayEstimator(self);
- self = NULL;
- }
+ // Allocate memory for spectrum and history buffers.
+ self->mean_bit_counts = NULL;
+ self->bit_counts = NULL;
+ self->histogram = NULL;
+ self->binary_near_history =
+ malloc((max_lookahead + 1) * sizeof(*self->binary_near_history));
+ if (self->binary_near_history == NULL ||
+ WebRtc_AllocateHistoryBufferMemory(self, farend->history_size) == 0) {
+ WebRtc_FreeBinaryDelayEstimator(self);
+ self = NULL;
}
return self;
}
+int WebRtc_AllocateHistoryBufferMemory(BinaryDelayEstimator* self,
+ int history_size) {
+ BinaryDelayEstimatorFarend* far = self->farend;
+ // (Re-)Allocate memory for spectrum and history buffers.
+ if (history_size != far->history_size) {
+ // Only update far-end buffers if we need.
+ history_size = WebRtc_AllocateFarendBufferMemory(far, history_size);
+ }
+ // The extra array element in |mean_bit_counts| and |histogram| is a dummy
+ // element only used while |last_delay| == -2, i.e., before we have a valid
+ // estimate.
+ self->mean_bit_counts =
+ realloc(self->mean_bit_counts,
+ (history_size + 1) * sizeof(*self->mean_bit_counts));
+ self->bit_counts =
+ realloc(self->bit_counts, history_size * sizeof(*self->bit_counts));
+ self->histogram =
+ realloc(self->histogram, (history_size + 1) * sizeof(*self->histogram));
+
+ if ((self->mean_bit_counts == NULL) ||
+ (self->bit_counts == NULL) ||
+ (self->histogram == NULL)) {
+ history_size = 0;
+ }
+ // Fill with zeros if we have expanded the buffers.
+ if (history_size > self->history_size) {
+ int size_diff = history_size - self->history_size;
+ memset(&self->mean_bit_counts[self->history_size],
+ 0,
+ sizeof(*self->mean_bit_counts) * size_diff);
+ memset(&self->bit_counts[self->history_size],
+ 0,
+ sizeof(*self->bit_counts) * size_diff);
+ memset(&self->histogram[self->history_size],
+ 0,
+ sizeof(*self->histogram) * size_diff);
+ }
+ self->history_size = history_size;
+
+ return self->history_size;
+}
+
void WebRtc_InitBinaryDelayEstimator(BinaryDelayEstimator* self) {
int i = 0;
assert(self != NULL);
- memset(self->bit_counts, 0, sizeof(int32_t) * self->farend->history_size);
- memset(self->binary_near_history, 0,
+ memset(self->bit_counts, 0, sizeof(int32_t) * self->history_size);
+ memset(self->binary_near_history,
+ 0,
sizeof(uint32_t) * self->near_history_size);
- for (i = 0; i <= self->farend->history_size; ++i) {
+ for (i = 0; i <= self->history_size; ++i) {
self->mean_bit_counts[i] = (20 << 9); // 20 in Q9.
self->histogram[i] = 0.f;
}
@@ -440,7 +494,7 @@
self->last_delay = -2;
self->last_candidate_delay = -2;
- self->compare_delay = self->farend->history_size;
+ self->compare_delay = self->history_size;
self->candidate_hits = 0;
self->last_delay_histogram = 0.f;
}
@@ -471,6 +525,10 @@
int32_t valley_depth = 0;
assert(self != NULL);
+ if (self->farend->history_size != self->history_size) {
+ // Non matching history sizes.
+ return -1;
+ }
if (self->near_history_size > 1) {
// If we apply lookahead, shift near-end binary spectrum history. Insert
// current |binary_near_spectrum| and pull out the delayed one.
@@ -482,10 +540,10 @@
// Compare with delayed spectra and store the |bit_counts| for each delay.
BitCountComparison(binary_near_spectrum, self->farend->binary_far_history,
- self->farend->history_size, self->bit_counts);
+ self->history_size, self->bit_counts);
// Update |mean_bit_counts|, which is the smoothed version of |bit_counts|.
- for (i = 0; i < self->farend->history_size; i++) {
+ for (i = 0; i < self->history_size; i++) {
// |bit_counts| is constrained to [0, 32], meaning we can smooth with a
// factor up to 2^26. We use Q9.
int32_t bit_count = (self->bit_counts[i] << 9); // Q9.
@@ -503,7 +561,7 @@
// Find |candidate_delay|, |value_best_candidate| and |value_worst_candidate|
// of |mean_bit_counts|.
- for (i = 0; i < self->farend->history_size; i++) {
+ for (i = 0; i < self->history_size; i++) {
if (self->mean_bit_counts[i] < value_best_candidate) {
value_best_candidate = self->mean_bit_counts[i];
candidate_delay = i;
diff --git a/modules/audio_processing/utility/delay_estimator.h b/modules/audio_processing/utility/delay_estimator.h
index 3d5ffce..65c3f03 100644
--- a/modules/audio_processing/utility/delay_estimator.h
+++ b/modules/audio_processing/utility/delay_estimator.h
@@ -36,6 +36,7 @@
// Binary history variables.
uint32_t* binary_near_history;
int near_history_size;
+ int history_size;
// Delay estimation variables.
int32_t minimum_probability;
@@ -85,6 +86,19 @@
BinaryDelayEstimatorFarend* WebRtc_CreateBinaryDelayEstimatorFarend(
int history_size);
+// Re-allocates the buffers.
+//
+// Inputs:
+// - self : Pointer to the binary estimation far-end instance
+// which is the return value of
+// WebRtc_CreateBinaryDelayEstimatorFarend().
+// - history_size : Size of the far-end binary spectrum history.
+//
+// Return value:
+// - history_size : The history size allocated.
+int WebRtc_AllocateFarendBufferMemory(BinaryDelayEstimatorFarend* self,
+ int history_size);
+
// Initializes the delay estimation far-end instance created with
// WebRtc_CreateBinaryDelayEstimatorFarend(...).
//
@@ -141,6 +155,20 @@
BinaryDelayEstimator* WebRtc_CreateBinaryDelayEstimator(
BinaryDelayEstimatorFarend* farend, int max_lookahead);
+// Re-allocates |history_size| dependent buffers. The far-end buffers will be
+// updated at the same time if needed.
+//
+// Input:
+// - self : Pointer to the binary estimation instance which is
+// the return value of
+// WebRtc_CreateBinaryDelayEstimator().
+// - history_size : Size of the history buffers.
+//
+// Return value:
+// - history_size : The history size allocated.
+int WebRtc_AllocateHistoryBufferMemory(BinaryDelayEstimator* self,
+ int history_size);
+
// Initializes the delay estimation instance created with
// WebRtc_CreateBinaryDelayEstimator(...).
//
@@ -220,5 +248,4 @@
int factor,
int32_t* mean_value);
-
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
diff --git a/modules/audio_processing/utility/delay_estimator_unittest.cc b/modules/audio_processing/utility/delay_estimator_unittest.cc
index ca0901d..4ebe0e6 100644
--- a/modules/audio_processing/utility/delay_estimator_unittest.cc
+++ b/modules/audio_processing/utility/delay_estimator_unittest.cc
@@ -23,9 +23,13 @@
// Delay history sizes.
enum { kMaxDelay = 100 };
enum { kLookahead = 10 };
+enum { kHistorySize = kMaxDelay + kLookahead };
// Length of binary spectrum sequence.
enum { kSequenceLength = 400 };
+const int kDifferentHistorySize = 3;
+const int kDifferentLookahead = 1;
+
const int kEnable[] = { 0, 1 };
const size_t kSizeEnable = sizeof(kEnable) / sizeof(*kEnable);
@@ -56,7 +60,7 @@
float near_f_[kSpectrumSize];
uint16_t far_u16_[kSpectrumSize];
uint16_t near_u16_[kSpectrumSize];
- uint32_t binary_spectrum_[kSequenceLength + kMaxDelay + kLookahead];
+ uint32_t binary_spectrum_[kSequenceLength + kHistorySize];
};
DelayEstimatorTest::DelayEstimatorTest()
@@ -76,21 +80,20 @@
// |kSequenceLength| has to be long enough for the delay estimation to leave
// the initialized state.
binary_spectrum_[0] = 1;
- for (int i = 1; i < (kSequenceLength + kMaxDelay + kLookahead); i++) {
+ for (int i = 1; i < (kSequenceLength + kHistorySize); i++) {
binary_spectrum_[i] = 3 * binary_spectrum_[i - 1];
}
}
void DelayEstimatorTest::SetUp() {
farend_handle_ = WebRtc_CreateDelayEstimatorFarend(kSpectrumSize,
- kMaxDelay + kLookahead);
+ kHistorySize);
ASSERT_TRUE(farend_handle_ != NULL);
farend_self_ = reinterpret_cast<DelayEstimatorFarend*>(farend_handle_);
handle_ = WebRtc_CreateDelayEstimator(farend_handle_, kLookahead);
ASSERT_TRUE(handle_ != NULL);
self_ = reinterpret_cast<DelayEstimator*>(handle_);
- binary_farend_ = WebRtc_CreateBinaryDelayEstimatorFarend(kMaxDelay +
- kLookahead);
+ binary_farend_ = WebRtc_CreateBinaryDelayEstimatorFarend(kHistorySize);
ASSERT_TRUE(binary_farend_ != NULL);
binary_ = WebRtc_CreateBinaryDelayEstimator(binary_farend_, kLookahead);
ASSERT_TRUE(binary_ != NULL);
@@ -226,7 +229,7 @@
// Make sure we have a non-NULL value at start, so we can detect NULL after
// create failure.
void* handle = farend_handle_;
- handle = WebRtc_CreateDelayEstimatorFarend(33, kMaxDelay + kLookahead);
+ handle = WebRtc_CreateDelayEstimatorFarend(33, kHistorySize);
EXPECT_TRUE(handle == NULL);
handle = WebRtc_CreateDelayEstimatorFarend(kSpectrumSize, 1);
EXPECT_TRUE(handle == NULL);
@@ -266,6 +269,28 @@
EXPECT_EQ(-1, WebRtc_AddFarSpectrumFix(farend_handle_, far_u16_,
spectrum_size_, 16));
+ // WebRtc_set_history_size() should return -1 if:
+ // 1) |handle| is a NULL.
+ // 2) |history_size| <= 1.
+ EXPECT_EQ(-1, WebRtc_set_history_size(NULL, 1));
+ EXPECT_EQ(-1, WebRtc_set_history_size(handle_, 1));
+ // WebRtc_history_size() should return -1 if:
+ // 1) NULL pointer input.
+ EXPECT_EQ(-1, WebRtc_history_size(NULL));
+ // 2) there is a mismatch between history size.
+ void* tmp_handle = WebRtc_CreateDelayEstimator(farend_handle_, kHistorySize);
+ EXPECT_EQ(0, WebRtc_InitDelayEstimator(tmp_handle));
+ EXPECT_EQ(kDifferentHistorySize,
+ WebRtc_set_history_size(tmp_handle, kDifferentHistorySize));
+ EXPECT_EQ(kDifferentHistorySize, WebRtc_history_size(tmp_handle));
+ EXPECT_EQ(kHistorySize, WebRtc_set_history_size(handle_, kHistorySize));
+ EXPECT_EQ(-1, WebRtc_history_size(tmp_handle));
+
+ // WebRtc_set_lookahead() should return -1 if we try a value outside the
+ /// buffer.
+ EXPECT_EQ(-1, WebRtc_set_lookahead(handle_, kLookahead + 1));
+ EXPECT_EQ(-1, WebRtc_set_lookahead(handle_, -1));
+
// WebRtc_set_allowed_offset() should return -1 if we have:
// 1) NULL pointer as |handle|.
// 2) |allowed_offset| < 0.
@@ -289,6 +314,8 @@
// 1) NULL pointer as |handle|.
// 2) NULL pointer as near-end spectrum.
// 3) Incorrect spectrum size.
+ // 4) Non matching history sizes if multiple delay estimators using the same
+ // far-end reference.
EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFloat(NULL, near_f_,
spectrum_size_));
// Use |handle_| which is properly created at SetUp().
@@ -296,12 +323,18 @@
spectrum_size_));
EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFloat(handle_, near_f_,
spectrum_size_ + 1));
+ // |tmp_handle| is already in a non-matching state.
+ EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFloat(tmp_handle,
+ near_f_,
+ spectrum_size_));
// WebRtc_DelayEstimatorProcessFix() should return -1 if we have:
// 1) NULL pointer as |handle|.
- // 3) NULL pointer as near-end spectrum.
- // 4) Incorrect spectrum size.
- // 6) Too high precision in near-end spectrum (Q-domain > 15).
+ // 2) NULL pointer as near-end spectrum.
+ // 3) Incorrect spectrum size.
+ // 4) Too high precision in near-end spectrum (Q-domain > 15).
+ // 5) Non matching history sizes if multiple delay estimators using the same
+ // far-end reference.
EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFix(NULL, near_u16_, spectrum_size_,
0));
EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFix(handle_, NULL, spectrum_size_,
@@ -310,6 +343,12 @@
spectrum_size_ + 1, 0));
EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFix(handle_, near_u16_,
spectrum_size_, 16));
+ // |tmp_handle| is already in a non-matching state.
+ EXPECT_EQ(-1, WebRtc_DelayEstimatorProcessFix(tmp_handle,
+ near_u16_,
+ spectrum_size_,
+ 0));
+ WebRtc_FreeDelayEstimator(tmp_handle);
// WebRtc_last_delay() should return -1 if we have a NULL pointer as |handle|.
EXPECT_EQ(-1, WebRtc_last_delay(NULL));
@@ -344,14 +383,23 @@
TEST_F(DelayEstimatorTest, InitializedSpectrumAfterProcess) {
// In this test we verify that the mean spectra are initialized after first
- // time we call WebRtc_AddFarSpectrum() and Process() respectively.
+ // time we call WebRtc_AddFarSpectrum() and Process() respectively. The test
+ // also verifies the state is not left for zero spectra.
+ const float kZerosFloat[kSpectrumSize] = { 0.0 };
+ const uint16_t kZerosU16[kSpectrumSize] = { 0 };
// For floating point operations, process one frame and verify initialization
// flag.
Init();
+ EXPECT_EQ(0, WebRtc_AddFarSpectrumFloat(farend_handle_, kZerosFloat,
+ spectrum_size_));
+ EXPECT_EQ(0, farend_self_->far_spectrum_initialized);
EXPECT_EQ(0, WebRtc_AddFarSpectrumFloat(farend_handle_, far_f_,
spectrum_size_));
EXPECT_EQ(1, farend_self_->far_spectrum_initialized);
+ EXPECT_EQ(-2, WebRtc_DelayEstimatorProcessFloat(handle_, kZerosFloat,
+ spectrum_size_));
+ EXPECT_EQ(0, self_->near_spectrum_initialized);
EXPECT_EQ(-2, WebRtc_DelayEstimatorProcessFloat(handle_, near_f_,
spectrum_size_));
EXPECT_EQ(1, self_->near_spectrum_initialized);
@@ -359,9 +407,15 @@
// For fixed point operations, process one frame and verify initialization
// flag.
Init();
+ EXPECT_EQ(0, WebRtc_AddFarSpectrumFix(farend_handle_, kZerosU16,
+ spectrum_size_, 0));
+ EXPECT_EQ(0, farend_self_->far_spectrum_initialized);
EXPECT_EQ(0, WebRtc_AddFarSpectrumFix(farend_handle_, far_u16_,
spectrum_size_, 0));
EXPECT_EQ(1, farend_self_->far_spectrum_initialized);
+ EXPECT_EQ(-2, WebRtc_DelayEstimatorProcessFix(handle_, kZerosU16,
+ spectrum_size_, 0));
+ EXPECT_EQ(0, self_->near_spectrum_initialized);
EXPECT_EQ(-2, WebRtc_DelayEstimatorProcessFix(handle_, near_u16_,
spectrum_size_, 0));
EXPECT_EQ(1, self_->near_spectrum_initialized);
@@ -536,6 +590,32 @@
WebRtc_FreeDelayEstimatorFarend(farend_handle);
}
+TEST_F(DelayEstimatorTest, VerifyLookaheadIsSetAndKeptAfterInit) {
+ EXPECT_EQ(kLookahead, WebRtc_lookahead(handle_));
+ EXPECT_EQ(kDifferentLookahead,
+ WebRtc_set_lookahead(handle_, kDifferentLookahead));
+ EXPECT_EQ(kDifferentLookahead, WebRtc_lookahead(handle_));
+ EXPECT_EQ(0, WebRtc_InitDelayEstimatorFarend(farend_handle_));
+ EXPECT_EQ(kDifferentLookahead, WebRtc_lookahead(handle_));
+ EXPECT_EQ(0, WebRtc_InitDelayEstimator(handle_));
+ EXPECT_EQ(kDifferentLookahead, WebRtc_lookahead(handle_));
+}
+
+TEST_F(DelayEstimatorTest, VerifyHistorySizeAtCreate) {
+ EXPECT_EQ(kHistorySize, WebRtc_history_size(handle_));
+}
+
+TEST_F(DelayEstimatorTest, VerifyHistorySizeIsSetAndKeptAfterInit) {
+ EXPECT_EQ(kHistorySize, WebRtc_history_size(handle_));
+ EXPECT_EQ(kDifferentHistorySize,
+ WebRtc_set_history_size(handle_, kDifferentHistorySize));
+ EXPECT_EQ(kDifferentHistorySize, WebRtc_history_size(handle_));
+ EXPECT_EQ(0, WebRtc_InitDelayEstimator(handle_));
+ EXPECT_EQ(kDifferentHistorySize, WebRtc_history_size(handle_));
+ EXPECT_EQ(0, WebRtc_InitDelayEstimatorFarend(farend_handle_));
+ EXPECT_EQ(kDifferentHistorySize, WebRtc_history_size(handle_));
+}
+
// TODO(bjornv): Add tests for SoftReset...(...).
} // namespace
diff --git a/modules/audio_processing/utility/delay_estimator_wrapper.c b/modules/audio_processing/utility/delay_estimator_wrapper.c
index 6ec894e..270588f 100644
--- a/modules/audio_processing/utility/delay_estimator_wrapper.c
+++ b/modules/audio_processing/utility/delay_estimator_wrapper.c
@@ -58,7 +58,7 @@
// Return:
// - out : Binary spectrum.
//
-static uint32_t BinarySpectrumFix(uint16_t* spectrum,
+static uint32_t BinarySpectrumFix(const uint16_t* spectrum,
SpectrumType* threshold_spectrum,
int q_domain,
int* threshold_initialized) {
@@ -93,7 +93,7 @@
return out;
}
-static uint32_t BinarySpectrumFloat(float* spectrum,
+static uint32_t BinarySpectrumFloat(const float* spectrum,
SpectrumType* threshold_spectrum,
int* threshold_initialized) {
int i = kBandFirst;
@@ -147,7 +147,7 @@
COMPILE_ASSERT(kBandLast - kBandFirst < 32);
if (spectrum_size >= kBandLast) {
- self = malloc(sizeof(DelayEstimator));
+ self = malloc(sizeof(DelayEstimatorFarend));
}
if (self != NULL) {
@@ -197,8 +197,10 @@
WebRtc_SoftResetBinaryDelayEstimatorFarend(self->binary_farend, delay_shift);
}
-int WebRtc_AddFarSpectrumFix(void* handle, uint16_t* far_spectrum,
- int spectrum_size, int far_q) {
+int WebRtc_AddFarSpectrumFix(void* handle,
+ const uint16_t* far_spectrum,
+ int spectrum_size,
+ int far_q) {
DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;
uint32_t binary_spectrum = 0;
@@ -226,7 +228,8 @@
return 0;
}
-int WebRtc_AddFarSpectrumFloat(void* handle, float* far_spectrum,
+int WebRtc_AddFarSpectrumFloat(void* handle,
+ const float* far_spectrum,
int spectrum_size) {
DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;
uint32_t binary_spectrum = 0;
@@ -324,6 +327,29 @@
return WebRtc_SoftResetBinaryDelayEstimator(self->binary_handle, delay_shift);
}
+int WebRtc_set_history_size(void* handle, int history_size) {
+ DelayEstimator* self = handle;
+
+ if ((self == NULL) || (history_size <= 1)) {
+ return -1;
+ }
+ return WebRtc_AllocateHistoryBufferMemory(self->binary_handle, history_size);
+}
+
+int WebRtc_history_size(const void* handle) {
+ const DelayEstimator* self = handle;
+
+ if (self == NULL) {
+ return -1;
+ }
+ if (self->binary_handle->farend->history_size !=
+ self->binary_handle->history_size) {
+ // Non matching history sizes.
+ return -1;
+ }
+ return self->binary_handle->history_size;
+}
+
int WebRtc_set_lookahead(void* handle, int lookahead) {
DelayEstimator* self = (DelayEstimator*) handle;
assert(self != NULL);
@@ -386,7 +412,7 @@
}
int WebRtc_DelayEstimatorProcessFix(void* handle,
- uint16_t* near_spectrum,
+ const uint16_t* near_spectrum,
int spectrum_size,
int near_q) {
DelayEstimator* self = (DelayEstimator*) handle;
@@ -418,7 +444,7 @@
}
int WebRtc_DelayEstimatorProcessFloat(void* handle,
- float* near_spectrum,
+ const float* near_spectrum,
int spectrum_size) {
DelayEstimator* self = (DelayEstimator*) handle;
uint32_t binary_spectrum = 0;
diff --git a/modules/audio_processing/utility/delay_estimator_wrapper.h b/modules/audio_processing/utility/delay_estimator_wrapper.h
index 13e86bd..fdadebe 100644
--- a/modules/audio_processing/utility/delay_estimator_wrapper.h
+++ b/modules/audio_processing/utility/delay_estimator_wrapper.h
@@ -17,9 +17,6 @@
#include "webrtc/typedefs.h"
// Releases the memory allocated by WebRtc_CreateDelayEstimatorFarend(...)
-// Input:
-// - handle : Pointer to the delay estimation far-end instance.
-//
void WebRtc_FreeDelayEstimatorFarend(void* handle);
// Allocates the memory needed by the far-end part of the delay estimation. The
@@ -27,36 +24,28 @@
// WebRtc_InitDelayEstimatorFarend(...).
//
// Inputs:
-// - spectrum_size : Size of the spectrum used both in far-end and
+// - spectrum_size : Size of the spectrum used both in far-end and
// near-end. Used to allocate memory for spectrum
// specific buffers.
-// - history_size : The far-end history buffer size. Note that the maximum
-// delay which can be estimated is controlled together
-// with |lookahead| through
-// WebRtc_CreateDelayEstimator().
+// - history_size : The far-end history buffer size. A change in buffer
+// size can be forced with WebRtc_set_history_size().
+// Note that the maximum delay which can be estimated is
+// determined together with WebRtc_set_lookahead().
//
// Return value:
-// - void* : Created |handle|. If the memory can't be allocated or
+// - void* : Created |handle|. If the memory can't be allocated or
// if any of the input parameters are invalid NULL is
// returned.
-//
void* WebRtc_CreateDelayEstimatorFarend(int spectrum_size, int history_size);
// Initializes the far-end part of the delay estimation instance returned by
// WebRtc_CreateDelayEstimatorFarend(...)
-// Input:
-// - handle : Pointer to the delay estimation far-end instance.
-//
-// Output:
-// - handle : Initialized instance.
-//
int WebRtc_InitDelayEstimatorFarend(void* handle);
// Soft resets the far-end part of the delay estimation instance returned by
// WebRtc_CreateDelayEstimatorFarend(...).
// Input:
// - delay_shift : The amount of blocks to shift history buffers.
-//
void WebRtc_SoftResetDelayEstimatorFarend(void* handle, int delay_shift);
// Adds the far-end spectrum to the far-end history buffer. This spectrum is
@@ -64,7 +53,6 @@
// WebRtc_ProcessSpectrum().
//
// Inputs:
-// - handle : Pointer to the delay estimation far-end instance.
// - far_spectrum : Far-end spectrum.
// - spectrum_size : The size of the data arrays (same for both far- and
// near-end).
@@ -73,17 +61,17 @@
// Output:
// - handle : Updated far-end instance.
//
-int WebRtc_AddFarSpectrumFix(void* handle, uint16_t* far_spectrum,
- int spectrum_size, int far_q);
+int WebRtc_AddFarSpectrumFix(void* handle,
+ const uint16_t* far_spectrum,
+ int spectrum_size,
+ int far_q);
// See WebRtc_AddFarSpectrumFix() for description.
-int WebRtc_AddFarSpectrumFloat(void* handle, float* far_spectrum,
+int WebRtc_AddFarSpectrumFloat(void* handle,
+ const float* far_spectrum,
int spectrum_size);
// Releases the memory allocated by WebRtc_CreateDelayEstimator(...)
-// Input:
-// - handle : Pointer to the delay estimation instance.
-//
void WebRtc_FreeDelayEstimator(void* handle);
// Allocates the memory needed by the delay estimation. The memory needs to be
@@ -117,24 +105,17 @@
//
// Note that the effective range of delay estimates is
// [-|lookahead|,... ,|history_size|-|lookahead|)
-// where |history_size| was set upon creating the far-end
-// history buffer size.
+// where |history_size| is set through
+// WebRtc_set_history_size().
//
// Return value:
// - void* : Created |handle|. If the memory can't be allocated or
// if any of the input parameters are invalid NULL is
// returned.
-//
void* WebRtc_CreateDelayEstimator(void* farend_handle, int max_lookahead);
// Initializes the delay estimation instance returned by
// WebRtc_CreateDelayEstimator(...)
-// Input:
-// - handle : Pointer to the delay estimation instance.
-//
-// Output:
-// - handle : Initialized instance.
-//
int WebRtc_InitDelayEstimator(void* handle);
// Soft resets the delay estimation instance returned by
@@ -144,22 +125,44 @@
//
// Return value:
// - actual_shifts : The actual number of shifts performed.
-//
int WebRtc_SoftResetDelayEstimator(void* handle, int delay_shift);
+// Sets the effective |history_size| used. Valid values from 2. We simply need
+// at least two delays to compare to perform an estimate. If |history_size| is
+// changed, buffers are reallocated filling in with zeros if necessary.
+// Note that changing the |history_size| affects both buffers in far-end and
+// near-end. Hence it is important to change all DelayEstimators that use the
+// same reference far-end, to the same |history_size| value.
+// Inputs:
+// - handle : Pointer to the delay estimation instance.
+// - history_size : Effective history size to be used.
+// Return value:
+// - new_history_size : The new history size used. If the memory was not able
+// to be allocated 0 is returned.
+int WebRtc_set_history_size(void* handle, int history_size);
+
+// Returns the history_size currently used.
+// Input:
+// - handle : Pointer to the delay estimation instance.
+int WebRtc_history_size(const void* handle);
+
// Sets the amount of |lookahead| to use. Valid values are [0, max_lookahead]
// where |max_lookahead| was set at create time through
// WebRtc_CreateDelayEstimator(...).
//
// Input:
-// - lookahead : The amount of blocks to shift history buffers.
+// - handle : Pointer to the delay estimation instance.
+// - lookahead : The amount of lookahead to be used.
//
// Return value:
-// - new_lookahead : The actual number of shifts performed.
-//
+// - new_lookahead : The actual amount of lookahead set, unless |handle| is
+// a NULL pointer or |lookahead| is invalid, for which an
+// error is returned.
int WebRtc_set_lookahead(void* handle, int lookahead);
// Returns the amount of lookahead we currently use.
+// Input:
+// - handle : Pointer to the delay estimation instance.
int WebRtc_lookahead(void* handle);
// Sets the |allowed_offset| used in the robust validation scheme. If the
@@ -178,8 +181,6 @@
// Returns the |allowed_offset| in number of partitions.
int WebRtc_get_allowed_offset(const void* handle);
-// TODO(bjornv): Implement this functionality. Currently, enabling it has no
-// impact, hence this is an empty API.
// Enables/Disables a robust validation functionality in the delay estimation.
// This is by default set to disabled at create time. The state is preserved
// over a reset.
@@ -209,15 +210,14 @@
// - delay : >= 0 - Calculated delay value.
// -1 - Error.
// -2 - Insufficient data for estimation.
-//
int WebRtc_DelayEstimatorProcessFix(void* handle,
- uint16_t* near_spectrum,
+ const uint16_t* near_spectrum,
int spectrum_size,
int near_q);
// See WebRtc_DelayEstimatorProcessFix() for description.
int WebRtc_DelayEstimatorProcessFloat(void* handle,
- float* near_spectrum,
+ const float* near_spectrum,
int spectrum_size);
// Returns the last calculated delay updated by the function
@@ -230,7 +230,6 @@
// - delay : >= 0 - Last calculated delay value.
// -1 - Error.
// -2 - Insufficient data for estimation.
-//
int WebRtc_last_delay(void* handle);
// Returns the estimation quality/probability of the last calculated delay
diff --git a/modules/audio_processing/utility/ring_buffer_unittest.cc b/modules/audio_processing/utility/ring_buffer_unittest.cc
index 5dacf0b..f5c36c2 100644
--- a/modules/audio_processing/utility/ring_buffer_unittest.cc
+++ b/modules/audio_processing/utility/ring_buffer_unittest.cc
@@ -52,8 +52,8 @@
// We use ASSERTs in this test to avoid obscuring the seed in the case of a
// failure.
static void RandomStressTest(int** data_ptr) {
- const int kNumTests = 100;
- const int kNumOps = 10000;
+ const int kNumTests = 10;
+ const int kNumOps = 1000;
const int kMaxBufferSize = 1000;
unsigned int seed = time(NULL);
diff --git a/modules/audio_processing/voice_detection_impl.cc b/modules/audio_processing/voice_detection_impl.cc
index c6e497f..31336b4 100644
--- a/modules/audio_processing/voice_detection_impl.cc
+++ b/modules/audio_processing/voice_detection_impl.cc
@@ -61,17 +61,11 @@
}
assert(audio->samples_per_split_channel() <= 160);
- const int16_t* mixed_data = audio->low_pass_split_data(0);
- if (audio->num_channels() > 1) {
- audio->CopyAndMixLowPass(1);
- mixed_data = audio->mixed_low_pass_data(0);
- }
-
// TODO(ajm): concatenate data in frame buffer here.
int vad_ret = WebRtcVad_Process(static_cast<Handle*>(handle(0)),
apm_->proc_split_sample_rate_hz(),
- mixed_data,
+ audio->mixed_low_pass_data(),
frame_size_samples_);
if (vad_ret == 0) {
stream_has_voice_ = false;
diff --git a/modules/audio_processing_neon.target.darwin-arm.mk b/modules/audio_processing_neon.target.darwin-arm.mk
index aa7768c..4b6e7ef 100644
--- a/modules/audio_processing_neon.target.darwin-arm.mk
+++ b/modules/audio_processing_neon.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_neon_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -27,6 +26,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/audio_processing/aec/aec_core_neon.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_rdft_neon.c \
third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.S \
third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.S
@@ -36,7 +36,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +55,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -77,6 +76,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,7 +84,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -101,12 +100,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -148,23 +150,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,13 +187,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,7 +215,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -229,12 +231,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -277,69 +282,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- lib_core_neon_offsets
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing_neon.target.linux-arm.mk b/modules/audio_processing_neon.target.linux-arm.mk
index aa7768c..4b6e7ef 100644
--- a/modules/audio_processing_neon.target.linux-arm.mk
+++ b/modules/audio_processing_neon.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_neon_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -27,6 +26,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/audio_processing/aec/aec_core_neon.c \
+ third_party/webrtc/modules/audio_processing/aec/aec_rdft_neon.c \
third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.S \
third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.S
@@ -36,7 +36,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +55,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -77,6 +76,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,7 +84,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -101,12 +100,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -148,23 +150,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,13 +187,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,7 +215,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -229,12 +231,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -277,69 +282,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES := \
- lib_core_neon_offsets
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing_sse2.target.darwin-x86.mk b/modules/audio_processing_sse2.target.darwin-x86.mk
index b128035..dc6ee54 100644
--- a/modules/audio_processing_sse2.target.darwin-x86.mk
+++ b/modules/audio_processing_sse2.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing_sse2.target.darwin-x86_64.mk b/modules/audio_processing_sse2.target.darwin-x86_64.mk
index cf5d513..b267170 100644
--- a/modules/audio_processing_sse2.target.darwin-x86_64.mk
+++ b/modules/audio_processing_sse2.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing_sse2.target.linux-x86.mk b/modules/audio_processing_sse2.target.linux-x86.mk
index b128035..dc6ee54 100644
--- a/modules/audio_processing_sse2.target.linux-x86.mk
+++ b/modules/audio_processing_sse2.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audio_processing_sse2.target.linux-x86_64.mk b/modules/audio_processing_sse2.target.linux-x86_64.mk
index cf5d513..b267170 100644
--- a/modules/audio_processing_sse2.target.linux-x86_64.mk
+++ b/modules/audio_processing_sse2.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audio_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.darwin-arm.mk b/modules/audioproc_debug_proto.target.darwin-arm.mk
index 83e238a..7ce0aaf 100644
--- a/modules/audioproc_debug_proto.target.darwin-arm.mk
+++ b/modules/audioproc_debug_proto.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -56,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +117,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,23 +169,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +204,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +232,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +248,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -297,68 +301,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.darwin-arm64.mk b/modules/audioproc_debug_proto.target.darwin-arm64.mk
index 33edd17..40dd7e0 100644
--- a/modules/audioproc_debug_proto.target.darwin-arm64.mk
+++ b/modules/audioproc_debug_proto.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -55,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,13 +83,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +106,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,21 +155,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +206,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +222,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,59 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.darwin-mips.mk b/modules/audioproc_debug_proto.target.darwin-mips.mk
index 8da7d8c..1c0e33c 100644
--- a/modules/audioproc_debug_proto.target.darwin-mips.mk
+++ b/modules/audioproc_debug_proto.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -56,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,18 +63,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +85,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +93,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,17 +109,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -163,23 +158,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,18 +184,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -221,7 +213,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -238,17 +229,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -287,64 +279,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.darwin-mips64.mk b/modules/audioproc_debug_proto.target.darwin-mips64.mk
new file mode 100644
index 0000000..1c0e33c
--- /dev/null
+++ b/modules/audioproc_debug_proto.target.darwin-mips64.mk
@@ -0,0 +1,313 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(gyp_shared_intermediate_dir)/protoc
+
+
+### Generated for rule "third_party_webrtc_modules_modules_gyp_audioproc_debug_proto_target_genproto":
+# "{'inputs': ['../../../tools/protoc_wrapper/protoc_wrapper.py', '$(gyp_shared_intermediate_dir)/protoc'], 'process_outputs_as_sources': '1', 'extension': 'proto', 'outputs': ['$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/%(INPUT_ROOT)s_pb2.py', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/%(INPUT_ROOT)s.pb.cc', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/%(INPUT_ROOT)s.pb.h'], 'rule_name': 'genproto', 'rule_sources': ['audio_processing/debug.proto'], 'action': ['python', '../../../tools/protoc_wrapper/protoc_wrapper.py', '--include', '', '--protobuf', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/%(INPUT_ROOT)s.pb.h', '--proto-in-dir', 'audio_processing', '--proto-in-file', '%(INPUT_ROOT)s$(suffix $<)', '--use-system-protobuf=0', '--', '$(gyp_shared_intermediate_dir)/protoc', '--cpp_out', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing', '--python_out', '$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing'], 'message': 'Generating C++ and Python code from $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: $(LOCAL_PATH)/third_party/webrtc/modules/audio_processing/debug.proto $(LOCAL_PATH)/tools/protoc_wrapper/protoc_wrapper.py $(gyp_shared_intermediate_dir)/protoc $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing; cd $(gyp_local_path)/third_party/webrtc/modules; python ../../../tools/protoc_wrapper/protoc_wrapper.py --include "" --protobuf "$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h" --proto-in-dir audio_processing --proto-in-file "debug$(suffix $<)" "--use-system-protobuf=0" -- "$(gyp_shared_intermediate_dir)/protoc" --cpp_out "$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing" --python_out "$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing"
+
+$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.cc: $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py ;
+$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h: $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py ;
+
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.cc \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+$(gyp_intermediate_dir)/debug.pb.cc: $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.cc
+ mkdir -p $(@D); cp $< $@
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_intermediate_dir)/debug.pb.cc \
+ $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS := \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audioproc_debug_proto_gyp
+
+# Alias gyp target name.
+.PHONY: audioproc_debug_proto
+audioproc_debug_proto: third_party_webrtc_modules_audioproc_debug_proto_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audioproc_debug_proto.target.darwin-x86.mk b/modules/audioproc_debug_proto.target.darwin-x86.mk
index b7546d5..1a42bc4 100644
--- a/modules/audioproc_debug_proto.target.darwin-x86.mk
+++ b/modules/audioproc_debug_proto.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -55,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +112,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,21 +161,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +218,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +234,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -280,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.darwin-x86_64.mk b/modules/audioproc_debug_proto.target.darwin-x86_64.mk
index 707fc09..18be8f1 100644
--- a/modules/audioproc_debug_proto.target.darwin-x86_64.mk
+++ b/modules/audioproc_debug_proto.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -56,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +111,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,22 +160,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +216,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +232,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -278,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.linux-arm.mk b/modules/audioproc_debug_proto.target.linux-arm.mk
index 83e238a..7ce0aaf 100644
--- a/modules/audioproc_debug_proto.target.linux-arm.mk
+++ b/modules/audioproc_debug_proto.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -56,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +117,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,23 +169,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +204,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +232,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +248,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -297,68 +301,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.linux-arm64.mk b/modules/audioproc_debug_proto.target.linux-arm64.mk
index 33edd17..40dd7e0 100644
--- a/modules/audioproc_debug_proto.target.linux-arm64.mk
+++ b/modules/audioproc_debug_proto.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -55,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,13 +83,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +106,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,21 +155,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +206,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +222,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,59 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.linux-mips.mk b/modules/audioproc_debug_proto.target.linux-mips.mk
index 8da7d8c..1c0e33c 100644
--- a/modules/audioproc_debug_proto.target.linux-mips.mk
+++ b/modules/audioproc_debug_proto.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -56,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,18 +63,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +85,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +93,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,17 +109,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -163,23 +158,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,18 +184,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -221,7 +213,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -238,17 +229,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -287,64 +279,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.linux-mips64.mk b/modules/audioproc_debug_proto.target.linux-mips64.mk
new file mode 100644
index 0000000..1c0e33c
--- /dev/null
+++ b/modules/audioproc_debug_proto.target.linux-mips64.mk
@@ -0,0 +1,313 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(gyp_shared_intermediate_dir)/protoc
+
+
+### Generated for rule "third_party_webrtc_modules_modules_gyp_audioproc_debug_proto_target_genproto":
+# "{'inputs': ['../../../tools/protoc_wrapper/protoc_wrapper.py', '$(gyp_shared_intermediate_dir)/protoc'], 'process_outputs_as_sources': '1', 'extension': 'proto', 'outputs': ['$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/%(INPUT_ROOT)s_pb2.py', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/%(INPUT_ROOT)s.pb.cc', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/%(INPUT_ROOT)s.pb.h'], 'rule_name': 'genproto', 'rule_sources': ['audio_processing/debug.proto'], 'action': ['python', '../../../tools/protoc_wrapper/protoc_wrapper.py', '--include', '', '--protobuf', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/%(INPUT_ROOT)s.pb.h', '--proto-in-dir', 'audio_processing', '--proto-in-file', '%(INPUT_ROOT)s$(suffix $<)', '--use-system-protobuf=0', '--', '$(gyp_shared_intermediate_dir)/protoc', '--cpp_out', '$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing', '--python_out', '$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing'], 'message': 'Generating C++ and Python code from $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py: $(LOCAL_PATH)/third_party/webrtc/modules/audio_processing/debug.proto $(LOCAL_PATH)/tools/protoc_wrapper/protoc_wrapper.py $(gyp_shared_intermediate_dir)/protoc $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing; cd $(gyp_local_path)/third_party/webrtc/modules; python ../../../tools/protoc_wrapper/protoc_wrapper.py --include "" --protobuf "$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h" --proto-in-dir audio_processing --proto-in-file "debug$(suffix $<)" "--use-system-protobuf=0" -- "$(gyp_shared_intermediate_dir)/protoc" --cpp_out "$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing" --python_out "$(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing"
+
+$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.cc: $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py ;
+$(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h: $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py ;
+
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.cc \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+$(gyp_intermediate_dir)/debug.pb.cc: $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.cc
+ mkdir -p $(@D); cp $< $@
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_intermediate_dir)/debug.pb.cc \
+ $(gyp_shared_intermediate_dir)/pyproto/webrtc/audio_processing/debug_pb2.py \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing/debug.pb.h
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS := \
+ $(gyp_shared_intermediate_dir)/protoc_out/webrtc/audio_processing
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DPROTOBUF_USE_DLLS' \
+ '-DGOOGLE_PROTOBUF_NO_RTTI' \
+ '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(gyp_shared_intermediate_dir)/protoc_out \
+ $(LOCAL_PATH)/third_party/protobuf \
+ $(LOCAL_PATH)/third_party/protobuf/src \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_audioproc_debug_proto_gyp
+
+# Alias gyp target name.
+.PHONY: audioproc_debug_proto
+audioproc_debug_proto: third_party_webrtc_modules_audioproc_debug_proto_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/audioproc_debug_proto.target.linux-x86.mk b/modules/audioproc_debug_proto.target.linux-x86.mk
index b7546d5..1a42bc4 100644
--- a/modules/audioproc_debug_proto.target.linux-x86.mk
+++ b/modules/audioproc_debug_proto.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -55,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +112,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,21 +161,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +218,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +234,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -280,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/audioproc_debug_proto.target.linux-x86_64.mk b/modules/audioproc_debug_proto.target.linux-x86_64.mk
index 707fc09..18be8f1 100644
--- a/modules/audioproc_debug_proto.target.linux-x86_64.mk
+++ b/modules/audioproc_debug_proto.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_audioproc_debug_proto_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -56,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +111,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,22 +160,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +216,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +232,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -278,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.darwin-arm.mk b/modules/bitrate_controller.target.darwin-arm.mk
index dc94a9d..eef7012 100644
--- a/modules/bitrate_controller.target.darwin-arm.mk
+++ b/modules/bitrate_controller.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -72,6 +70,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -79,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -96,12 +94,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,23 +141,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -264,68 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.darwin-arm64.mk b/modules/bitrate_controller.target.darwin-arm64.mk
index 16d15a5..6e38358 100644
--- a/modules/bitrate_controller.target.darwin-arm64.mk
+++ b/modules/bitrate_controller.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,13 +60,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,59 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.darwin-mips.mk b/modules/bitrate_controller.target.darwin-mips.mk
index 29f1b92..5161b54 100644
--- a/modules/bitrate_controller.target.darwin-mips.mk
+++ b/modules/bitrate_controller.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -42,18 +40,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,17 +86,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -135,23 +130,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -160,18 +156,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -193,7 +185,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -210,17 +201,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -254,64 +246,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.darwin-mips64.mk b/modules/bitrate_controller.target.darwin-mips64.mk
new file mode 100644
index 0000000..5161b54
--- /dev/null
+++ b/modules/bitrate_controller.target.darwin-mips64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc \
+ third_party/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_bitrate_controller_gyp
+
+# Alias gyp target name.
+.PHONY: bitrate_controller
+bitrate_controller: third_party_webrtc_modules_bitrate_controller_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/bitrate_controller.target.darwin-x86.mk b/modules/bitrate_controller.target.darwin-x86.mk
index 085f2a4..1dca02a 100644
--- a/modules/bitrate_controller.target.darwin-x86.mk
+++ b/modules/bitrate_controller.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,21 +133,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.darwin-x86_64.mk b/modules/bitrate_controller.target.darwin-x86_64.mk
index 8e2c219..e1e69c3 100644
--- a/modules/bitrate_controller.target.darwin-x86_64.mk
+++ b/modules/bitrate_controller.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,22 +132,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -245,63 +249,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.linux-arm.mk b/modules/bitrate_controller.target.linux-arm.mk
index dc94a9d..eef7012 100644
--- a/modules/bitrate_controller.target.linux-arm.mk
+++ b/modules/bitrate_controller.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -72,6 +70,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -79,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -96,12 +94,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,23 +141,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -202,7 +204,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -219,12 +220,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -264,68 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.linux-arm64.mk b/modules/bitrate_controller.target.linux-arm64.mk
index 16d15a5..6e38358 100644
--- a/modules/bitrate_controller.target.linux-arm64.mk
+++ b/modules/bitrate_controller.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,13 +60,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,59 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.linux-mips.mk b/modules/bitrate_controller.target.linux-mips.mk
index 29f1b92..5161b54 100644
--- a/modules/bitrate_controller.target.linux-mips.mk
+++ b/modules/bitrate_controller.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -42,18 +40,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,17 +86,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -135,23 +130,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -160,18 +156,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -193,7 +185,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -210,17 +201,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -254,64 +246,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.linux-mips64.mk b/modules/bitrate_controller.target.linux-mips64.mk
new file mode 100644
index 0000000..5161b54
--- /dev/null
+++ b/modules/bitrate_controller.target.linux-mips64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc \
+ third_party/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_bitrate_controller_gyp
+
+# Alias gyp target name.
+.PHONY: bitrate_controller
+bitrate_controller: third_party_webrtc_modules_bitrate_controller_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/bitrate_controller.target.linux-x86.mk b/modules/bitrate_controller.target.linux-x86.mk
index 085f2a4..1dca02a 100644
--- a/modules/bitrate_controller.target.linux-x86.mk
+++ b/modules/bitrate_controller.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,21 +133,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller.target.linux-x86_64.mk b/modules/bitrate_controller.target.linux-x86_64.mk
index 8e2c219..e1e69c3 100644
--- a/modules/bitrate_controller.target.linux-x86_64.mk
+++ b/modules/bitrate_controller.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_bitrate_controller_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,22 +132,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -245,63 +249,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/bitrate_controller/BUILD.gn b/modules/bitrate_controller/BUILD.gn
new file mode 100644
index 0000000..d4d8f68
--- /dev/null
+++ b/modules/bitrate_controller/BUILD.gn
@@ -0,0 +1,34 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+source_set("bitrate_controller") {
+ sources = [
+ "bitrate_controller_impl.cc",
+ "bitrate_controller_impl.h",
+ "include/bitrate_controller.h",
+ "send_side_bandwidth_estimation.cc",
+ "send_side_bandwidth_estimation.h",
+ ]
+
+ if (is_win) {
+ cflags = [
+ # TODO(jschuh): Bug 1348: fix this warning.
+ "/wd4267" # size_t to int truncations
+ ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [ "../../system_wrappers" ]
+}
diff --git a/modules/bitrate_controller/OWNERS b/modules/bitrate_controller/OWNERS
index cce3a26..2aa9763 100644
--- a/modules/bitrate_controller/OWNERS
+++ b/modules/bitrate_controller/OWNERS
@@ -1,4 +1,3 @@
-pwestin@webrtc.org
stefan@webrtc.org
henrik.lundin@webrtc.org
mflodman@webrtc.org
@@ -8,3 +7,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn
new file mode 100644
index 0000000..10219b5
--- /dev/null
+++ b/modules/desktop_capture/BUILD.gn
@@ -0,0 +1,142 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("//build/config/ui.gni")
+import("../../build/webrtc.gni")
+
+use_desktop_capture_differ_sse2 =
+ (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64"))
+
+source_set("desktop_capture") {
+ sources = [
+ "desktop_and_cursor_composer.cc",
+ "desktop_and_cursor_composer.h",
+ "desktop_capture_types.h",
+ "desktop_capturer.h",
+ "desktop_frame.cc",
+ "desktop_frame.h",
+ "desktop_frame_win.cc",
+ "desktop_frame_win.h",
+ "desktop_geometry.cc",
+ "desktop_geometry.h",
+ "desktop_capture_options.h",
+ "desktop_capture_options.cc",
+ "desktop_capturer.h",
+ "desktop_region.cc",
+ "desktop_region.h",
+ "differ.cc",
+ "differ.h",
+ "differ_block.cc",
+ "differ_block.h",
+ "mac/desktop_configuration.h",
+ "mac/desktop_configuration.mm",
+ "mac/desktop_configuration_monitor.h",
+ "mac/desktop_configuration_monitor.cc",
+ "mac/full_screen_chrome_window_detector.cc",
+ "mac/full_screen_chrome_window_detector.h",
+ "mac/scoped_pixel_buffer_object.cc",
+ "mac/scoped_pixel_buffer_object.h",
+ "mac/window_list_utils.cc",
+ "mac/window_list_utils.h",
+ "mouse_cursor.cc",
+ "mouse_cursor.h",
+ "mouse_cursor_monitor.h",
+ "mouse_cursor_monitor_mac.mm",
+ "mouse_cursor_monitor_win.cc",
+ "mouse_cursor_shape.h",
+ "screen_capture_frame_queue.cc",
+ "screen_capture_frame_queue.h",
+ "screen_capturer.cc",
+ "screen_capturer.h",
+ "screen_capturer_helper.cc",
+ "screen_capturer_helper.h",
+ "screen_capturer_mac.mm",
+ "screen_capturer_win.cc",
+ "shared_desktop_frame.cc",
+ "shared_desktop_frame.h",
+ "shared_memory.cc",
+ "shared_memory.h",
+ "win/cursor.cc",
+ "win/cursor.h",
+ "win/desktop.cc",
+ "win/desktop.h",
+ "win/scoped_gdi_object.h",
+ "win/scoped_thread_desktop.cc",
+ "win/scoped_thread_desktop.h",
+ "win/screen_capturer_win_gdi.cc",
+ "win/screen_capturer_win_gdi.h",
+ "win/screen_capturer_win_magnifier.cc",
+ "win/screen_capturer_win_magnifier.h",
+ "win/screen_capture_utils.cc",
+ "win/screen_capture_utils.h",
+ "win/window_capture_utils.cc",
+ "win/window_capture_utils.h",
+ "window_capturer.cc",
+ "window_capturer.h",
+ "window_capturer_mac.mm",
+ "window_capturer_win.cc",
+ ]
+
+ if (use_x11) {
+ sources += [
+ "mouse_cursor_monitor_x11.cc",
+ "screen_capturer_x11.cc",
+ "window_capturer_x11.cc",
+ "x11/shared_x_display.h",
+ "x11/shared_x_display.cc",
+ "x11/x_error_trap.cc",
+ "x11/x_error_trap.h",
+ "x11/x_server_pixel_buffer.cc",
+ "x11/x_server_pixel_buffer.h",
+ ]
+ configs += ["//build/config/linux:x11"]
+ }
+
+ if (!is_win && !is_mac && !use_x11) {
+ sources += [
+ "mouse_cursor_monitor_null.cc",
+ "screen_capturer_null.cc",
+ "window_capturer_null.cc",
+ ]
+ }
+
+ direct_dependent_configs = [ "../..:common_inherited_config"]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ "../../system_wrappers",
+ "../../base:webrtc_base",
+ ]
+
+ if (use_desktop_capture_differ_sse2) {
+ deps += [":desktop_capture_differ_sse2"]
+ }
+}
+
+if (use_desktop_capture_differ_sse2) {
+ # Have to be compiled as a separate target because it needs to be compiled
+ # with SSE2 enabled.
+ source_set("desktop_capture_differ_sse2") {
+ visibility = [ ":*" ]
+ sources = [
+ "differ_block_sse2.cc",
+ "differ_block_sse2.h",
+ ]
+
+ configs += [ "../..:common_inherited_config"]
+
+ if (is_posix && !is_mac) {
+ cflags = ["-msse2"]
+ }
+ }
+}
diff --git a/modules/desktop_capture/OWNERS b/modules/desktop_capture/OWNERS
index e85861b..67d2fa1 100644
--- a/modules/desktop_capture/OWNERS
+++ b/modules/desktop_capture/OWNERS
@@ -1,4 +1,5 @@
alexeypa@chromium.org
+jiayl@webrtc.org
sergeyu@chromium.org
wez@chromium.org
@@ -6,3 +7,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
index b482a29..d2579a1 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
+++ b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
@@ -10,7 +10,7 @@
#include "webrtc/modules/desktop_capture/desktop_and_cursor_composer.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/modules/desktop_capture/mouse_cursor.h"
diff --git a/modules/desktop_capture/desktop_capture.gypi b/modules/desktop_capture/desktop_capture.gypi
index 6f4a083..df6c4bc 100644
--- a/modules/desktop_capture/desktop_capture.gypi
+++ b/modules/desktop_capture/desktop_capture.gypi
@@ -13,6 +13,7 @@
'type': 'static_library',
'dependencies': [
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
+ '<(webrtc_root)/base/base.gyp:rtc_base',
],
'sources': [
"desktop_and_cursor_composer.cc",
@@ -38,10 +39,12 @@
"mac/desktop_configuration.mm",
"mac/desktop_configuration_monitor.h",
"mac/desktop_configuration_monitor.cc",
- "mac/osx_version.h",
- "mac/osx_version.cc",
+ "mac/full_screen_chrome_window_detector.cc",
+ "mac/full_screen_chrome_window_detector.h",
"mac/scoped_pixel_buffer_object.cc",
"mac/scoped_pixel_buffer_object.h",
+ "mac/window_list_utils.cc",
+ "mac/window_list_utils.h",
"mouse_cursor.cc",
"mouse_cursor.h",
"mouse_cursor_monitor.h",
diff --git a/modules/desktop_capture/desktop_capture_options.cc b/modules/desktop_capture/desktop_capture_options.cc
index 105853b..b7f123b 100644
--- a/modules/desktop_capture/desktop_capture_options.cc
+++ b/modules/desktop_capture/desktop_capture_options.cc
@@ -35,6 +35,8 @@
#endif
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
result.set_configuration_monitor(new DesktopConfigurationMonitor());
+ result.set_full_screen_chrome_window_detector(
+ new FullScreenChromeWindowDetector());
#endif
return result;
}
diff --git a/modules/desktop_capture/desktop_capture_options.h b/modules/desktop_capture/desktop_capture_options.h
index c6aabd4..030cb2b 100644
--- a/modules/desktop_capture/desktop_capture_options.h
+++ b/modules/desktop_capture/desktop_capture_options.h
@@ -19,6 +19,7 @@
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
#include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h"
+#include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h"
#endif
namespace webrtc {
@@ -50,6 +51,14 @@
void set_configuration_monitor(scoped_refptr<DesktopConfigurationMonitor> m) {
configuration_monitor_ = m;
}
+
+ FullScreenChromeWindowDetector* full_screen_chrome_window_detector() const {
+ return full_screen_window_detector_;
+ }
+ void set_full_screen_chrome_window_detector(
+ scoped_refptr<FullScreenChromeWindowDetector> detector) {
+ full_screen_window_detector_ = detector;
+ }
#endif
// Flag indicating that the capturer should use screen change notifications.
@@ -82,6 +91,7 @@
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
scoped_refptr<DesktopConfigurationMonitor> configuration_monitor_;
+ scoped_refptr<FullScreenChromeWindowDetector> full_screen_window_detector_;
#endif
#if defined(WEBRTC_WIN)
diff --git a/modules/desktop_capture/desktop_region_unittest.cc b/modules/desktop_capture/desktop_region_unittest.cc
index 747e8c0..3062f0b 100644
--- a/modules/desktop_capture/desktop_region_unittest.cc
+++ b/modules/desktop_capture/desktop_region_unittest.cc
@@ -12,7 +12,7 @@
#include <algorithm>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc {
diff --git a/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc b/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc
new file mode 100644
index 0000000..23c432f
--- /dev/null
+++ b/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h"
+
+#include <assert.h>
+#include <libproc.h>
+#include <string>
+
+#include "webrtc/base/macutils.h"
+#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
+#include "webrtc/modules/desktop_capture/mac/window_list_utils.h"
+#include "webrtc/system_wrappers/interface/logging.h"
+
+
+namespace webrtc {
+
+namespace {
+
+const int64_t kUpdateIntervalMs = 500;
+
+// Returns true if the window is minimized.
+bool IsWindowMinimized(CGWindowID id) {
+ CFArrayRef window_id_array =
+ CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL);
+ CFArrayRef window_array =
+ CGWindowListCreateDescriptionFromArray(window_id_array);
+ bool minimized = false;
+
+ if (window_array && CFArrayGetCount(window_array)) {
+ CFDictionaryRef window = reinterpret_cast<CFDictionaryRef>(
+ CFArrayGetValueAtIndex(window_array, 0));
+ CFBooleanRef on_screen = reinterpret_cast<CFBooleanRef>(
+ CFDictionaryGetValue(window, kCGWindowIsOnscreen));
+
+ minimized = !on_screen;
+ }
+
+ CFRelease(window_id_array);
+ CFRelease(window_array);
+
+ return minimized;
+}
+
+// Returns true if the window is occupying a full screen.
+bool IsWindowFullScreen(const MacDesktopConfiguration& desktop_config,
+ CFDictionaryRef window) {
+ bool fullscreen = false;
+
+ CFDictionaryRef bounds_ref = reinterpret_cast<CFDictionaryRef>(
+ CFDictionaryGetValue(window, kCGWindowBounds));
+
+ CGRect bounds;
+ if (bounds_ref &&
+ CGRectMakeWithDictionaryRepresentation(bounds_ref, &bounds)) {
+ for (MacDisplayConfigurations::const_iterator it =
+ desktop_config.displays.begin();
+ it != desktop_config.displays.end(); ++it) {
+ if (it->bounds.equals(DesktopRect::MakeXYWH(bounds.origin.x,
+ bounds.origin.y,
+ bounds.size.width,
+ bounds.size.height))) {
+ fullscreen = true;
+ break;
+ }
+ }
+ }
+
+ return fullscreen;
+}
+
+std::string GetWindowTitle(CGWindowID id) {
+ CFArrayRef window_id_array =
+ CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL);
+ CFArrayRef window_array =
+ CGWindowListCreateDescriptionFromArray(window_id_array);
+ std::string title;
+
+ if (window_array && CFArrayGetCount(window_array)) {
+ CFDictionaryRef window = reinterpret_cast<CFDictionaryRef>(
+ CFArrayGetValueAtIndex(window_array, 0));
+ CFStringRef title_ref = reinterpret_cast<CFStringRef>(
+ CFDictionaryGetValue(window, kCGWindowName));
+
+ if (title_ref)
+ rtc::ToUtf8(title_ref, &title);
+ }
+ CFRelease(window_id_array);
+ CFRelease(window_array);
+
+ return title;
+}
+
+int GetWindowOwnerPid(CGWindowID id) {
+ CFArrayRef window_id_array =
+ CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL);
+ CFArrayRef window_array =
+ CGWindowListCreateDescriptionFromArray(window_id_array);
+ int pid = 0;
+
+ if (window_array && CFArrayGetCount(window_array)) {
+ CFDictionaryRef window = reinterpret_cast<CFDictionaryRef>(
+ CFArrayGetValueAtIndex(window_array, 0));
+ CFNumberRef pid_ref = reinterpret_cast<CFNumberRef>(
+ CFDictionaryGetValue(window, kCGWindowOwnerPID));
+
+ if (pid_ref)
+ CFNumberGetValue(pid_ref, kCFNumberIntType, &pid);
+ }
+ CFRelease(window_id_array);
+ CFRelease(window_array);
+
+ return pid;
+}
+
+// Returns the window that is full-screen and has the same title and owner pid
+// as the input window.
+CGWindowID FindFullScreenWindowWithSamePidAndTitle(CGWindowID id) {
+ int pid = GetWindowOwnerPid(id);
+ std::string title = GetWindowTitle(id);
+
+ // Only get on screen, non-desktop windows.
+ CFArrayRef window_array = CGWindowListCopyWindowInfo(
+ kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements,
+ kCGNullWindowID);
+ if (!window_array)
+ return kCGNullWindowID;
+
+ CGWindowID full_screen_window = kCGNullWindowID;
+
+ MacDesktopConfiguration desktop_config = MacDesktopConfiguration::GetCurrent(
+ MacDesktopConfiguration::TopLeftOrigin);
+
+ // Check windows to make sure they have an id, title, and use window layer
+ // other than 0.
+ CFIndex count = CFArrayGetCount(window_array);
+ for (CFIndex i = 0; i < count; ++i) {
+ CFDictionaryRef window = reinterpret_cast<CFDictionaryRef>(
+ CFArrayGetValueAtIndex(window_array, i));
+ CFStringRef window_title_ref = reinterpret_cast<CFStringRef>(
+ CFDictionaryGetValue(window, kCGWindowName));
+ CFNumberRef window_id_ref = reinterpret_cast<CFNumberRef>(
+ CFDictionaryGetValue(window, kCGWindowNumber));
+ CFNumberRef window_pid_ref = reinterpret_cast<CFNumberRef>(
+ CFDictionaryGetValue(window, kCGWindowOwnerPID));
+
+ if (!window_title_ref || !window_id_ref || !window_pid_ref)
+ continue;
+
+ int window_pid = 0;
+ CFNumberGetValue(window_pid_ref, kCFNumberIntType, &window_pid);
+ if (window_pid != pid)
+ continue;
+
+ std::string window_title;
+ if (!rtc::ToUtf8(window_title_ref, &window_title) ||
+ window_title != title) {
+ continue;
+ }
+
+ CGWindowID window_id;
+ CFNumberGetValue(window_id_ref, kCFNumberIntType, &window_id);
+ if (IsWindowFullScreen(desktop_config, window)) {
+ full_screen_window = window_id;
+ break;
+ }
+ }
+
+ CFRelease(window_array);
+ return full_screen_window;
+}
+
+bool IsChromeWindow(CGWindowID id) {
+ int pid = GetWindowOwnerPid(id);
+ char buffer[PROC_PIDPATHINFO_MAXSIZE];
+ int path_length = proc_pidpath(pid, buffer, sizeof(buffer));
+ if (path_length <= 0)
+ return false;
+
+ const char* last_slash = strrchr(buffer, '/');
+ std::string name(last_slash ? last_slash + 1 : buffer);
+ return name.find("Google Chrome") == 0 || name == "Chromium";
+}
+
+} // namespace
+
+FullScreenChromeWindowDetector::FullScreenChromeWindowDetector()
+ : ref_count_(0) {}
+
+FullScreenChromeWindowDetector::~FullScreenChromeWindowDetector() {}
+
+CGWindowID FullScreenChromeWindowDetector::FindFullScreenWindow(
+ CGWindowID original_window) {
+ if (!IsChromeWindow(original_window) || !IsWindowMinimized(original_window))
+ return kCGNullWindowID;
+
+ CGWindowID full_screen_window_id =
+ FindFullScreenWindowWithSamePidAndTitle(original_window);
+
+ if (full_screen_window_id == kCGNullWindowID)
+ return kCGNullWindowID;
+
+ for (WindowCapturer::WindowList::iterator it = previous_window_list_.begin();
+ it != previous_window_list_.end(); ++it) {
+ if (static_cast<CGWindowID>(it->id) != full_screen_window_id)
+ continue;
+
+ int64_t time_interval =
+ (TickTime::Now() - last_udpate_time_).Milliseconds();
+ LOG(LS_WARNING) << "The full-screen window exists in the list, "
+ << "which was updated " << time_interval << "ms ago.";
+ return kCGNullWindowID;
+ }
+
+ return full_screen_window_id;
+}
+
+void FullScreenChromeWindowDetector::UpdateWindowListIfNeeded(
+ CGWindowID original_window) {
+ if (IsChromeWindow(original_window) &&
+ (TickTime::Now() - last_udpate_time_).Milliseconds()
+ > kUpdateIntervalMs) {
+ previous_window_list_.clear();
+ previous_window_list_.swap(current_window_list_);
+
+ // No need to update the window list when the window is minimized.
+ if (IsWindowMinimized(original_window)) {
+ previous_window_list_.clear();
+ return;
+ }
+
+ GetWindowList(¤t_window_list_);
+ last_udpate_time_ = TickTime::Now();
+ }
+}
+
+} // namespace webrtc
diff --git a/modules/desktop_capture/mac/full_screen_chrome_window_detector.h b/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
new file mode 100644
index 0000000..b24fc99
--- /dev/null
+++ b/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_MAC_FULL_SCREEN_CHROME_WINDOW_DETECTOR_H_
+#define WEBRTC_MODULES_DESKTOP_CAPTURE_MAC_FULL_SCREEN_CHROME_WINDOW_DETECTOR_H_
+
+#include <ApplicationServices/ApplicationServices.h>
+
+#include "webrtc/modules/desktop_capture/window_capturer.h"
+#include "webrtc/system_wrappers/interface/atomic32.h"
+#include "webrtc/system_wrappers/interface/tick_util.h"
+
+namespace webrtc {
+
+// This is a work around for the Chrome tab full-screen behavior: Chrome
+// creates a new window in full-screen mode to show a tab full-screen and
+// minimizes the old window. To continue capturing in this case, we try to
+// find the new full-screen window using these criteria:
+// 0. The original shared window is minimized.
+// 1. The original shared window's owner application name is "Google Chrome".
+// 2. The original window and the new window have the same title and owner
+// pid.
+// 3. The new window is full-screen.
+// 4. The new window didn't exist at least 500 millisecond ago.
+
+class FullScreenChromeWindowDetector {
+ public:
+ FullScreenChromeWindowDetector();
+
+ void AddRef() { ++ref_count_; }
+ void Release() {
+ if (--ref_count_ == 0)
+ delete this;
+ }
+
+ // Returns the full-screen window in place of the original window if all the
+ // criteria are met, or kCGNullWindowID if no such window found.
+ CGWindowID FindFullScreenWindow(CGWindowID original_window);
+
+ // The caller should call this function periodically, no less than twice per
+ // second.
+ void UpdateWindowListIfNeeded(CGWindowID original_window);
+
+ private:
+ ~FullScreenChromeWindowDetector();
+
+ Atomic32 ref_count_;
+
+ // We cache the last two results of the window list, so
+ // |previous_window_list_| is taken at least 500ms before the next Capture()
+ // call. If we only save the last result, we may get false positive (i.e.
+ // full-screen window exists in the list) if Capture() is called too soon.
+ WindowCapturer::WindowList current_window_list_;
+ WindowCapturer::WindowList previous_window_list_;
+ TickTime last_udpate_time_;
+
+ DISALLOW_COPY_AND_ASSIGN(FullScreenChromeWindowDetector);
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MAC_FULL_SCREEN_CHROME_WINDOW_DETECTOR_H_
diff --git a/modules/desktop_capture/mac/osx_version.cc b/modules/desktop_capture/mac/osx_version.cc
deleted file mode 100644
index 7466f20..0000000
--- a/modules/desktop_capture/mac/osx_version.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <sys/utsname.h>
-
-#include "webrtc/system_wrappers/interface/logging.h"
-
-namespace webrtc {
-
-namespace {
-
-int GetDarwinVersion() {
- struct utsname uname_info;
- if (uname(&uname_info) != 0) {
- LOG(LS_ERROR) << "uname failed";
- return 0;
- }
-
- if (strcmp(uname_info.sysname, "Darwin") != 0)
- return 0;
-
- char* dot;
- int result = strtol(uname_info.release, &dot, 10);
- if (*dot != '.') {
- LOG(LS_ERROR) << "Failed to parse version";
- return 0;
- }
-
- return result;
-}
-
-} // namespace
-
-bool IsOSLionOrLater() {
- static int darwin_version = GetDarwinVersion();
-
- // Verify that the version has been parsed correctly.
- if (darwin_version < 6) {
- LOG_F(LS_ERROR) << "Invalid Darwin version: " << darwin_version;
- abort();
- }
-
- // Darwin major version 11 corresponds to OSX 10.7.
- return darwin_version >= 11;
-}
-
-} // namespace webrtc
diff --git a/modules/desktop_capture/mac/window_list_utils.cc b/modules/desktop_capture/mac/window_list_utils.cc
new file mode 100644
index 0000000..0c3eaa3
--- /dev/null
+++ b/modules/desktop_capture/mac/window_list_utils.cc
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/desktop_capture/mac/window_list_utils.h"
+
+#include <ApplicationServices/ApplicationServices.h>
+
+#include "webrtc/base/macutils.h"
+
+namespace webrtc {
+
+bool GetWindowList(WindowCapturer::WindowList* windows) {
+ // Only get on screen, non-desktop windows.
+ CFArrayRef window_array = CGWindowListCopyWindowInfo(
+ kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements,
+ kCGNullWindowID);
+ if (!window_array)
+ return false;
+
+ // Check windows to make sure they have an id, title, and use window layer
+ // other than 0.
+ CFIndex count = CFArrayGetCount(window_array);
+ for (CFIndex i = 0; i < count; ++i) {
+ CFDictionaryRef window = reinterpret_cast<CFDictionaryRef>(
+ CFArrayGetValueAtIndex(window_array, i));
+ CFStringRef window_title = reinterpret_cast<CFStringRef>(
+ CFDictionaryGetValue(window, kCGWindowName));
+ CFNumberRef window_id = reinterpret_cast<CFNumberRef>(
+ CFDictionaryGetValue(window, kCGWindowNumber));
+ CFNumberRef window_layer = reinterpret_cast<CFNumberRef>(
+ CFDictionaryGetValue(window, kCGWindowLayer));
+ if (window_title && window_id && window_layer) {
+ // Skip windows with layer=0 (menu, dock).
+ int layer;
+ CFNumberGetValue(window_layer, kCFNumberIntType, &layer);
+ if (layer != 0)
+ continue;
+
+ int id;
+ CFNumberGetValue(window_id, kCFNumberIntType, &id);
+ WindowCapturer::Window window;
+ window.id = id;
+ if (!rtc::ToUtf8(window_title, &(window.title)) ||
+ window.title.empty()) {
+ continue;
+ }
+ windows->push_back(window);
+ }
+ }
+
+ CFRelease(window_array);
+ return true;
+}
+
+} // namespace webrtc
diff --git a/modules/desktop_capture/mac/window_list_utils.h b/modules/desktop_capture/mac/window_list_utils.h
new file mode 100644
index 0000000..7be3850
--- /dev/null
+++ b/modules/desktop_capture/mac/window_list_utils.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_LIST_UTILS_H_
+#define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_LIST_UTILS_H_
+
+#include "webrtc/modules/desktop_capture/window_capturer.h"
+
+namespace webrtc {
+
+// A helper function to get the on-screen windows.
+bool GetWindowList(WindowCapturer::WindowList* windows);
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_LIST_UTILS_H_
+
diff --git a/modules/desktop_capture/mouse_cursor_monitor_mac.mm b/modules/desktop_capture/mouse_cursor_monitor_mac.mm
index e880633..331ee80 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_mac.mm
+++ b/modules/desktop_capture/mouse_cursor_monitor_mac.mm
@@ -15,11 +15,12 @@
#include <Cocoa/Cocoa.h>
#include <CoreFoundation/CoreFoundation.h>
+#include "webrtc/base/macutils.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
#include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h"
-#include "webrtc/modules/desktop_capture/mac/osx_version.h"
+#include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h"
#include "webrtc/modules/desktop_capture/mouse_cursor.h"
#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
@@ -52,6 +53,8 @@
Callback* callback_;
Mode mode_;
scoped_ptr<MouseCursor> last_cursor_;
+ scoped_refptr<FullScreenChromeWindowDetector>
+ full_screen_chrome_window_detector_;
};
MouseCursorMonitorMac::MouseCursorMonitorMac(
@@ -62,9 +65,12 @@
window_id_(window_id),
screen_id_(screen_id),
callback_(NULL),
- mode_(SHAPE_AND_POSITION) {
+ mode_(SHAPE_AND_POSITION),
+ full_screen_chrome_window_detector_(
+ options.full_screen_chrome_window_detector()) {
assert(window_id == kCGNullWindowID || screen_id == kInvalidScreenId);
- if (screen_id != kInvalidScreenId && !IsOSLionOrLater()) {
+ if (screen_id != kInvalidScreenId &&
+ rtc::GetOSVersionName() < rtc::kMacOSLion) {
// Single screen capture is not supported on pre OS X 10.7.
screen_id_ = kFullDesktopScreenId;
}
@@ -115,14 +121,23 @@
// if the current mouse position is covered by another window and also adjust
// |position| to make it relative to the window origin.
if (window_id_ != kCGNullWindowID) {
- // Get list of windows that may be covering parts of |window_id_|.
+ CGWindowID on_screen_window = window_id_;
+ if (full_screen_chrome_window_detector_) {
+ CGWindowID full_screen_window =
+ full_screen_chrome_window_detector_->FindFullScreenWindow(window_id_);
+
+ if (full_screen_window != kCGNullWindowID)
+ on_screen_window = full_screen_window;
+ }
+
+ // Get list of windows that may be covering parts of |on_screen_window|.
// CGWindowListCopyWindowInfo() returns windows in order from front to back,
- // so |window_id_| is expected to be the last in the list.
+ // so |on_screen_window| is expected to be the last in the list.
CFArrayRef window_array =
CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly |
kCGWindowListOptionOnScreenAboveWindow |
kCGWindowListOptionIncludingWindow,
- window_id_);
+ on_screen_window);
bool found_window = false;
if (window_array) {
CFIndex count = CFArrayGetCount(window_array);
@@ -158,7 +173,7 @@
if (!CFNumberGetValue(window_number, kCFNumberIntType, &window_id))
continue;
- if (window_id == window_id_) {
+ if (window_id == on_screen_window) {
found_window = true;
if (!window_rect.Contains(position))
state = OUTSIDE;
@@ -247,6 +262,7 @@
last_cursor_->hotspot().equals(hotspot) &&
memcmp(last_cursor_->image()->data(), src_data,
last_cursor_->image()->stride() * size.height()) == 0) {
+ CFRelease(image_data_ref);
return;
}
diff --git a/modules/desktop_capture/mouse_cursor_monitor_unittest.cc b/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
index c6af2b7..5a541d0 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
+++ b/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
@@ -10,7 +10,7 @@
#include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/modules/desktop_capture/mouse_cursor.h"
diff --git a/modules/desktop_capture/screen_capturer_mac.mm b/modules/desktop_capture/screen_capturer_mac.mm
index 2d57339..effe7eb 100644
--- a/modules/desktop_capture/screen_capturer_mac.mm
+++ b/modules/desktop_capture/screen_capturer_mac.mm
@@ -20,13 +20,13 @@
#include <OpenGL/CGLMacro.h>
#include <OpenGL/OpenGL.h>
+#include "webrtc/base/macutils.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/modules/desktop_capture/desktop_geometry.h"
#include "webrtc/modules/desktop_capture/desktop_region.h"
#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
#include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h"
-#include "webrtc/modules/desktop_capture/mac/osx_version.h"
#include "webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h"
#include "webrtc/modules/desktop_capture/mouse_cursor_shape.h"
#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
@@ -425,10 +425,11 @@
DesktopFrame* current_frame = queue_.current_frame();
bool flip = false; // GL capturers need flipping.
- if (IsOSLionOrLater()) {
+ if (rtc::GetOSVersionName() >= rtc::kMacOSLion) {
// Lion requires us to use their new APIs for doing screen capture. These
// APIS currently crash on 10.6.8 if there is no monitor attached.
if (!CgBlitPostLion(*current_frame, region)) {
+ desktop_config_monitor_->Unlock();
callback_->OnCaptureCompleted(NULL);
return;
}
@@ -478,7 +479,7 @@
bool ScreenCapturerMac::GetScreenList(ScreenList* screens) {
assert(screens->size() == 0);
- if (!IsOSLionOrLater()) {
+ if (rtc::GetOSVersionName() < rtc::kMacOSLion) {
// Single monitor cast is not supported on pre OS X 10.7.
Screen screen;
screen.id = kFullDesktopScreenId;
@@ -496,7 +497,7 @@
}
bool ScreenCapturerMac::SelectScreen(ScreenId id) {
- if (!IsOSLionOrLater()) {
+ if (rtc::GetOSVersionName() < rtc::kMacOSLion) {
// Ignore the screen selection on unsupported OS.
assert(!current_display_);
return id == kFullDesktopScreenId;
@@ -874,7 +875,7 @@
// contents. Although the API exists in OS 10.6, it crashes the caller if
// the machine has no monitor connected, so we fall back to depcreated APIs
// when running on 10.6.
- if (IsOSLionOrLater()) {
+ if (rtc::GetOSVersionName() >= rtc::kMacOSLion) {
LOG(LS_INFO) << "Using CgBlitPostLion.";
// No need for any OpenGL support on Lion
return;
@@ -922,10 +923,11 @@
LOG(LS_INFO) << "Using GlBlit";
CGLPixelFormatAttribute attributes[] = {
- // This function does an early return if IsOSLionOrLater(), this code only
- // runs on 10.6 and can be deleted once 10.6 support is dropped. So just
- // keep using kCGLPFAFullScreen even though it was deprecated in 10.6 --
- // it's still functional there, and it's not used on newer OS X versions.
+ // This function does an early return if GetOSVersionName() >= kMacOSLion,
+ // this code only runs on 10.6 and can be deleted once 10.6 support is
+ // dropped. So just keep using kCGLPFAFullScreen even though it was
+ // deprecated in 10.6 -- it's still functional there, and it's not used on
+ // newer OS X versions.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
kCGLPFAFullScreen,
diff --git a/modules/desktop_capture/win/cursor.cc b/modules/desktop_capture/win/cursor.cc
index 00055c4..e3c272c 100644
--- a/modules/desktop_capture/win/cursor.cc
+++ b/modules/desktop_capture/win/cursor.cc
@@ -197,7 +197,7 @@
// The XOR mask becomes the color bitmap.
memcpy(
- image->data(), mask_plane + (width * height), image->stride() * width);
+ image->data(), mask_plane + (width * height), image->stride() * height);
}
// Reconstruct transparency from the mask if the color image does not has
diff --git a/modules/desktop_capture/win/screen_capturer_win_gdi.cc b/modules/desktop_capture/win/screen_capturer_win_gdi.cc
index 9cb3681..dc10ece 100644
--- a/modules/desktop_capture/win/screen_capturer_win_gdi.cc
+++ b/modules/desktop_capture/win/screen_capturer_win_gdi.cc
@@ -133,7 +133,8 @@
callback_->OnCaptureCompleted(frame);
// Check for cursor shape update.
- CaptureCursor();
+ if (mouse_shape_observer_)
+ CaptureCursor();
}
void ScreenCapturerWinGdi::SetMouseShapeObserver(
@@ -279,6 +280,8 @@
}
void ScreenCapturerWinGdi::CaptureCursor() {
+ assert(mouse_shape_observer_);
+
CURSORINFO cursor_info;
cursor_info.cbSize = sizeof(CURSORINFO);
if (!GetCursorInfo(&cursor_info)) {
@@ -317,8 +320,7 @@
// Record the last cursor image that we sent to the client.
last_cursor_ = *cursor;
- if (mouse_shape_observer_)
- mouse_shape_observer_->OnCursorShapeChanged(cursor.release());
+ mouse_shape_observer_->OnCursorShapeChanged(cursor.release());
}
} // namespace webrtc
diff --git a/modules/desktop_capture/window_capturer_mac.mm b/modules/desktop_capture/window_capturer_mac.mm
index d177fc4..e69fc11 100644
--- a/modules/desktop_capture/window_capturer_mac.mm
+++ b/modules/desktop_capture/window_capturer_mac.mm
@@ -15,33 +15,21 @@
#include <Cocoa/Cocoa.h>
#include <CoreFoundation/CoreFoundation.h>
+#include "webrtc/base/macutils.h"
+#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
+#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
+#include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h"
+#include "webrtc/modules/desktop_capture/mac/window_list_utils.h"
#include "webrtc/system_wrappers/interface/logging.h"
+#include "webrtc/system_wrappers/interface/scoped_refptr.h"
+#include "webrtc/system_wrappers/interface/tick_util.h"
namespace webrtc {
namespace {
-bool CFStringRefToUtf8(const CFStringRef string, std::string* str_utf8) {
- assert(string);
- assert(str_utf8);
- CFIndex length = CFStringGetLength(string);
- size_t max_length_utf8 =
- CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
- str_utf8->resize(max_length_utf8);
- CFIndex used_bytes;
- int result = CFStringGetBytes(
- string, CFRangeMake(0, length), kCFStringEncodingUTF8, 0, false,
- reinterpret_cast<UInt8*>(&*str_utf8->begin()), max_length_utf8,
- &used_bytes);
- if (result != length) {
- str_utf8->clear();
- return false;
- }
- str_utf8->resize(used_bytes);
- return true;
-}
-
+// Returns true if the window exists.
bool IsWindowValid(CGWindowID id) {
CFArrayRef window_id_array =
CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL);
@@ -56,7 +44,9 @@
class WindowCapturerMac : public WindowCapturer {
public:
- WindowCapturerMac();
+ explicit WindowCapturerMac(
+ scoped_refptr<FullScreenChromeWindowDetector>
+ full_screen_chrome_window_detector);
virtual ~WindowCapturerMac();
// WindowCapturer interface.
@@ -70,14 +60,22 @@
private:
Callback* callback_;
+
+ // The window being captured.
CGWindowID window_id_;
+ scoped_refptr<FullScreenChromeWindowDetector>
+ full_screen_chrome_window_detector_;
+
DISALLOW_COPY_AND_ASSIGN(WindowCapturerMac);
};
-WindowCapturerMac::WindowCapturerMac()
+WindowCapturerMac::WindowCapturerMac(
+ scoped_refptr<FullScreenChromeWindowDetector>
+ full_screen_chrome_window_detector)
: callback_(NULL),
- window_id_(0) {
+ window_id_(0),
+ full_screen_chrome_window_detector_(full_screen_chrome_window_detector) {
}
WindowCapturerMac::~WindowCapturerMac() {
@@ -114,7 +112,7 @@
CFNumberGetValue(window_id, kCFNumberIntType, &id);
WindowCapturer::Window window;
window.id = id;
- if (!CFStringRefToUtf8(window_title, &(window.title)) ||
+ if (!rtc::ToUtf8(window_title, &(window.title)) ||
window.title.empty()) {
continue;
}
@@ -183,9 +181,18 @@
return;
}
+ CGWindowID on_screen_window = window_id_;
+ if (full_screen_chrome_window_detector_) {
+ CGWindowID full_screen_window =
+ full_screen_chrome_window_detector_->FindFullScreenWindow(window_id_);
+
+ if (full_screen_window != kCGNullWindowID)
+ on_screen_window = full_screen_window;
+ }
+
CGImageRef window_image = CGWindowListCreateImage(
CGRectNull, kCGWindowListOptionIncludingWindow,
- window_id_, kCGWindowImageBoundsIgnoreFraming);
+ on_screen_window, kCGWindowImageBoundsIgnoreFraming);
if (!window_image) {
callback_->OnCaptureCompleted(NULL);
@@ -217,14 +224,20 @@
CFRelease(cf_data);
CFRelease(window_image);
+ frame->mutable_updated_region()->SetRect(
+ DesktopRect::MakeSize(frame->size()));
+
callback_->OnCaptureCompleted(frame);
+
+ if (full_screen_chrome_window_detector_)
+ full_screen_chrome_window_detector_->UpdateWindowListIfNeeded(window_id_);
}
} // namespace
// static
WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) {
- return new WindowCapturerMac();
+ return new WindowCapturerMac(options.full_screen_chrome_window_detector());
}
} // namespace webrtc
diff --git a/modules/desktop_capture/window_capturer_unittest.cc b/modules/desktop_capture/window_capturer_unittest.cc
index ad60a4b..9ac7d18 100644
--- a/modules/desktop_capture/window_capturer_unittest.cc
+++ b/modules/desktop_capture/window_capturer_unittest.cc
@@ -10,7 +10,7 @@
#include "webrtc/modules/desktop_capture/window_capturer.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/modules/desktop_capture/desktop_region.h"
diff --git a/modules/desktop_capture/window_capturer_win.cc b/modules/desktop_capture/window_capturer_win.cc
index a002185..3cb1048 100644
--- a/modules/desktop_capture/window_capturer_win.cc
+++ b/modules/desktop_capture/window_capturer_win.cc
@@ -12,6 +12,7 @@
#include <assert.h>
+#include "webrtc/base/win32.h"
#include "webrtc/modules/desktop_capture/desktop_frame_win.h"
#include "webrtc/modules/desktop_capture/win/window_capture_utils.h"
#include "webrtc/system_wrappers/interface/logging.h"
@@ -23,22 +24,6 @@
typedef HRESULT (WINAPI *DwmIsCompositionEnabledFunc)(BOOL* enabled);
-// Coverts a zero-terminated UTF-16 string to UTF-8. Returns an empty string if
-// error occurs.
-std::string Utf16ToUtf8(const WCHAR* str) {
- int len_utf8 = WideCharToMultiByte(CP_UTF8, 0, str, -1,
- NULL, 0, NULL, NULL);
- if (len_utf8 <= 0)
- return std::string();
- std::string result(len_utf8, '\0');
- int rv = WideCharToMultiByte(CP_UTF8, 0, str, -1,
- &*(result.begin()), len_utf8, NULL, NULL);
- if (rv != len_utf8)
- assert(false);
-
- return result;
-}
-
BOOL CALLBACK WindowsEnumerationHandler(HWND hwnd, LPARAM param) {
WindowCapturer::WindowList* list =
reinterpret_cast<WindowCapturer::WindowList*>(param);
@@ -70,7 +55,7 @@
WCHAR window_title[kTitleLength];
// Truncate the title if it's longer than kTitleLength.
GetWindowText(hwnd, window_title, kTitleLength);
- window.title = Utf16ToUtf8(window_title);
+ window.title = rtc::ToUtf8(window_title);
// Skip windows when we failed to convert the title or it is empty.
if (window.title.empty())
@@ -188,6 +173,17 @@
return;
}
+ // Return a 1x1 black frame if the window is minimized, to match the behavior
+ // on Mac.
+ if (IsIconic(window_)) {
+ BasicDesktopFrame* frame = new BasicDesktopFrame(DesktopSize(1, 1));
+ memset(frame->data(), 0, frame->stride() * frame->size().height());
+
+ previous_size_ = frame->size();
+ callback_->OnCaptureCompleted(frame);
+ return;
+ }
+
DesktopRect original_rect;
DesktopRect cropped_rect;
if (!GetCroppedWindowRect(window_, &cropped_rect, &original_rect)) {
@@ -251,6 +247,9 @@
previous_size_ = frame->size();
+ frame->mutable_updated_region()->SetRect(
+ DesktopRect::MakeSize(frame->size()));
+
if (!result) {
LOG(LS_ERROR) << "Both PrintWindow() and BitBlt() failed.";
frame.reset();
diff --git a/modules/desktop_capture/window_capturer_x11.cc b/modules/desktop_capture/window_capturer_x11.cc
index b641c93..4945423 100755
--- a/modules/desktop_capture/window_capturer_x11.cc
+++ b/modules/desktop_capture/window_capturer_x11.cc
@@ -302,6 +302,9 @@
x_server_pixel_buffer_.CaptureRect(DesktopRect::MakeSize(frame->size()),
frame);
+ frame->mutable_updated_region()->SetRect(
+ DesktopRect::MakeSize(frame->size()));
+
callback_->OnCaptureCompleted(frame);
}
diff --git a/modules/iLBC.target.darwin-arm.mk b/modules/iLBC.target.darwin-arm.mk
index eb07e51..7508a29 100644
--- a/modules/iLBC.target.darwin-arm.mk
+++ b/modules/iLBC.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -99,7 +98,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -117,13 +115,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -138,6 +136,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -145,7 +144,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -162,12 +160,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -210,23 +211,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -244,13 +246,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -272,7 +274,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -289,12 +290,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -338,68 +342,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.darwin-arm64.mk b/modules/iLBC.target.darwin-arm64.mk
index ca06471..3ba95c5 100644
--- a/modules/iLBC.target.darwin-arm64.mk
+++ b/modules/iLBC.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -98,7 +97,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -128,13 +126,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -151,12 +149,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -196,21 +197,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -246,7 +248,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -263,12 +264,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -309,59 +313,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.darwin-mips.mk b/modules/iLBC.target.darwin-mips.mk
index 0ba7b4c..5dcf0fa 100644
--- a/modules/iLBC.target.darwin-mips.mk
+++ b/modules/iLBC.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -99,7 +98,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -108,18 +106,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -134,6 +128,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -141,7 +136,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -158,17 +152,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -205,23 +200,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -230,18 +226,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -263,7 +255,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -280,17 +271,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -328,64 +320,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.darwin-mips64.mk b/modules/iLBC.target.darwin-mips64.mk
new file mode 100644
index 0000000..5dcf0fa
--- /dev/null
+++ b/modules/iLBC.target.darwin-mips64.mk
@@ -0,0 +1,354 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/chebyshev.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/constants.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/create_augmented_vec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/enhancer.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/gain_dequant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/hp_input.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/hp_output.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/index_conv_enc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/interpolate.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/pack_bits.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsp.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/refiner.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_dequant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_quant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/smooth.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/smooth_out_data.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/sort_sq.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/split_vq.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/state_construct.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/state_search.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/swap_bytes.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/unpack_bits.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/vq3.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/vq4.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/window32_w32.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_iLBC_gyp
+
+# Alias gyp target name.
+.PHONY: iLBC
+iLBC: third_party_webrtc_modules_iLBC_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/iLBC.target.darwin-x86.mk b/modules/iLBC.target.darwin-x86.mk
index 572cf24..5a10dc0 100644
--- a/modules/iLBC.target.darwin-x86.mk
+++ b/modules/iLBC.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -98,7 +97,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -133,6 +131,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -140,7 +139,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -157,12 +155,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -202,21 +203,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -258,7 +260,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -275,12 +276,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -321,63 +325,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.darwin-x86_64.mk b/modules/iLBC.target.darwin-x86_64.mk
index f1e9e99..ec09752 100644
--- a/modules/iLBC.target.darwin-x86_64.mk
+++ b/modules/iLBC.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -99,7 +98,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -132,6 +130,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -139,7 +138,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -156,12 +154,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -201,22 +202,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -256,7 +258,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -273,12 +274,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -319,63 +323,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.linux-arm.mk b/modules/iLBC.target.linux-arm.mk
index eb07e51..7508a29 100644
--- a/modules/iLBC.target.linux-arm.mk
+++ b/modules/iLBC.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -99,7 +98,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -117,13 +115,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -138,6 +136,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -145,7 +144,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -162,12 +160,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -210,23 +211,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -244,13 +246,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -272,7 +274,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -289,12 +290,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -338,68 +342,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.linux-arm64.mk b/modules/iLBC.target.linux-arm64.mk
index ca06471..3ba95c5 100644
--- a/modules/iLBC.target.linux-arm64.mk
+++ b/modules/iLBC.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -98,7 +97,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -128,13 +126,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -151,12 +149,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -196,21 +197,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -246,7 +248,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -263,12 +264,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -309,59 +313,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.linux-mips.mk b/modules/iLBC.target.linux-mips.mk
index 0ba7b4c..5dcf0fa 100644
--- a/modules/iLBC.target.linux-mips.mk
+++ b/modules/iLBC.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -99,7 +98,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -108,18 +106,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -134,6 +128,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -141,7 +136,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -158,17 +152,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -205,23 +200,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -230,18 +226,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -263,7 +255,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -280,17 +271,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -328,64 +320,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.linux-mips64.mk b/modules/iLBC.target.linux-mips64.mk
new file mode 100644
index 0000000..5dcf0fa
--- /dev/null
+++ b/modules/iLBC.target.linux-mips64.mk
@@ -0,0 +1,354 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/chebyshev.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/constants.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/create_augmented_vec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/enhancer.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/gain_dequant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/hp_input.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/hp_output.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/index_conv_enc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/interpolate.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/pack_bits.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsp.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/refiner.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_dequant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_quant.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/smooth.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/smooth_out_data.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/sort_sq.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/split_vq.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/state_construct.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/state_search.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/swap_bytes.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/unpack_bits.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/vq3.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/vq4.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/window32_w32.c \
+ third_party/webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_iLBC_gyp
+
+# Alias gyp target name.
+.PHONY: iLBC
+iLBC: third_party_webrtc_modules_iLBC_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/iLBC.target.linux-x86.mk b/modules/iLBC.target.linux-x86.mk
index 572cf24..5a10dc0 100644
--- a/modules/iLBC.target.linux-x86.mk
+++ b/modules/iLBC.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -98,7 +97,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -133,6 +131,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -140,7 +139,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -157,12 +155,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -202,21 +203,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -258,7 +260,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -275,12 +276,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -321,63 +325,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iLBC.target.linux-x86_64.mk b/modules/iLBC.target.linux-x86_64.mk
index f1e9e99..ec09752 100644
--- a/modules/iLBC.target.linux-x86_64.mk
+++ b/modules/iLBC.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iLBC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -99,7 +98,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -132,6 +130,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -139,7 +138,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -156,12 +154,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -201,22 +202,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -256,7 +258,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -273,12 +274,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -319,63 +323,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.darwin-arm.mk b/modules/iSAC.target.darwin-arm.mk
index bc012ab..eaa66ed 100644
--- a/modules/iSAC.target.darwin-arm.mk
+++ b/modules/iSAC.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -76,13 +74,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -97,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -104,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -121,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -169,23 +170,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,13 +205,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -231,7 +233,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -248,12 +249,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -297,68 +301,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.darwin-arm64.mk b/modules/iSAC.target.darwin-arm64.mk
index 0ed32c4..41b57b0 100644
--- a/modules/iSAC.target.darwin-arm64.mk
+++ b/modules/iSAC.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -57,7 +56,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,13 +85,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -110,12 +108,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -155,21 +156,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -222,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,59 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.darwin-mips.mk b/modules/iSAC.target.darwin-mips.mk
index 9b2a258..86c41aa 100644
--- a/modules/iSAC.target.darwin-mips.mk
+++ b/modules/iSAC.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,18 +65,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -93,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,17 +111,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -164,23 +159,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,18 +185,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -222,7 +214,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -239,17 +230,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -287,64 +279,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.darwin-mips64.mk b/modules/iSAC.target.darwin-mips64.mk
new file mode 100644
index 0000000..86c41aa
--- /dev/null
+++ b/modules/iSAC.target.darwin-mips64.mk
@@ -0,0 +1,313 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/decode_bwe.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/fft.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/filterbank_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/intialize.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/filterbanks.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lattice.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/transform.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_iSAC_gyp
+
+# Alias gyp target name.
+.PHONY: iSAC
+iSAC: third_party_webrtc_modules_iSAC_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/iSAC.target.darwin-x86.mk b/modules/iSAC.target.darwin-x86.mk
index ee1e47a..c0121cb 100644
--- a/modules/iSAC.target.darwin-x86.mk
+++ b/modules/iSAC.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -57,7 +56,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -161,21 +162,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,7 +219,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -234,12 +235,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -280,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.darwin-x86_64.mk b/modules/iSAC.target.darwin-x86_64.mk
index f056e80..08af557 100644
--- a/modules/iSAC.target.darwin-x86_64.mk
+++ b/modules/iSAC.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,22 +161,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -215,7 +217,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -232,12 +233,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -278,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.linux-arm.mk b/modules/iSAC.target.linux-arm.mk
index bc012ab..eaa66ed 100644
--- a/modules/iSAC.target.linux-arm.mk
+++ b/modules/iSAC.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -76,13 +74,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -97,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -104,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -121,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -169,23 +170,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,13 +205,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -231,7 +233,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -248,12 +249,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -297,68 +301,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.linux-arm64.mk b/modules/iSAC.target.linux-arm64.mk
index 0ed32c4..41b57b0 100644
--- a/modules/iSAC.target.linux-arm64.mk
+++ b/modules/iSAC.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -57,7 +56,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,13 +85,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -110,12 +108,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -155,21 +156,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -222,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,59 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.linux-mips.mk b/modules/iSAC.target.linux-mips.mk
index 9b2a258..86c41aa 100644
--- a/modules/iSAC.target.linux-mips.mk
+++ b/modules/iSAC.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,18 +65,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -93,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,17 +111,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -164,23 +159,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,18 +185,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -222,7 +214,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -239,17 +230,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -287,64 +279,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.linux-mips64.mk b/modules/iSAC.target.linux-mips64.mk
new file mode 100644
index 0000000..86c41aa
--- /dev/null
+++ b/modules/iSAC.target.linux-mips64.mk
@@ -0,0 +1,313 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/decode_bwe.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/fft.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/filterbank_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/intialize.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/filterbanks.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lattice.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/main/source/transform.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_iSAC_gyp
+
+# Alias gyp target name.
+.PHONY: iSAC
+iSAC: third_party_webrtc_modules_iSAC_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/iSAC.target.linux-x86.mk b/modules/iSAC.target.linux-x86.mk
index ee1e47a..c0121cb 100644
--- a/modules/iSAC.target.linux-x86.mk
+++ b/modules/iSAC.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -57,7 +56,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -161,21 +162,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,7 +219,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -234,12 +235,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -280,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSAC.target.linux-x86_64.mk b/modules/iSAC.target.linux-x86_64.mk
index f056e80..08af557 100644
--- a/modules/iSAC.target.linux-x86_64.mk
+++ b/modules/iSAC.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSAC_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -58,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,22 +161,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -215,7 +217,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -232,12 +233,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -278,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.darwin-arm.mk b/modules/iSACFix.target.darwin-arm.mk
index e9cd722..2704066 100644
--- a/modules/iSACFix.target.darwin-arm.mk
+++ b/modules/iSACFix.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -42,11 +41,13 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_armv7.S \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_armv6.S
@@ -56,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +74,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,23 +171,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +206,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +234,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +250,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -297,68 +303,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.darwin-arm64.mk b/modules/iSACFix.target.darwin-arm64.mk
index 8ab7e62..3a2a528 100644
--- a/modules/iSACFix.target.darwin-arm64.mk
+++ b/modules/iSACFix.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -43,19 +42,20 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,13 +85,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +108,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,21 +157,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +208,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +224,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,59 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.darwin-mips.mk b/modules/iSACFix.target.darwin-mips.mk
index 09baebd..b038668 100644
--- a/modules/iSACFix.target.darwin-mips.mk
+++ b/modules/iSACFix.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -39,17 +38,18 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_mips.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_mips.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
@@ -57,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,18 +65,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -92,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,17 +111,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -164,23 +160,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,18 +186,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -222,7 +215,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -239,17 +231,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -288,64 +281,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.darwin-mips64.mk b/modules/iSACFix.target.darwin-mips64.mk
new file mode 100644
index 0000000..b038668
--- /dev/null
+++ b/modules/iSACFix.target.darwin-mips64.mk
@@ -0,0 +1,315 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filters.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_iSACFix_gyp
+
+# Alias gyp target name.
+.PHONY: iSACFix
+iSACFix: third_party_webrtc_modules_iSACFix_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/iSACFix.target.darwin-x86.mk b/modules/iSACFix.target.darwin-x86.mk
index bd104fc..542cc27 100644
--- a/modules/iSACFix.target.darwin-x86.mk
+++ b/modules/iSACFix.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -43,19 +42,20 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +90,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,21 +163,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +220,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +236,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -280,63 +286,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.darwin-x86_64.mk b/modules/iSACFix.target.darwin-x86_64.mk
index c7c23ab..1dab1a7 100644
--- a/modules/iSACFix.target.darwin-x86_64.mk
+++ b/modules/iSACFix.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -43,12 +42,14 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
@@ -56,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +89,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,22 +162,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +218,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +234,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -278,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.linux-arm.mk b/modules/iSACFix.target.linux-arm.mk
index e9cd722..2704066 100644
--- a/modules/iSACFix.target.linux-arm.mk
+++ b/modules/iSACFix.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -42,11 +41,13 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_armv7.S \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_armv6.S
@@ -56,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +74,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,23 +171,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +206,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +234,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +250,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -297,68 +303,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.linux-arm64.mk b/modules/iSACFix.target.linux-arm64.mk
index 8ab7e62..3a2a528 100644
--- a/modules/iSACFix.target.linux-arm64.mk
+++ b/modules/iSACFix.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -43,19 +42,20 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,13 +85,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +108,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,21 +157,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +208,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +224,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -268,59 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.linux-mips.mk b/modules/iSACFix.target.linux-mips.mk
index 09baebd..b038668 100644
--- a/modules/iSACFix.target.linux-mips.mk
+++ b/modules/iSACFix.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -39,17 +38,18 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_mips.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_mips.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
@@ -57,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,18 +65,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -92,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,17 +111,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -164,23 +160,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,18 +186,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -222,7 +215,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -239,17 +231,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -288,64 +281,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.linux-mips64.mk b/modules/iSACFix.target.linux-mips64.mk
new file mode 100644
index 0000000..b038668
--- /dev/null
+++ b/modules/iSACFix.target.linux-mips64.mk
@@ -0,0 +1,315 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filters.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_iSACFix_gyp
+
+# Alias gyp target name.
+.PHONY: iSACFix
+iSACFix: third_party_webrtc_modules_iSACFix_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/iSACFix.target.linux-x86.mk b/modules/iSACFix.target.linux-x86.mk
index bd104fc..542cc27 100644
--- a/modules/iSACFix.target.linux-x86.mk
+++ b/modules/iSACFix.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -43,19 +42,20 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +90,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +98,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,21 +163,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +220,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +236,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -280,63 +286,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/iSACFix.target.linux-x86_64.mk b/modules/iSACFix.target.linux-x86_64.mk
index c7c23ab..1dab1a7 100644
--- a/modules/iSACFix.target.linux-x86_64.mk
+++ b/modules/iSACFix.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_iSACFix_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -43,12 +42,14 @@
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c \
third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c \
- third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c \
+ third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c
# Flags passed to both C and C++ files.
@@ -56,7 +57,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +89,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,22 +162,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +218,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +234,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -278,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/interface/module_common_types.h b/modules/interface/module_common_types.h
index 2c94707..60bb7ab 100644
--- a/modules/interface/module_common_types.h
+++ b/modules/interface/module_common_types.h
@@ -20,11 +20,6 @@
#include "webrtc/common_types.h"
#include "webrtc/typedefs.h"
-#ifdef _WIN32
-// Remove warning "new behavior: elements of array will be default initialized".
-#pragma warning(disable : 4351)
-#endif
-
namespace webrtc {
struct RTPAudioHeader {
@@ -34,21 +29,10 @@
uint8_t channel; // number of channels 2 = stereo
};
-enum {
- kNoPictureId = -1
-};
-enum {
- kNoTl0PicIdx = -1
-};
-enum {
- kNoTemporalIdx = -1
-};
-enum {
- kNoKeyIdx = -1
-};
-enum {
- kNoSimulcastIdx = 0
-};
+const int16_t kNoPictureId = -1;
+const int16_t kNoTl0PicIdx = -1;
+const uint8_t kNoTemporalIdx = 0xFF;
+const int kNoKeyIdx = -1;
struct RTPVideoHeaderVP8 {
void InitRTPVideoHeaderVP8() {
@@ -67,7 +51,7 @@
// kNoPictureId if PictureID does not exist.
int16_t tl0PicIdx; // TL0PIC_IDX, 8 bits;
// kNoTl0PicIdx means no value provided.
- int8_t temporalIdx; // Temporal layer index, or kNoTemporalIdx.
+ uint8_t temporalIdx; // Temporal layer index, or kNoTemporalIdx.
bool layerSync; // This frame is a layer sync frame.
// Disabled if temporalIdx == kNoTemporalIdx.
int keyIdx; // 5 bits; kNoKeyIdx means not used.
@@ -75,14 +59,22 @@
bool beginningOfPartition; // True if this packet is the first
// in a VP8 partition. Otherwise false
};
+
+struct RTPVideoHeaderH264 {
+ bool stap_a;
+ bool single_nalu;
+};
+
union RTPVideoTypeHeader {
RTPVideoHeaderVP8 VP8;
+ RTPVideoHeaderH264 H264;
};
enum RtpVideoCodecTypes {
kRtpVideoNone,
kRtpVideoGeneric,
- kRtpVideoVp8
+ kRtpVideoVp8,
+ kRtpVideoH264
};
struct RTPVideoHeader {
uint16_t width; // size
diff --git a/modules/isac_neon.target.darwin-arm.mk b/modules/isac_neon.target.darwin-arm.mk
index bb5277a..af09117 100644
--- a/modules/isac_neon.target.darwin-arm.mk
+++ b/modules/isac_neon.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_isac_neon_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -77,6 +75,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,7 +83,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -101,12 +99,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -148,23 +149,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,13 +186,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,7 +214,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -229,12 +230,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -277,68 +281,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/isac_neon.target.linux-arm.mk b/modules/isac_neon.target.linux-arm.mk
index bb5277a..af09117 100644
--- a/modules/isac_neon.target.linux-arm.mk
+++ b/modules/isac_neon.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_isac_neon_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -77,6 +75,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,7 +83,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -101,12 +99,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -148,23 +149,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,13 +186,13 @@
-mfpu=neon \
-flax-vector-conversions \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,7 +214,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -229,12 +230,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -277,68 +281,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.darwin-arm.mk b/modules/media_file.target.darwin-arm.mk
index 3159b37..a17bdcb 100644
--- a/modules/media_file.target.darwin-arm.mk
+++ b/modules/media_file.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -80,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -97,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -143,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -205,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -222,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.darwin-arm64.mk b/modules/media_file.target.darwin-arm64.mk
index 0bb2ad1..41f0f92 100644
--- a/modules/media_file.target.darwin-arm64.mk
+++ b/modules/media_file.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -129,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -196,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -240,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.darwin-mips.mk b/modules/media_file.target.darwin-mips.mk
index 65b96f2..153a94b 100644
--- a/modules/media_file.target.darwin-mips.mk
+++ b/modules/media_file.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -43,18 +41,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -69,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -138,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -196,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -213,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -259,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.darwin-mips64.mk b/modules/media_file.target.darwin-mips64.mk
new file mode 100644
index 0000000..153a94b
--- /dev/null
+++ b/modules/media_file.target.darwin-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/media_file/source/avi_file.cc \
+ third_party/webrtc/modules/media_file/source/media_file_impl.cc \
+ third_party/webrtc/modules/media_file/source/media_file_utility.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_media_file_gyp
+
+# Alias gyp target name.
+.PHONY: media_file
+media_file: third_party_webrtc_modules_media_file_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/media_file.target.darwin-x86.mk b/modules/media_file.target.darwin-x86.mk
index bdd7c97..060f8a6 100644
--- a/modules/media_file.target.darwin-x86.mk
+++ b/modules/media_file.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.darwin-x86_64.mk b/modules/media_file.target.darwin-x86_64.mk
index a88e61d..d496c76 100644
--- a/modules/media_file.target.darwin-x86_64.mk
+++ b/modules/media_file.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -250,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.linux-arm.mk b/modules/media_file.target.linux-arm.mk
index 3159b37..a17bdcb 100644
--- a/modules/media_file.target.linux-arm.mk
+++ b/modules/media_file.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -80,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -97,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -143,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -205,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -222,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.linux-arm64.mk b/modules/media_file.target.linux-arm64.mk
index 0bb2ad1..41f0f92 100644
--- a/modules/media_file.target.linux-arm64.mk
+++ b/modules/media_file.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -129,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -196,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -240,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.linux-mips.mk b/modules/media_file.target.linux-mips.mk
index 65b96f2..153a94b 100644
--- a/modules/media_file.target.linux-mips.mk
+++ b/modules/media_file.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -43,18 +41,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -69,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -138,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -196,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -213,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -259,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.linux-mips64.mk b/modules/media_file.target.linux-mips64.mk
new file mode 100644
index 0000000..153a94b
--- /dev/null
+++ b/modules/media_file.target.linux-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/media_file/source/avi_file.cc \
+ third_party/webrtc/modules/media_file/source/media_file_impl.cc \
+ third_party/webrtc/modules/media_file/source/media_file_utility.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_media_file_gyp
+
+# Alias gyp target name.
+.PHONY: media_file
+media_file: third_party_webrtc_modules_media_file_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/media_file.target.linux-x86.mk b/modules/media_file.target.linux-x86.mk
index bdd7c97..060f8a6 100644
--- a/modules/media_file.target.linux-x86.mk
+++ b/modules/media_file.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file.target.linux-x86_64.mk b/modules/media_file.target.linux-x86_64.mk
index a88e61d..d496c76 100644
--- a/modules/media_file.target.linux-x86_64.mk
+++ b/modules/media_file.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_media_file_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -250,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/media_file/BUILD.gn b/modules/media_file/BUILD.gn
new file mode 100644
index 0000000..6f49dcd
--- /dev/null
+++ b/modules/media_file/BUILD.gn
@@ -0,0 +1,47 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+config("internal_config") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ include_dirs = [
+ "interface",
+ "../interface",
+ ]
+}
+
+source_set("media_file") {
+ sources = [
+ "interface/media_file.h",
+ "interface/media_file_defines.h",
+ "source/avi_file.cc",
+ "source/avi_file.h",
+ "source/media_file_impl.cc",
+ "source/media_file_impl.h",
+ "source/media_file_utility.cc",
+ "source/media_file_utility.h",
+ ]
+
+ if (is_win) {
+ cflags = [
+ # TODO(jschuh): Bug 1348: fix this warning.
+ "/wd4267", # size_t to int truncations
+ ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ direct_dependent_configs = [ ":internal_config" ]
+
+ deps = [ "../../system_wrappers" ]
+}
diff --git a/modules/media_file/OWNERS b/modules/media_file/OWNERS
index 2cc47e4..beb9729 100644
--- a/modules/media_file/OWNERS
+++ b/modules/media_file/OWNERS
@@ -1,4 +1,5 @@
-pwestin@webrtc.org
mflodman@webrtc.org
perkj@webrtc.org
-niklas.enbom@webrtc.org
\ No newline at end of file
+niklas.enbom@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/media_file/interface/media_file.h b/modules/media_file/interface/media_file.h
index f2ec103..5413b44 100644
--- a/modules/media_file/interface/media_file.h
+++ b/modules/media_file/interface/media_file.h
@@ -27,7 +27,7 @@
static void DestroyMediaFile(MediaFile* module);
// Set the MediaFile instance identifier.
- virtual int32_t ChangeUniqueId(const int32_t id) = 0;
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0;
// Put 10-60ms of audio data from file into the audioBuffer depending on
// codec frame size. dataLengthInBytes is both an input and output
diff --git a/modules/media_file/source/Android.mk b/modules/media_file/source/Android.mk
deleted file mode 100644
index 2c408c8..0000000
--- a/modules/media_file/source/Android.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_media_file
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- avi_file.cc \
- media_file_impl.cc \
- media_file_utility.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_MODULE_UTILITY_VIDEO'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../utility/interface \
- $(LOCAL_PATH)/../../audio_coding/main/interface \
- $(LOCAL_PATH)/../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/media_file/source/media_file_impl.h b/modules/media_file/source/media_file_impl.h
index 1a19e71..eaec128 100644
--- a/modules/media_file/source/media_file_impl.h
+++ b/modules/media_file/source/media_file_impl.h
@@ -26,16 +26,18 @@
MediaFileImpl(const int32_t id);
~MediaFileImpl();
- int32_t ChangeUniqueId(const int32_t id);
- int32_t Process();
- int32_t TimeUntilNextProcess();
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
+ virtual int32_t Process() OVERRIDE;
+ virtual int32_t TimeUntilNextProcess() OVERRIDE;
// MediaFile functions
- int32_t PlayoutAudioData(int8_t* audioBuffer, uint32_t& dataLengthInBytes);
- int32_t PlayoutAVIVideoData(int8_t* videoBuffer,
- uint32_t& dataLengthInBytes);
- int32_t PlayoutStereoData(int8_t* audioBufferLeft, int8_t* audioBufferRight,
- uint32_t& dataLengthInBytes);
+ virtual int32_t PlayoutAudioData(int8_t* audioBuffer,
+ uint32_t& dataLengthInBytes) OVERRIDE;
+ virtual int32_t PlayoutAVIVideoData(int8_t* videoBuffer,
+ uint32_t& dataLengthInBytes) OVERRIDE;
+ virtual int32_t PlayoutStereoData(int8_t* audioBufferLeft,
+ int8_t* audioBufferRight,
+ uint32_t& dataLengthInBytes) OVERRIDE;
virtual int32_t StartPlayingAudioFile(
const char* fileName,
const uint32_t notificationTimeMs = 0,
@@ -43,51 +45,52 @@
const FileFormats format = kFileFormatPcm16kHzFile,
const CodecInst* codecInst = NULL,
const uint32_t startPointMs = 0,
- const uint32_t stopPointMs = 0);
- int32_t StartPlayingVideoFile(const char* fileName, const bool loop,
- bool videoOnly, const FileFormats format);
- int32_t StartPlayingAudioStream(InStream& stream,
+ const uint32_t stopPointMs = 0) OVERRIDE;
+ virtual int32_t StartPlayingVideoFile(const char* fileName, const bool loop,
+ bool videoOnly,
+ const FileFormats format) OVERRIDE;
+ virtual int32_t StartPlayingAudioStream(InStream& stream,
const uint32_t notificationTimeMs = 0,
const FileFormats format = kFileFormatPcm16kHzFile,
const CodecInst* codecInst = NULL,
const uint32_t startPointMs = 0,
- const uint32_t stopPointMs = 0);
- int32_t StopPlaying();
- bool IsPlaying();
- int32_t PlayoutPositionMs(uint32_t& positionMs) const;
- int32_t IncomingAudioData(const int8_t* audioBuffer,
- const uint32_t bufferLength);
- int32_t IncomingAVIVideoData(const int8_t* audioBuffer,
- const uint32_t bufferLength);
- int32_t StartRecordingAudioFile(
+ const uint32_t stopPointMs = 0) OVERRIDE;
+ virtual int32_t StopPlaying() OVERRIDE;
+ virtual bool IsPlaying() OVERRIDE;
+ virtual int32_t PlayoutPositionMs(uint32_t& positionMs) const OVERRIDE;
+ virtual int32_t IncomingAudioData(const int8_t* audioBuffer,
+ const uint32_t bufferLength) OVERRIDE;
+ virtual int32_t IncomingAVIVideoData(const int8_t* audioBuffer,
+ const uint32_t bufferLength) OVERRIDE;
+ virtual int32_t StartRecordingAudioFile(
const char* fileName,
const FileFormats format,
const CodecInst& codecInst,
const uint32_t notificationTimeMs = 0,
- const uint32_t maxSizeBytes = 0);
- int32_t StartRecordingVideoFile(
+ const uint32_t maxSizeBytes = 0) OVERRIDE;
+ virtual int32_t StartRecordingVideoFile(
const char* fileName,
const FileFormats format,
const CodecInst& codecInst,
const VideoCodec& videoCodecInst,
- bool videoOnly = false);
- int32_t StartRecordingAudioStream(
+ bool videoOnly = false) OVERRIDE;
+ virtual int32_t StartRecordingAudioStream(
OutStream& stream,
const FileFormats format,
const CodecInst& codecInst,
- const uint32_t notificationTimeMs = 0);
- int32_t StopRecording();
- bool IsRecording();
- int32_t RecordDurationMs(uint32_t& durationMs);
- bool IsStereo();
- int32_t SetModuleFileCallback(FileCallback* callback);
- int32_t FileDurationMs(
+ const uint32_t notificationTimeMs = 0) OVERRIDE;
+ virtual int32_t StopRecording() OVERRIDE;
+ virtual bool IsRecording() OVERRIDE;
+ virtual int32_t RecordDurationMs(uint32_t& durationMs) OVERRIDE;
+ virtual bool IsStereo() OVERRIDE;
+ virtual int32_t SetModuleFileCallback(FileCallback* callback) OVERRIDE;
+ virtual int32_t FileDurationMs(
const char* fileName,
uint32_t& durationMs,
const FileFormats format,
- const uint32_t freqInHz = 16000);
- int32_t codec_info(CodecInst& codecInst) const;
- int32_t VideoCodecInst(VideoCodec& codecInst) const;
+ const uint32_t freqInHz = 16000) OVERRIDE;
+ virtual int32_t codec_info(CodecInst& codecInst) const OVERRIDE;
+ virtual int32_t VideoCodecInst(VideoCodec& codecInst) const OVERRIDE;
private:
// Returns true if the combination of format and codecInst is valid.
diff --git a/modules/media_file/source/media_file_unittest.cc b/modules/media_file/source/media_file_unittest.cc
index d658dc2..56d3544 100644
--- a/modules/media_file/source/media_file_unittest.cc
+++ b/modules/media_file/source/media_file_unittest.cc
@@ -10,6 +10,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/media_file/interface/media_file.h"
+#include "webrtc/system_wrappers/interface/compile_assert.h"
#include "webrtc/system_wrappers/interface/sleep.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/test/testsupport/gtest_disable.h"
@@ -45,3 +46,50 @@
ASSERT_EQ(0, media_file_->StopPlaying());
}
+
+TEST_F(MediaFileTest, WriteWavFile) {
+ // Write file.
+ static const int kHeaderSize = 44;
+ static const int kPayloadSize = 320;
+ webrtc::CodecInst codec = {0, "L16", 16000, kPayloadSize, 1};
+ std::string outfile = webrtc::test::OutputPath() + "wavtest.wav";
+ ASSERT_EQ(0,
+ media_file_->StartRecordingAudioFile(
+ outfile.c_str(), webrtc::kFileFormatWavFile, codec));
+ static const int8_t kFakeData[kPayloadSize] = {0};
+ ASSERT_EQ(0, media_file_->IncomingAudioData(kFakeData, kPayloadSize));
+ ASSERT_EQ(0, media_file_->StopRecording());
+
+ // Check the file we just wrote.
+ static const uint8_t kExpectedHeader[] = {
+ 'R', 'I', 'F', 'F',
+ 0x64, 0x1, 0, 0, // size of whole file - 8: 320 + 44 - 8
+ 'W', 'A', 'V', 'E',
+ 'f', 'm', 't', ' ',
+ 0x10, 0, 0, 0, // size of fmt block - 8: 24 - 8
+ 0x1, 0, // format: PCM (1)
+ 0x1, 0, // channels: 1
+ 0x80, 0x3e, 0, 0, // sample rate: 16000
+ 0, 0x7d, 0, 0, // byte rate: 2 * 16000
+ 0x2, 0, // block align: NumChannels * BytesPerSample
+ 0x10, 0, // bits per sample: 2 * 8
+ 'd', 'a', 't', 'a',
+ 0x40, 0x1, 0, 0, // size of payload: 320
+ };
+ COMPILE_ASSERT(sizeof(kExpectedHeader) == kHeaderSize, header_size);
+
+ EXPECT_EQ(size_t(kHeaderSize + kPayloadSize),
+ webrtc::test::GetFileSize(outfile));
+ FILE* f = fopen(outfile.c_str(), "rb");
+ ASSERT_TRUE(f);
+
+ uint8_t header[kHeaderSize];
+ ASSERT_EQ(1u, fread(header, kHeaderSize, 1, f));
+ EXPECT_EQ(0, memcmp(kExpectedHeader, header, kHeaderSize));
+
+ uint8_t payload[kPayloadSize];
+ ASSERT_EQ(1u, fread(payload, kPayloadSize, 1, f));
+ EXPECT_EQ(0, memcmp(kFakeData, payload, kPayloadSize));
+
+ EXPECT_EQ(0, fclose(f));
+}
diff --git a/modules/media_file/source/media_file_utility.cc b/modules/media_file/source/media_file_utility.cc
index e8883c9..71d62a1 100644
--- a/modules/media_file/source/media_file_utility.cc
+++ b/modules/media_file/source/media_file_utility.cc
@@ -14,6 +14,7 @@
#include <sys/stat.h>
#include <sys/types.h>
+#include "webrtc/common_audio/wav_header.h"
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/interface/module_common_types.h"
@@ -25,12 +26,6 @@
#endif
namespace {
-enum WaveFormats
-{
- kWaveFormatPcm = 0x0001,
- kWaveFormatALaw = 0x0006,
- kWaveFormatMuLaw = 0x0007
-};
// First 16 bytes the WAVE header. ckID should be "RIFF", wave_ckID should be
// "WAVE" and ckSize is the chunk size (4 + n)
@@ -183,7 +178,7 @@
waveFormatHeader.nSamplesPerSec = 8000;
waveFormatHeader.wBitsPerSample = 8;
waveFormatHeader.nBlockAlign = 1;
- waveFormatHeader.wFormatTag = kWaveFormatMuLaw;
+ waveFormatHeader.wFormatTag = kWavFormatMuLaw;
} else if (strncmp(audioCodecInst.plname, "PCMA", 4) == 0)
{
@@ -196,7 +191,7 @@
waveFormatHeader.nSamplesPerSec = 8000;
waveFormatHeader.wBitsPerSample = 8;
waveFormatHeader.nBlockAlign = 1;
- waveFormatHeader.wFormatTag = kWaveFormatALaw;
+ waveFormatHeader.wFormatTag = kWavFormatALaw;
} else if (strncmp(audioCodecInst.plname, "L16", 3) == 0)
{
@@ -210,7 +205,7 @@
waveFormatHeader.nSamplesPerSec = audioCodecInst.plfreq;
waveFormatHeader.wBitsPerSample = 16;
waveFormatHeader.nBlockAlign = 2;
- waveFormatHeader.wFormatTag = kWaveFormatPcm;
+ waveFormatHeader.wFormatTag = kWavFormatPcm;
} else
{
return -1;
@@ -499,8 +494,7 @@
memcpy(tmpStr2, &_wavFormatObj.formatTag, 2);
_wavFormatObj.formatTag =
- (WaveFormats) ((uint32_t)tmpStr2[0] +
- (((uint32_t)tmpStr2[1])<<8));
+ (uint32_t)tmpStr2[0] + (((uint32_t)tmpStr2[1])<<8);
memcpy(tmpStr2, &_wavFormatObj.nChannels, 2);
_wavFormatObj.nChannels =
(int16_t) ((uint32_t)tmpStr2[0] +
@@ -575,9 +569,9 @@
// Either a proper format chunk has been read or a data chunk was come
// across.
- if( (_wavFormatObj.formatTag != kWaveFormatPcm) &&
- (_wavFormatObj.formatTag != kWaveFormatALaw) &&
- (_wavFormatObj.formatTag != kWaveFormatMuLaw))
+ if( (_wavFormatObj.formatTag != kWavFormatPcm) &&
+ (_wavFormatObj.formatTag != kWavFormatALaw) &&
+ (_wavFormatObj.formatTag != kWavFormatMuLaw))
{
WEBRTC_TRACE(kTraceError, kTraceFile, _id,
"Coding formatTag value=%d not supported!",
@@ -603,7 +597,7 @@
}
// Calculate the number of bytes that 10 ms of audio data correspond to.
- if(_wavFormatObj.formatTag == kWaveFormatPcm)
+ if(_wavFormatObj.formatTag == kWavFormatPcm)
{
// TODO (hellner): integer division for 22050 and 11025 would yield
// the same result as the else statement. Remove those
@@ -643,19 +637,19 @@
// Calculate the packet size for 10ms frames
switch(formatTag)
{
- case kWaveFormatALaw:
+ case kWavFormatALaw:
strcpy(codec_info_.plname, "PCMA");
_codecId = kCodecPcma;
codec_info_.pltype = 8;
codec_info_.pacsize = codec_info_.plfreq / 100;
break;
- case kWaveFormatMuLaw:
+ case kWavFormatMuLaw:
strcpy(codec_info_.plname, "PCMU");
_codecId = kCodecPcmu;
codec_info_.pltype = 0;
codec_info_.pacsize = codec_info_.plfreq / 100;
break;
- case kWaveFormatPcm:
+ case kWavFormatPcm:
codec_info_.pacsize = (bitsPerSample * (codec_info_.plfreq / 100)) / 8;
if(samplesPerSec == 8000)
{
@@ -1054,14 +1048,14 @@
{
_bytesPerSample = 1;
if(WriteWavHeader(wav, 8000, _bytesPerSample, channels,
- kWaveFormatMuLaw, 0) == -1)
+ kWavFormatMuLaw, 0) == -1)
{
return -1;
}
}else if(STR_CASE_CMP(codecInst.plname, "PCMA") == 0)
{
_bytesPerSample = 1;
- if(WriteWavHeader(wav, 8000, _bytesPerSample, channels, kWaveFormatALaw,
+ if(WriteWavHeader(wav, 8000, _bytesPerSample, channels, kWavFormatALaw,
0) == -1)
{
return -1;
@@ -1071,7 +1065,7 @@
{
_bytesPerSample = 2;
if(WriteWavHeader(wav, codecInst.plfreq, _bytesPerSample, channels,
- kWaveFormatPcm, 0) == -1)
+ kWavFormatPcm, 0) == -1)
{
return -1;
}
@@ -1124,103 +1118,18 @@
const uint32_t format,
const uint32_t lengthInBytes)
{
-
// Frame size in bytes for 10 ms of audio.
// TODO (hellner): 44.1 kHz has 440 samples frame size. Doesn't seem to
// be taken into consideration here!
- int32_t frameSize = (freq / 100) * bytesPerSample * channels;
+ const int32_t frameSize = (freq / 100) * channels;
// Calculate the number of full frames that the wave file contain.
- const int32_t dataLengthInBytes = frameSize *
- (lengthInBytes / frameSize);
+ const int32_t dataLengthInBytes = frameSize * (lengthInBytes / frameSize);
- int8_t tmpStr[4];
- int8_t tmpChar;
- uint32_t tmpLong;
-
- memcpy(tmpStr, "RIFF", 4);
- wav.Write(tmpStr, 4);
-
- tmpLong = dataLengthInBytes + 36;
- tmpChar = (int8_t)(tmpLong);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 8);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 16);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 24);
- wav.Write(&tmpChar, 1);
-
- memcpy(tmpStr, "WAVE", 4);
- wav.Write(tmpStr, 4);
-
- memcpy(tmpStr, "fmt ", 4);
- wav.Write(tmpStr, 4);
-
- tmpChar = 16;
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
-
- tmpChar = (int8_t)(format);
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
-
- tmpChar = (int8_t)(channels);
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
-
- tmpLong = freq;
- tmpChar = (int8_t)(tmpLong);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 8);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 16);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 24);
- wav.Write(&tmpChar, 1);
-
- // nAverageBytesPerSec = Sample rate * Bytes per sample * Channels
- tmpLong = bytesPerSample * freq * channels;
- tmpChar = (int8_t)(tmpLong);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 8);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 16);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 24);
- wav.Write(&tmpChar, 1);
-
- // nBlockAlign = Bytes per sample * Channels
- tmpChar = (int8_t)(bytesPerSample * channels);
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
-
- tmpChar = (int8_t)(bytesPerSample*8);
- wav.Write(&tmpChar, 1);
- tmpChar = 0;
- wav.Write(&tmpChar, 1);
-
- memcpy(tmpStr, "data", 4);
- wav.Write(tmpStr, 4);
-
- tmpLong = dataLengthInBytes;
- tmpChar = (int8_t)(tmpLong);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 8);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 16);
- wav.Write(&tmpChar, 1);
- tmpChar = (int8_t)(tmpLong >> 24);
- wav.Write(&tmpChar, 1);
-
+ uint8_t buf[kWavHeaderSize];
+ webrtc::WriteWavHeader(buf, channels, freq, static_cast<WavFormat>(format),
+ bytesPerSample, dataLengthInBytes / bytesPerSample);
+ wav.Write(buf, kWavHeaderSize);
return 0;
}
@@ -1237,12 +1146,12 @@
if(STR_CASE_CMP(codec_info_.plname, "L16") == 0)
{
res = WriteWavHeader(wav, codec_info_.plfreq, 2, channels,
- kWaveFormatPcm, _bytesWritten);
+ kWavFormatPcm, _bytesWritten);
} else if(STR_CASE_CMP(codec_info_.plname, "PCMU") == 0) {
- res = WriteWavHeader(wav, 8000, 1, channels, kWaveFormatMuLaw,
+ res = WriteWavHeader(wav, 8000, 1, channels, kWavFormatMuLaw,
_bytesWritten);
} else if(STR_CASE_CMP(codec_info_.plname, "PCMA") == 0) {
- res = WriteWavHeader(wav, 8000, 1, channels, kWaveFormatALaw,
+ res = WriteWavHeader(wav, 8000, 1, channels, kWavFormatALaw,
_bytesWritten);
} else {
// Allow calling this API even if not writing to a WAVE file.
diff --git a/modules/modules.gyp b/modules/modules.gyp
index 8dec125..9650e66 100644
--- a/modules/modules.gyp
+++ b/modules/modules.gyp
@@ -68,6 +68,8 @@
'<@(audio_coding_defines)',
],
'dependencies': [
+ 'acm_receive_test',
+ 'acm_send_test',
'audio_coding_module',
'audio_processing',
'bitrate_controller',
@@ -100,8 +102,11 @@
'<(webrtc_root)/test/test.gyp:rtcp_packet_parser',
],
'sources': [
+ 'audio_coding/main/acm2/acm_opus_unittest.cc',
'audio_coding/main/acm2/acm_receiver_unittest.cc',
+ 'audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc',
'audio_coding/main/acm2/audio_coding_module_unittest.cc',
+ 'audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc',
'audio_coding/main/acm2/call_statistics_unittest.cc',
'audio_coding/main/acm2/initial_delay_manager_unittest.cc',
'audio_coding/main/acm2/nack_unittest.cc',
@@ -147,9 +152,11 @@
'audio_coding/neteq/mock/mock_delay_peak_detector.h',
'audio_coding/neteq/mock/mock_dtmf_buffer.h',
'audio_coding/neteq/mock/mock_dtmf_tone_generator.h',
+ 'audio_coding/neteq/mock/mock_expand.h',
'audio_coding/neteq/mock/mock_external_decoder_pcm16b.h',
'audio_coding/neteq/mock/mock_packet_buffer.h',
'audio_coding/neteq/mock/mock_payload_splitter.h',
+ 'audio_coding/neteq/tools/input_audio_file_unittest.cc',
'audio_coding/neteq/tools/packet_unittest.cc',
'audio_processing/aec/system_delay_unittest.cc',
'audio_processing/aec/echo_cancellation_unittest.cc',
@@ -205,13 +212,13 @@
'rtp_rtcp/source/rtcp_receiver_unittest.cc',
'rtp_rtcp/source/rtcp_sender_unittest.cc',
'rtp_rtcp/source/rtp_fec_unittest.cc',
+ 'rtp_rtcp/source/rtp_format_h264_unittest.cc',
'rtp_rtcp/source/rtp_format_vp8_unittest.cc',
'rtp_rtcp/source/rtp_format_vp8_test_helper.cc',
'rtp_rtcp/source/rtp_format_vp8_test_helper.h',
'rtp_rtcp/source/rtp_packet_history_unittest.cc',
'rtp_rtcp/source/rtp_payload_registry_unittest.cc',
'rtp_rtcp/source/rtp_rtcp_impl_unittest.cc',
- 'rtp_rtcp/source/rtp_utility_unittest.cc',
'rtp_rtcp/source/rtp_header_extension_unittest.cc',
'rtp_rtcp/source/rtp_sender_unittest.cc',
'rtp_rtcp/source/vp8_partition_aggregator_unittest.cc',
@@ -230,6 +237,7 @@
'video_coding/main/interface/mock/mock_vcm_callbacks.h',
'video_coding/main/source/decoding_state_unittest.cc',
'video_coding/main/source/jitter_buffer_unittest.cc',
+ 'video_coding/main/source/jitter_estimator_tests.cc',
'video_coding/main/source/media_optimization_unittest.cc',
'video_coding/main/source/receiver_unittest.cc',
'video_coding/main/source/session_info_unittest.cc',
@@ -240,15 +248,11 @@
'video_coding/main/source/qm_select_unittest.cc',
'video_coding/main/source/test/stream_generator.cc',
'video_coding/main/source/test/stream_generator.h',
- 'video_coding/main/test/pcap_file_reader.cc',
- 'video_coding/main/test/pcap_file_reader_unittest.cc',
- 'video_coding/main/test/rtp_file_reader.cc',
- 'video_coding/main/test/rtp_file_reader_unittest.cc',
+ 'video_coding/utility/quality_scaler_unittest.cc',
'video_processing/main/test/unit_test/brightness_detection_test.cc',
'video_processing/main/test/unit_test/color_enhancement_test.cc',
'video_processing/main/test/unit_test/content_metrics_test.cc',
'video_processing/main/test/unit_test/deflickering_test.cc',
- 'video_processing/main/test/unit_test/denoising_test.cc',
'video_processing/main/test/unit_test/video_processing_unittest.cc',
'video_processing/main/test/unit_test/video_processing_unittest.h',
],
@@ -295,9 +299,7 @@
'<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
],
}],
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -330,7 +332,6 @@
'<@(audio_coding_defines)',
],
'sources': [
- 'audio_coding/main/test/ACMTest.cc',
'audio_coding/main/test/APITest.cc',
'audio_coding/main/test/Channel.cc',
'audio_coding/main/test/dual_stream_unittest.cc',
@@ -356,9 +357,7 @@
'video_coding/codecs/vp8/test/vp8_impl_unittest.cc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -367,9 +366,7 @@
},
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'modules_unittests_apk_target',
diff --git a/modules/neteq.target.darwin-arm.mk b/modules/neteq.target.darwin-arm.mk
index 70c9ecf..63cb6a8 100644
--- a/modules/neteq.target.darwin-arm.mk
+++ b/modules/neteq.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -64,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -82,13 +80,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -103,6 +101,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -110,7 +109,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -127,12 +125,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -186,23 +187,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,13 +222,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -248,7 +250,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -265,12 +266,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -325,68 +329,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.darwin-arm64.mk b/modules/neteq.target.darwin-arm64.mk
index 5c100b1..59644df 100644
--- a/modules/neteq.target.darwin-arm64.mk
+++ b/modules/neteq.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -63,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,13 +91,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -172,21 +173,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -222,7 +224,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -239,12 +240,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -296,59 +300,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.darwin-mips.mk b/modules/neteq.target.darwin-mips.mk
index 93da48d..d998e5b 100644
--- a/modules/neteq.target.darwin-mips.mk
+++ b/modules/neteq.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -64,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -73,18 +71,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -99,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -106,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -123,17 +117,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -181,23 +176,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,18 +202,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -239,7 +231,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -256,17 +247,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -315,64 +307,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.darwin-mips64.mk b/modules/neteq.target.darwin-mips64.mk
new file mode 100644
index 0000000..d998e5b
--- /dev/null
+++ b/modules/neteq.target.darwin-mips64.mk
@@ -0,0 +1,341 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/neteq/accelerate.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_classifier.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_decoder.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_multi_vector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_vector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/background_noise.cc \
+ third_party/webrtc/modules/audio_coding/neteq/buffer_level_filter.cc \
+ third_party/webrtc/modules/audio_coding/neteq/comfort_noise.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decision_logic.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decision_logic_fax.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decision_logic_normal.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decoder_database.cc \
+ third_party/webrtc/modules/audio_coding/neteq/delay_manager.cc \
+ third_party/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/dsp_helper.cc \
+ third_party/webrtc/modules/audio_coding/neteq/dtmf_buffer.cc \
+ third_party/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc \
+ third_party/webrtc/modules/audio_coding/neteq/expand.cc \
+ third_party/webrtc/modules/audio_coding/neteq/merge.cc \
+ third_party/webrtc/modules/audio_coding/neteq/neteq_impl.cc \
+ third_party/webrtc/modules/audio_coding/neteq/neteq.cc \
+ third_party/webrtc/modules/audio_coding/neteq/statistics_calculator.cc \
+ third_party/webrtc/modules/audio_coding/neteq/normal.cc \
+ third_party/webrtc/modules/audio_coding/neteq/packet_buffer.cc \
+ third_party/webrtc/modules/audio_coding/neteq/payload_splitter.cc \
+ third_party/webrtc/modules/audio_coding/neteq/post_decode_vad.cc \
+ third_party/webrtc/modules/audio_coding/neteq/preemptive_expand.cc \
+ third_party/webrtc/modules/audio_coding/neteq/random_vector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/rtcp.cc \
+ third_party/webrtc/modules/audio_coding/neteq/sync_buffer.cc \
+ third_party/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc \
+ third_party/webrtc/modules/audio_coding/neteq/time_stretch.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_neteq_gyp
+
+# Alias gyp target name.
+.PHONY: neteq
+neteq: third_party_webrtc_modules_neteq_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/neteq.target.darwin-x86.mk b/modules/neteq.target.darwin-x86.mk
index 6670fd9..7a4e6ca 100644
--- a/modules/neteq.target.darwin-x86.mk
+++ b/modules/neteq.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -63,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -98,6 +96,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -105,7 +104,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -122,12 +120,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -178,21 +179,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -234,7 +236,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -251,12 +252,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -308,63 +312,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.darwin-x86_64.mk b/modules/neteq.target.darwin-x86_64.mk
index 929a490..585d6e4 100644
--- a/modules/neteq.target.darwin-x86_64.mk
+++ b/modules/neteq.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -64,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -97,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -104,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -121,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -177,22 +178,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,7 +234,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -249,12 +250,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -306,63 +310,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.linux-arm.mk b/modules/neteq.target.linux-arm.mk
index 70c9ecf..63cb6a8 100644
--- a/modules/neteq.target.linux-arm.mk
+++ b/modules/neteq.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -64,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -82,13 +80,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -103,6 +101,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -110,7 +109,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -127,12 +125,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -186,23 +187,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,13 +222,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -248,7 +250,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -265,12 +266,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -325,68 +329,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.linux-arm64.mk b/modules/neteq.target.linux-arm64.mk
index 5c100b1..59644df 100644
--- a/modules/neteq.target.linux-arm64.mk
+++ b/modules/neteq.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -63,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,13 +91,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -116,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -172,21 +173,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -222,7 +224,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -239,12 +240,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -296,59 +300,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.linux-mips.mk b/modules/neteq.target.linux-mips.mk
index 93da48d..d998e5b 100644
--- a/modules/neteq.target.linux-mips.mk
+++ b/modules/neteq.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -64,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -73,18 +71,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -99,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -106,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -123,17 +117,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -181,23 +176,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,18 +202,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -239,7 +231,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -256,17 +247,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -315,64 +307,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.linux-mips64.mk b/modules/neteq.target.linux-mips64.mk
new file mode 100644
index 0000000..d998e5b
--- /dev/null
+++ b/modules/neteq.target.linux-mips64.mk
@@ -0,0 +1,341 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/neteq/accelerate.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_classifier.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_decoder.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_multi_vector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/audio_vector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/background_noise.cc \
+ third_party/webrtc/modules/audio_coding/neteq/buffer_level_filter.cc \
+ third_party/webrtc/modules/audio_coding/neteq/comfort_noise.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decision_logic.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decision_logic_fax.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decision_logic_normal.cc \
+ third_party/webrtc/modules/audio_coding/neteq/decoder_database.cc \
+ third_party/webrtc/modules/audio_coding/neteq/delay_manager.cc \
+ third_party/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/dsp_helper.cc \
+ third_party/webrtc/modules/audio_coding/neteq/dtmf_buffer.cc \
+ third_party/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc \
+ third_party/webrtc/modules/audio_coding/neteq/expand.cc \
+ third_party/webrtc/modules/audio_coding/neteq/merge.cc \
+ third_party/webrtc/modules/audio_coding/neteq/neteq_impl.cc \
+ third_party/webrtc/modules/audio_coding/neteq/neteq.cc \
+ third_party/webrtc/modules/audio_coding/neteq/statistics_calculator.cc \
+ third_party/webrtc/modules/audio_coding/neteq/normal.cc \
+ third_party/webrtc/modules/audio_coding/neteq/packet_buffer.cc \
+ third_party/webrtc/modules/audio_coding/neteq/payload_splitter.cc \
+ third_party/webrtc/modules/audio_coding/neteq/post_decode_vad.cc \
+ third_party/webrtc/modules/audio_coding/neteq/preemptive_expand.cc \
+ third_party/webrtc/modules/audio_coding/neteq/random_vector.cc \
+ third_party/webrtc/modules/audio_coding/neteq/rtcp.cc \
+ third_party/webrtc/modules/audio_coding/neteq/sync_buffer.cc \
+ third_party/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc \
+ third_party/webrtc/modules/audio_coding/neteq/time_stretch.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_CODEC_OPUS' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/opus/src/celt \
+ $(LOCAL_PATH)/third_party/opus/src/src \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g711/include \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/g722/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/pcm16b/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/ilbc/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/isac/fix/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/codecs/cng/include \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_neteq_gyp
+
+# Alias gyp target name.
+.PHONY: neteq
+neteq: third_party_webrtc_modules_neteq_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/neteq.target.linux-x86.mk b/modules/neteq.target.linux-x86.mk
index 6670fd9..7a4e6ca 100644
--- a/modules/neteq.target.linux-x86.mk
+++ b/modules/neteq.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -63,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -98,6 +96,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -105,7 +104,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -122,12 +120,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -178,21 +179,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -234,7 +236,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -251,12 +252,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -308,63 +312,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/neteq.target.linux-x86_64.mk b/modules/neteq.target.linux-x86_64.mk
index 929a490..585d6e4 100644
--- a/modules/neteq.target.linux-x86_64.mk
+++ b/modules/neteq.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_neteq_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -64,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -97,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -104,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -121,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -177,22 +178,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,7 +234,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -249,12 +250,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -306,63 +310,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.darwin-arm.mk b/modules/paced_sender.target.darwin-arm.mk
index ab7dd54..361a1af 100644
--- a/modules/paced_sender.target.darwin-arm.mk
+++ b/modules/paced_sender.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,68 +267,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.darwin-arm64.mk b/modules/paced_sender.target.darwin-arm64.mk
index a6e1057..41cdf33 100644
--- a/modules/paced_sender.target.darwin-arm64.mk
+++ b/modules/paced_sender.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,59 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.darwin-mips.mk b/modules/paced_sender.target.darwin-mips.mk
index 8bfec2e..49ab9d5 100644
--- a/modules/paced_sender.target.darwin-mips.mk
+++ b/modules/paced_sender.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +245,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.darwin-mips64.mk b/modules/paced_sender.target.darwin-mips64.mk
new file mode 100644
index 0000000..49ab9d5
--- /dev/null
+++ b/modules/paced_sender.target.darwin-mips64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/pacing/paced_sender.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_paced_sender_gyp
+
+# Alias gyp target name.
+.PHONY: paced_sender
+paced_sender: third_party_webrtc_modules_paced_sender_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/paced_sender.target.darwin-x86.mk b/modules/paced_sender.target.darwin-x86.mk
index 491b5bb..591110f 100644
--- a/modules/paced_sender.target.darwin-x86.mk
+++ b/modules/paced_sender.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.darwin-x86_64.mk b/modules/paced_sender.target.darwin-x86_64.mk
index 8b961f4..43c117e 100644
--- a/modules/paced_sender.target.darwin-x86_64.mk
+++ b/modules/paced_sender.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.linux-arm.mk b/modules/paced_sender.target.linux-arm.mk
index ab7dd54..361a1af 100644
--- a/modules/paced_sender.target.linux-arm.mk
+++ b/modules/paced_sender.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,68 +267,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.linux-arm64.mk b/modules/paced_sender.target.linux-arm64.mk
index a6e1057..41cdf33 100644
--- a/modules/paced_sender.target.linux-arm64.mk
+++ b/modules/paced_sender.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,59 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.linux-mips.mk b/modules/paced_sender.target.linux-mips.mk
index 8bfec2e..49ab9d5 100644
--- a/modules/paced_sender.target.linux-mips.mk
+++ b/modules/paced_sender.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +245,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.linux-mips64.mk b/modules/paced_sender.target.linux-mips64.mk
new file mode 100644
index 0000000..49ab9d5
--- /dev/null
+++ b/modules/paced_sender.target.linux-mips64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/pacing/paced_sender.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_paced_sender_gyp
+
+# Alias gyp target name.
+.PHONY: paced_sender
+paced_sender: third_party_webrtc_modules_paced_sender_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/paced_sender.target.linux-x86.mk b/modules/paced_sender.target.linux-x86.mk
index 491b5bb..591110f 100644
--- a/modules/paced_sender.target.linux-x86.mk
+++ b/modules/paced_sender.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/paced_sender.target.linux-x86_64.mk b/modules/paced_sender.target.linux-x86_64.mk
index 8b961f4..43c117e 100644
--- a/modules/paced_sender.target.linux-x86_64.mk
+++ b/modules/paced_sender.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_paced_sender_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/pacing/BUILD.gn b/modules/pacing/BUILD.gn
new file mode 100644
index 0000000..7c451d6
--- /dev/null
+++ b/modules/pacing/BUILD.gn
@@ -0,0 +1,22 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+source_set("pacing") {
+ sources = [
+ "include/paced_sender.h",
+ "paced_sender.cc",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [ "../../system_wrappers" ]
+}
diff --git a/modules/pacing/OWNERS b/modules/pacing/OWNERS
index 1426abc..bde04e2 100644
--- a/modules/pacing/OWNERS
+++ b/modules/pacing/OWNERS
@@ -1,4 +1,3 @@
-pwestin@webrtc.org
stefan@webrtc.org
mflodman@webrtc.org
asapersson@webrtc.org
@@ -7,3 +6,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/pacing/include/mock/mock_paced_sender.h b/modules/pacing/include/mock/mock_paced_sender.h
index 3841ef3..6600a92 100644
--- a/modules/pacing/include/mock/mock_paced_sender.h
+++ b/modules/pacing/include/mock/mock_paced_sender.h
@@ -16,12 +16,13 @@
#include <vector>
#include "webrtc/modules/pacing/include/paced_sender.h"
+#include "webrtc/system_wrappers/interface/clock.h"
namespace webrtc {
class MockPacedSender : public PacedSender {
public:
- MockPacedSender() : PacedSender(NULL, 0, 0) {}
+ MockPacedSender() : PacedSender(Clock::GetRealTimeClock(), NULL, 0, 0) {}
MOCK_METHOD6(SendPacket, bool(Priority priority,
uint32_t ssrc,
uint16_t sequence_number,
diff --git a/modules/pacing/include/paced_sender.h b/modules/pacing/include/paced_sender.h
index 95f1a86..14a3a3d 100644
--- a/modules/pacing/include/paced_sender.h
+++ b/modules/pacing/include/paced_sender.h
@@ -14,13 +14,15 @@
#include <list>
#include <set>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/interface/module.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/tick_util.h"
#include "webrtc/typedefs.h"
namespace webrtc {
+class Clock;
class CriticalSectionWrapper;
+
namespace paced_sender {
class IntervalBudget;
struct Packet;
@@ -48,6 +50,7 @@
int64_t capture_time_ms,
bool retransmission) = 0;
// Called when it's a good time to send a padding data.
+ // Returns the number of bytes sent.
virtual int TimeToSendPadding(int bytes) = 0;
protected:
@@ -55,8 +58,17 @@
};
static const int kDefaultMaxQueueLengthMs = 2000;
+ // Pace in kbits/s until we receive first estimate.
+ static const int kDefaultInitialPaceKbps = 2000;
+ // Pacing-rate relative to our target send rate.
+ // Multiplicative factor that is applied to the target bitrate to calculate
+ // the number of bytes that can be transmitted per interval.
+ // Increasing this factor will result in lower delays in cases of bitrate
+ // overshoots from the encoder.
+ static const float kDefaultPaceMultiplier;
- PacedSender(Callback* callback, int max_bitrate_kbps, int min_bitrate_kbps);
+ PacedSender(Clock* clock, Callback* callback, int max_bitrate_kbps,
+ int min_bitrate_kbps);
virtual ~PacedSender();
@@ -101,40 +113,50 @@
private:
// Return true if next packet in line should be transmitted.
// Return packet list that contains the next packet.
- bool ShouldSendNextPacket(paced_sender::PacketList** packet_list);
+ bool ShouldSendNextPacket(paced_sender::PacketList** packet_list)
+ EXCLUSIVE_LOCKS_REQUIRED(critsect_);
// Local helper function to GetNextPacket.
- paced_sender::Packet GetNextPacketFromList(paced_sender::PacketList* packets);
+ paced_sender::Packet GetNextPacketFromList(paced_sender::PacketList* packets)
+ EXCLUSIVE_LOCKS_REQUIRED(critsect_);
- bool SendPacketFromList(paced_sender::PacketList* packet_list);
+ bool SendPacketFromList(paced_sender::PacketList* packet_list)
+ EXCLUSIVE_LOCKS_REQUIRED(critsect_);
// Updates the number of bytes that can be sent for the next time interval.
- void UpdateBytesPerInterval(uint32_t delta_time_in_ms);
+ void UpdateBytesPerInterval(uint32_t delta_time_in_ms)
+ EXCLUSIVE_LOCKS_REQUIRED(critsect_);
// Updates the buffers with the number of bytes that we sent.
- void UpdateMediaBytesSent(int num_bytes);
+ void UpdateMediaBytesSent(int num_bytes) EXCLUSIVE_LOCKS_REQUIRED(critsect_);
- Callback* callback_;
- bool enabled_;
- bool paused_;
- int max_queue_length_ms_;
+ Clock* const clock_;
+ Callback* const callback_;
+
scoped_ptr<CriticalSectionWrapper> critsect_;
+ bool enabled_ GUARDED_BY(critsect_);
+ bool paused_ GUARDED_BY(critsect_);
+ int max_queue_length_ms_ GUARDED_BY(critsect_);
// This is the media budget, keeping track of how many bits of media
// we can pace out during the current interval.
- scoped_ptr<paced_sender::IntervalBudget> media_budget_;
+ scoped_ptr<paced_sender::IntervalBudget> media_budget_ GUARDED_BY(critsect_);
// This is the padding budget, keeping track of how many bits of padding we're
// allowed to send out during the current interval. This budget will be
// utilized when there's no media to send.
- scoped_ptr<paced_sender::IntervalBudget> padding_budget_;
+ scoped_ptr<paced_sender::IntervalBudget> padding_budget_
+ GUARDED_BY(critsect_);
- TickTime time_last_update_;
- TickTime time_last_send_;
- int64_t capture_time_ms_last_queued_;
- int64_t capture_time_ms_last_sent_;
+ int64_t time_last_update_us_ GUARDED_BY(critsect_);
+ int64_t time_last_send_us_ GUARDED_BY(critsect_);
+ int64_t capture_time_ms_last_queued_ GUARDED_BY(critsect_);
+ int64_t capture_time_ms_last_sent_ GUARDED_BY(critsect_);
- scoped_ptr<paced_sender::PacketList> high_priority_packets_;
- scoped_ptr<paced_sender::PacketList> normal_priority_packets_;
- scoped_ptr<paced_sender::PacketList> low_priority_packets_;
+ scoped_ptr<paced_sender::PacketList> high_priority_packets_
+ GUARDED_BY(critsect_);
+ scoped_ptr<paced_sender::PacketList> normal_priority_packets_
+ GUARDED_BY(critsect_);
+ scoped_ptr<paced_sender::PacketList> low_priority_packets_
+ GUARDED_BY(critsect_);
};
} // namespace webrtc
#endif // WEBRTC_MODULES_PACED_SENDER_H_
diff --git a/modules/pacing/paced_sender.cc b/modules/pacing/paced_sender.cc
index e9f9bdd..6204a9a 100644
--- a/modules/pacing/paced_sender.cc
+++ b/modules/pacing/paced_sender.cc
@@ -12,7 +12,11 @@
#include <assert.h>
+#include <map>
+#include <set>
+
#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/trace_event.h"
@@ -27,29 +31,31 @@
// Max time that the first packet in the queue can sit in the queue if no
// packets are sent, regardless of buffer state. In practice only in effect at
// low bitrates (less than 320 kbits/s).
-const int kMaxQueueTimeWithoutSendingMs = 30;
+const int kMaxQueueTimeWithoutSendingUs = 30000;
} // namespace
namespace webrtc {
-
namespace paced_sender {
struct Packet {
- Packet(uint32_t ssrc, uint16_t seq_number, int64_t capture_time_ms,
- int64_t enqueue_time_ms, int length_in_bytes, bool retransmission)
- : ssrc_(ssrc),
- sequence_number_(seq_number),
- capture_time_ms_(capture_time_ms),
- enqueue_time_ms_(enqueue_time_ms),
- bytes_(length_in_bytes),
- retransmission_(retransmission) {
- }
- uint32_t ssrc_;
- uint16_t sequence_number_;
- int64_t capture_time_ms_;
- int64_t enqueue_time_ms_;
- int bytes_;
- bool retransmission_;
+ Packet(uint32_t ssrc,
+ uint16_t seq_number,
+ int64_t capture_time_ms,
+ int64_t enqueue_time_ms,
+ int length_in_bytes,
+ bool retransmission)
+ : ssrc(ssrc),
+ sequence_number(seq_number),
+ capture_time_ms(capture_time_ms),
+ enqueue_time_ms(enqueue_time_ms),
+ bytes(length_in_bytes),
+ retransmission(retransmission) {}
+ uint32_t ssrc;
+ uint16_t sequence_number;
+ int64_t capture_time_ms;
+ int64_t enqueue_time_ms;
+ int bytes;
+ bool retransmission;
};
// STL list style class which prevents duplicates in the list.
@@ -67,23 +73,24 @@
void pop_front() {
Packet& packet = packet_list_.front();
- uint16_t sequence_number = packet.sequence_number_;
+ uint16_t sequence_number = packet.sequence_number;
+ uint32_t ssrc = packet.ssrc;
packet_list_.pop_front();
- sequence_number_set_.erase(sequence_number);
+ sequence_number_set_[ssrc].erase(sequence_number);
}
void push_back(const Packet& packet) {
- if (sequence_number_set_.find(packet.sequence_number_) ==
- sequence_number_set_.end()) {
+ if (sequence_number_set_[packet.ssrc].find(packet.sequence_number) ==
+ sequence_number_set_[packet.ssrc].end()) {
// Don't insert duplicates.
packet_list_.push_back(packet);
- sequence_number_set_.insert(packet.sequence_number_);
+ sequence_number_set_[packet.ssrc].insert(packet.sequence_number);
}
}
private:
std::list<Packet> packet_list_;
- std::set<uint16_t> sequence_number_set_;
+ std::map<uint32_t, std::set<uint16_t> > sequence_number_set_;
};
class IntervalBudget {
@@ -120,17 +127,21 @@
};
} // namespace paced_sender
-PacedSender::PacedSender(Callback* callback,
+const float PacedSender::kDefaultPaceMultiplier = 2.5f;
+
+PacedSender::PacedSender(Clock* clock,
+ Callback* callback,
int max_bitrate_kbps,
int min_bitrate_kbps)
- : callback_(callback),
+ : clock_(clock),
+ callback_(callback),
+ critsect_(CriticalSectionWrapper::CreateCriticalSection()),
enabled_(true),
paused_(false),
max_queue_length_ms_(kDefaultMaxQueueLengthMs),
- critsect_(CriticalSectionWrapper::CreateCriticalSection()),
media_budget_(new paced_sender::IntervalBudget(max_bitrate_kbps)),
padding_budget_(new paced_sender::IntervalBudget(min_bitrate_kbps)),
- time_last_update_(TickTime::Now()),
+ time_last_update_us_(clock->TimeInMicroseconds()),
capture_time_ms_last_queued_(0),
capture_time_ms_last_sent_(0),
high_priority_packets_(new paced_sender::PacketList),
@@ -139,8 +150,7 @@
UpdateBytesPerInterval(kMinPacketLimitMs);
}
-PacedSender::~PacedSender() {
-}
+PacedSender::~PacedSender() {}
void PacedSender::Pause() {
CriticalSectionScoped cs(critsect_.get());
@@ -178,7 +188,7 @@
return true; // We can send now.
}
if (capture_time_ms < 0) {
- capture_time_ms = TickTime::MillisecondTimestamp();
+ capture_time_ms = clock_->TimeInMilliseconds();
}
if (priority != kHighPriority &&
capture_time_ms > capture_time_ms_last_queued_) {
@@ -201,7 +211,7 @@
packet_list->push_back(paced_sender::Packet(ssrc,
sequence_number,
capture_time_ms,
- TickTime::MillisecondTimestamp(),
+ clock_->TimeInMilliseconds(),
bytes,
retransmission));
return false;
@@ -214,30 +224,30 @@
int PacedSender::QueueInMs() const {
CriticalSectionScoped cs(critsect_.get());
- int64_t now_ms = TickTime::MillisecondTimestamp();
+ int64_t now_ms = clock_->TimeInMilliseconds();
int64_t oldest_packet_enqueue_time = now_ms;
if (!high_priority_packets_->empty()) {
- oldest_packet_enqueue_time = std::min(
- oldest_packet_enqueue_time,
- high_priority_packets_->front().enqueue_time_ms_);
+ oldest_packet_enqueue_time =
+ std::min(oldest_packet_enqueue_time,
+ high_priority_packets_->front().enqueue_time_ms);
}
if (!normal_priority_packets_->empty()) {
- oldest_packet_enqueue_time = std::min(
- oldest_packet_enqueue_time,
- normal_priority_packets_->front().enqueue_time_ms_);
+ oldest_packet_enqueue_time =
+ std::min(oldest_packet_enqueue_time,
+ normal_priority_packets_->front().enqueue_time_ms);
}
if (!low_priority_packets_->empty()) {
- oldest_packet_enqueue_time = std::min(
- oldest_packet_enqueue_time,
- low_priority_packets_->front().enqueue_time_ms_);
+ oldest_packet_enqueue_time =
+ std::min(oldest_packet_enqueue_time,
+ low_priority_packets_->front().enqueue_time_ms);
}
return now_ms - oldest_packet_enqueue_time;
}
int32_t PacedSender::TimeUntilNextProcess() {
CriticalSectionScoped cs(critsect_.get());
- int64_t elapsed_time_ms =
- (TickTime::Now() - time_last_update_).Milliseconds();
+ int64_t elapsed_time_ms = (clock_->TimeInMicroseconds() -
+ time_last_update_us_ + 500) / 1000;
if (elapsed_time_ms <= 0) {
return kMinPacketLimitMs;
}
@@ -248,10 +258,10 @@
}
int32_t PacedSender::Process() {
- TickTime now = TickTime::Now();
+ int64_t now_us = clock_->TimeInMicroseconds();
CriticalSectionScoped cs(critsect_.get());
- int elapsed_time_ms = (now - time_last_update_).Milliseconds();
- time_last_update_ = now;
+ int elapsed_time_ms = (now_us - time_last_update_us_ + 500) / 1000;
+ time_last_update_us_ = now_us;
if (!enabled_) {
return 0;
}
@@ -280,16 +290,15 @@
return 0;
}
-// MUST have critsect_ when calling.
bool PacedSender::SendPacketFromList(paced_sender::PacketList* packet_list)
EXCLUSIVE_LOCKS_REQUIRED(critsect_.get()) {
paced_sender::Packet packet = GetNextPacketFromList(packet_list);
critsect_->Leave();
- const bool success = callback_->TimeToSendPacket(packet.ssrc_,
- packet.sequence_number_,
- packet.capture_time_ms_,
- packet.retransmission_);
+ const bool success = callback_->TimeToSendPacket(packet.ssrc,
+ packet.sequence_number,
+ packet.capture_time_ms,
+ packet.retransmission);
critsect_->Enter();
// If packet cannot be sent then keep it in packet list and exit early.
// There's no need to send more packets.
@@ -297,34 +306,32 @@
return false;
}
packet_list->pop_front();
- const bool last_packet = packet_list->empty() ||
- packet_list->front().capture_time_ms_ > packet.capture_time_ms_;
+ const bool last_packet =
+ packet_list->empty() ||
+ packet_list->front().capture_time_ms > packet.capture_time_ms;
if (packet_list != high_priority_packets_.get()) {
- if (packet.capture_time_ms_ > capture_time_ms_last_sent_) {
- capture_time_ms_last_sent_ = packet.capture_time_ms_;
- } else if (packet.capture_time_ms_ == capture_time_ms_last_sent_ &&
+ if (packet.capture_time_ms > capture_time_ms_last_sent_) {
+ capture_time_ms_last_sent_ = packet.capture_time_ms;
+ } else if (packet.capture_time_ms == capture_time_ms_last_sent_ &&
last_packet) {
- TRACE_EVENT_ASYNC_END0("webrtc_rtp", "PacedSend",
- packet.capture_time_ms_);
+ TRACE_EVENT_ASYNC_END0("webrtc_rtp", "PacedSend", packet.capture_time_ms);
}
}
return true;
}
-// MUST have critsect_ when calling.
void PacedSender::UpdateBytesPerInterval(uint32_t delta_time_ms) {
media_budget_->IncreaseBudget(delta_time_ms);
padding_budget_->IncreaseBudget(delta_time_ms);
}
-// MUST have critsect_ when calling.
bool PacedSender::ShouldSendNextPacket(paced_sender::PacketList** packet_list) {
*packet_list = NULL;
if (media_budget_->bytes_remaining() <= 0) {
// All bytes consumed for this interval.
// Check if we have not sent in a too long time.
- if ((TickTime::Now() - time_last_send_).Milliseconds() >
- kMaxQueueTimeWithoutSendingMs) {
+ if (clock_->TimeInMicroseconds() - time_last_send_us_ >
+ kMaxQueueTimeWithoutSendingUs) {
if (!high_priority_packets_->empty()) {
*packet_list = high_priority_packets_.get();
return true;
@@ -339,12 +346,13 @@
int64_t high_priority_capture_time = -1;
if (!high_priority_packets_->empty()) {
high_priority_capture_time =
- high_priority_packets_->front().capture_time_ms_;
+ high_priority_packets_->front().capture_time_ms;
*packet_list = high_priority_packets_.get();
}
if (!normal_priority_packets_->empty() &&
- (high_priority_capture_time == -1 || high_priority_capture_time >
- normal_priority_packets_->front().capture_time_ms_)) {
+ (high_priority_capture_time == -1 ||
+ high_priority_capture_time >
+ normal_priority_packets_->front().capture_time_ms)) {
*packet_list = normal_priority_packets_.get();
}
if (*packet_list)
@@ -370,13 +378,12 @@
paced_sender::Packet PacedSender::GetNextPacketFromList(
paced_sender::PacketList* packets) {
paced_sender::Packet packet = packets->front();
- UpdateMediaBytesSent(packet.bytes_);
+ UpdateMediaBytesSent(packet.bytes);
return packet;
}
-// MUST have critsect_ when calling.
void PacedSender::UpdateMediaBytesSent(int num_bytes) {
- time_last_send_ = TickTime::Now();
+ time_last_send_us_ = clock_->TimeInMicroseconds();
media_budget_->UseBudget(num_bytes);
padding_budget_->UseBudget(num_bytes);
}
diff --git a/modules/pacing/paced_sender_unittest.cc b/modules/pacing/paced_sender_unittest.cc
index 9763c80..14dcdbc 100644
--- a/modules/pacing/paced_sender_unittest.cc
+++ b/modules/pacing/paced_sender_unittest.cc
@@ -12,6 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/pacing/include/paced_sender.h"
+#include "webrtc/system_wrappers/interface/clock.h"
using testing::_;
using testing::Return;
@@ -55,12 +56,12 @@
class PacedSenderTest : public ::testing::Test {
protected:
- PacedSenderTest() {
+ PacedSenderTest() : clock_(123456) {
srand(0);
- TickTime::UseFakeClock(123456);
// Need to initialize PacedSender after we initialize clock.
send_bucket_.reset(
- new PacedSender(&callback_, kPaceMultiplier * kTargetBitrate, 0));
+ new PacedSender(
+ &clock_, &callback_, kPaceMultiplier * kTargetBitrate, 0));
}
void SendAndExpectPacket(PacedSender::Priority priority,
@@ -75,6 +76,7 @@
.WillRepeatedly(Return(true));
}
+ SimulatedClock clock_;
MockPacedSenderCallback callback_;
scoped_ptr<PacedSender> send_bucket_;
};
@@ -84,20 +86,20 @@
uint16_t sequence_number = 1234;
// Due to the multiplicative factor we can send 3 packets not 2 packets.
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
- int64_t queued_packet_timestamp = TickTime::MillisecondTimestamp();
+ clock_.TimeInMilliseconds(), 250, false);
+ int64_t queued_packet_timestamp = clock_.TimeInMilliseconds();
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
sequence_number, queued_packet_timestamp, 250, false));
send_bucket_->Process();
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
EXPECT_CALL(callback_, TimeToSendPadding(_)).Times(0);
- TickTime::AdvanceFakeClock(4);
+ clock_.AdvanceTimeMilliseconds(4);
EXPECT_EQ(1, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(1);
+ clock_.AdvanceTimeMilliseconds(1);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_CALL(callback_, TimeToSendPacket(
ssrc, sequence_number++, queued_packet_timestamp, false))
@@ -106,11 +108,11 @@
send_bucket_->Process();
sequence_number++;
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
- sequence_number++, TickTime::MillisecondTimestamp(), 250, false));
+ sequence_number++, clock_.TimeInMilliseconds(), 250, false));
send_bucket_->Process();
}
@@ -121,17 +123,17 @@
// Due to the multiplicative factor we can send 3 packets not 2 packets.
for (int i = 0; i < 3; ++i) {
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
}
for (int j = 0; j < 30; ++j) {
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
- sequence_number++, TickTime::MillisecondTimestamp(), 250, false));
+ sequence_number++, clock_.TimeInMilliseconds(), 250, false));
}
send_bucket_->Process();
EXPECT_CALL(callback_, TimeToSendPadding(_)).Times(0);
for (int k = 0; k < 10; ++k) {
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_CALL(callback_,
TimeToSendPacket(ssrc, _, _, false))
.Times(3)
@@ -140,17 +142,17 @@
EXPECT_EQ(0, send_bucket_->Process());
}
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
- sequence_number, TickTime::MillisecondTimestamp(), 250, false));
+ sequence_number, clock_.TimeInMilliseconds(), 250, false));
send_bucket_->Process();
}
@@ -162,22 +164,22 @@
// Due to the multiplicative factor we can send 3 packets not 2 packets.
for (int i = 0; i < 3; ++i) {
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
}
queued_sequence_number = sequence_number;
for (int j = 0; j < 30; ++j) {
// Send in duplicate packets.
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
- sequence_number, TickTime::MillisecondTimestamp(), 250, false));
+ sequence_number, clock_.TimeInMilliseconds(), 250, false));
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
- sequence_number++, TickTime::MillisecondTimestamp(), 250, false));
+ sequence_number++, clock_.TimeInMilliseconds(), 250, false));
}
EXPECT_CALL(callback_, TimeToSendPadding(_)).Times(0);
send_bucket_->Process();
for (int k = 0; k < 10; ++k) {
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
for (int i = 0; i < 3; ++i) {
EXPECT_CALL(callback_, TimeToSendPacket(ssrc, queued_sequence_number++,
@@ -190,17 +192,40 @@
EXPECT_EQ(0, send_bucket_->Process());
}
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
- sequence_number++, TickTime::MillisecondTimestamp(), 250, false));
+ sequence_number++, clock_.TimeInMilliseconds(), 250, false));
+ send_bucket_->Process();
+}
+
+TEST_F(PacedSenderTest, CanQueuePacketsWithSameSequenceNumberOnDifferentSsrcs) {
+ uint32_t ssrc = 12345;
+ uint16_t sequence_number = 1234;
+
+ SendAndExpectPacket(PacedSender::kNormalPriority,
+ ssrc,
+ sequence_number,
+ clock_.TimeInMilliseconds(),
+ 250,
+ false);
+
+ // Expect packet on second ssrc to be queued and sent as well.
+ SendAndExpectPacket(PacedSender::kNormalPriority,
+ ssrc + 1,
+ sequence_number,
+ clock_.TimeInMilliseconds(),
+ 250,
+ false);
+
+ clock_.AdvanceTimeMilliseconds(1000);
send_bucket_->Process();
}
@@ -211,15 +236,15 @@
send_bucket_->UpdateBitrate(kPaceMultiplier * kTargetBitrate, kTargetBitrate);
// Due to the multiplicative factor we can send 3 packets not 2 packets.
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
- TickTime::MillisecondTimestamp(), 250, false);
+ clock_.TimeInMilliseconds(), 250, false);
// No padding is expected since we have sent too much already.
EXPECT_CALL(callback_, TimeToSendPadding(_)).Times(0);
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
@@ -227,7 +252,7 @@
EXPECT_CALL(callback_, TimeToSendPadding(250)).Times(1).
WillOnce(Return(250));
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
}
@@ -238,12 +263,12 @@
// No padding is expected since the pacer is disabled.
EXPECT_CALL(callback_, TimeToSendPadding(_)).Times(0);
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
EXPECT_CALL(callback_, TimeToSendPadding(_)).Times(0);
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
}
@@ -255,11 +280,11 @@
const int kTimeStep = 5;
const int64_t kBitrateWindow = 100;
send_bucket_->UpdateBitrate(kPaceMultiplier * kTargetBitrate, kTargetBitrate);
- int64_t start_time = TickTime::MillisecondTimestamp();
- while (TickTime::MillisecondTimestamp() - start_time < kBitrateWindow) {
+ int64_t start_time = clock_.TimeInMilliseconds();
+ while (clock_.TimeInMilliseconds() - start_time < kBitrateWindow) {
SendAndExpectPacket(PacedSender::kNormalPriority, ssrc, sequence_number++,
capture_time_ms, 250, false);
- TickTime::AdvanceFakeClock(kTimeStep);
+ clock_.AdvanceTimeMilliseconds(kTimeStep);
EXPECT_CALL(callback_, TimeToSendPadding(250)).Times(1).
WillOnce(Return(250));
send_bucket_->Process();
@@ -274,17 +299,17 @@
const int64_t kBitrateWindow = 10000;
PacedSenderPadding callback;
send_bucket_.reset(
- new PacedSender(&callback, kPaceMultiplier * kTargetBitrate, 0));
+ new PacedSender(&clock_, &callback, kPaceMultiplier * kTargetBitrate, 0));
send_bucket_->UpdateBitrate(kPaceMultiplier * kTargetBitrate, kTargetBitrate);
- int64_t start_time = TickTime::MillisecondTimestamp();
+ int64_t start_time = clock_.TimeInMilliseconds();
int media_bytes = 0;
- while (TickTime::MillisecondTimestamp() - start_time < kBitrateWindow) {
+ while (clock_.TimeInMilliseconds() - start_time < kBitrateWindow) {
int media_payload = rand() % 100 + 200; // [200, 300] bytes.
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority, ssrc,
sequence_number++, capture_time_ms,
media_payload, false));
media_bytes += media_payload;
- TickTime::AdvanceFakeClock(kTimeStep);
+ clock_.AdvanceTimeMilliseconds(kTimeStep);
send_bucket_->Process();
}
EXPECT_NEAR(kTargetBitrate, 8 * (media_bytes + callback.padding_sent()) /
@@ -325,7 +350,7 @@
.WillRepeatedly(Return(true));
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
@@ -335,7 +360,7 @@
.WillRepeatedly(Return(true));
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
}
@@ -344,7 +369,7 @@
uint32_t ssrc_low_priority = 12345;
uint32_t ssrc = 12346;
uint16_t sequence_number = 1234;
- int64_t capture_time_ms = TickTime::MillisecondTimestamp();
+ int64_t capture_time_ms = clock_.TimeInMilliseconds();
EXPECT_EQ(0, send_bucket_->QueueInMs());
@@ -366,15 +391,15 @@
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kHighPriority,
ssrc, sequence_number++, capture_time_ms, 250, false));
- TickTime::AdvanceFakeClock(10000);
- int64_t second_capture_time_ms = TickTime::MillisecondTimestamp();
+ clock_.AdvanceTimeMilliseconds(10000);
+ int64_t second_capture_time_ms = clock_.TimeInMilliseconds();
// Expect everything to be queued.
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kLowPriority,
ssrc_low_priority, sequence_number++, second_capture_time_ms, 250,
false));
- EXPECT_EQ(TickTime::MillisecondTimestamp() - capture_time_ms,
+ EXPECT_EQ(clock_.TimeInMilliseconds() - capture_time_ms,
send_bucket_->QueueInMs());
// Expect no packet to come out while paused.
@@ -382,7 +407,7 @@
EXPECT_CALL(callback_, TimeToSendPacket(_, _, _, _)).Times(0);
for (int i = 0; i < 10; ++i) {
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
}
@@ -394,7 +419,7 @@
send_bucket_->Resume();
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
@@ -403,7 +428,7 @@
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_EQ(5, send_bucket_->TimeUntilNextProcess());
- TickTime::AdvanceFakeClock(5);
+ clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
EXPECT_EQ(0, send_bucket_->QueueInMs());
@@ -412,7 +437,7 @@
TEST_F(PacedSenderTest, ResendPacket) {
uint32_t ssrc = 12346;
uint16_t sequence_number = 1234;
- int64_t capture_time_ms = TickTime::MillisecondTimestamp();
+ int64_t capture_time_ms = clock_.TimeInMilliseconds();
EXPECT_EQ(0, send_bucket_->QueueInMs());
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority,
@@ -421,26 +446,26 @@
capture_time_ms,
250,
false));
- TickTime::AdvanceFakeClock(1);
+ clock_.AdvanceTimeMilliseconds(1);
EXPECT_FALSE(send_bucket_->SendPacket(PacedSender::kNormalPriority,
ssrc,
sequence_number + 1,
capture_time_ms + 1,
250,
false));
- TickTime::AdvanceFakeClock(9999);
- EXPECT_EQ(TickTime::MillisecondTimestamp() - capture_time_ms,
+ clock_.AdvanceTimeMilliseconds(9999);
+ EXPECT_EQ(clock_.TimeInMilliseconds() - capture_time_ms,
send_bucket_->QueueInMs());
// Fails to send first packet so only one call.
EXPECT_CALL(callback_, TimeToSendPacket(
ssrc, sequence_number, capture_time_ms, false))
.Times(1)
.WillOnce(Return(false));
- TickTime::AdvanceFakeClock(10000);
+ clock_.AdvanceTimeMilliseconds(10000);
send_bucket_->Process();
// Queue remains unchanged.
- EXPECT_EQ(TickTime::MillisecondTimestamp() - capture_time_ms,
+ EXPECT_EQ(clock_.TimeInMilliseconds() - capture_time_ms,
send_bucket_->QueueInMs());
// Fails to send second packet.
@@ -452,11 +477,11 @@
ssrc, sequence_number + 1, capture_time_ms + 1, false))
.Times(1)
.WillOnce(Return(false));
- TickTime::AdvanceFakeClock(10000);
+ clock_.AdvanceTimeMilliseconds(10000);
send_bucket_->Process();
// Queue is reduced by 1 packet.
- EXPECT_EQ(TickTime::MillisecondTimestamp() - capture_time_ms - 1,
+ EXPECT_EQ(clock_.TimeInMilliseconds() - capture_time_ms - 1,
send_bucket_->QueueInMs());
// Send second packet and queue becomes empty.
@@ -464,7 +489,7 @@
ssrc, sequence_number + 1, capture_time_ms + 1, false))
.Times(1)
.WillOnce(Return(true));
- TickTime::AdvanceFakeClock(10000);
+ clock_.AdvanceTimeMilliseconds(10000);
send_bucket_->Process();
EXPECT_EQ(0, send_bucket_->QueueInMs());
}
@@ -479,22 +504,23 @@
SendAndExpectPacket(PacedSender::kNormalPriority,
ssrc,
sequence_number++,
- TickTime::MillisecondTimestamp(),
+ clock_.TimeInMilliseconds(),
1200,
false);
}
- TickTime::AdvanceFakeClock(2001);
+ clock_.AdvanceTimeMilliseconds(2001);
SendAndExpectPacket(PacedSender::kNormalPriority,
ssrc,
sequence_number++,
- TickTime::MillisecondTimestamp(),
+ clock_.TimeInMilliseconds(),
1200,
false);
EXPECT_EQ(2001, send_bucket_->QueueInMs());
send_bucket_->Process();
EXPECT_EQ(0, send_bucket_->QueueInMs());
- TickTime::AdvanceFakeClock(31);
+ clock_.AdvanceTimeMilliseconds(31);
+
send_bucket_->Process();
}
@@ -507,11 +533,11 @@
SendAndExpectPacket(PacedSender::kNormalPriority,
ssrc,
sequence_number,
- TickTime::MillisecondTimestamp(),
+ clock_.TimeInMilliseconds(),
1200,
false);
- TickTime::AdvanceFakeClock(500);
+ clock_.AdvanceTimeMilliseconds(500);
EXPECT_EQ(500, send_bucket_->QueueInMs());
send_bucket_->Process();
EXPECT_EQ(0, send_bucket_->QueueInMs());
diff --git a/modules/remote_bitrate_estimator.target.darwin-arm.mk b/modules/remote_bitrate_estimator.target.darwin-arm.mk
index 1f500a5..f6eb2e0 100644
--- a/modules/remote_bitrate_estimator.target.darwin-arm.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,68 +267,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.darwin-arm64.mk b/modules/remote_bitrate_estimator.target.darwin-arm64.mk
index 24883ed..430b726 100644
--- a/modules/remote_bitrate_estimator.target.darwin-arm64.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,59 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.darwin-mips.mk b/modules/remote_bitrate_estimator.target.darwin-mips.mk
index 570dbb9..1774a9b 100644
--- a/modules/remote_bitrate_estimator.target.darwin-mips.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +245,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.darwin-mips64.mk b/modules/remote_bitrate_estimator.target.darwin-mips64.mk
new file mode 100644
index 0000000..1774a9b
--- /dev/null
+++ b/modules/remote_bitrate_estimator.target.darwin-mips64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/remote_bitrate_estimator/rate_statistics.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_remote_bitrate_estimator_gyp
+
+# Alias gyp target name.
+.PHONY: remote_bitrate_estimator
+remote_bitrate_estimator: third_party_webrtc_modules_remote_bitrate_estimator_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/remote_bitrate_estimator.target.darwin-x86.mk b/modules/remote_bitrate_estimator.target.darwin-x86.mk
index e148eab..accd972 100644
--- a/modules/remote_bitrate_estimator.target.darwin-x86.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.darwin-x86_64.mk b/modules/remote_bitrate_estimator.target.darwin-x86_64.mk
index f648df0..745a108 100644
--- a/modules/remote_bitrate_estimator.target.darwin-x86_64.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.linux-arm.mk b/modules/remote_bitrate_estimator.target.linux-arm.mk
index 1f500a5..f6eb2e0 100644
--- a/modules/remote_bitrate_estimator.target.linux-arm.mk
+++ b/modules/remote_bitrate_estimator.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,68 +267,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.linux-arm64.mk b/modules/remote_bitrate_estimator.target.linux-arm64.mk
index 24883ed..430b726 100644
--- a/modules/remote_bitrate_estimator.target.linux-arm64.mk
+++ b/modules/remote_bitrate_estimator.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,59 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.linux-mips.mk b/modules/remote_bitrate_estimator.target.linux-mips.mk
index 570dbb9..1774a9b 100644
--- a/modules/remote_bitrate_estimator.target.linux-mips.mk
+++ b/modules/remote_bitrate_estimator.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +245,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.linux-mips64.mk b/modules/remote_bitrate_estimator.target.linux-mips64.mk
new file mode 100644
index 0000000..1774a9b
--- /dev/null
+++ b/modules/remote_bitrate_estimator.target.linux-mips64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/remote_bitrate_estimator/rate_statistics.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_remote_bitrate_estimator_gyp
+
+# Alias gyp target name.
+.PHONY: remote_bitrate_estimator
+remote_bitrate_estimator: third_party_webrtc_modules_remote_bitrate_estimator_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/remote_bitrate_estimator.target.linux-x86.mk b/modules/remote_bitrate_estimator.target.linux-x86.mk
index e148eab..accd972 100644
--- a/modules/remote_bitrate_estimator.target.linux-x86.mk
+++ b/modules/remote_bitrate_estimator.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator.target.linux-x86_64.mk b/modules/remote_bitrate_estimator.target.linux-x86_64.mk
index f648df0..745a108 100644
--- a/modules/remote_bitrate_estimator.target.linux-x86_64.mk
+++ b/modules/remote_bitrate_estimator.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/BUILD.gn b/modules/remote_bitrate_estimator/BUILD.gn
new file mode 100644
index 0000000..36af77e
--- /dev/null
+++ b/modules/remote_bitrate_estimator/BUILD.gn
@@ -0,0 +1,25 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+source_set("remote_bitrate_estimator") {
+ sources = [
+ "overuse_detector.cc",
+ "overuse_detector.h",
+ "remote_bitrate_estimator_single_stream.cc",
+ "remote_rate_control.cc",
+ "remote_rate_control.h",
+ ]
+
+ configs += [ "../../:common_inherited_config"]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
diff --git a/modules/remote_bitrate_estimator/OWNERS b/modules/remote_bitrate_estimator/OWNERS
index eab2b8e..fd12dce 100644
--- a/modules/remote_bitrate_estimator/OWNERS
+++ b/modules/remote_bitrate_estimator/OWNERS
@@ -1,9 +1,11 @@
-pwestin@webrtc.org
stefan@webrtc.org
henrik.lundin@webrtc.org
mflodman@webrtc.org
asapersson@webrtc.org
+
# These are for the common case of adding or renaming files. If you're doing
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/remote_bitrate_estimator/bwe_simulations.cc b/modules/remote_bitrate_estimator/bwe_simulations.cc
index 6b208e4..142de87 100644
--- a/modules/remote_bitrate_estimator/bwe_simulations.cc
+++ b/modules/remote_bitrate_estimator/bwe_simulations.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test.h"
#include "webrtc/test/testsupport/fileutils.h"
@@ -96,6 +96,36 @@
RunFor(60 * 1000);
}
+TEST_P(BweSimulation, PacerChoke1000kbps500kbps1000kbps) {
+ VerboseLogging(true);
+ AdaptiveVideoSender source(0, NULL, 30, 300, 0, 0);
+ PacedVideoSender sender(this, 300, &source);
+ ChokeFilter filter(this);
+ RateCounterFilter counter(this, "receiver_input");
+ filter.SetCapacity(1000);
+ filter.SetMaxDelay(500);
+ RunFor(60 * 1000);
+ filter.SetCapacity(500);
+ RunFor(60 * 1000);
+ filter.SetCapacity(1000);
+ RunFor(60 * 1000);
+}
+
+TEST_P(BweSimulation, PacerChoke200kbps30kbps200kbps) {
+ VerboseLogging(true);
+ AdaptiveVideoSender source(0, NULL, 30, 300, 0, 0);
+ PacedVideoSender sender(this, 300, &source);
+ ChokeFilter filter(this);
+ RateCounterFilter counter(this, "receiver_input");
+ filter.SetCapacity(200);
+ filter.SetMaxDelay(500);
+ RunFor(60 * 1000);
+ filter.SetCapacity(30);
+ RunFor(60 * 1000);
+ filter.SetCapacity(200);
+ RunFor(60 * 1000);
+}
+
TEST_P(BweSimulation, Choke200kbps30kbps200kbps) {
VerboseLogging(true);
AdaptiveVideoSender sender(0, this, 30, 300, 0, 0);
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm.mk
index a8d0491..e031d4d 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -48,13 +46,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -69,6 +67,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +75,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +91,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,23 +137,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,13 +168,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -194,7 +196,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -211,12 +212,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -255,68 +259,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm64.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm64.mk
index 9fa8af4..00da75a 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm64.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +57,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -82,12 +80,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -122,21 +123,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -168,7 +170,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -185,12 +186,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -226,59 +230,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips.mk
index 2de4b44..011eea6 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -43,13 +41,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -64,6 +59,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +67,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,17 +83,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -130,23 +126,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -155,13 +152,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -183,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -200,17 +193,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -243,64 +237,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips64.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips64.mk
new file mode 100644
index 0000000..011eea6
--- /dev/null
+++ b/modules/remote_bitrate_estimator/rbe_components.target.darwin-mips64.mk
@@ -0,0 +1,271 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc \
+ third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc \
+ third_party/webrtc/modules/remote_bitrate_estimator/remote_rate_control.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
+
+# Alias gyp target name.
+.PHONY: rbe_components
+rbe_components: third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86.mk
index 61de417..d74760e 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +182,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +198,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -238,63 +242,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86_64.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86_64.mk
index 027635c..047d67e 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86_64.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,22 +128,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,7 +180,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -195,12 +196,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,63 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.linux-arm.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-arm.mk
index a8d0491..e031d4d 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.linux-arm.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -48,13 +46,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -69,6 +67,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +75,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +91,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,23 +137,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,13 +168,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -194,7 +196,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -211,12 +212,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -255,68 +259,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.linux-arm64.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-arm64.mk
index 9fa8af4..00da75a 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.linux-arm64.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +57,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -82,12 +80,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -122,21 +123,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -168,7 +170,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -185,12 +186,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -226,59 +230,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.linux-mips.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-mips.mk
index 2de4b44..011eea6 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.linux-mips.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -43,13 +41,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -64,6 +59,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +67,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,17 +83,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -130,23 +126,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -155,13 +152,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -183,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -200,17 +193,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -243,64 +237,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.linux-mips64.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-mips64.mk
new file mode 100644
index 0000000..011eea6
--- /dev/null
+++ b/modules/remote_bitrate_estimator/rbe_components.target.linux-mips64.mk
@@ -0,0 +1,271 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc \
+ third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc \
+ third_party/webrtc/modules/remote_bitrate_estimator/remote_rate_control.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
+
+# Alias gyp target name.
+.PHONY: rbe_components
+rbe_components: third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.linux-x86.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-x86.mk
index 61de417..d74760e 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.linux-x86.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -33,7 +32,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +182,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +198,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -238,63 +242,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/rbe_components.target.linux-x86_64.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-x86_64.mk
index 027635c..047d67e 100644
--- a/modules/remote_bitrate_estimator/rbe_components.target.linux-x86_64.mk
+++ b/modules/remote_bitrate_estimator/rbe_components.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_remote_bitrate_estimator_rbe_components_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -34,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,22 +128,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,7 +180,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -195,12 +196,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,63 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi b/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
index c2f1b3d..f290a34 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
@@ -56,8 +56,8 @@
},
'sources': [
'tools/rtp_to_text.cc',
- '<(webrtc_root)/modules/video_coding/main/test/rtp_file_reader.cc',
- '<(webrtc_root)/modules/video_coding/main/test/rtp_file_reader.h',
+ '<(webrtc_root)/test/rtp_file_reader.cc',
+ '<(webrtc_root)/test/rtp_file_reader.h',
], # source
},
{
@@ -79,8 +79,8 @@
},
'sources': [
'tools/bwe_rtp_play.cc',
- '<(webrtc_root)/modules/video_coding/main/test/rtp_file_reader.cc',
- '<(webrtc_root)/modules/video_coding/main/test/rtp_file_reader.h',
+ '<(webrtc_root)/test/rtp_file_reader.cc',
+ '<(webrtc_root)/test/rtp_file_reader.h',
], # source
},
], # targets
diff --git a/modules/remote_bitrate_estimator/test/bwe_test.cc b/modules/remote_bitrate_estimator/test/bwe_test.cc
index 90ce6a3..d4919e7 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_test.cc
@@ -76,11 +76,11 @@
}
}
- int64_t step_ms = estimator_->TimeUntilNextProcess();
+ int64_t step_ms = std::max(estimator_->TimeUntilNextProcess(), 0);
while ((clock_.TimeInMilliseconds() + step_ms) < packet_time_ms) {
clock_.AdvanceTimeMilliseconds(step_ms);
estimator_->Process();
- step_ms = estimator_->TimeUntilNextProcess();
+ step_ms = std::max(estimator_->TimeUntilNextProcess(), 0);
}
estimator_->IncomingPacket(packet_time_ms, packet.payload_size(),
packet.header());
@@ -195,13 +195,13 @@
if (queue_.empty()) {
return;
}
- Packets to_transfer;
Packets::iterator it = queue_.begin();
for (; it != queue_.end(); ++it) {
if (it->send_time_us() > end_of_batch_time_us) {
break;
}
}
+ Packets to_transfer;
to_transfer.splice(to_transfer.begin(), queue_, queue_.begin(), it);
batch->merge(to_transfer);
}
diff --git a/modules/remote_bitrate_estimator/test/bwe_test.h b/modules/remote_bitrate_estimator/test/bwe_test.h
index 4959065..d02e064 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test.h
+++ b/modules/remote_bitrate_estimator/test/bwe_test.h
@@ -11,7 +11,7 @@
#include <map>
#include <string>
#include <vector>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h"
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_framework.cc b/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
index b3cd7db..194db4d 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
@@ -154,6 +154,11 @@
send_time_us_ = send_time_us;
}
+void Packet::SetAbsSendTimeMs(int64_t abs_send_time_ms) {
+ header_.extension.absoluteSendTime = ((static_cast<int64_t>(abs_send_time_ms *
+ (1 << 18)) + 500) / 1000) & 0x00fffffful;
+}
+
bool IsTimeSorted(const Packets& packets) {
PacketsConstIt last_it = packets.begin();
for (PacketsConstIt it = last_it; it != packets.end(); ++it) {
@@ -566,12 +571,8 @@
now_ms_ += time_ms;
Packets new_packets;
while (now_ms_ >= next_frame_ms_) {
- prototype_header_.sequenceNumber++;
prototype_header_.timestamp = kTimestampBase +
static_cast<uint32_t>(next_frame_ms_ * 90.0);
- prototype_header_.extension.absoluteSendTime = (kTimestampBase +
- ((static_cast<int64_t>(next_frame_ms_ * (1 << 18)) + 500) / 1000)) &
- 0x00fffffful;
prototype_header_.extension.transmissionTimeOffset = 0;
// Generate new packets for this frame, all with the same timestamp,
@@ -581,9 +582,11 @@
int64_t send_time_us = next_frame_ms_ * 1000.0;
uint32_t payload_size = frame_size_bytes_;
while (payload_size > 0) {
+ ++prototype_header_.sequenceNumber;
uint32_t size = std::min(kMaxPayloadSizeBytes, payload_size);
new_packets.push_back(Packet(flow_ids()[0], send_time_us, size,
prototype_header_));
+ new_packets.back().SetAbsSendTimeMs(next_frame_ms_);
payload_size -= size;
}
@@ -604,6 +607,98 @@
bytes_per_second_ = feedback.estimated_bps / 8;
frame_size_bytes_ = (bytes_per_second_ * frame_period_ms_ + 500) / 1000;
}
+
+PacedVideoSender::PacedVideoSender(PacketProcessorListener* listener,
+ uint32_t kbps,
+ AdaptiveVideoSender* source)
+ // It is important that the first_frame_offset and the initial time of
+ // clock_ are both zero, otherwise we can't have absolute time in this
+ // class.
+ : PacketSender(listener, source->flow_ids()),
+ clock_(0),
+ start_of_run_ms_(0),
+ pacer_(&clock_, this, PacedSender::kDefaultPaceMultiplier * kbps, 0),
+ source_(source) {}
+
+void PacedVideoSender::RunFor(int64_t time_ms, Packets* in_out) {
+ start_of_run_ms_ = clock_.TimeInMilliseconds();
+ Packets generated_packets;
+ source_->RunFor(time_ms, &generated_packets);
+ Packets::iterator it = generated_packets.begin();
+ // Run process periodically to allow the packets to be paced out.
+ const int kProcessIntervalMs = 10;
+ for (int64_t current_time = 0; current_time < time_ms;
+ current_time += kProcessIntervalMs) {
+ int64_t end_of_interval_us =
+ 1000 * (clock_.TimeInMilliseconds() + kProcessIntervalMs);
+ while (it != generated_packets.end() &&
+ end_of_interval_us >= it->send_time_us()) {
+ // Time to send next packet to pacer.
+ pacer_.SendPacket(PacedSender::kNormalPriority,
+ it->header().ssrc,
+ it->header().sequenceNumber,
+ (it->send_time_us() + 500) / 1000,
+ it->payload_size(),
+ false);
+ pacer_queue_.push_back(*it);
+ const size_t kMaxPacerQueueSize = 1000;
+ if (pacer_queue_.size() > kMaxPacerQueueSize) {
+ pacer_queue_.pop_front();
+ }
+ ++it;
+ }
+ clock_.AdvanceTimeMilliseconds(kProcessIntervalMs);
+ pacer_.Process();
+ }
+ QueuePackets(in_out, (start_of_run_ms_ + time_ms) * 1000);
+}
+
+void PacedVideoSender::QueuePackets(Packets* batch,
+ int64_t end_of_batch_time_us) {
+ queue_.merge(*batch);
+ if (queue_.empty()) {
+ return;
+ }
+ Packets::iterator it = queue_.begin();
+ for (; it != queue_.end(); ++it) {
+ if (it->send_time_us() > end_of_batch_time_us) {
+ break;
+ }
+ }
+ Packets to_transfer;
+ to_transfer.splice(to_transfer.begin(), queue_, queue_.begin(), it);
+ batch->merge(to_transfer);
+}
+
+void PacedVideoSender::GiveFeedback(const PacketSender::Feedback& feedback) {
+ source_->GiveFeedback(feedback);
+ pacer_.UpdateBitrate(
+ PacedSender::kDefaultPaceMultiplier * feedback.estimated_bps / 1000, 0);
+}
+
+bool PacedVideoSender::TimeToSendPacket(uint32_t ssrc,
+ uint16_t sequence_number,
+ int64_t capture_time_ms,
+ bool retransmission) {
+ for (Packets::iterator it = pacer_queue_.begin(); it != pacer_queue_.end();
+ ++it) {
+ if (it->header().sequenceNumber == sequence_number) {
+ int64_t pace_out_time_ms = clock_.TimeInMilliseconds();
+ // Make sure a packet is never paced out earlier than when it was put into
+ // the pacer.
+ assert(1000 * pace_out_time_ms >= it->send_time_us());
+ it->SetAbsSendTimeMs(pace_out_time_ms);
+ it->set_send_time_us(1000 * pace_out_time_ms);
+ queue_.push_back(*it);
+ return true;
+ }
+ }
+ return false;
+}
+
+int PacedVideoSender::TimeToSendPadding(int bytes) {
+ return 0;
+}
} // namespace bwe
} // namespace testing
} // namespace webrtc
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_framework.h b/modules/remote_bitrate_estimator/test/bwe_test_framework.h
index 8af07f9..0ab3b5f 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_framework.h
+++ b/modules/remote_bitrate_estimator/test/bwe_test_framework.h
@@ -22,7 +22,9 @@
#include <vector>
#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/pacing/include/paced_sender.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
+#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@@ -161,6 +163,7 @@
int64_t creation_time_us() const { return creation_time_us_; }
void set_send_time_us(int64_t send_time_us);
int64_t send_time_us() const { return send_time_us_; }
+ void SetAbsSendTimeMs(int64_t abs_send_time_ms);
uint32_t payload_size() const { return payload_size_; }
const RTPHeader& header() const { return header_; }
@@ -391,9 +394,9 @@
uint32_t max_payload_size_bytes() const { return kMaxPayloadSizeBytes; }
uint32_t bytes_per_second() const { return bytes_per_second_; }
- virtual uint32_t GetCapacityKbps() const;
+ virtual uint32_t GetCapacityKbps() const OVERRIDE;
- virtual void RunFor(int64_t time_ms, Packets* in_out);
+ virtual void RunFor(int64_t time_ms, Packets* in_out) OVERRIDE;
protected:
const uint32_t kMaxPayloadSizeBytes;
@@ -417,12 +420,43 @@
float first_frame_offset);
virtual ~AdaptiveVideoSender() {}
- virtual int GetFeedbackIntervalMs() const { return 100; }
- virtual void GiveFeedback(const Feedback& feedback);
+ virtual int GetFeedbackIntervalMs() const OVERRIDE { return 100; }
+ virtual void GiveFeedback(const Feedback& feedback) OVERRIDE;
-private:
+ private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AdaptiveVideoSender);
};
+
+class PacedVideoSender : public PacketSender, public PacedSender::Callback {
+ public:
+ PacedVideoSender(PacketProcessorListener* listener,
+ uint32_t kbps, AdaptiveVideoSender* source);
+ virtual ~PacedVideoSender() {}
+
+ virtual int GetFeedbackIntervalMs() const OVERRIDE { return 100; }
+ virtual void GiveFeedback(const Feedback& feedback) OVERRIDE;
+ virtual void RunFor(int64_t time_ms, Packets* in_out) OVERRIDE;
+
+ // Implements PacedSender::Callback.
+ virtual bool TimeToSendPacket(uint32_t ssrc,
+ uint16_t sequence_number,
+ int64_t capture_time_ms,
+ bool retransmission) OVERRIDE;
+ virtual int TimeToSendPadding(int bytes) OVERRIDE;
+
+ private:
+ void QueuePackets(Packets* batch, int64_t end_of_batch_time_us);
+
+ static const int64_t kInitialTimeMs = 0;
+ SimulatedClock clock_;
+ int64_t start_of_run_ms_;
+ PacedSender pacer_;
+ Packets pacer_queue_;
+ Packets queue_;
+ AdaptiveVideoSender* source_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PacedVideoSender);
+};
} // namespace bwe
} // namespace testing
} // namespace webrtc
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc b/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
index ec32926..51c1dc2 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
@@ -12,7 +12,7 @@
#include <numeric>
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/test/testsupport/fileutils.h"
@@ -500,7 +500,7 @@
TestJitterFilter(1031);
}
-static void TestReorderFilter(uint32_t reorder_percent, uint32_t near) {
+static void TestReorderFilter(uint32_t reorder_percent, uint32_t near_value) {
const uint32_t kPacketCount = 10000;
// Generate packets with 10 ms interval.
@@ -533,7 +533,8 @@
// Because reordering is random, we allow a threshold when comparing. The
// maximum distance a packet can be moved is PacketCount - 1.
- EXPECT_NEAR(((kPacketCount - 1) * reorder_percent) / 100, distance, near);
+ EXPECT_NEAR(
+ ((kPacketCount - 1) * reorder_percent) / 100, distance, near_value);
}
TEST(BweTestFramework_ReorderFilterTest, Reorder0) {
diff --git a/modules/remote_bitrate_estimator/tools/bwe_rtp.cc b/modules/remote_bitrate_estimator/tools/bwe_rtp.cc
index 40fa6df..e71c75c 100644
--- a/modules/remote_bitrate_estimator/tools/bwe_rtp.cc
+++ b/modules/remote_bitrate_estimator/tools/bwe_rtp.cc
@@ -16,10 +16,7 @@
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
-#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h"
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
-
-using webrtc::rtpplayer::RtpPacketSourceInterface;
+#include "webrtc/test/rtp_file_reader.h"
const int kMinBitrateBps = 30000;
@@ -27,11 +24,12 @@
char** argv,
webrtc::Clock* clock,
webrtc::RemoteBitrateObserver* observer,
- RtpPacketSourceInterface** rtp_reader,
+ webrtc::test::RtpFileReader** rtp_reader,
webrtc::RtpHeaderParser** parser,
webrtc::RemoteBitrateEstimator** estimator,
std::string* estimator_used) {
- *rtp_reader = webrtc::rtpplayer::CreateRtpFileReader(argv[3]);
+ *rtp_reader = webrtc::test::RtpFileReader::Create(
+ webrtc::test::RtpFileReader::kRtpDump, argv[3]);
if (!*rtp_reader) {
fprintf(stderr, "Cannot open input file %s\n", argv[3]);
return false;
diff --git a/modules/remote_bitrate_estimator/tools/bwe_rtp.h b/modules/remote_bitrate_estimator/tools/bwe_rtp.h
index 714457d..2d12a80 100644
--- a/modules/remote_bitrate_estimator/tools/bwe_rtp.h
+++ b/modules/remote_bitrate_estimator/tools/bwe_rtp.h
@@ -18,8 +18,8 @@
class RemoteBitrateEstimator;
class RemoteBitrateObserver;
class RtpHeaderParser;
-namespace rtpplayer {
-class RtpPacketSourceInterface;
+namespace test {
+class RtpFileReader;
}
}
@@ -28,7 +28,7 @@
char** argv,
webrtc::Clock* clock,
webrtc::RemoteBitrateObserver* observer,
- webrtc::rtpplayer::RtpPacketSourceInterface** rtp_reader,
+ webrtc::test::RtpFileReader** rtp_reader,
webrtc::RtpHeaderParser** parser,
webrtc::RemoteBitrateEstimator** estimator,
std::string* estimator_used);
diff --git a/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc b/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
index 9ea3f08..eb224f2 100644
--- a/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
+++ b/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
@@ -14,11 +14,8 @@
#include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
-#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h"
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-
-using webrtc::rtpplayer::RtpPacketSourceInterface;
+#include "webrtc/test/rtp_file_reader.h"
class Observer : public webrtc::RemoteBitrateObserver {
public:
@@ -49,7 +46,7 @@
"<extension id> is the id associated with the extension.\n");
return -1;
}
- RtpPacketSourceInterface* reader;
+ webrtc::test::RtpFileReader* reader;
webrtc::RemoteBitrateEstimator* estimator;
webrtc::RtpHeaderParser* parser;
std::string estimator_used;
@@ -59,7 +56,7 @@
&parser, &estimator, &estimator_used)) {
return -1;
}
- webrtc::scoped_ptr<RtpPacketSourceInterface> rtp_reader(reader);
+ webrtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
webrtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
webrtc::scoped_ptr<webrtc::RemoteBitrateEstimator> rbe(estimator);
@@ -68,30 +65,25 @@
int64_t next_process_time_ms = 0;
int64_t next_rtp_time_ms = 0;
int64_t first_rtp_time_ms = -1;
- const uint32_t kMaxPacketSize = 1500;
- uint8_t packet_buffer[kMaxPacketSize];
- uint8_t* packet = packet_buffer;
int non_zero_abs_send_time = 0;
int non_zero_ts_offsets = 0;
while (true) {
- uint32_t next_rtp_time;
if (next_rtp_time_ms <= clock.TimeInMilliseconds()) {
- uint32_t packet_length = kMaxPacketSize;
- if (rtp_reader->NextPacket(packet, &packet_length,
- &next_rtp_time) == -1) {
+ webrtc::test::RtpFileReader::Packet packet;
+ if (!rtp_reader->NextPacket(&packet)) {
break;
}
if (first_rtp_time_ms == -1)
- first_rtp_time_ms = next_rtp_time;
- next_rtp_time_ms = next_rtp_time - first_rtp_time_ms;
+ first_rtp_time_ms = packet.time_ms;
+ packet.time_ms = packet.time_ms - first_rtp_time_ms;
webrtc::RTPHeader header;
- parser->Parse(packet, packet_length, &header);
+ parser->Parse(packet.data, packet.length, &header);
if (header.extension.absoluteSendTime != 0)
++non_zero_abs_send_time;
if (header.extension.transmissionTimeOffset != 0)
++non_zero_ts_offsets;
rbe->IncomingPacket(clock.TimeInMilliseconds(),
- packet_length - header.headerLength,
+ static_cast<int>(packet.length - header.headerLength),
header);
++packet_counter;
}
diff --git a/modules/remote_bitrate_estimator/tools/rtp_to_text.cc b/modules/remote_bitrate_estimator/tools/rtp_to_text.cc
index af4a4d4..a85bca4 100644
--- a/modules/remote_bitrate_estimator/tools/rtp_to_text.cc
+++ b/modules/remote_bitrate_estimator/tools/rtp_to_text.cc
@@ -14,11 +14,8 @@
#include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
-#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h"
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-
-using webrtc::rtpplayer::RtpPacketSourceInterface;
+#include "webrtc/test/rtp_file_reader.h"
int main(int argc, char** argv) {
if (argc < 4) {
@@ -32,43 +29,44 @@
" output.\n");
return -1;
}
- RtpPacketSourceInterface* reader;
+ webrtc::test::RtpFileReader* reader;
webrtc::RtpHeaderParser* parser;
if (!ParseArgsAndSetupEstimator(argc, argv, NULL, NULL, &reader, &parser,
NULL, NULL)) {
return -1;
}
bool arrival_time_only = (argc >= 5 && strncmp(argv[4], "-t", 2) == 0);
- webrtc::scoped_ptr<RtpPacketSourceInterface> rtp_reader(reader);
+ webrtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
webrtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
fprintf(stdout, "seqnum timestamp ts_offset abs_sendtime recvtime "
"markerbit ssrc size\n");
int packet_counter = 0;
- static const uint32_t kMaxPacketSize = 1500;
- uint8_t packet_buffer[kMaxPacketSize];
- uint8_t* packet = packet_buffer;
- uint32_t packet_length = kMaxPacketSize;
- uint32_t time_ms = 0;
int non_zero_abs_send_time = 0;
int non_zero_ts_offsets = 0;
- while (rtp_reader->NextPacket(packet, &packet_length, &time_ms) == 0) {
+ webrtc::test::RtpFileReader::Packet packet;
+ while (rtp_reader->NextPacket(&packet)) {
webrtc::RTPHeader header;
- parser->Parse(packet, packet_length, &header);
+ parser->Parse(packet.data, packet.length, &header);
if (header.extension.absoluteSendTime != 0)
++non_zero_abs_send_time;
if (header.extension.transmissionTimeOffset != 0)
++non_zero_ts_offsets;
if (arrival_time_only) {
std::stringstream ss;
- ss << static_cast<int64_t>(time_ms) * 1000000;
+ ss << static_cast<int64_t>(packet.time_ms) * 1000000;
fprintf(stdout, "%s\n", ss.str().c_str());
} else {
- fprintf(stdout, "%u %u %d %u %u %d %u %u\n", header.sequenceNumber,
- header.timestamp, header.extension.transmissionTimeOffset,
- header.extension.absoluteSendTime, time_ms, header.markerBit,
- header.ssrc, packet_length);
+ fprintf(stdout,
+ "%u %u %d %u %u %d %u %d\n",
+ header.sequenceNumber,
+ header.timestamp,
+ header.extension.transmissionTimeOffset,
+ header.extension.absoluteSendTime,
+ packet.time_ms,
+ header.markerBit,
+ header.ssrc,
+ static_cast<int>(packet.length));
}
- packet_length = kMaxPacketSize;
++packet_counter;
}
fprintf(stderr, "Parsed %d packets\n", packet_counter);
diff --git a/modules/rtp_rtcp.target.darwin-arm.mk b/modules/rtp_rtcp.target.darwin-arm.mk
index 53076d9..9698ce1 100644
--- a/modules/rtp_rtcp.target.darwin-arm.mk
+++ b/modules/rtp_rtcp.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -61,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -79,13 +80,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -100,6 +101,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -107,7 +109,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -124,12 +125,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,23 +172,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +207,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +235,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +251,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -292,68 +299,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.darwin-arm64.mk b/modules/rtp_rtcp.target.darwin-arm64.mk
index 21cdcee..7b01e1f 100644
--- a/modules/rtp_rtcp.target.darwin-arm64.mk
+++ b/modules/rtp_rtcp.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -60,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,13 +91,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,21 +158,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +209,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +225,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,59 +270,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.darwin-mips.mk b/modules/rtp_rtcp.target.darwin-mips.mk
index 317986e..466d157 100644
--- a/modules/rtp_rtcp.target.darwin-mips.mk
+++ b/modules/rtp_rtcp.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -61,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,18 +71,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -120,17 +117,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -163,23 +161,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,18 +187,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -221,7 +216,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -238,17 +232,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -282,64 +277,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.darwin-mips64.mk b/modules/rtp_rtcp.target.darwin-mips64.mk
new file mode 100644
index 0000000..466d157
--- /dev/null
+++ b/modules/rtp_rtcp.target.darwin-mips64.mk
@@ -0,0 +1,311 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/rtp_rtcp/source/bitrate.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_sender.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_utility.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/ssrc_database.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/tmmbr_help.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/producer_fec.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_rtp_rtcp_gyp
+
+# Alias gyp target name.
+.PHONY: rtp_rtcp
+rtp_rtcp: third_party_webrtc_modules_rtp_rtcp_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/rtp_rtcp.target.darwin-x86.mk b/modules/rtp_rtcp.target.darwin-x86.mk
index 89133ed..8c145c8 100644
--- a/modules/rtp_rtcp.target.darwin-x86.mk
+++ b/modules/rtp_rtcp.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -60,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -95,6 +96,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +104,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +120,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,21 +164,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +221,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +237,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -275,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.darwin-x86_64.mk b/modules/rtp_rtcp.target.darwin-x86_64.mk
index 390e062..031cab3 100644
--- a/modules/rtp_rtcp.target.darwin-x86_64.mk
+++ b/modules/rtp_rtcp.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -61,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -94,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -101,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -118,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,22 +163,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +219,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +235,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -273,63 +280,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.linux-arm.mk b/modules/rtp_rtcp.target.linux-arm.mk
index 53076d9..9698ce1 100644
--- a/modules/rtp_rtcp.target.linux-arm.mk
+++ b/modules/rtp_rtcp.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -61,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -79,13 +80,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -100,6 +101,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -107,7 +109,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -124,12 +125,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -168,23 +172,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +207,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +235,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +251,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -292,68 +299,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.linux-arm64.mk b/modules/rtp_rtcp.target.linux-arm64.mk
index 21cdcee..7b01e1f 100644
--- a/modules/rtp_rtcp.target.linux-arm64.mk
+++ b/modules/rtp_rtcp.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -60,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,13 +91,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +114,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,21 +158,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +209,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +225,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,59 +270,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.linux-mips.mk b/modules/rtp_rtcp.target.linux-mips.mk
index 317986e..466d157 100644
--- a/modules/rtp_rtcp.target.linux-mips.mk
+++ b/modules/rtp_rtcp.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -61,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,18 +71,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -120,17 +117,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -163,23 +161,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,18 +187,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -221,7 +216,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -238,17 +232,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -282,64 +277,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.linux-mips64.mk b/modules/rtp_rtcp.target.linux-mips64.mk
new file mode 100644
index 0000000..466d157
--- /dev/null
+++ b/modules/rtp_rtcp.target.linux-mips64.mk
@@ -0,0 +1,311 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/rtp_rtcp/source/bitrate.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_sender.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_utility.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/ssrc_database.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/tmmbr_help.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/producer_fec.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_rtp_rtcp_gyp
+
+# Alias gyp target name.
+.PHONY: rtp_rtcp
+rtp_rtcp: third_party_webrtc_modules_rtp_rtcp_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/rtp_rtcp.target.linux-x86.mk b/modules/rtp_rtcp.target.linux-x86.mk
index 89133ed..8c145c8 100644
--- a/modules/rtp_rtcp.target.linux-x86.mk
+++ b/modules/rtp_rtcp.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -60,7 +62,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -95,6 +96,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +104,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +120,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -160,21 +164,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +221,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +237,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -275,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp.target.linux-x86_64.mk b/modules/rtp_rtcp.target.linux-x86_64.mk
index 390e062..031cab3 100644
--- a/modules/rtp_rtcp.target.linux-x86_64.mk
+++ b/modules/rtp_rtcp.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_rtp_rtcp_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -52,7 +51,10 @@
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc \
third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc \
+ third_party/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc \
third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.cc
@@ -61,7 +63,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -94,6 +95,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -101,7 +103,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -118,12 +119,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,22 +163,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +219,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +235,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -273,63 +280,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
new file mode 100644
index 0000000..2ee1a8f
--- /dev/null
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -0,0 +1,115 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+source_set("rtp_rtcp") {
+ sources = [
+ # Common
+ "interface/fec_receiver.h",
+ "interface/receive_statistics.h",
+ "interface/remote_ntp_time_estimator.h",
+ "interface/rtp_header_parser.h",
+ "interface/rtp_payload_registry.h",
+ "interface/rtp_receiver.h",
+ "interface/rtp_rtcp.h",
+ "interface/rtp_rtcp_defines.h",
+ "source/bitrate.cc",
+ "source/bitrate.h",
+ "source/byte_io.h",
+ "source/fec_receiver_impl.cc",
+ "source/fec_receiver_impl.h",
+ "source/receive_statistics_impl.cc",
+ "source/receive_statistics_impl.h",
+ "source/remote_ntp_time_estimator.cc",
+ "source/rtp_header_parser.cc",
+ "source/rtp_rtcp_config.h",
+ "source/rtp_rtcp_impl.cc",
+ "source/rtp_rtcp_impl.h",
+ "source/rtcp_packet.cc",
+ "source/rtcp_packet.h",
+ "source/rtcp_receiver.cc",
+ "source/rtcp_receiver.h",
+ "source/rtcp_receiver_help.cc",
+ "source/rtcp_receiver_help.h",
+ "source/rtcp_sender.cc",
+ "source/rtcp_sender.h",
+ "source/rtcp_utility.cc",
+ "source/rtcp_utility.h",
+ "source/rtp_header_extension.cc",
+ "source/rtp_header_extension.h",
+ "source/rtp_receiver_impl.cc",
+ "source/rtp_receiver_impl.h",
+ "source/rtp_sender.cc",
+ "source/rtp_sender.h",
+ "source/rtp_utility.cc",
+ "source/rtp_utility.h",
+ "source/ssrc_database.cc",
+ "source/ssrc_database.h",
+ "source/tmmbr_help.cc",
+ "source/tmmbr_help.h",
+ # Audio Files
+ "source/dtmf_queue.cc",
+ "source/dtmf_queue.h",
+ "source/rtp_receiver_audio.cc",
+ "source/rtp_receiver_audio.h",
+ "source/rtp_sender_audio.cc",
+ "source/rtp_sender_audio.h",
+ # Video Files
+ "source/fec_private_tables_random.h",
+ "source/fec_private_tables_bursty.h",
+ "source/forward_error_correction.cc",
+ "source/forward_error_correction.h",
+ "source/forward_error_correction_internal.cc",
+ "source/forward_error_correction_internal.h",
+ "source/producer_fec.cc",
+ "source/producer_fec.h",
+ "source/rtp_packet_history.cc",
+ "source/rtp_packet_history.h",
+ "source/rtp_payload_registry.cc",
+ "source/rtp_receiver_strategy.cc",
+ "source/rtp_receiver_strategy.h",
+ "source/rtp_receiver_video.cc",
+ "source/rtp_receiver_video.h",
+ "source/rtp_sender_video.cc",
+ "source/rtp_sender_video.h",
+ "source/video_codec_information.h",
+ "source/rtp_format.cc",
+ "source/rtp_format.h",
+ "source/rtp_format_h264.cc",
+ "source/rtp_format_h264.h",
+ "source/rtp_format_vp8.cc",
+ "source/rtp_format_vp8.h",
+ "source/rtp_format_video_generic.cc",
+ "source/rtp_format_video_generic.h",
+ "source/vp8_partition_aggregator.cc",
+ "source/vp8_partition_aggregator.h",
+ # Mocks
+ "mocks/mock_rtp_rtcp.h",
+ "source/mock/mock_rtp_payload_strategy.h",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ "../../system_wrappers",
+ "../pacing",
+ "../remote_bitrate_estimator",
+ ]
+
+ if (is_win) {
+ cflags = [
+ # TODO(jschuh): Bug 1348: fix this warning.
+ "/wd4267", # size_t to int truncations
+ ]
+ }
+}
diff --git a/modules/rtp_rtcp/OWNERS b/modules/rtp_rtcp/OWNERS
index c968564..2b08b6b 100644
--- a/modules/rtp_rtcp/OWNERS
+++ b/modules/rtp_rtcp/OWNERS
@@ -1,5 +1,6 @@
-pwestin@webrtc.org
stefan@webrtc.org
henrik.lundin@webrtc.org
mflodman@webrtc.org
-asapersson@webrtc.org
\ No newline at end of file
+asapersson@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/rtp_rtcp/interface/rtp_header_parser.h b/modules/rtp_rtcp/interface/rtp_header_parser.h
index a13f5b8..2809996 100644
--- a/modules/rtp_rtcp/interface/rtp_header_parser.h
+++ b/modules/rtp_rtcp/interface/rtp_header_parser.h
@@ -23,13 +23,14 @@
virtual ~RtpHeaderParser() {}
// Returns true if the packet is an RTCP packet, false otherwise.
- static bool IsRtcp(const uint8_t* packet, int length);
+ static bool IsRtcp(const uint8_t* packet, size_t length);
// Parses the packet and stores the parsed packet in |header|. Returns true on
// success, false otherwise.
// This method is thread-safe in the sense that it can parse multiple packets
// at once.
- virtual bool Parse(const uint8_t* packet, int length,
+ virtual bool Parse(const uint8_t* packet,
+ size_t length,
RTPHeader* header) const = 0;
// Registers an RTP header extension and binds it to |id|.
diff --git a/modules/rtp_rtcp/interface/rtp_payload_registry.h b/modules/rtp_rtcp/interface/rtp_payload_registry.h
index 965f4b0..327ea16 100644
--- a/modules/rtp_rtcp/interface/rtp_payload_registry.h
+++ b/modules/rtp_rtcp/interface/rtp_payload_registry.h
@@ -25,17 +25,15 @@
virtual bool CodecsMustBeUnique() const = 0;
- virtual bool PayloadIsCompatible(
- const ModuleRTPUtility::Payload& payload,
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate) const = 0;
+ virtual bool PayloadIsCompatible(const RtpUtility::Payload& payload,
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate) const = 0;
- virtual void UpdatePayloadRate(
- ModuleRTPUtility::Payload* payload,
- const uint32_t rate) const = 0;
+ virtual void UpdatePayloadRate(RtpUtility::Payload* payload,
+ const uint32_t rate) const = 0;
- virtual ModuleRTPUtility::Payload* CreatePayloadType(
+ virtual RtpUtility::Payload* CreatePayloadType(
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const int8_t payloadType,
const uint32_t frequency,
@@ -43,7 +41,7 @@
const uint32_t rate) const = 0;
virtual int GetPayloadTypeFrequency(
- const ModuleRTPUtility::Payload& payload) const = 0;
+ const RtpUtility::Payload& payload) const = 0;
static RTPPayloadStrategy* CreateStrategy(const bool handling_audio);
@@ -99,9 +97,8 @@
int GetPayloadTypeFrequency(uint8_t payload_type) const;
- bool PayloadTypeToPayload(
- const uint8_t payload_type,
- ModuleRTPUtility::Payload*& payload) const;
+ bool PayloadTypeToPayload(const uint8_t payload_type,
+ RtpUtility::Payload*& payload) const;
void ResetLastReceivedPayloadTypes() {
CriticalSectionScoped cs(crit_sect_.get());
@@ -151,7 +148,7 @@
bool IsRtxInternal(const RTPHeader& header) const;
scoped_ptr<CriticalSectionWrapper> crit_sect_;
- ModuleRTPUtility::PayloadTypeMap payload_type_map_;
+ RtpUtility::PayloadTypeMap payload_type_map_;
scoped_ptr<RTPPayloadStrategy> rtp_payload_strategy_;
int8_t red_payload_type_;
int8_t ulpfec_payload_type_;
diff --git a/modules/rtp_rtcp/interface/rtp_rtcp.h b/modules/rtp_rtcp/interface/rtp_rtcp.h
index 95c565f..7b0a4f8 100644
--- a/modules/rtp_rtcp/interface/rtp_rtcp.h
+++ b/modules/rtp_rtcp/interface/rtp_rtcp.h
@@ -47,8 +47,8 @@
* intra_frame_callback - Called when the receiver request a intra frame.
* bandwidth_callback - Called when we receive a changed estimate from
* the receiver of out stream.
- * audio_messages - Telehone events. May not be NULL; default callback
- * will do nothing.
+ * audio_messages - Telephone events. May not be NULL; default
+ * callback will do nothing.
* remote_bitrate_estimator - Estimates the bandwidth available for a set of
* streams from the same client.
* paced_sender - Spread any bursts of packets into smaller
@@ -67,6 +67,9 @@
RtpAudioFeedback* audio_messages;
RemoteBitrateEstimator* remote_bitrate_estimator;
PacedSender* paced_sender;
+ BitrateStatisticsObserver* send_bitrate_observer;
+ FrameCountObserver* send_frame_count_observer;
+ SendSideDelayObserver* send_side_delay_observer;
};
/*
@@ -203,6 +206,10 @@
*/
virtual int32_t SetSequenceNumber(const uint16_t seq) = 0;
+ virtual void SetRtpStateForSsrc(uint32_t ssrc,
+ const RtpState& rtp_state) = 0;
+ virtual bool GetRtpStateForSsrc(uint32_t ssrc, RtpState* rtp_state) = 0;
+
/*
* Get SSRC
*/
@@ -305,13 +312,6 @@
uint32_t* nackRate) const = 0;
/*
- * Called on any new send bitrate estimate.
- */
- virtual void RegisterVideoBitrateObserver(
- BitrateStatisticsObserver* observer) = 0;
- virtual BitrateStatisticsObserver* GetVideoBitrateObserver() const = 0;
-
- /*
* Used by the codec module to deliver a video or audio frame for
* packetization.
*
@@ -342,10 +342,6 @@
virtual int TimeToSendPadding(int bytes) = 0;
- virtual void RegisterSendFrameCountObserver(
- FrameCountObserver* observer) = 0;
- virtual FrameCountObserver* GetSendFrameCountObserver() const = 0;
-
virtual bool GetSendSideDelay(int* avg_send_delay_ms,
int* max_send_delay_ms) const = 0;
@@ -383,13 +379,6 @@
virtual int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]) = 0;
/*
- * Get RTCP CName (i.e unique identifier)
- *
- * return -1 on failure else 0
- */
- virtual int32_t CNAME(char cName[RTCP_CNAME_SIZE]) = 0;
-
- /*
* Get remote CName
*
* return -1 on failure else 0
diff --git a/modules/rtp_rtcp/interface/rtp_rtcp_defines.h b/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
index 6f99f93..2d6b272 100644
--- a/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
+++ b/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
@@ -63,6 +63,11 @@
kRtpAlive = 2
};
+enum ProtectionType {
+ kUnprotectedPacket,
+ kProtectedPacket
+};
+
enum StorageType {
kDontStore,
kDontRetransmit,
@@ -192,6 +197,22 @@
typedef std::list<RTCPReportBlock> ReportBlockList;
+struct RtpState {
+ RtpState()
+ : sequence_number(0),
+ start_timestamp(0),
+ timestamp(0),
+ capture_time_ms(-1),
+ last_timestamp_time_ms(-1),
+ media_has_been_sent(false) {}
+ uint16_t sequence_number;
+ uint32_t start_timestamp;
+ uint32_t timestamp;
+ int64_t capture_time_ms;
+ int64_t last_timestamp_time_ms;
+ bool media_has_been_sent;
+};
+
class RtpData
{
public:
@@ -339,7 +360,7 @@
}
virtual bool OnRecoveredPacket(const uint8_t* packet,
- int packet_length) {
+ int packet_length) OVERRIDE {
return true;
}
};
diff --git a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
index 03156c7..2caa631 100644
--- a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
+++ b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
@@ -19,6 +19,17 @@
namespace webrtc {
+class MockRtpData : public RtpData {
+ public:
+ MOCK_METHOD3(OnReceivedPayloadData,
+ int32_t(const uint8_t* payloadData,
+ const uint16_t payloadSize,
+ const WebRtcRTPHeader* rtpHeader));
+
+ MOCK_METHOD2(OnRecoveredPacket,
+ bool(const uint8_t* packet, int packet_length));
+};
+
class MockRtpRtcp : public RtpRtcp {
public:
MOCK_METHOD1(ChangeUniqueId,
@@ -74,6 +85,9 @@
uint16_t());
MOCK_METHOD1(SetSequenceNumber,
int32_t(const uint16_t seq));
+ MOCK_METHOD2(SetRtpStateForSsrc,
+ void(uint32_t ssrc, const RtpState& rtp_state));
+ MOCK_METHOD2(GetRtpStateForSsrc, bool(uint32_t ssrc, RtpState* rtp_state));
MOCK_CONST_METHOD0(SSRC,
uint32_t());
MOCK_METHOD1(SetSSRC,
@@ -132,8 +146,6 @@
int32_t(const RTCPMethod method));
MOCK_METHOD1(SetCNAME,
int32_t(const char cName[RTCP_CNAME_SIZE]));
- MOCK_METHOD1(CNAME,
- int32_t(char cName[RTCP_CNAME_SIZE]));
MOCK_CONST_METHOD2(RemoteCNAME,
int32_t(const uint32_t remoteSSRC,
char cName[RTCP_CNAME_SIZE]));
diff --git a/modules/rtp_rtcp/source/Android.mk b/modules/rtp_rtcp/source/Android.mk
deleted file mode 100644
index 68295be..0000000
--- a/modules/rtp_rtcp/source/Android.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_rtp_rtcp
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := \
- bitrate.cc \
- rtp_rtcp_impl.cc \
- rtcp_receiver.cc \
- rtcp_receiver_help.cc \
- rtcp_sender.cc \
- rtcp_utility.cc \
- rtp_receiver.cc \
- rtp_sender.cc \
- rtp_utility.cc \
- rtp_header_extension.cc \
- ssrc_database.cc \
- tmmbr_help.cc \
- dtmf_queue.cc \
- rtp_receiver_audio.cc \
- rtp_sender_audio.cc \
- bandwidth_management.cc \
- forward_error_correction.cc \
- forward_error_correction_internal.cc \
- overuse_detector.cc \
- remote_rate_control.cc \
- rtp_packet_history.cc \
- receiver_fec.cc \
- rtp_receiver_video.cc \
- rtp_sender_video.cc \
- rtp_format_vp8.cc \
- transmission_bucket.cc \
- vp8_partition_aggregator.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/rtp_rtcp/source/H264/bitstream_builder.cc b/modules/rtp_rtcp/source/H264/bitstream_builder.cc
deleted file mode 100644
index 3551782..0000000
--- a/modules/rtp_rtcp/source/H264/bitstream_builder.cc
+++ /dev/null
@@ -1,580 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "bitstream_builder.h"
-
-#include <string.h>
-
-namespace webrtc {
-BitstreamBuilder::BitstreamBuilder(uint8_t* data, const uint32_t dataSize) :
- _data(data),
- _dataSize(dataSize),
- _byteOffset(0),
- _bitOffset(0)
-{
- memset(data, 0, dataSize);
-}
-
-uint32_t
-BitstreamBuilder::Length() const
-{
- return _byteOffset+ (_bitOffset?1:0);
-}
-
-int32_t
-BitstreamBuilder::Add1Bit(const uint8_t bit)
-{
- // sanity
- if(_bitOffset + 1 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bit);
- return 0;
-}
-
-void
-BitstreamBuilder::Add1BitWithoutSanity(const uint8_t bit)
-{
- if(bit & 0x1)
- {
- _data[_byteOffset] += (1 << (7-_bitOffset));
- }
-
- if(_bitOffset == 7)
- {
- // last bit in byte
- _bitOffset = 0;
- _byteOffset++;
- } else
- {
- _bitOffset++;
- }
-}
-
-int32_t
-BitstreamBuilder::Add2Bits(const uint8_t bits)
-{
- // sanity
- if(_bitOffset + 2 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bits >> 1);
- Add1BitWithoutSanity(bits);
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add3Bits(const uint8_t bits)
-{
- // sanity
- if(_bitOffset + 3 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bits >> 2);
- Add1BitWithoutSanity(bits >> 1);
- Add1BitWithoutSanity(bits);
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add4Bits(const uint8_t bits)
-{
- // sanity
- if(_bitOffset + 4 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bits >> 3);
- Add1BitWithoutSanity(bits >> 2);
- Add1BitWithoutSanity(bits >> 1);
- Add1BitWithoutSanity(bits);
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add5Bits(const uint8_t bits)
-{
- // sanity
- if(_bitOffset + 5 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bits >> 4);
- Add1BitWithoutSanity(bits >> 3);
- Add1BitWithoutSanity(bits >> 2);
- Add1BitWithoutSanity(bits >> 1);
- Add1BitWithoutSanity(bits);
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add6Bits(const uint8_t bits)
-{
- // sanity
- if(_bitOffset + 6 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bits >> 5);
- Add1BitWithoutSanity(bits >> 4);
- Add1BitWithoutSanity(bits >> 3);
- Add1BitWithoutSanity(bits >> 2);
- Add1BitWithoutSanity(bits >> 1);
- Add1BitWithoutSanity(bits);
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add7Bits(const uint8_t bits)
-{
- // sanity
- if(_bitOffset + 7 > 8)
- {
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- }
- Add1BitWithoutSanity(bits >> 6);
- Add1BitWithoutSanity(bits >> 5);
- Add1BitWithoutSanity(bits >> 4);
- Add1BitWithoutSanity(bits >> 3);
- Add1BitWithoutSanity(bits >> 2);
- Add1BitWithoutSanity(bits >> 1);
- Add1BitWithoutSanity(bits);
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add8Bits(const uint8_t bits)
-{
- // sanity
- if(_dataSize < Length()+1)
- {
- // not enough space in buffer
- return -1;
- }
- if(_bitOffset == 0)
- {
- _data[_byteOffset] = bits;
- } else
- {
- _data[_byteOffset] += (bits >> _bitOffset);
- _data[_byteOffset+1] += (bits << (8-_bitOffset));
- }
- _byteOffset++;
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add16Bits(const uint16_t bits)
-{
- // sanity
- if(_dataSize < Length()+2)
- {
- // not enough space in buffer
- return -1;
- }
- if(_bitOffset == 0)
- {
- _data[_byteOffset] = (uint8_t)(bits >> 8);
- _data[_byteOffset+1] = (uint8_t)(bits);
- } else
- {
- _data[_byteOffset] += (uint8_t)(bits >> (_bitOffset + 8));
- _data[_byteOffset+1] += (uint8_t)(bits >> _bitOffset);
- _data[_byteOffset+2] += (uint8_t)(bits << (8-_bitOffset));
- }
- _byteOffset += 2;
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add24Bits(const uint32_t bits)
-{
- // sanity
- if(_dataSize < Length()+3)
- {
- // not enough space in buffer
- return -1;
- }
- if(_bitOffset == 0)
- {
- _data[_byteOffset] = (uint8_t)(bits >> 16);
- _data[_byteOffset+1] = (uint8_t)(bits >> 8);
- _data[_byteOffset+2] = (uint8_t)(bits);
- } else
- {
- _data[_byteOffset] += (uint8_t)(bits >> (_bitOffset+16));
- _data[_byteOffset+1] += (uint8_t)(bits >> (_bitOffset+8));
- _data[_byteOffset+2] += (uint8_t)(bits >> (_bitOffset));
- _data[_byteOffset+3] += (uint8_t)(bits << (8-_bitOffset));
- }
- _byteOffset += 3;
- return 0;
-}
-
-int32_t
-BitstreamBuilder::Add32Bits(const uint32_t bits)
-{
- // sanity
- if(_dataSize < Length()+4)
- {
- // not enough space in buffer
- return -1;
- }
- if(_bitOffset == 0)
- {
- _data[_byteOffset] = (uint8_t)(bits >> 24);
- _data[_byteOffset+1] = (uint8_t)(bits >> 16);
- _data[_byteOffset+2] = (uint8_t)(bits >> 8);
- _data[_byteOffset+3] = (uint8_t)(bits);
- } else
- {
- _data[_byteOffset] += (uint8_t)(bits >> (_bitOffset+24));
- _data[_byteOffset+1] += (uint8_t)(bits >> (_bitOffset+16));
- _data[_byteOffset+2] += (uint8_t)(bits >> (_bitOffset+8));
- _data[_byteOffset+3] += (uint8_t)(bits >> (_bitOffset));
- _data[_byteOffset+4] += (uint8_t)(bits << (8-_bitOffset));
- }
- _byteOffset += 4;
- return 0;
-}
-
-// Exp-Golomb codes
-/*
- with "prefix" and "suffix" bits and assignment to codeNum ranges (informative)
- Bit string form Range of codeNum
- 1 0
- 0 1 x0 1..2 2bits-1
- 0 0 1 x1 x0 3..6 3bits-1
- 0 0 0 1 x2 x1 x0 7..14 4bits-1
- 0 0 0 0 1 x3 x2 x1 x0 15..30
- 0 0 0 0 0 1 x4 x3 x2 x1 x0 31..62
-*/
-int32_t
-BitstreamBuilder::AddUE(const uint32_t value)
-{
- // un-rolled on 8 bit base to avoid too deep if else chain
- if(value < 0x0000ffff)
- {
- if(value < 0x000000ff)
- {
- if(value == 0)
- {
- if(AddPrefix(0) != 0)
- {
- return -1;
- }
- } else if(value < 3)
- {
- if(AddPrefix(1) != 0)
- {
- return -1;
- }
- AddSuffix(1, value-1);
- } else if(value < 7)
- {
- if(AddPrefix(2) != 0)
- {
- return -1;
- }
- AddSuffix(2, value-3);
- } else if(value < 15)
- {
- if(AddPrefix(3) != 0)
- {
- return -1;
- }
- AddSuffix(3, value-7);
- } else if(value < 31)
- {
- if(AddPrefix(4) != 0)
- {
- return -1;
- }
- AddSuffix(4, value-15);
- } else if(value < 63)
- {
- if(AddPrefix(5) != 0)
- {
- return -1;
- }
- AddSuffix(5, value-31);
- } else if(value < 127)
- {
- if(AddPrefix(6) != 0)
- {
- return -1;
- }
- AddSuffix(6, value-63);
- } else
- {
- if(AddPrefix(7) != 0)
- {
- return -1;
- }
- AddSuffix(7, value-127);
- }
- }else
- {
- if(value < 0x000001ff)
- {
- if(AddPrefix(8) != 0)
- {
- return -1;
- }
- AddSuffix(8, value-0x000000ff);
- } else if(value < 0x000003ff)
- {
- if(AddPrefix(9) != 0)
- {
- return -1;
- }
- AddSuffix(9, value-0x000001ff);
- } else if(value < 0x000007ff)
- {
- if(AddPrefix(10) != 0)
- {
- return -1;
- }
- AddSuffix(10, value-0x000003ff);
- } else if(value < 0x00000fff)
- {
- if(AddPrefix(11) != 0)
- {
- return -1;
- }
- AddSuffix(1, value-0x000007ff);
- } else if(value < 0x00001fff)
- {
- if(AddPrefix(12) != 0)
- {
- return -1;
- }
- AddSuffix(12, value-0x00000fff);
- } else if(value < 0x00003fff)
- {
- if(AddPrefix(13) != 0)
- {
- return -1;
- }
- AddSuffix(13, value-0x00001fff);
- } else if(value < 0x00007fff)
- {
- if(AddPrefix(14) != 0)
- {
- return -1;
- }
- AddSuffix(14, value-0x00003fff);
- } else
- {
- if(AddPrefix(15) != 0)
- {
- return -1;
- }
- AddSuffix(15, value-0x00007fff);
- }
- }
- }else
- {
- if(value < 0x00ffffff)
- {
- if(value < 0x0001ffff)
- {
- if(AddPrefix(16) != 0)
- {
- return -1;
- }
- AddSuffix(16, value-0x0000ffff);
- } else if(value < 0x0003ffff)
- {
- if(AddPrefix(17) != 0)
- {
- return -1;
- }
- AddSuffix(17, value-0x0001ffff);
- } else if(value < 0x0007ffff)
- {
- if(AddPrefix(18) != 0)
- {
- return -1;
- }
- AddSuffix(18, value-0x0003ffff);
- } else if(value < 0x000fffff)
- {
- if(AddPrefix(19) != 0)
- {
- return -1;
- }
- AddSuffix(19, value-0x0007ffff);
- } else if(value < 0x001fffff)
- {
- if(AddPrefix(20) != 0)
- {
- return -1;
- }
- AddSuffix(20, value-0x000fffff);
- } else if(value < 0x003fffff)
- {
- if(AddPrefix(21) != 0)
- {
- return -1;
- }
- AddSuffix(21, value-0x001fffff);
- } else if(value < 0x007fffff)
- {
- if(AddPrefix(22) != 0)
- {
- return -1;
- }
- AddSuffix(22, value-0x003fffff);
- } else
- {
- if(AddPrefix(23) != 0)
- {
- return -1;
- }
- AddSuffix(23, value-0x007fffff);
- }
- } else
- {
- if(value < 0x01ffffff)
- {
- if(AddPrefix(24) != 0)
- {
- return -1;
- }
- AddSuffix(24, value-0x00ffffff);
- } else if(value < 0x03ffffff)
- {
- if(AddPrefix(25) != 0)
- {
- return -1;
- }
- AddSuffix(25, value-0x01ffffff);
- } else if(value < 0x07ffffff)
- {
- if(AddPrefix(26) != 0)
- {
- return -1;
- }
- AddSuffix(26, value-0x03ffffff);
- } else if(value < 0x0fffffff)
- {
- if(AddPrefix(27) != 0)
- {
- return -1;
- }
- AddSuffix(27, value-0x07ffffff);
- } else if(value < 0x1fffffff)
- {
- if(AddPrefix(28) != 0)
- {
- return -1;
- }
- AddSuffix(28, value-0x0fffffff);
- } else if(value < 0x3fffffff)
- {
- if(AddPrefix(29) != 0)
- {
- return -1;
- }
- AddSuffix(29, value-0x1fffffff);
- } else if(value < 0x7fffffff)
- {
- if(AddPrefix(30) != 0)
- {
- return -1;
- }
- AddSuffix(30, value-0x3fffffff);
- } else if(value < 0xffffffff)
- {
- if(AddPrefix(31) != 0)
- {
- return -1;
- }
- AddSuffix(31, value-0x7ffffff);
- } else
- {
- if(AddPrefix(32) != 0)
- {
- return -1;
- }
- AddSuffix(32, 0); // exactly 0xffffffff
- }
- }
- }
- return 0;
-}
-
-int32_t
-BitstreamBuilder::AddPrefix(const uint8_t numZeros)
-{
- // sanity for the sufix too
- uint32_t numBitsToAdd = numZeros * 2 + 1;
- if(((_dataSize - _byteOffset) *8 + 8-_bitOffset) < numBitsToAdd)
- {
- return -1;
- }
-
- // add numZeros
- for (uint32_t i = 0; i < numZeros; i++)
- {
- Add1Bit(0);
- }
- Add1Bit(1);
- return 0;
-}
-
-void
-BitstreamBuilder::AddSuffix(const uint8_t numBits, const uint32_t rest)
-{
- // most significant bit first
- for(int32_t i = numBits - 1; i >= 0; i--)
- {
- if(( rest >> i) & 0x1)
- {
- Add1Bit(1);
- }else
- {
- Add1Bit(0);
- }
- }
-}
-} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/H264/bitstream_builder.h b/modules/rtp_rtcp/source/H264/bitstream_builder.h
deleted file mode 100644
index bf1efaf..0000000
--- a/modules/rtp_rtcp/source/H264/bitstream_builder.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_BUILDER_H_
-#define WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_BUILDER_H_
-
-#include "webrtc/typedefs.h"
-
-namespace webrtc {
-class BitstreamBuilder
-{
-public:
- BitstreamBuilder(uint8_t* data, const uint32_t dataSize);
-
- uint32_t Length() const;
-
- int32_t Add1Bit(const uint8_t bit);
- int32_t Add2Bits(const uint8_t bits);
- int32_t Add3Bits(const uint8_t bits);
- int32_t Add4Bits(const uint8_t bits);
- int32_t Add5Bits(const uint8_t bits);
- int32_t Add6Bits(const uint8_t bits);
- int32_t Add7Bits(const uint8_t bits);
- int32_t Add8Bits(const uint8_t bits);
- int32_t Add16Bits(const uint16_t bits);
- int32_t Add24Bits(const uint32_t bits);
- int32_t Add32Bits(const uint32_t bits);
-
- // Exp-Golomb codes
- int32_t AddUE(const uint32_t value);
-
-private:
- int32_t AddPrefix(const uint8_t numZeros);
- void AddSuffix(const uint8_t numBits, const uint32_t rest);
- void Add1BitWithoutSanity(const uint8_t bit);
-
- uint8_t* _data;
- uint32_t _dataSize;
-
- uint32_t _byteOffset;
- uint8_t _bitOffset;
-};
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_BUILDER_H_
diff --git a/modules/rtp_rtcp/source/H264/bitstream_parser.cc b/modules/rtp_rtcp/source/H264/bitstream_parser.cc
deleted file mode 100644
index d6505d2..0000000
--- a/modules/rtp_rtcp/source/H264/bitstream_parser.cc
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "bitstream_parser.h"
-
-namespace webrtc {
-BitstreamParser::BitstreamParser(const uint8_t* data, const uint32_t dataLength) :
- _data(data),
- _dataLength(dataLength),
- _byteOffset(0),
- _bitOffset(0)
-{
-}
- // todo should we have any error codes from this?
-
-uint8_t
-BitstreamParser::Get1Bit()
-{
- uint8_t retVal = 0x1 & (_data[_byteOffset] >> (7-_bitOffset++));
-
- // prepare next byte
- if(_bitOffset == 8)
- {
- _bitOffset = 0;
- _byteOffset++;
- }
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get2Bits()
-{
- uint8_t retVal = (Get1Bit() << 1);
- retVal += Get1Bit();
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get3Bits()
-{
- uint8_t retVal = (Get1Bit() << 2);
- retVal += (Get1Bit() << 1);
- retVal += Get1Bit();
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get4Bits()
-{
- uint8_t retVal = (Get1Bit() << 3);
- retVal += (Get1Bit() << 2);
- retVal += (Get1Bit() << 1);
- retVal += Get1Bit();
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get5Bits()
-{
- uint8_t retVal = (Get1Bit() << 4);
- retVal += (Get1Bit() << 3);
- retVal += (Get1Bit() << 2);
- retVal += (Get1Bit() << 1);
- retVal += Get1Bit();
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get6Bits()
-{
- uint8_t retVal = (Get1Bit() << 5);
- retVal += (Get1Bit() << 4);
- retVal += (Get1Bit() << 3);
- retVal += (Get1Bit() << 2);
- retVal += (Get1Bit() << 1);
- retVal += Get1Bit();
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get7Bits()
-{
- uint8_t retVal = (Get1Bit() << 6);
- retVal += (Get1Bit() << 5);
- retVal += (Get1Bit() << 4);
- retVal += (Get1Bit() << 3);
- retVal += (Get1Bit() << 2);
- retVal += (Get1Bit() << 1);
- retVal += Get1Bit();
- return retVal;
-}
-
-uint8_t
-BitstreamParser::Get8Bits()
-{
- uint16_t retVal;
-
- if(_bitOffset != 0)
- {
- // read 16 bits
- retVal = (_data[_byteOffset] << 8)+ (_data[_byteOffset+1]) ;
- retVal = retVal >> (8-_bitOffset);
- } else
- {
- retVal = _data[_byteOffset];
- }
- _byteOffset++;
- return (uint8_t)retVal;
-}
-
-uint16_t
-BitstreamParser::Get16Bits()
-{
- uint32_t retVal;
-
- if(_bitOffset != 0)
- {
- // read 24 bits
- retVal = (_data[_byteOffset] << 16) + (_data[_byteOffset+1] << 8) + (_data[_byteOffset+2]);
- retVal = retVal >> (8-_bitOffset);
- }else
- {
- // read 16 bits
- retVal = (_data[_byteOffset] << 8) + (_data[_byteOffset+1]) ;
- }
- _byteOffset += 2;
- return (uint16_t)retVal;
-}
-
-uint32_t
-BitstreamParser::Get24Bits()
-{
- uint32_t retVal;
-
- if(_bitOffset != 0)
- {
- // read 32 bits
- retVal = (_data[_byteOffset] << 24) + (_data[_byteOffset+1] << 16) + (_data[_byteOffset+2] << 8) + (_data[_byteOffset+3]);
- retVal = retVal >> (8-_bitOffset);
- }else
- {
- // read 24 bits
- retVal = (_data[_byteOffset] << 16) + (_data[_byteOffset+1] << 8) + (_data[_byteOffset+2]) ;
- }
- _byteOffset += 3;
- return retVal & 0x00ffffff; // we need to clean up the high 8 bits
-}
-
-uint32_t
-BitstreamParser::Get32Bits()
-{
- uint32_t retVal;
-
- if(_bitOffset != 0)
- {
- // read 40 bits
- uint64_t tempVal = _data[_byteOffset];
- tempVal <<= 8;
- tempVal += _data[_byteOffset+1];
- tempVal <<= 8;
- tempVal += _data[_byteOffset+2];
- tempVal <<= 8;
- tempVal += _data[_byteOffset+3];
- tempVal <<= 8;
- tempVal += _data[_byteOffset+4];
- tempVal >>= (8-_bitOffset);
-
- retVal = uint32_t(tempVal);
- }else
- {
- // read 32 bits
- retVal = (_data[_byteOffset]<< 24) + (_data[_byteOffset+1] << 16) + (_data[_byteOffset+2] << 8) + (_data[_byteOffset+3]) ;
- }
- _byteOffset += 4;
- return retVal;
-}
-
-// Exp-Golomb codes
-/*
- with "prefix" and "suffix" bits and assignment to codeNum ranges (informative)
- Bit string form Range of codeNum
- 1 0
- 0 1 x0 1..2
- 0 0 1 x1 x0 3..6
- 0 0 0 1 x2 x1 x0 7..14
- 0 0 0 0 1 x3 x2 x1 x0 15..30
- 0 0 0 0 0 1 x4 x3 x2 x1 x0 31..62
-*/
-
-uint32_t
-BitstreamParser::GetUE()
-{
- uint32_t retVal = 0;
- uint8_t numLeadingZeros = 0;
-
- while (Get1Bit() != 1)
- {
- numLeadingZeros++;
- }
- // prefix
- retVal = (1 << numLeadingZeros) - 1;
-
- // suffix
- while (numLeadingZeros)
- {
- retVal += (Get1Bit() << --numLeadingZeros);
- }
- return retVal;
-}
-} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/H264/bitstream_parser.h b/modules/rtp_rtcp/source/H264/bitstream_parser.h
deleted file mode 100644
index 6e3d307..0000000
--- a/modules/rtp_rtcp/source/H264/bitstream_parser.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_PARSER_H_
-#define WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_PARSER_H_
-
-#include "webrtc/typedefs.h"
-
-namespace webrtc {
-class BitstreamParser
-{
-public:
- BitstreamParser(const uint8_t* data, const uint32_t dataLength);
-
- uint8_t Get1Bit();
- uint8_t Get2Bits();
- uint8_t Get3Bits();
- uint8_t Get4Bits();
- uint8_t Get5Bits();
- uint8_t Get6Bits();
- uint8_t Get7Bits();
- uint8_t Get8Bits();
- uint16_t Get16Bits();
- uint32_t Get24Bits();
- uint32_t Get32Bits();
-
- // Exp-Golomb codes
- uint32_t GetUE();
-
-private:
- const uint8_t* _data;
- const uint32_t _dataLength;
-
- uint32_t _byteOffset;
- uint8_t _bitOffset;
-};
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_PARSER_H_
diff --git a/modules/rtp_rtcp/source/H264/h264_information.cc b/modules/rtp_rtcp/source/H264/h264_information.cc
deleted file mode 100644
index ddb34eb..0000000
--- a/modules/rtp_rtcp/source/H264/h264_information.cc
+++ /dev/null
@@ -1,818 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <string.h>
-#include "h264_information.h"
-
-//#define DEBUG_SEI_MESSAGE 1
-
-#ifdef DEBUG_SEI_MESSAGE
- #include "bitstream_parser.h"
- #include <stdio.h>
- #include <math.h>
-
- uint32_t BitRateBPS(uint16_t x )
- {
- return (x & 0x3fff) * uint32_t(pow(10.0f,(2 + (x >> 14))));
- }
-
-#endif
-
-namespace webrtc {
-H264Information::H264Information(const bool SVC)
- : _SVC(SVC)
-
-{
-}
-
-H264Information::~H264Information()
-{
-
-}
-
-void
-H264Information::Reset()
-{
- _parsedLength = 0;
- _remLength = 0;
- _length = 0;
- _info.numNALUs = 0;
- _info.numLayers = 0;
-
- memset(_info.startCodeSize, 0, sizeof(_info.startCodeSize));
- memset(_info.payloadSize, 0, sizeof(_info.payloadSize));
- memset(_info.NRI, 0, sizeof(_info.NRI));
- memset(_info.type, 0, sizeof(_info.type));
- memset(_info.accLayerSize, 0, sizeof(_info.accLayerSize));
-
- for (int32_t i = 0; i < KMaxNumberOfNALUs; i++)
- {
- _info.SVCheader[i].idr = 0;
- _info.SVCheader[i].priorityID = 0;
- _info.SVCheader[i].interLayerPred = 0;
- _info.SVCheader[i].dependencyID = 0;
- _info.SVCheader[i].qualityID = 0;
- _info.SVCheader[i].temporalID = 0;
- _info.SVCheader[i].useRefBasePic = 0;
- _info.SVCheader[i].discardable = 0;
- _info.SVCheader[i].output = 0;
-
- _info.PACSI[i].X = 0;
- _info.PACSI[i].Y = 0;
-// _info.PACSI[i].T = 0;
- _info.PACSI[i].A = 0;
- _info.PACSI[i].P = 0;
- _info.PACSI[i].C = 0;
- _info.PACSI[i].S = 0;
- _info.PACSI[i].E = 0;
- _info.PACSI[i].TL0picIDx = 0;
- _info.PACSI[i].IDRpicID = 0;
- _info.PACSI[i].DONC = 0;
- _info.PACSI[i].numSEINALUs = 0;
- _info.PACSI[i].NALlength = 5;
- }
-}
-
-/*******************************************************************************
- * int32_t GetInfo(const uint8_t* ptrEncodedBuffer,
- * const uint32_t length,
- * const H264Info*& ptrInfo);
- *
- * Gets information from an encoded stream.
- *
- * Input:
- * - ptrEncodedBuffer : Pointer to encoded stream.
- * - length : Length in bytes of encoded stream.
- *
- * Output:
- * - ptrInfo : Pointer to struct with H.264 info.
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- */
-int32_t
-H264Information::GetInfo(const uint8_t* ptrEncodedBuffer,
- const uint32_t length,
- const H264Info*& ptrInfo)
-{
- if (!ptrEncodedBuffer || length < 4)
- {
- return -1;
- }
-
- if (!HasInfo(length))
- {
- if (-1 == FindInfo(ptrEncodedBuffer, length))
- {
- Reset();
- return -1;
- }
- }
- ptrInfo = &_info;
- return 0;
-}
-
-RtpVideoCodecTypes
-H264Information::Type()
-{
- if(_SVC)
- {
- return RTP_H264_SVCVideo;
- }
- return RTP_H264Video;
-}
-
-
-/*******************************************************************************
- * bool HasInfo(const uint32_t length);
- *
- * Checks if information has already been stored for this encoded stream.
- *
- * Input:
- * - length : Length in bytes of encoded stream.
- *
- * Return value:
- * - true (false) : Information has (not) been stored.
- */
-
-bool
-H264Information::HasInfo(const uint32_t length)
-{
- if (!_info.numNALUs)
- {
- return false;
- }
-
- // has info, make sure current length matches info length
- if (length != _length)
- {
- Reset();
- return false;
- }
-
- return true;
-}
-
-/*******************************************************************************
- * int32_t FindInfo(const uint8_t* ptrEncodedBuffer,
- * const uint32_t length);
- *
- * Parses the encoded stream.
- *
- * Input:
- * - ptrEncodedBuffer : Pointer to encoded stream.
- * - length : Length in bytes of encoded stream.
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- */
-int32_t
-H264Information::FindInfo(const uint8_t* ptrEncodedBuffer, const uint32_t length)
-{
- _ptrData = ptrEncodedBuffer;
- _length = length;
- _parsedLength = 0;
- _remLength = length;
-
- do
- {
- // Get start code length
- if (FindNALUStartCodeSize() == -1)
- {
- Reset();
- return -1;
- }
-
- // Get NAL unit payload size
- int32_t foundLast = FindNALU();
- if (foundLast == -1)
- {
- Reset();
- return -1;
- }
-
- // Validate parsed length
- if (_parsedLength > _length)
- {
- Reset();
- return -1;
- }
-
- // Get NRI
- GetNRI();
-
- // Get type
- if (FindNALUType() == -1)
- {
- Reset();
- return -1;
- }
-
- // Set layer start end bit
- SetLayerSEBit(foundLast);
-
-
- // Last NAL unit found?
- if (foundLast == 1)
- {
- if (_parsedLength != _length)
- {
- Reset();
- return -1;
- }
- _info.numNALUs++;
- return SetLayerLengths();
- }
-
- // Next NAL unit
- _ptrData += (_info.startCodeSize[_info.numNALUs] + _info.payloadSize[_info.numNALUs]);
- _remLength -= (_info.startCodeSize[_info.numNALUs] + _info.payloadSize[_info.numNALUs]);
- _info.numNALUs++;
-
- // Validate memory allocation
- if (_info.numNALUs >= KMaxNumberOfNALUs)
- {
- Reset();
- return -1;
- }
- }
- while(true);
-
- return 0;
-}
-
-/*******************************************************************************
- * int32_t FindNALUStartCodeSize();
- *
- * Finds the start code length of the current NAL unit.
- *
- * Output:
- * - _info.startCodeSize[currentNALU] : Start code length in bytes of NAL unit.
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- */
-int32_t
-H264Information::FindNALUStartCodeSize()
-{
- // NAL unit start code. Ex. {0,0,1} or {0,0,0,1}
- for (uint32_t i = 2; i < _remLength; i++)
- {
- if (_ptrData[i] == 1 && _ptrData[i - 1] == 0 && _ptrData[i - 2] == 0)
- {
- _info.startCodeSize[_info.numNALUs] = uint8_t(i + 1);
- return 0;
- }
- }
- return -1;
-}
-
-/*******************************************************************************
- * int32_t FindNALU();
- *
- * Finds the length of the current NAL unit.
- *
- * Output:
- * - _info.payloadSize[currentNALU] : Payload length in bytes of NAL unit
- * (start code length not included).
- * - _parsedLength : Current parsed length in bytes.
- *
- * Return value:
- * - 1 : ok. Last NAL unit found.
- * - 0 : ok
- * - (-1) : Error
- */
-int32_t
-H264Information::FindNALU()
-{
- for (uint32_t i = _info.startCodeSize[_info.numNALUs]; i < _remLength - 2; i += 2)
- {
- if (_ptrData[i] == 0)
- {
- int32_t size = 0;
- if ((_ptrData[i + 1] == 1 && _ptrData[i - 1] == 0) ||
- (_ptrData[i + 2] == 1 && _ptrData[i + 1] == 0))
- {
- // Found a header
- // Reduce size by preceding zeroes
- while (_ptrData[i - 1] == 0)
- {
- i--;
- }
- size = i;
- }
- if (size > 0)
- {
- _info.payloadSize[_info.numNALUs] = size - _info.startCodeSize[_info.numNALUs];
- _parsedLength += _info.startCodeSize[_info.numNALUs] + _info.payloadSize[_info.numNALUs];
- return 0;
- }
- }
- }
- // Last NAL unit
- _info.payloadSize[_info.numNALUs] = _remLength - _info.startCodeSize[_info.numNALUs];
- if (_info.payloadSize[_info.numNALUs] > 0)
- {
- _parsedLength += _info.startCodeSize[_info.numNALUs] + _info.payloadSize[_info.numNALUs];
- return 1;
- }
- return -1;
-}
-
-/*******************************************************************************
- * void GetNRI();
- *
- * Finds the NRI of the current NAL unit.
- *
- * Output:
- * - _info.NRI[currentNALU] : NRI of NAL unit.
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- */
-void
-H264Information::GetNRI()
-{
- // NAL unit header (1 byte)
- // ---------------------------------
- // | start code |F|NRI| Type |
- // ---------------------------------
-
- // NRI (2 bits) - nal_ref_idc. '00' - the NAL unit is not used to reconstruct reference pictures.
- // >00 - the NAL unit is required to reconstruct reference pictures
- // in the same layer, or contains a parameter set.
-
-
- const uint8_t type = _ptrData[_info.startCodeSize[_info.numNALUs]] & 0x1f;
-
- // NALU type of 5, 7 and 8 shoud have NRI to b011
- if( type == 5 ||
- type == 7 ||
- type == 8)
- {
- _info.NRI[_info.numNALUs] = 0x60;
- }else
- {
- _info.NRI[_info.numNALUs] = _ptrData[_info.startCodeSize[_info.numNALUs]] & 0x60;
- }
-}
-
-
-/*******************************************************************************
- * int32_t FindNALUType();
- *
- * Finds the type of the current NAL unit.
- *
- * Output:
- * - _info.type[currentNALU] : Type of NAL unit
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- */
-int32_t
-H264Information::FindNALUType()
-{
- // NAL unit header (1 byte)
- // ---------------------------------
- // | start code |F|NRI| Type |
- // ---------------------------------
-
- _info.type[_info.numNALUs] = _ptrData[_info.startCodeSize[_info.numNALUs]] & 0x1f;
-
- if (_info.type[_info.numNALUs] == 0)
- {
- return -1;
- }
-
- // SVC NAL units, extended header
- if (ParseSVCNALUHeader() == -1)
- {
- return -1;
- }
-
- return 0;
-}
-
-/*******************************************************************************
- * int32_t ParseSVCNALUHeader();
- *
- * Finds the extended header of the current NAL unit. Included for NAL unit types 14 and 20.
- *
- * Output:
- * - _info.SVCheader[currentNALU] : SVC header of NAL unit.
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- */
-int32_t
-H264Information::ParseSVCNALUHeader()
-{
- if (_info.type[_info.numNALUs] == 5)
- {
- _info.SVCheader[_info.numNALUs].idr = 1;
- }
- if (_info.type[_info.numNALUs] == 6)
- {
- uint32_t seiPayloadSize;
- do
- {
- // SEI message
- seiPayloadSize = 0;
-
- uint32_t curByte = _info.startCodeSize[_info.numNALUs] + 1;
- const uint32_t seiStartOffset = curByte;
-
- uint32_t seiPayloadType = 0;
- while(_ptrData[curByte] == 0xff)
- {
- seiPayloadType += 255;
- curByte++;
- }
- seiPayloadType += _ptrData[curByte++];
-
- while(_ptrData[curByte] == 0xff)
- {
- seiPayloadSize += 255;
- curByte++;
- }
- seiPayloadSize += _ptrData[curByte++];
-
- if(_info.payloadSize[_info.numNALUs] < _info.startCodeSize[_info.numNALUs] + seiPayloadSize)
- {
- // sanity of remaining buffer
- // return 0 since no one "need" SEI messages
- assert(false);
- return 0;
- }
-
- if(seiPayloadType == 24)
- {
- // we add this to NALU 0 to be signaled in the first PACSI packet
- _info.PACSI[0].numSEINALUs = 1; // we allways add this to NALU 0 to send it in the first packet
- if(_info.PACSI[0].seiMessageLength[0] != seiPayloadSize)
- {
- _info.PACSI[0].seiMessageLength[0] = seiPayloadSize;
- delete [] _info.PACSI[0].seiMessageData[0];
- _info.PACSI[0].seiMessageData[0] = new uint8_t[seiPayloadSize];
- }
- memcpy(_info.PACSI[0].seiMessageData[0], _ptrData+seiStartOffset, seiPayloadSize);
-
- _info.PACSI[0].NALlength += seiPayloadSize + 2; // additional 2 is the length
-
-#ifdef DEBUG_SEI_MESSAGE
- const uint8_t numberOfLayers = 10;
- uint16_t avgBitrate[numberOfLayers]= {0,0,0,0,0,0,0,0,0,0};
- uint16_t maxBitrateLayer[numberOfLayers]= {0,0,0,0,0,0,0,0,0,0};
- uint16_t maxBitrateLayerRepresentation[numberOfLayers] = {0,0,0,0,0,0,0,0,0,0};
- uint16_t maxBitrareCalcWindow[numberOfLayers] = {0,0,0,0,0,0,0,0,0,0};
-
- BitstreamParser parserScalabilityInfo(_ptrData+curByte, seiPayloadSize);
-
- parserScalabilityInfo.Get1Bit(); // not used in futher parsing
- const uint8_t priority_layer_info_present = parserScalabilityInfo.Get1Bit();
- const uint8_t priority_id_setting_flag = parserScalabilityInfo.Get1Bit();
-
- uint32_t numberOfLayersMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t j = 0; j<= numberOfLayersMinusOne; j++)
- {
- printf("\nLayer ID:%d \n",parserScalabilityInfo.GetUE());
- printf("Priority ID:%d \n", parserScalabilityInfo.Get6Bits());
- printf("Discardable:%d \n", parserScalabilityInfo.Get1Bit());
-
- printf("Dependency ID:%d \n", parserScalabilityInfo.Get3Bits());
- printf("Quality ID:%d \n", parserScalabilityInfo.Get4Bits());
- printf("Temporal ID:%d \n", parserScalabilityInfo.Get3Bits());
-
- const uint8_t sub_pic_layer_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t sub_region_layer_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t iroi_division_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t profile_level_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t bitrate_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t frm_rate_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t frm_size_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t layer_dependency_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t parameter_sets_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t bitstream_restriction_info_present_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t exact_inter_layer_pred_flag = parserScalabilityInfo.Get1Bit(); // not used in futher parsing
-
- if(sub_pic_layer_flag || iroi_division_info_present_flag)
- {
- parserScalabilityInfo.Get1Bit();
- }
- const uint8_t layer_conversion_flag = parserScalabilityInfo.Get1Bit();
- const uint8_t layer_output_flag = parserScalabilityInfo.Get1Bit(); // not used in futher parsing
-
- if(profile_level_info_present_flag)
- {
- parserScalabilityInfo.Get24Bits();
- }
- if(bitrate_info_present_flag)
- {
- // this is what we want
- avgBitrate[j] = parserScalabilityInfo.Get16Bits();
- maxBitrateLayer[j] = parserScalabilityInfo.Get16Bits();
- maxBitrateLayerRepresentation[j] = parserScalabilityInfo.Get16Bits();
- maxBitrareCalcWindow[j] = parserScalabilityInfo.Get16Bits();
-
- printf("\tAvg:%d\n", BitRateBPS(avgBitrate[j]));
- printf("\tmaxBitrate:%d\n", BitRateBPS(maxBitrateLayer[j]));
- printf("\tmaxBitrate rep:%d\n", BitRateBPS(maxBitrateLayerRepresentation[j]));
- printf("\tCalcWindow:%d\n", maxBitrareCalcWindow[j]);
- }
- if(frm_rate_info_present_flag)
- {
- printf("\tFrame rate constant:%d\n", parserScalabilityInfo.Get2Bits()); // 0 = not constant, 1 = constant, 2 = maybe...
- printf("\tFrame rate avg:%d\n", parserScalabilityInfo.Get16Bits()/256);
- }
- if(frm_size_info_present_flag || iroi_division_info_present_flag)
- {
- printf("\tFrame Width:%d\n",(parserScalabilityInfo.GetUE()+1)*16);
- printf("\tFrame Height:%d\n",(parserScalabilityInfo.GetUE()+1)*16);
- }
- if(sub_region_layer_flag)
- {
- parserScalabilityInfo.GetUE();
- if(parserScalabilityInfo.Get1Bit())
- {
- parserScalabilityInfo.Get16Bits();
- parserScalabilityInfo.Get16Bits();
- parserScalabilityInfo.Get16Bits();
- parserScalabilityInfo.Get16Bits();
- }
- }
- if(sub_pic_layer_flag)
- {
- parserScalabilityInfo.GetUE();
- }
- if(iroi_division_info_present_flag)
- {
- if(parserScalabilityInfo.Get1Bit())
- {
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- }else
- {
- const uint32_t numRoisMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t k = 0; k <= numRoisMinusOne; k++)
- {
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- }
- }
- }
- if(layer_dependency_info_present_flag)
- {
- const uint32_t numDirectlyDependentLayers = parserScalabilityInfo.GetUE();
- for(uint32_t k = 0; k < numDirectlyDependentLayers; k++)
- {
- parserScalabilityInfo.GetUE();
- }
- } else
- {
- parserScalabilityInfo.GetUE();
- }
- if(parameter_sets_info_present_flag)
- {
- const uint32_t numSeqParameterSetMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t k = 0; k <= numSeqParameterSetMinusOne; k++)
- {
- parserScalabilityInfo.GetUE();
- }
- const uint32_t numSubsetSeqParameterSetMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t l = 0; l <= numSubsetSeqParameterSetMinusOne; l++)
- {
- parserScalabilityInfo.GetUE();
- }
- const uint32_t numPicParameterSetMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t m = 0; m <= numPicParameterSetMinusOne; m++)
- {
- parserScalabilityInfo.GetUE();
- }
- }else
- {
- parserScalabilityInfo.GetUE();
- }
- if(bitstream_restriction_info_present_flag)
- {
- parserScalabilityInfo.Get1Bit();
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.GetUE();
- }
- if(layer_conversion_flag)
- {
- parserScalabilityInfo.GetUE();
- for(uint32_t k = 0; k <2;k++)
- {
- if(parserScalabilityInfo.Get1Bit())
- {
- parserScalabilityInfo.Get24Bits();
- parserScalabilityInfo.Get16Bits();
- parserScalabilityInfo.Get16Bits();
- }
- }
- }
- }
- if(priority_layer_info_present)
- {
- const uint32_t prNumDidMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t k = 0; k <= prNumDidMinusOne;k++)
- {
- parserScalabilityInfo.Get3Bits();
- const uint32_t prNumMinusOne = parserScalabilityInfo.GetUE();
- for(uint32_t l = 0; l <= prNumMinusOne; l++)
- {
- parserScalabilityInfo.GetUE();
- parserScalabilityInfo.Get24Bits();
- parserScalabilityInfo.Get16Bits();
- parserScalabilityInfo.Get16Bits();
- }
- }
- }
- if(priority_id_setting_flag)
- {
- uint8_t priorityIdSettingUri;
- uint32_t priorityIdSettingUriIdx = 0;
- do
- {
- priorityIdSettingUri = parserScalabilityInfo.Get8Bits();
- } while (priorityIdSettingUri != 0);
- }
-#endif
- } else
- {
- // not seiPayloadType 24 ignore
- }
- //check if we have more SEI in NALU
- } while (_info.payloadSize[_info.numNALUs] > _info.startCodeSize[_info.numNALUs] + seiPayloadSize);
- }
-
- // Extended NAL unit header (3 bytes).
- // +---------------+---------------+---------------+
- // |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // |R|I| PRID |N| DID | QID | TID |U|D|O| RR|
- // +---------------+---------------+---------------+
-
- // R - Reserved for future extensions (MUST be 1). Receivers SHOULD ignore the value of R.
- // I - Is layer representation an IDR layer (1) or not (0).
- // PRID - Priority identifier for the NAL unit.
- // N - Specifies whether inter-layer prediction may be used for decoding the coded slice (1) or not (0).
- // DID - Indicates the inter-layer coding dependency level of a layer representation.
- // QID - Indicates the quality level of an MGS layer representation.
- // TID - Indicates the temporal level of a layer representation.
- // U - Use only reference base pictures during the inter prediction process (1) or not (0).
- // D - Discardable flag.
- // O - Output_flag. Affects the decoded picture output process as defined in Annex C of [H.264].
- // RR - Reserved_three_2bits (MUST be '11'). Receivers SHOULD ignore the value of RR.
-
- if (_info.type[_info.numNALUs] == 14 ||
- _info.type[_info.numNALUs] == 20)
- {
- uint32_t curByte = _info.startCodeSize[_info.numNALUs] + 1;
-
- if (_remLength < curByte + 3)
- {
- return -1;
- }
-
- _info.SVCheader[_info.numNALUs].idr = (_ptrData[curByte] >> 6) & 0x01;
- _info.SVCheader[_info.numNALUs].priorityID = (_ptrData[curByte++] & 0x3F);
-
- _info.SVCheader[_info.numNALUs].interLayerPred = (_ptrData[curByte] >> 7) & 0x01;
- _info.SVCheader[_info.numNALUs].dependencyID = (_ptrData[curByte] >> 4) & 0x07;
- _info.SVCheader[_info.numNALUs].qualityID = (_ptrData[curByte++] & 0x0F);
-
- _info.SVCheader[_info.numNALUs].temporalID = (_ptrData[curByte] >> 5) & 0x07;
- _info.SVCheader[_info.numNALUs].useRefBasePic = (_ptrData[curByte] >> 4) & 0x01;
- _info.SVCheader[_info.numNALUs].discardable = (_ptrData[curByte] >> 3) & 0x01;
- _info.SVCheader[_info.numNALUs].output = (_ptrData[curByte] >> 2) & 0x01;
-
- if (_info.type[_info.numNALUs] == 14)
- {
- // inform the next NALU
- memcpy(&(_info.SVCheader[_info.numNALUs+1]), &(_info.SVCheader[_info.numNALUs]), sizeof(_H264_SVC_NALUHeader));
- }
- }
- return 0;
-}
-
-
-/*******************************************************************************
- * void SetLayerSEBit();
- *
- * Sets start and end bits for the current NAL unit.
- *
- * Output:
- * - _info.PACSI[currentNALU].S : First NAL unit in a layer (S = 1).
- * - _info.PACSI[currentNALU].E : Last NAL unit in a layer (E = 1).
- *
- */
-void
-H264Information::SetLayerSEBit(int32_t foundLast)
-{
- if (_info.numNALUs == 0)
- {
- // First NAL unit
- _info.PACSI[_info.numNALUs].S = 1;
- }
-
- if (_info.numNALUs > 0)
- {
- if (_info.type[_info.numNALUs] != _info.type[_info.numNALUs-1] &&
- (_info.type[_info.numNALUs] == 20))
- {
- // First layer in scalable extension
- _info.PACSI[_info.numNALUs].S = 1;
- _info.PACSI[_info.numNALUs-1].E = 1;
- }
-
- if (_info.type[_info.numNALUs] == 20 && _info.type[_info.numNALUs-1] == 20)
- {
- if (_info.SVCheader[_info.numNALUs].temporalID != _info.SVCheader[_info.numNALUs-1].temporalID ||
- _info.SVCheader[_info.numNALUs].dependencyID != _info.SVCheader[_info.numNALUs-1].dependencyID ||
- _info.SVCheader[_info.numNALUs].qualityID != _info.SVCheader[_info.numNALUs-1].qualityID)
- {
- // New layer in scalable extension
- _info.PACSI[_info.numNALUs].S = 1;
- _info.PACSI[_info.numNALUs-1].E = 1;
- }
- }
- }
-
- if (foundLast)
- {
- // Last NAL unit
- _info.PACSI[_info.numNALUs].E = 1;
- }
-
-}
-
-/*******************************************************************************
- * int32_t SetLayerLengths();
- *
- * Sets the accumulated layer length.
- *
- * Output:
- * - _info.accLayerSize[currentLayer] : Size in bytes of layer: 0 - currentLayer.
- *
- * Return value:
- * - 0 : ok
- * - (-1) : Error
- *
- */
-int32_t
-H264Information::SetLayerLengths()
-{
- for (uint32_t curNALU = 0; curNALU < _info.numNALUs; curNALU++)
- {
- _info.accLayerSize[_info.numLayers] += _info.startCodeSize[curNALU] + _info.payloadSize[curNALU];
-
- if (_info.PACSI[curNALU].E == 1)
- {
- _info.numLayers++;
- if (curNALU == uint32_t(_info.numNALUs - 1))
- {
- break;
- }
- if (_info.numLayers >= KMaxNumberOfLayers)
- {
- Reset();
- return -1;
- }
- _info.accLayerSize[_info.numLayers] += _info.accLayerSize[_info.numLayers - 1];
- }
- }
-
- if (_info.numLayers < 1 && _info.numLayers > KMaxNumberOfLayers)
- {
- Reset();
- return -1;
- }
-
- if (_info.accLayerSize[_info.numLayers - 1] != int32_t(_length))
- {
- Reset();
- return -1;
- }
-
- return 0;
-}
-} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/H264/h264_information.h b/modules/rtp_rtcp/source/H264/h264_information.h
deleted file mode 100644
index 356a026..0000000
--- a/modules/rtp_rtcp/source/H264/h264_information.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_H264_INFORMATION_H_
-#define WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_H264_INFORMATION_H_
-
-#include "VideoCodecInformation.h"
-#include "webrtc/typedefs.h"
-
-namespace webrtc {
-enum
-{
- KMaxNumberOfNALUs = 128,
- KMaxNumberOfSEINALUs = 2,
- KMaxNumberOfLayers = 16
-};
-
-struct H264_SVC_NALUHeader
-{
- H264_SVC_NALUHeader()
- :
- r(1),
- idr(0),
- priorityID(0),
- interLayerPred(0),
- dependencyID(0),
- qualityID(0),
- temporalID(0),
- useRefBasePic(0),
- discardable(0),
- output(0),
- rr(3),
- length(3)
- {
- }
- const uint8_t r;
- uint8_t idr;
- uint8_t priorityID;
- uint8_t interLayerPred;
- uint8_t dependencyID;
- uint8_t qualityID;
- uint8_t temporalID;
- uint8_t useRefBasePic;
- uint8_t discardable;
- uint8_t output;
- const uint8_t rr;
- const uint8_t length;
-};
-
-class H264_PACSI_NALU
-{
-public:
- H264_PACSI_NALU() :
- NALlength(5),
- type(30),
- X(0),
- Y(0),
-// T(0),
- A(0),
- P(0),
- C(0),
- S(0),
- E(0),
- TL0picIDx(0),
- IDRpicID(0),
- DONC(0),
- numSEINALUs(0)
- {
- memset(seiMessageLength, 0, sizeof(seiMessageLength));
- memset(seiMessageData, 0, sizeof(seiMessageData));
- }
- ~H264_PACSI_NALU()
- {
- for(int i = 0; i<KMaxNumberOfSEINALUs; i++)
- {
- if(seiMessageData[i])
- {
- delete [] seiMessageData[i];
- }
- }
- }
-
- uint32_t NALlength;
- const uint8_t type;
- uint8_t X;
- uint8_t Y;
-// uint8_t T;
- uint8_t A;
- uint8_t P;
- uint8_t C;
- uint8_t S;
- uint8_t E;
- uint8_t TL0picIDx;
- uint16_t IDRpicID;
- uint16_t DONC;
- uint32_t numSEINALUs;
- uint32_t seiMessageLength[KMaxNumberOfSEINALUs]; // we allow KMaxNumberOfSEINALUs SEI messages
- uint8_t* seiMessageData[KMaxNumberOfSEINALUs];
-};
-
-struct H264Info
-{
- H264Info()
- :
- numNALUs(0),
- numLayers(0)
- {
- memset(startCodeSize, 0, sizeof(startCodeSize));
- memset(payloadSize, 0, sizeof(payloadSize));
- memset(NRI, 0, sizeof(NRI));
- memset(type, 0, sizeof(type));
- memset(accLayerSize, 0, sizeof(accLayerSize));
- }
- uint16_t numNALUs;
- uint8_t numLayers;
- uint8_t startCodeSize[KMaxNumberOfNALUs];
- uint32_t payloadSize[KMaxNumberOfNALUs];
- uint8_t NRI[KMaxNumberOfNALUs];
- uint8_t type[KMaxNumberOfNALUs];
- H264_SVC_NALUHeader SVCheader[KMaxNumberOfNALUs];
- H264_PACSI_NALU PACSI[KMaxNumberOfNALUs];
- int32_t accLayerSize[KMaxNumberOfLayers];
-};
-
-
-class H264Information : public VideoCodecInformation
-{
-public:
- H264Information(const bool SVC);
- ~H264Information();
-
- virtual void Reset();
-
- virtual RtpVideoCodecTypes Type();
-
- virtual int32_t GetInfo(const uint8_t* ptrEncodedBuffer, const uint32_t length, const H264Info*& ptrInfo);
-
-
-protected:
- bool HasInfo(const uint32_t length);
- int32_t FindInfo(const uint8_t* ptrEncodedBuffer, const uint32_t length);
-
- void GetNRI();
- int32_t FindNALU();
- int32_t FindNALUStartCodeSize();
- int32_t FindNALUType();
-
- int32_t ParseSVCNALUHeader();
-
- void SetLayerSEBit(int32_t foundLast);
- int32_t SetLayerLengths();
-
-private:
- const bool _SVC;
- const uint8_t* _ptrData;
- uint32_t _length;
- uint32_t _parsedLength;
- uint32_t _remLength;
- H264Info _info;
-};
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_H264_INFORMATION_H_
diff --git a/modules/rtp_rtcp/source/H264/rtp_sender_h264.cc b/modules/rtp_rtcp/source/H264/rtp_sender_h264.cc
deleted file mode 100644
index d62f50b..0000000
--- a/modules/rtp_rtcp/source/H264/rtp_sender_h264.cc
+++ /dev/null
@@ -1,1280 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "rtp_sender_h264.h"
-
-#include "rtp_utility.h"
-
-namespace webrtc {
-RTPSenderH264::RTPSenderH264(RTPSenderInterface* rtpSender) :
- // H264
- _rtpSender(*rtpSender),
- _h264Mode(H264_SINGLE_NAL_MODE),
- _h264SendPPS_SPS(true),
- _h264SVCPayloadType(-1),
- _h264SVCRelaySequenceNumber(0),
- _h264SVCRelayTimeStamp(0),
- _h264SVCRelayLayerComplete(false),
-
- _useHighestSendLayer(false),
- _highestDependencyLayerOld(MAX_NUMBER_OF_TEMPORAL_ID-1),
- _highestDependencyQualityIDOld(MAX_NUMBER_OF_DEPENDENCY_QUALITY_ID-1),
- _highestDependencyLayer(0),
- _highestDependencyQualityID(0),
- _highestTemporalLayer(0)
-{
-}
-
-RTPSenderH264::~RTPSenderH264()
-{
-}
-
-int32_t
-RTPSenderH264::Init()
-{
- _h264SendPPS_SPS = true;
- _h264Mode = H264_SINGLE_NAL_MODE;
- return 0;
-}
-
-/*
- multi-session
- 3 modes supported
- NI-T timestamps
- NI-TC timestamps/CS-DON
- NI-C CS-DON
-
- Non-interleaved timestamp based mode (NI-T)
- Non-interleaved cross-session decoding order number (CS-DON) based mode (NI-C)
- Non-interleaved combined timestamp and CS-DON mode (NI-TC)
-
- NOT supported Interleaved CS-DON (I-C) mode.
-
- NI-T and NI-TC modes both use timestamps to recover the decoding
- order. In order to be able to do so, it is necessary for the RTP
- packet stream to contain data for all sampling instances of a given
- RTP session in all enhancement RTP sessions that depend on the given
- RTP session. The NI-C and I-C modes do not have this limitation,
- and use the CS-DON values as a means to explicitly indicate decoding
- order, either directly coded in PACSI NAL units, or inferred from
- them using the packetization rules. It is noted that the NI-TC mode
- offers both alternatives and it is up to the receiver to select
- which one to use.
-*/
-
-bool
-RTPSenderH264::AddH264SVCNALUHeader(const H264_SVC_NALUHeader& svc,
- uint8_t* databuffer,
- int32_t& curByte) const
-{
- // +---------------+---------------+---------------+
- // |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // |R|I| PRID |N| DID | QID | TID |U|D|O| RR|
- // +---------------+---------------+---------------+
-
- // R - Reserved for future extensions (MUST be 1). Receivers SHOULD ignore the value of R.
- // I - Is layer representation an IDR layer (1) or not (0).
- // PRID - Priority identifier for the NAL unit.
- // N - Specifies whether inter-layer prediction may be used for decoding the coded slice (1) or not (0).
- // DID - Indicates the int32_t:er-layer coding dependency level of a layer representation.
- // QID - Indicates the quality level of an MGS layer representation.
- // TID - Indicates the temporal level of a layer representation.
- // U - Use only reference base pictures during the int32_t:er prediction process (1) or not (0).
- // D - Discardable flag.
- // O - Output_flag. Affects the decoded picture output process as defined in Annex C of [H.264].
- // RR - Reserved_three_2bits (MUST be '11'). Receivers SHOULD ignore the value of RR.
-
- // Add header data
- databuffer[curByte++] = (svc.r << 7) + (svc.idr << 6) + (svc.priorityID & 0x3F);
- databuffer[curByte++] = (svc.interLayerPred << 7) + (svc.dependencyID << 4) + (svc.qualityID & 0x0F);
- databuffer[curByte++] = (svc.temporalID << 5) + (svc.useRefBasePic << 4) + (svc.discardable << 3) +
- (svc.output << 2) + (svc.rr & 0x03);
- return true;
-}
-
-int32_t
-RTPSenderH264::AddH264PACSINALU(const bool firstPacketInNALU,
- const bool lastPacketInNALU,
- const H264_PACSI_NALU& pacsi,
- const H264_SVC_NALUHeader& svc,
- const uint16_t DONC,
- uint8_t* databuffer,
- int32_t& curByte) const
-{
- // 0 1 2 3
- // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // |F|NRI|Type(30) | SVC NAL unit header |
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // |X|Y|T|A|P|C|S|E| TL0PICIDX (o.)| IDRPICID (o.) |
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // | DONC (o.) | NAL unit size 1 |
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // | |
- // | SEI NAL unit 1 |
- // | |
- // | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- // | | NAL unit size 2 | |
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
- // | |
- // | SEI NAL unit 2 |
- // | +-+-+-+-+-+-+-+-+-+-+
- // | |
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
- // If present, MUST be first NAL unit in aggregation packet + there MUST be at least
- // one additional unit in the same packet! The RTPHeader and payload header are set as if the 2nd NAL unit
- // (first non-PACSI NAL unit) is encapsulated in the same packet.
- // contains scalability info common for all remaining NAL units.
-
- // todo add API to configure this required for multisession
- const bool addDONC = false;
-
- if (svc.length == 0 || pacsi.NALlength == 0)
- {
- return 0;
- }
-
- int32_t startByte = curByte;
-
- // NAL unit header
- databuffer[curByte++] = 30; // NRI will be added later
-
- // Extended SVC header
- AddH264SVCNALUHeader(svc, databuffer, curByte);
-
- // Flags
- databuffer[curByte++] = (pacsi.X << 7) +
- (pacsi.Y << 6) +
- (addDONC << 5) +
- (pacsi.A << 4) +
- (pacsi.P << 3) +
- (pacsi.C << 2) +
- firstPacketInNALU?(pacsi.S << 1):0 +
- lastPacketInNALU?(pacsi.E):0;
-
- // Optional fields
- if (pacsi.Y)
- {
- databuffer[curByte++] = pacsi.TL0picIDx;
- databuffer[curByte++] = (uint8_t)(pacsi.IDRpicID >> 8);
- databuffer[curByte++] = (uint8_t)(pacsi.IDRpicID);
- }
- // Decoding order number
- if (addDONC) // pacsi.T
- {
- databuffer[curByte++] = (uint8_t)(DONC >> 8);
- databuffer[curByte++] = (uint8_t)(DONC);
- }
-
- // SEI NALU
- if(firstPacketInNALU) // IMPROVEMENT duplicate it to make sure it arrives...
- {
- // we only set this for NALU 0 to make sure we send it only once per frame
- for (uint32_t i = 0; i < pacsi.numSEINALUs; i++)
- {
- // NALU size
- databuffer[curByte++] = (uint8_t)(pacsi.seiMessageLength[i] >> 8);
- databuffer[curByte++] = (uint8_t)(pacsi.seiMessageLength[i]);
-
- // NALU data
- memcpy(databuffer + curByte, pacsi.seiMessageData[i], pacsi.seiMessageLength[i]);
- curByte += pacsi.seiMessageLength[i];
- }
- }
- return curByte - startByte;
-}
-
-int32_t
-RTPSenderH264::SetH264RelaySequenceNumber(const uint16_t seqNum)
-{
- _h264SVCRelaySequenceNumber = seqNum;
- return 0;
-}
-
-int32_t
-RTPSenderH264::SetH264RelayCompleteLayer(const bool complete)
-{
- _h264SVCRelayLayerComplete = complete;
- return 0;
-}
-
-/*
- 12 Filler data
-
- The only restriction of filler data NAL units within an
- access unit is that they shall not precede the first VCL
- NAL unit with the same access unit.
-*/
-int32_t
-RTPSenderH264::SendH264FillerData(const WebRtcRTPHeader* rtpHeader,
- const uint16_t bytesToSend,
- const uint32_t ssrc)
-{
- uint16_t fillerLength = bytesToSend - 12 - 1;
-
- if (fillerLength > WEBRTC_IP_PACKET_SIZE - 12 - 1)
- {
- return 0;
- }
-
- if (fillerLength == 0)
- {
- // do not send an empty packet, will not reach JB
- fillerLength = 1;
- }
-
- // send codec valid data, H.264 has defined data which is binary 1111111
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
-
- dataBuffer[0] = static_cast<uint8_t>(0x80); // version 2
- dataBuffer[1] = rtpHeader->header.payloadType;
- ModuleRTPUtility::AssignUWord16ToBuffer(dataBuffer+2, _rtpSender.IncrementSequenceNumber()); // get the current SequenceNumber and add by 1 after returning
- ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer+4, rtpHeader->header.timestamp);
- ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer+8, rtpHeader->header.ssrc);
-
- // set filler NALU type
- dataBuffer[12] = 12; // NRI field = 0, type 12
-
- // fill with 0xff
- memset(dataBuffer + 12 + 1, 0xff, fillerLength);
-
- return _rtpSender.SendToNetwork(dataBuffer,
- fillerLength,
- 12 + 1);
-}
-
-int32_t
-RTPSenderH264::SendH264FillerData(const uint32_t captureTimestamp,
- const uint8_t payloadType,
- const uint32_t bytes
- )
-{
-
- const uint16_t rtpHeaderLength = _rtpSender.RTPHeaderLength();
- uint16_t maxLength = _rtpSender.MaxPayloadLength() - FECPacketOverhead() - _rtpSender.RTPHeaderLength();
-
- int32_t bytesToSend=bytes;
- uint16_t fillerLength=0;
-
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
-
- while(bytesToSend>0)
- {
- fillerLength=maxLength;
- if(fillerLength<maxLength)
- {
- fillerLength = (uint16_t) bytesToSend;
- }
-
- bytesToSend-=fillerLength;
-
- if (fillerLength > WEBRTC_IP_PACKET_SIZE - 12 - 1)
- {
- return 0;
- }
-
- if (fillerLength == 0)
- {
- // do not send an empty packet, will not reach JB
- fillerLength = 1;
- }
-
- // send paded data
- // correct seq num, time stamp and payloadtype
- _rtpSender.BuildRTPheader(dataBuffer, payloadType, false,captureTimestamp, true, true);
-
- // set filler NALU type
- dataBuffer[12] = 12; // NRI field = 0, type 12
-
- // send codec valid data, H.264 has defined data which is binary 1111111
- // fill with 0xff
- memset(dataBuffer + 12 + 1, 0xff, fillerLength-1);
-
- if( _rtpSender.SendToNetwork(dataBuffer,
- fillerLength,
- 12)<0)
- {
-
- return -1;;
- }
- }
- return 0;
-}
-
-int32_t
-RTPSenderH264::SendH264SVCRelayPacket(const WebRtcRTPHeader* rtpHeader,
- const uint8_t* incomingRTPPacket,
- const uint16_t incomingRTPPacketSize,
- const uint32_t ssrc,
- const bool higestLayer)
-{
- if (rtpHeader->header.sequenceNumber != (uint16_t)(_h264SVCRelaySequenceNumber + 1))
- {
- // not continous, signal loss
- _rtpSender.IncrementSequenceNumber();
- }
- _h264SVCRelaySequenceNumber = rtpHeader->header.sequenceNumber;
-
-
- if (rtpHeader->header.timestamp != _h264SVCRelayTimeStamp)
- {
- // new frame
- _h264SVCRelayLayerComplete = false;
- }
-
- if (rtpHeader->header.timestamp == _h264SVCRelayTimeStamp &&
- _h264SVCRelayLayerComplete)
- {
- // sanity, end of layer already sent
- // Could happened for fragmented packet with missing PACSI info (PACSI packet reorded and received after packet it belongs to)
- // fragmented packet has no layer info set (default info 0)
- return 0;
- }
- _h264SVCRelayTimeStamp = rtpHeader->header.timestamp;
-
- // re-packetize H.264-SVC packets
- // we keep the timestap unchanged
- // make a copy and only change the SSRC and seqNum
-
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
- memcpy(dataBuffer, incomingRTPPacket, incomingRTPPacketSize);
-
- // _sequenceNumber initiated in Init()
- // _ssrc initiated in constructor
-
- // re-write payload type
- if(_h264SVCPayloadType != -1)
- {
- dataBuffer[1] &= kRtpMarkerBitMask;
- dataBuffer[1] += _h264SVCPayloadType;
- }
-
- // _sequenceNumber will not work for re-ordering by NACK from original sender
- // engine responsible for this
- ModuleRTPUtility::AssignUWord16ToBuffer(dataBuffer+2, _rtpSender.IncrementSequenceNumber()); // get the current SequenceNumber and add by 1 after returning
- //ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer+8, ssrc);
-
- // how do we know it's the last relayed packet in a frame?
- // 1) packets arrive in order, the engine manages that
- // 2) highest layer that we relay
- // 3) the end bit is set for the highest layer
-
- if(higestLayer && rtpHeader->type.Video.codecHeader.H264.relayE)
- {
- // set marker bit
- dataBuffer[1] |= kRtpMarkerBitMask;
-
- // set relayed layer as complete
- _h264SVCRelayLayerComplete = true;
- }
- return _rtpSender.SendToNetwork(dataBuffer,
- incomingRTPPacketSize - rtpHeader->header.headerLength,
- rtpHeader->header.headerLength);
-}
-
-int32_t
-RTPSenderH264::SendH264_STAP_A(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- bool& switchToFUA,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength)
-{
- const int32_t H264_NALU_LENGTH = 2;
-
- uint16_t h264HeaderLength = 1; // normal header length
- uint16_t maxPayloadLengthSTAP_A = _rtpSender.MaxPayloadLength() -
- FECPacketOverhead() - rtpHeaderLength -
- h264HeaderLength - H264_NALU_LENGTH;
-
- int32_t dataOffset = rtpHeaderLength + h264HeaderLength;
- uint8_t NRI = 0;
- uint16_t payloadBytesInPacket = 0;
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
-
- if (ptrH264Info->payloadSize[idxNALU] > maxPayloadLengthSTAP_A)
- {
- // we need to fragment NAL switch to mode FU-A
- switchToFUA = true;
- } else
- {
- // combine as many NAL units in every IP packet
- do
- {
- if(!_h264SendPPS_SPS)
- {
- // don't send NALU of type 7 and 8 SPS and PPS
- if(ptrH264Info->type[idxNALU] == 7 || ptrH264Info->type[idxNALU] == 8)
- {
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- idxNALU++;
- continue;
- }
- }
- if(ptrH264Info->payloadSize[idxNALU] + payloadBytesInPacket <= maxPayloadLengthSTAP_A)
- {
- if(ptrH264Info->NRI[idxNALU] > NRI)
- {
- NRI = ptrH264Info->NRI[idxNALU];
- }
- // put NAL size into packet
- dataBuffer[dataOffset] = (uint8_t)(ptrH264Info->payloadSize[idxNALU] >> 8);
- dataOffset++;
- dataBuffer[dataOffset] = (uint8_t)(ptrH264Info->payloadSize[idxNALU] & 0xff);
- dataOffset++;
- // Put payload in packet
- memcpy(&dataBuffer[dataOffset], &data[ptrH264Info->startCodeSize[idxNALU]], ptrH264Info->payloadSize[idxNALU]);
- dataOffset += ptrH264Info->payloadSize[idxNALU];
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- payloadBytesInPacket += (uint16_t)(ptrH264Info->payloadSize[idxNALU] + H264_NALU_LENGTH);
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- } else
- {
- // we don't fitt the next NALU in this packet
- break;
- }
- idxNALU++;
- }while(payloadBytesToSend);
- }
-
- // sanity
- // don't send empty packets
- if (payloadBytesInPacket)
- {
- // add RTP header
- _rtpSender.BuildRTPheader(dataBuffer, payloadType, (payloadBytesToSend==0)?true:false, captureTimeStamp);
- dataBuffer[rtpHeaderLength] = 24 + NRI; // STAP-A == 24
- uint16_t payloadLength = payloadBytesInPacket + h264HeaderLength;
-
- if(-1 == SendVideoPacket(frameType, dataBuffer, payloadLength, rtpHeaderLength))
- {
- return -1;
- }
- }
- return 0;
-} // end STAP-A
-
-// STAP-A for H.264 SVC
-int32_t
-RTPSenderH264::SendH264_STAP_A_PACSI(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- bool& switchToFUA,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength,
- uint16_t& decodingOrderNumber)
-{
- const int32_t H264_NALU_LENGTH = 2;
-
- uint16_t h264HeaderLength = 1; // normal header length
- uint16_t maxPayloadLengthSTAP_A = _rtpSender.MaxPayloadLength() - FECPacketOverhead() - rtpHeaderLength - h264HeaderLength - H264_NALU_LENGTH;
- int32_t dataOffset = rtpHeaderLength + h264HeaderLength;
- uint8_t NRI = 0;
- uint16_t payloadBytesInPacket = 0;
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
- bool firstNALUNotIDR = true; //delta
-
- // Put PACSI NAL unit into packet
- int32_t lengthPACSI = 0;
- uint32_t PACSI_NALlength = ptrH264Info->PACSI[idxNALU].NALlength;
- if (PACSI_NALlength > maxPayloadLengthSTAP_A)
- {
- return -1;
- }
- dataBuffer[dataOffset++] = (uint8_t)(PACSI_NALlength >> 8);
- dataBuffer[dataOffset++] = (uint8_t)(PACSI_NALlength & 0xff);
-
- // end bit will be updated later, since another NALU in this packet might be the last
- int32_t lengthPASCINALU = AddH264PACSINALU(true,
- false,
- ptrH264Info->PACSI[idxNALU],
- ptrH264Info->SVCheader[idxNALU],
- decodingOrderNumber,
- dataBuffer,
- dataOffset);
- if (lengthPASCINALU <= 0)
- {
- return -1;
- }
- decodingOrderNumber++;
-
- lengthPACSI = H264_NALU_LENGTH + lengthPASCINALU;
- maxPayloadLengthSTAP_A -= (uint16_t)lengthPACSI;
- if (ptrH264Info->payloadSize[idxNALU] > maxPayloadLengthSTAP_A)
- {
- // we need to fragment NAL switch to mode FU-A
- switchToFUA = true;
- return 0;
- }
- if(!ptrH264Info->SVCheader[idxNALU].idr)
- {
- firstNALUNotIDR = true;
- }
-
- uint32_t layer = (ptrH264Info->SVCheader[idxNALU].dependencyID << 16)+
- (ptrH264Info->SVCheader[idxNALU].qualityID << 8) +
- ptrH264Info->SVCheader[idxNALU].temporalID;
-
- {
- // combine as many NAL units in every IP packet, with the same priorityID
- // Improvement we could allow several very small MGS NALU from different layers to be sent in one packet
-
- do
- {
- if(!_h264SendPPS_SPS)
- {
- // Don't send NALU of type 7 and 8 SPS and PPS,
- // they could be signaled outofband
- if(ptrH264Info->type[idxNALU] == 7 || ptrH264Info->type[idxNALU] == 8)
- {
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- idxNALU++;
- continue;
- }
- }
- // don't send NALU type 6 (SEI message) not allowed when we send it in PACSI
- if(ptrH264Info->type[idxNALU] == 6)
- {
- // SEI NALU Don't send, not allowed when we send it in PACSI
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- idxNALU++;
- continue;
- }
-
- const uint32_t layerNALU = (ptrH264Info->SVCheader[idxNALU].dependencyID << 16)+
- (ptrH264Info->SVCheader[idxNALU].qualityID << 8) +
- ptrH264Info->SVCheader[idxNALU].temporalID;
-
- // we need to break on a new layer
- if( ptrH264Info->payloadSize[idxNALU] + payloadBytesInPacket <= maxPayloadLengthSTAP_A &&
- layerNALU == layer)
- {
- if(ptrH264Info->NRI[idxNALU] > NRI)
- {
- NRI = ptrH264Info->NRI[idxNALU];
- }
- // put NAL size into packet
- dataBuffer[dataOffset] = (uint8_t)(ptrH264Info->payloadSize[idxNALU] >> 8);
- dataOffset++;
- dataBuffer[dataOffset] = (uint8_t)(ptrH264Info->payloadSize[idxNALU] & 0xff);
- dataOffset++;
- // Put payload in packet
- memcpy(&dataBuffer[dataOffset], &data[ptrH264Info->startCodeSize[idxNALU]], ptrH264Info->payloadSize[idxNALU]);
- dataOffset += ptrH264Info->payloadSize[idxNALU];
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- payloadBytesInPacket += (uint16_t)(ptrH264Info->payloadSize[idxNALU] + H264_NALU_LENGTH);
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- } else
- {
- // we don't fitt the next NALU in this packet or,
- // it's the next layer
-
- // check if we should send this NALU
- // based on the layer
-
- if(_useHighestSendLayer && layerNALU != layer)
- {
- // we don't send this NALU due to it's a new layer
- // check if we should send the next or if this is the last
- const uint8_t dependencyQualityID = (ptrH264Info->SVCheader[idxNALU].dependencyID << 4) + ptrH264Info->SVCheader[idxNALU].qualityID;
-
- bool highestLayer;
- if(SendH264SVCLayer(frameType,
- ptrH264Info->SVCheader[idxNALU].temporalID,
- dependencyQualityID,
- highestLayer) == false)
- {
- // will trigger markerbit and stop sending this frame
- payloadBytesToSend = 0;
- }
- }
- break;
- }
- idxNALU++;
-
- }while(payloadBytesToSend);
- }
-
- // sanity, don't send empty packets
- if (payloadBytesInPacket)
- {
- // add RTP header
- _rtpSender.BuildRTPheader(dataBuffer, payloadType, (payloadBytesToSend==0)?true:false, captureTimeStamp);
-
- dataBuffer[rtpHeaderLength] = 24 + NRI; // STAP-A == 24
-
- // NRI for PACSI
- dataBuffer[rtpHeaderLength + H264_NALU_LENGTH + 1] &= 0x1f; // zero out NRI field
- dataBuffer[rtpHeaderLength + H264_NALU_LENGTH + 1] |= NRI;
-
- if(ptrH264Info->PACSI[idxNALU-1].E)
- {
- // update end bit
- dataBuffer[rtpHeaderLength + H264_NALU_LENGTH + 5] |= 0x01;
- }
- if(firstNALUNotIDR)
- {
- // we have to check if any of the NALU in this packet is an IDR NALU
- bool setIBit = false;
- for(int i = 0; i < idxNALU; i++)
- {
- if(ptrH264Info->SVCheader[i].idr)
- {
- setIBit = true;
- break;
- }
- }
- if(setIBit)
- {
- // update I bit
- dataBuffer[rtpHeaderLength + H264_NALU_LENGTH + 2] |= 0x40;
- }
- }
- const uint16_t payloadLength = payloadBytesInPacket + h264HeaderLength + (uint16_t)lengthPACSI;
- if(-1 == SendVideoPacket(frameType,
- dataBuffer,
- payloadLength,
- rtpHeaderLength,
- layer==0))
- {
- return -1;
- }
- }
- return 0;
-} // end STAP-A
-
-int32_t
-RTPSenderH264::SendH264_FU_A(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength,
- uint16_t& decodingOrderNumber,
- const bool sendSVCPACSI)
-{
-
- // FUA for the rest of the frame
- uint16_t maxPayloadLength = _rtpSender.MaxPayloadLength() - FECPacketOverhead() - rtpHeaderLength;
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
- uint32_t payloadBytesRemainingInNALU = ptrH264Info->payloadSize[idxNALU];
-
- bool isBaseLayer=false;
-
- if(payloadBytesRemainingInNALU > maxPayloadLength)
- {
- // we need to fragment NALU
- const uint16_t H264_FUA_LENGTH = 2; // FU-a H.264 header is 2 bytes
-
- if(sendSVCPACSI)
- {
- SendH264_SinglePACSI(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- true,
- false);
-
- uint32_t layer = (ptrH264Info->SVCheader[idxNALU].dependencyID << 16)+
- (ptrH264Info->SVCheader[idxNALU].qualityID << 8) +
- ptrH264Info->SVCheader[idxNALU].temporalID;
- isBaseLayer=(layer==0);
- }
-
- // First packet
- _rtpSender.BuildRTPheader(dataBuffer,payloadType, false, captureTimeStamp);
-
- uint16_t maxPayloadLengthFU_A = maxPayloadLength - H264_FUA_LENGTH ;
- uint8_t fuaIndc = 28 + ptrH264Info->NRI[idxNALU];
- dataBuffer[rtpHeaderLength] = fuaIndc; // FU-A indicator
- dataBuffer[rtpHeaderLength+1] = (uint8_t)(ptrH264Info->type[idxNALU] + 0x80)/*start*/; // FU-A header
-
- memcpy(&dataBuffer[rtpHeaderLength + H264_FUA_LENGTH], &data[ptrH264Info->startCodeSize[idxNALU]+1], maxPayloadLengthFU_A);
- uint16_t payloadLength = maxPayloadLengthFU_A + H264_FUA_LENGTH;
- if(-1 == SendVideoPacket(frameType, dataBuffer, payloadLength, rtpHeaderLength, isBaseLayer))
- {
- return -1;
- }
-
- //+1 is from the type that is coded into the FU-a header
- data += maxPayloadLengthFU_A + 1 + ptrH264Info->startCodeSize[idxNALU]; // inc data ptr
- payloadBytesToSend -= maxPayloadLengthFU_A+1+ptrH264Info->startCodeSize[idxNALU];
- payloadBytesRemainingInNALU -= maxPayloadLengthFU_A+1;
-
- // all non first/last packets
- while(payloadBytesRemainingInNALU > maxPayloadLengthFU_A)
- {
- if(sendSVCPACSI)
- {
- SendH264_SinglePACSI(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- false,
- false);
- }
-
- // prepare next header
- _rtpSender.BuildRTPheader(dataBuffer, payloadType, false, captureTimeStamp);
-
- dataBuffer[rtpHeaderLength] = (uint8_t)fuaIndc; // FU-A indicator
- dataBuffer[rtpHeaderLength+1] = ptrH264Info->type[idxNALU]; // FU-A header
-
- memcpy(&dataBuffer[rtpHeaderLength+H264_FUA_LENGTH], data, maxPayloadLengthFU_A);
- payloadLength = maxPayloadLengthFU_A + H264_FUA_LENGTH;
-
- if(-1 == SendVideoPacket(frameType, dataBuffer, payloadLength, rtpHeaderLength,isBaseLayer))
- {
- return -1;
- }
- data += maxPayloadLengthFU_A; // inc data ptr
- payloadBytesToSend -= maxPayloadLengthFU_A;
- payloadBytesRemainingInNALU -= maxPayloadLengthFU_A;
- dataBuffer[rtpHeaderLength] = fuaIndc; // FU-A indicator
- dataBuffer[rtpHeaderLength+1] = ptrH264Info->type[idxNALU]; // FU-A header
- }
- if(sendSVCPACSI)
- {
- SendH264_SinglePACSI(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- false,
- true); // last packet in NALU
-
- if(_useHighestSendLayer && idxNALU+1 < ptrH264Info->numNALUs)
- {
- // not last NALU in frame
- // check if it's the the next layer should not be sent
-
- // check if we should send the next or if this is the last
- const uint8_t dependencyQualityID = (ptrH264Info->SVCheader[idxNALU+1].dependencyID << 4) +
- ptrH264Info->SVCheader[idxNALU+1].qualityID;
-
- bool highestLayer;
- if(SendH264SVCLayer(frameType,
- ptrH264Info->SVCheader[idxNALU+1].temporalID,
- dependencyQualityID,
- highestLayer) == false)
- {
- // will trigger markerbit and stop sending this frame
- payloadBytesToSend = payloadBytesRemainingInNALU;
- }
- }
- }
- // last packet in NALU
- _rtpSender.BuildRTPheader(dataBuffer, payloadType,(payloadBytesToSend == (int32_t)payloadBytesRemainingInNALU)?true:false, captureTimeStamp);
- dataBuffer[rtpHeaderLength+1] = ptrH264Info->type[idxNALU] + 0x40/*stop*/; // FU-A header
-
- memcpy(&dataBuffer[rtpHeaderLength+H264_FUA_LENGTH], data, payloadBytesRemainingInNALU);
- payloadLength = (uint16_t)payloadBytesRemainingInNALU + H264_FUA_LENGTH;
- payloadBytesToSend -= payloadBytesRemainingInNALU;
- if(payloadBytesToSend != 0)
- {
- data += payloadBytesRemainingInNALU; // inc data ptr
- }
- idxNALU++;
- if(-1 == SendVideoPacket(frameType, dataBuffer, payloadLength, rtpHeaderLength,isBaseLayer))
- {
- return -1;
- }
- } else
- {
- // send NAL unit in singel mode
- return SendH264_SingleMode(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- payloadBytesToSend,
- data,
- rtpHeaderLength,
- sendSVCPACSI);
- }
- // end FU-a
- return 0;
-}
-
-int32_t
-RTPSenderH264::SendH264_SingleMode(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength,
- uint16_t& decodingOrderNumber,
- const bool sendSVCPACSI)
-{
- // no H.264 header lenght in single mode
- // we use WEBRTC_IP_PACKET_SIZE instead of the configured MTU since it's better to send fragmented UDP than not to send
- const uint16_t maxPayloadLength = WEBRTC_IP_PACKET_SIZE - _rtpSender.PacketOverHead() - FECPacketOverhead() - rtpHeaderLength;
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
- bool isBaseLayer=false;
-
- if(ptrH264Info->payloadSize[idxNALU] > maxPayloadLength)
- {
- return -3;
- }
- if(!_h264SendPPS_SPS)
- {
- // don't send NALU of type 7 and 8 SPS and PPS
- if(ptrH264Info->type[idxNALU] == 7 || ptrH264Info->type[idxNALU] == 8)
- {
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- idxNALU++;
- return 0;
- }
- }
- if(sendSVCPACSI)
- {
- SendH264_SinglePACSI(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- true,
- true);
-
- uint32_t layer = (ptrH264Info->SVCheader[idxNALU].dependencyID << 16)+
- (ptrH264Info->SVCheader[idxNALU].qualityID << 8) +
- ptrH264Info->SVCheader[idxNALU].temporalID;
- isBaseLayer=(layer==0);
- }
-
- // Put payload in packet
- memcpy(&dataBuffer[rtpHeaderLength], &data[ptrH264Info->startCodeSize[idxNALU]], ptrH264Info->payloadSize[idxNALU]);
-
- uint16_t payloadBytesInPacket = (uint16_t)ptrH264Info->payloadSize[idxNALU];
- payloadBytesToSend -= ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU]; // left to send
-
- //
- _rtpSender.BuildRTPheader(dataBuffer,payloadType,(payloadBytesToSend ==0)?true:false, captureTimeStamp);
-
- dataBuffer[rtpHeaderLength] &= 0x1f; // zero out NRI field
- dataBuffer[rtpHeaderLength] |= ptrH264Info->NRI[idxNALU]; // nri
- if(payloadBytesToSend > 0)
- {
- data += ptrH264Info->payloadSize[idxNALU] + ptrH264Info->startCodeSize[idxNALU];
- }
- idxNALU++;
- if(-1 == SendVideoPacket(frameType, dataBuffer, payloadBytesInPacket, rtpHeaderLength,isBaseLayer))
- {
- return -1;
- }
- return 0;
-}
-
-int32_t
-RTPSenderH264::SendH264_SinglePACSI(const FrameType frameType,
- const H264Info* ptrH264Info,
- const uint16_t idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- const bool firstPacketInNALU,
- const bool lastPacketInNALU);
-{
- // Send PACSI in single mode
- uint8_t dataBuffer[WEBRTC_IP_PACKET_SIZE];
- uint16_t rtpHeaderLength = (uint16_t)_rtpSender.BuildRTPheader(dataBuffer, payloadType,false, captureTimeStamp);
- int32_t dataOffset = rtpHeaderLength;
-
- int32_t lengthPASCINALU = AddH264PACSINALU(firstPacketInNALU,
- lastPacketInNALU,
- ptrH264Info->PACSI[idxNALU],
- ptrH264Info->SVCheader[idxNALU],
- decodingOrderNumber,
- dataBuffer,
- dataOffset);
-
- if (lengthPASCINALU <= 0)
- {
- return -1;
- }
- decodingOrderNumber++;
-
- uint16_t payloadBytesInPacket = (uint16_t)lengthPASCINALU;
-
- // Set payload header (first payload byte co-serves as the payload header)
- dataBuffer[rtpHeaderLength] &= 0x1f; // zero out NRI field
- dataBuffer[rtpHeaderLength] |= ptrH264Info->NRI[idxNALU]; // nri
-
- const uint32_t layer = (ptrH264Info->SVCheader[idxNALU].dependencyID << 16)+
- (ptrH264Info->SVCheader[idxNALU].qualityID << 8) +
- ptrH264Info->SVCheader[idxNALU].temporalID;
-
- if (-1 == SendVideoPacket(frameType, dataBuffer, payloadBytesInPacket, rtpHeaderLength,layer==0))
- {
- return -1;
- }
- return 0;
-}
-
-
-
-
-int32_t
-RTPSenderH264::SendH264SVC(const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- H264Information& h264Information,
- uint16_t& decodingOrderNumber)
-{
- int32_t payloadBytesToSend = payloadSize;
- const uint16_t rtpHeaderLength = _rtpSender.RTPHeaderLength();
-
- const H264Info* ptrH264Info = NULL;
- if (h264Information.GetInfo(payloadData,payloadSize, ptrH264Info) == -1)
- {
- return -1;
- }
- if(_useHighestSendLayer)
- {
- // we need to check if we should drop the frame
- // it could be a temporal layer (aka a temporal frame)
- const uint8_t dependencyQualityID = (ptrH264Info->SVCheader[0].dependencyID << 4) + ptrH264Info->SVCheader[0].qualityID;
-
- bool dummyHighestLayer;
- if(SendH264SVCLayer(frameType,
- ptrH264Info->SVCheader[0].temporalID,
- dependencyQualityID,
- dummyHighestLayer) == false)
- {
- // skip send this frame
- return 0;
- }
- }
-
- uint16_t idxNALU = 0;
- while (payloadBytesToSend > 0)
- {
- bool switchToFUA = false;
- if (SendH264_STAP_A_PACSI(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- switchToFUA,
- payloadBytesToSend,
- payloadData,
- rtpHeaderLength,
- decodingOrderNumber) != 0)
- {
- return -1;
- }
- if(switchToFUA)
- {
- // FU_A for this NALU
- if (SendH264_FU_A(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- payloadBytesToSend,
- payloadData,
- rtpHeaderLength,
- true) != 0)
- {
- return -1;
- }
- }
- }
- return 0;
-}
-
-int32_t
-RTPSenderH264::SetH264PacketizationMode(const H264PacketizationMode mode)
-{
- _h264Mode = mode;
- return 0;
-}
-
-int32_t
-RTPSenderH264::SetH264SendModeNALU_PPS_SPS(const bool dontSend)
-{
- _h264SendPPS_SPS = !dontSend;
- return 0;
-}
-
-bool
-RTPSenderH264::SendH264SVCLayer(const FrameType frameType,
- const uint8_t temporalID,
- const uint8_t dependencyQualityID,
- bool& higestLayer)
-{
- uint8_t dependencyID = dependencyQualityID >> 4;
-
- // keyframe required to switch between dependency layers not quality and temporal
- if( _highestDependencyLayer != _highestDependencyLayerOld)
- {
- // we want to switch dependency layer
- if(frameType == kVideoFrameKey)
- {
- // key frame we can change layer if it's correct layer
- if(_highestDependencyLayer > _highestDependencyLayerOld)
- {
- // we want to switch up
- // does this packet belong to a new layer?
-
- if( dependencyID > _highestDependencyLayerOld &&
- dependencyID <= _highestDependencyLayer)
- {
- _highestDependencyLayerOld = dependencyID;
- _highestDependencyQualityIDOld = _highestDependencyQualityID;
-
- if( dependencyID == _highestDependencyLayer &&
- dependencyQualityID == _highestDependencyQualityID)
- {
- higestLayer = true;
- }
- // relay
- return true;
- }
- }
- if(_highestDependencyLayer < _highestDependencyLayerOld)
- {
- // we want to switch down
- // does this packet belong to a low layer?
- if( dependencyID <= _highestDependencyLayer)
- {
- _highestDependencyLayerOld = dependencyID;
- _highestDependencyQualityIDOld = _highestDependencyQualityID;
- if( dependencyID == _highestDependencyLayer &&
- dependencyQualityID == _highestDependencyQualityID)
- {
- higestLayer = true;
- }
- // relay
- return true;
- }
- }
- } else
- {
- // Delta frame and we are waiting to switch dependency layer
- if(_highestDependencyLayer > _highestDependencyLayerOld)
- {
- // we want to switch up to a higher dependency layer
- // use old setting until we get a key-frame
-
- // filter based on old dependency
- // we could have allowed to add a MGS layer lower than the dependency ID
- // but then we can't know the highest layer relayed we assume that the user
- // will add one layer at a time
- if( _highestTemporalLayer < temporalID ||
- _highestDependencyLayerOld < dependencyID ||
- _highestDependencyQualityIDOld < dependencyQualityID)
- {
- // drop
- return false;
- }
- // highest layer based on old
- if( dependencyID == _highestDependencyLayerOld &&
- dependencyQualityID == _highestDependencyQualityIDOld)
- {
- higestLayer = true;
- }
- } else
- {
- // we want to switch down to a lower dependency layer,
- // use old setting, done bellow
- // drop all temporal layers while waiting for the key-frame
- if(temporalID > 0)
- {
- // drop
- return false;
- }
- // we can't drop a lower MGS layer since this might depend on it
- // however we can drop MGS layers larger than dependecyQualityId
- // with dependency from old and quality 0
- if( _highestDependencyLayerOld < dependencyID ||
- (_highestDependencyQualityIDOld & 0xf0) < dependencyQualityID)
- {
- // drop
- return false;
- }
- if( dependencyID == _highestDependencyLayerOld &&
- dependencyQualityID == (_highestDependencyQualityIDOld & 0xf0))
- {
- higestLayer = true;
- }
- }
- }
- } else
- {
- // filter based on current state
- if( _highestTemporalLayer < temporalID ||
- _highestDependencyLayer < dependencyID ||
- _highestDependencyQualityID < dependencyQualityID)
- {
- // drop
- return false;
- }
- if( dependencyID == _highestDependencyLayer &&
- dependencyQualityID == _highestDependencyQualityID)
- {
- higestLayer = true;
- }
- }
- return true;
-}
-
-int32_t
-RTPSenderH264::SetHighestSendLayer(const uint8_t dependencyQualityLayer,
- const uint8_t temporalLayer)
-{
- const uint8_t dependencyLayer = (dependencyQualityLayer >> 4);
-
- if(_highestDependencyLayerOld != _highestDependencyLayer)
- {
- // we have not switched to the new dependency yet
- } else
- {
- if(_highestDependencyLayer == dependencyLayer)
- {
- // no change of dependency
- // switch now _highestDependencyQualityIDOld
- _highestDependencyQualityIDOld = dependencyQualityLayer;
- }else
- {
- // change of dependency, update _highestDependencyQualityIDOld store as old
- _highestDependencyQualityIDOld = _highestDependencyQualityID;
- }
- }
- _useHighestSendLayer = true;
- _highestDependencyLayer = dependencyLayer;
- _highestDependencyQualityID = dependencyQualityLayer;
- _highestTemporalLayer = temporalLayer;
- return 0;
-}
-
-int32_t
-RTPSenderH264::HighestSendLayer(uint8_t& dependencyQualityLayer,
- uint8_t& temporalLayer)
-{
- if (!_useHighestSendLayer)
- {
- // No information set
- return -1;
- }
- dependencyQualityLayer = _highestDependencyQualityID;
- temporalLayer = _highestTemporalLayer;
- return 0;
-}
-/*
-* H.264
-*/
-int32_t
-RTPSenderH264::SendH264(const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- H264Information& h264Information)
-{
- int32_t payloadBytesToSend = payloadSize;
- const uint8_t* data = payloadData;
- bool switchToFUA = false;
- const uint16_t rtpHeaderLength = _rtpSender.RTPHeaderLength();
-
- const H264Info* ptrH264Info = NULL;
- if (h264Information.GetInfo(payloadData,payloadSize, ptrH264Info) == -1)
- {
- return -1;
- }
- uint16_t idxNALU = 0;
- uint16_t DONCdummy = 0;
-
- while (payloadBytesToSend > 0)
- {
- switch(_h264Mode)
- {
- case H264_NON_INTERLEAVED_MODE:
-
- if(!switchToFUA)
- {
- if(SendH264_STAP_A(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- switchToFUA,
- payloadBytesToSend,
- data,
- rtpHeaderLength) != 0)
- {
- return -1;
- }
- }
- else
- {
- // FUA for the rest of the frame
- if(SendH264_FU_A(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- payloadBytesToSend,
- data,
- rtpHeaderLength,
- DONCdummy) != 0)
- {
- return -1;
- }
- // try to go back to STAP_A
- switchToFUA = false;
- }
- break;
- case H264_SINGLE_NAL_MODE:
- {
- // modeSingleU
- if(SendH264_SingleMode(frameType,
- ptrH264Info,
- idxNALU,
- payloadType,
- captureTimeStamp,
- payloadBytesToSend,
- data,
- rtpHeaderLength,
- DONCdummy) != 0)
- {
- return -1;
- }
- break;
- }
- case H264_INTERLEAVED_MODE:
- // not supported
- assert(false);
- return -1;
- }
- }
- return 0;
-}
-} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/H264/rtp_sender_h264.h b/modules/rtp_rtcp/source/H264/rtp_sender_h264.h
deleted file mode 100644
index ea385d4..0000000
--- a/modules/rtp_rtcp/source/H264/rtp_sender_h264.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_RTP_SENDER_H264_H_
-#define WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_RTP_SENDER_H264_H_
-
-#include "webrtc/typedefs.h"
-#include "ModuleRTPRTCPConfig.h"
-#include "rtp_rtcp_defines.h"
-#include "h264_information.h"
-
-#include "RTPSender.h"
-
-namespace webrtc {
-class RTPSenderH264
-{
-public:
- int32_t SendH264(const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- H264Information& h264Information);
-
- int32_t SendH264SVC(const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- H264Information& h264Information);
-
- // H.264 AVC
- int32_t SetH264PacketizationMode(const H264PacketizationMode mode);
-
- int32_t SetH264SendModeNALU_PPS_SPS(const bool dontSend);
-
- // H.264 SVC
- int32_t SetHighestSendLayer(const uint8_t dependencyQualityLayer,
- const uint8_t temporalLayer);
-
- int32_t HighestSendLayer(uint8_t& dependencyQualityLayer,
- uint8_t& temporalLayer);
-
-protected:
- RTPSenderH264(RTPSenderInterface* rtpSender);
- virtual ~RTPSenderH264();
-
- int32_t Init();
-
- virtual uint16_t FECPacketOverhead() const = 0;
- virtual RtpVideoCodecTypes VideoCodecType() const = 0;
-
- virtual int32_t SendVideoPacket(const FrameType frameType,
- const uint8_t* dataBuffer,
- const uint16_t payloadLength,
- const uint16_t rtpHeaderLength,
- bool baseLayerVideoPacket=false) = 0;
-
-
- bool SendH264SVCLayer(const FrameType frameType,
- const uint8_t temporalID,
- const uint8_t dependencyQualityID,
- bool& higestLayer);
-
- // H.264 SVC
- int32_t AddH264PACSINALU(const bool firstPacketInNALU,
- const bool lastPacketInNALU,
- const H264_PACSI_NALU& paci,
- const H264_SVC_NALUHeader& svc,
- const uint16_t DONC,
- uint8_t* databuffer,
- int32_t& curByte) const;
-
- int32_t SendH264FillerData(const WebRtcRTPHeader* rtpHeader,
- const uint16_t bytesToSend,
- const uint32_t ssrc);
-
- int32_t SendH264FillerData(const uint32_t captureTimestamp,
- const uint8_t payloadType,
- const uint32_t bytesToSend);
-
- int32_t SendH264SVCRelayPacket(const WebRtcRTPHeader* rtpHeader,
- const uint8_t* incomingRTPPacket,
- const uint16_t incomingRTPPacketSize,
- const uint32_t ssrc,
- const bool higestLayer);
-
- int32_t SetH264RelaySequenceNumber(const uint16_t seqNum);
-
- int32_t SetH264RelayCompleteLayer(const bool complete);
-
- // H.264
- H264PacketizationMode _h264Mode;
- bool _h264SendPPS_SPS;
-
- // H.264-SVC
- int8_t _h264SVCPayloadType;
- uint16_t _h264SVCRelaySequenceNumber;
- uint32_t _h264SVCRelayTimeStamp;
- bool _h264SVCRelayLayerComplete;
-
-
-private:
- // H.264
- int32_t SendH264_SingleMode(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength,
- const bool sendSVCPACSI=false);
-
- int32_t SendH264_FU_A(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength,
- const bool sendSVCPACSI = false);
-
- int32_t SendH264_STAP_A(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- bool& switchToFUA,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLength);
-
- int32_t SendH264_STAP_A_PACSI(const FrameType frameType,
- const H264Info* ptrH264Info,
- uint16_t &idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- bool& switchToFUA,
- int32_t &payloadBytesToSend,
- const uint8_t*& data,
- const uint16_t rtpHeaderLengh)
-
- int32_t SendH264_SinglePACSI(const FrameType frameType,
- const H264Info* ptrH264Info,
- const uint16_t idxNALU,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- const bool firstPacketInNALU,
- const bool lastPacketInNALU);
-
- bool AddH264SVCNALUHeader(const H264_SVC_NALUHeader& svc,
- uint8_t* databuffer,
- int32_t& curByte) const;
-
- RTPSenderInterface& _rtpSender;
-
- // relay
- bool _useHighestSendLayer;
- uint8_t _highestDependencyLayerOld;
- uint8_t _highestDependencyQualityIDOld;
- uint8_t _highestDependencyLayer;
- uint8_t _highestDependencyQualityID;
- uint8_t _highestTemporalLayer;
-
-
-};
-
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_RTP_SENDER_H264_H_
diff --git a/modules/rtp_rtcp/source/fec_receiver_impl.cc b/modules/rtp_rtcp/source/fec_receiver_impl.cc
index 0d6c174..e795841 100644
--- a/modules/rtp_rtcp/source/fec_receiver_impl.cc
+++ b/modules/rtp_rtcp/source/fec_receiver_impl.cc
@@ -171,7 +171,7 @@
payload_data_length - REDHeaderLength);
received_packet->pkt->length = payload_data_length - REDHeaderLength;
received_packet->ssrc =
- ModuleRTPUtility::BufferToUWord32(&incoming_rtp_packet[8]);
+ RtpUtility::BufferToUWord32(&incoming_rtp_packet[8]);
} else {
// copy the RTP header
diff --git a/modules/rtp_rtcp/source/fec_receiver_unittest.cc b/modules/rtp_rtcp/source/fec_receiver_unittest.cc
index 0b12449..2a3b155 100644
--- a/modules/rtp_rtcp/source/fec_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/fec_receiver_unittest.cc
@@ -15,6 +15,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/rtp_rtcp/interface/fec_receiver.h"
+#include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h"
#include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h"
@@ -25,17 +26,6 @@
namespace webrtc {
-class MockRtpData : public RtpData {
- public:
- MOCK_METHOD3(OnReceivedPayloadData,
- int32_t(const uint8_t* payloadData,
- const uint16_t payloadSize,
- const WebRtcRTPHeader* rtpHeader));
-
- MOCK_METHOD2(OnRecoveredPacket,
- bool(const uint8_t* packet, int packet_length));
-};
-
class ReceiverFecTest : public ::testing::Test {
protected:
virtual void SetUp() {
diff --git a/modules/rtp_rtcp/source/fec_test_helper.cc b/modules/rtp_rtcp/source/fec_test_helper.cc
index 176954f..0ffd5bf 100644
--- a/modules/rtp_rtcp/source/fec_test_helper.cc
+++ b/modules/rtp_rtcp/source/fec_test_helper.cc
@@ -86,9 +86,9 @@
data[0] = 0x80; // Version 2.
data[1] = header->payloadType;
data[1] |= (header->markerBit ? kRtpMarkerBitMask : 0);
- ModuleRTPUtility::AssignUWord16ToBuffer(data + 2, header->sequenceNumber);
- ModuleRTPUtility::AssignUWord32ToBuffer(data + 4, header->timestamp);
- ModuleRTPUtility::AssignUWord32ToBuffer(data + 8, header->ssrc);
+ RtpUtility::AssignUWord16ToBuffer(data + 2, header->sequenceNumber);
+ RtpUtility::AssignUWord32ToBuffer(data + 4, header->timestamp);
+ RtpUtility::AssignUWord32ToBuffer(data + 8, header->ssrc);
}
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/forward_error_correction.cc b/modules/rtp_rtcp/source/forward_error_correction.cc
index 31303c8..b02ea08 100644
--- a/modules/rtp_rtcp/source/forward_error_correction.cc
+++ b/modules/rtp_rtcp/source/forward_error_correction.cc
@@ -230,7 +230,7 @@
Packet* media_packet = *media_list_it;
// Assign network-ordered media payload length.
- ModuleRTPUtility::AssignUWord16ToBuffer(
+ RtpUtility::AssignUWord16ToBuffer(
media_payload_length, media_packet->length - kRtpHeaderSize);
fec_packet_length = media_packet->length + fec_rtp_offset;
@@ -432,7 +432,7 @@
// -- ULP header --
// Copy the payload size to the protection length field.
// (We protect the entire packet.)
- ModuleRTPUtility::AssignUWord16ToBuffer(
+ RtpUtility::AssignUWord16ToBuffer(
&generated_fec_packets_[i].data[10],
generated_fec_packets_[i].length - kFecHeaderSize - ulp_header_size);
@@ -537,7 +537,7 @@
fec_packet->ssrc = rx_packet->ssrc;
const uint16_t seq_num_base =
- ModuleRTPUtility::BufferToUWord16(&fec_packet->pkt->data[2]);
+ RtpUtility::BufferToUWord16(&fec_packet->pkt->data[2]);
const uint16_t maskSizeBytes =
(fec_packet->pkt->data[0] & 0x40) ? kMaskSizeLBitSet
: kMaskSizeLBitClear; // L bit set?
@@ -603,6 +603,23 @@
while (!received_packet_list->empty()) {
ReceivedPacket* rx_packet = received_packet_list->front();
+ // Check for discarding oldest FEC packet, to avoid wrong FEC decoding from
+ // sequence number wrap-around. Detection of old FEC packet is based on
+ // sequence number difference of received packet and oldest packet in FEC
+ // packet list.
+ // TODO(marpan/holmer): We should be able to improve detection/discarding of
+ // old FEC packets based on timestamp information or better sequence number
+ // thresholding (e.g., to distinguish between wrap-around and reordering).
+ if (!fec_packet_list_.empty()) {
+ uint16_t seq_num_diff = abs(
+ static_cast<int>(rx_packet->seq_num) -
+ static_cast<int>(fec_packet_list_.front()->seq_num));
+ if (seq_num_diff > 0x3fff) {
+ DiscardFECPacket(fec_packet_list_.front());
+ fec_packet_list_.pop_front();
+ }
+ }
+
if (rx_packet->is_fec) {
InsertFECPacket(rx_packet, recovered_packet_list);
} else {
@@ -633,7 +650,7 @@
// Copy FEC payload, skipping the ULP header.
memcpy(&recovered->pkt->data[kRtpHeaderSize],
&fec_packet->pkt->data[kFecHeaderSize + ulp_header_size],
- ModuleRTPUtility::BufferToUWord16(protection_length));
+ RtpUtility::BufferToUWord16(protection_length));
// Copy the length recovery field.
memcpy(recovered->length_recovery, &fec_packet->pkt->data[8], 2);
// Copy the first 2 bytes of the FEC header.
@@ -641,8 +658,7 @@
// Copy the 5th to 8th bytes of the FEC header.
memcpy(&recovered->pkt->data[4], &fec_packet->pkt->data[4], 4);
// Set the SSRC field.
- ModuleRTPUtility::AssignUWord32ToBuffer(&recovered->pkt->data[8],
- fec_packet->ssrc);
+ RtpUtility::AssignUWord32ToBuffer(&recovered->pkt->data[8], fec_packet->ssrc);
}
void ForwardErrorCorrection::FinishRecovery(RecoveredPacket* recovered) {
@@ -651,12 +667,11 @@
recovered->pkt->data[0] &= 0xbf; // Clear the 2nd bit.
// Set the SN field.
- ModuleRTPUtility::AssignUWord16ToBuffer(&recovered->pkt->data[2],
- recovered->seq_num);
+ RtpUtility::AssignUWord16ToBuffer(&recovered->pkt->data[2],
+ recovered->seq_num);
// Recover the packet length.
recovered->pkt->length =
- ModuleRTPUtility::BufferToUWord16(recovered->length_recovery) +
- kRtpHeaderSize;
+ RtpUtility::BufferToUWord16(recovered->length_recovery) + kRtpHeaderSize;
}
void ForwardErrorCorrection::XorPackets(const Packet* src_packet,
@@ -671,8 +686,8 @@
}
// XOR with the network-ordered payload size.
uint8_t media_payload_length[2];
- ModuleRTPUtility::AssignUWord16ToBuffer(media_payload_length,
- src_packet->length - kRtpHeaderSize);
+ RtpUtility::AssignUWord16ToBuffer(media_payload_length,
+ src_packet->length - kRtpHeaderSize);
dst_packet->length_recovery[0] ^= media_payload_length[0];
dst_packet->length_recovery[1] ^= media_payload_length[1];
diff --git a/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h b/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h
index ccf82e5..f577cba 100644
--- a/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h
+++ b/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h
@@ -21,21 +21,21 @@
MOCK_CONST_METHOD0(CodecsMustBeUnique,
bool());
MOCK_CONST_METHOD4(PayloadIsCompatible,
- bool(const ModuleRTPUtility::Payload& payload,
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate));
+ bool(const RtpUtility::Payload& payload,
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate));
MOCK_CONST_METHOD2(UpdatePayloadRate,
- void(ModuleRTPUtility::Payload* payload, const uint32_t rate));
- MOCK_CONST_METHOD1(GetPayloadTypeFrequency, int(
- const ModuleRTPUtility::Payload& payload));
- MOCK_CONST_METHOD5(CreatePayloadType,
- ModuleRTPUtility::Payload*(
- const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- const int8_t payloadType,
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate));
+ void(RtpUtility::Payload* payload, const uint32_t rate));
+ MOCK_CONST_METHOD1(GetPayloadTypeFrequency,
+ int(const RtpUtility::Payload& payload));
+ MOCK_CONST_METHOD5(
+ CreatePayloadType,
+ RtpUtility::Payload*(const char payloadName[RTP_PAYLOAD_NAME_SIZE],
+ const int8_t payloadType,
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate));
};
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index 209af40..b30791c 100644
--- a/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -112,7 +112,10 @@
return len;
}
int packet_length = len;
- uint8_t restored_packet[1500];
+ // TODO(pbos): Figure out why this needs to be initialized. Likely this
+ // is hiding a bug either in test setup or other code.
+ // https://code.google.com/p/webrtc/issues/detail?id=3183
+ uint8_t restored_packet[1500] = {0};
uint8_t* restored_packet_ptr = restored_packet;
RTPHeader header;
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
diff --git a/modules/rtp_rtcp/source/producer_fec.cc b/modules/rtp_rtcp/source/producer_fec.cc
index 3173d3d..747cd89 100644
--- a/modules/rtp_rtcp/source/producer_fec.cc
+++ b/modules/rtp_rtcp/source/producer_fec.cc
@@ -61,7 +61,7 @@
void RedPacket::SetSeqNum(int seq_num) {
assert(seq_num >= 0 && seq_num < (1<<16));
- ModuleRTPUtility::AssignUWord16ToBuffer(&data_[2], seq_num);
+ RtpUtility::AssignUWord16ToBuffer(&data_[2], seq_num);
}
void RedPacket::AssignPayload(const uint8_t* payload, int length) {
diff --git a/modules/rtp_rtcp/source/receive_statistics_impl.cc b/modules/rtp_rtcp/source/receive_statistics_impl.cc
index aa7c9c5..f063ce3 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.cc
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.cc
@@ -133,11 +133,12 @@
void StreamStatisticianImpl::UpdateJitter(const RTPHeader& header,
uint32_t receive_time_secs,
uint32_t receive_time_frac) {
- uint32_t receive_time_rtp = ModuleRTPUtility::ConvertNTPTimeToRTP(
- receive_time_secs, receive_time_frac, header.payload_type_frequency);
- uint32_t last_receive_time_rtp = ModuleRTPUtility::ConvertNTPTimeToRTP(
- last_receive_time_secs_, last_receive_time_frac_,
- header.payload_type_frequency);
+ uint32_t receive_time_rtp = RtpUtility::ConvertNTPTimeToRTP(
+ receive_time_secs, receive_time_frac, header.payload_type_frequency);
+ uint32_t last_receive_time_rtp =
+ RtpUtility::ConvertNTPTimeToRTP(last_receive_time_secs_,
+ last_receive_time_frac_,
+ header.payload_type_frequency);
int32_t time_diff_samples = (receive_time_rtp - last_receive_time_rtp) -
(header.timestamp - last_received_timestamp_);
@@ -407,36 +408,31 @@
void ReceiveStatisticsImpl::IncomingPacket(const RTPHeader& header,
size_t bytes,
bool retransmitted) {
- StatisticianImplMap::iterator it;
+ StreamStatisticianImpl* impl;
{
CriticalSectionScoped cs(receive_statistics_lock_.get());
- it = statisticians_.find(header.ssrc);
- if (it == statisticians_.end()) {
- std::pair<StatisticianImplMap::iterator, uint32_t> insert_result =
- statisticians_.insert(std::make_pair(
- header.ssrc, new StreamStatisticianImpl(clock_, this, this)));
- it = insert_result.first;
+ StatisticianImplMap::iterator it = statisticians_.find(header.ssrc);
+ if (it != statisticians_.end()) {
+ impl = it->second;
+ } else {
+ impl = new StreamStatisticianImpl(clock_, this, this);
+ statisticians_[header.ssrc] = impl;
}
}
- it->second->IncomingPacket(header, bytes, retransmitted);
+ // StreamStatisticianImpl instance is created once and only destroyed when
+ // this whole ReceiveStatisticsImpl is destroyed. StreamStatisticianImpl has
+ // it's own locking so don't hold receive_statistics_lock_ (potential
+ // deadlock).
+ impl->IncomingPacket(header, bytes, retransmitted);
}
void ReceiveStatisticsImpl::FecPacketReceived(uint32_t ssrc) {
CriticalSectionScoped cs(receive_statistics_lock_.get());
StatisticianImplMap::iterator it = statisticians_.find(ssrc);
- assert(it != statisticians_.end());
- it->second->FecPacketReceived();
-}
-
-void ReceiveStatisticsImpl::ChangeSsrc(uint32_t from_ssrc, uint32_t to_ssrc) {
- CriticalSectionScoped cs(receive_statistics_lock_.get());
- StatisticianImplMap::iterator from_it = statisticians_.find(from_ssrc);
- if (from_it == statisticians_.end())
- return;
- if (statisticians_.find(to_ssrc) != statisticians_.end())
- return;
- statisticians_[to_ssrc] = from_it->second;
- statisticians_.erase(from_it);
+ // Ignore FEC if it is the first packet.
+ if (it != statisticians_.end()) {
+ it->second->FecPacketReceived();
+ }
}
StatisticianMap ReceiveStatisticsImpl::GetActiveStatisticians() const {
diff --git a/modules/rtp_rtcp/source/receive_statistics_impl.h b/modules/rtp_rtcp/source/receive_statistics_impl.h
index 4aa41f3..40ca285 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.h
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.h
@@ -114,8 +114,6 @@
virtual int32_t Process() OVERRIDE;
virtual int32_t TimeUntilNextProcess() OVERRIDE;
- void ChangeSsrc(uint32_t from_ssrc, uint32_t to_ssrc);
-
virtual void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback)
OVERRIDE;
diff --git a/modules/rtp_rtcp/source/receive_statistics_unittest.cc b/modules/rtp_rtcp/source/receive_statistics_unittest.cc
index f0b9ded..5b4d0dd 100644
--- a/modules/rtp_rtcp/source/receive_statistics_unittest.cc
+++ b/modules/rtp_rtcp/source/receive_statistics_unittest.cc
@@ -219,41 +219,42 @@
EXPECT_EQ(1u, callback.num_calls_);
}
+class RtpTestCallback : public StreamDataCountersCallback {
+ public:
+ RtpTestCallback()
+ : StreamDataCountersCallback(), num_calls_(0), ssrc_(0), stats_() {}
+ virtual ~RtpTestCallback() {}
+
+ virtual void DataCountersUpdated(const StreamDataCounters& counters,
+ uint32_t ssrc) {
+ ssrc_ = ssrc;
+ stats_ = counters;
+ ++num_calls_;
+ }
+
+ void ExpectMatches(uint32_t num_calls,
+ uint32_t ssrc,
+ uint32_t bytes,
+ uint32_t padding,
+ uint32_t packets,
+ uint32_t retransmits,
+ uint32_t fec) {
+ EXPECT_EQ(num_calls, num_calls_);
+ EXPECT_EQ(ssrc, ssrc_);
+ EXPECT_EQ(bytes, stats_.bytes);
+ EXPECT_EQ(padding, stats_.padding_bytes);
+ EXPECT_EQ(packets, stats_.packets);
+ EXPECT_EQ(retransmits, stats_.retransmitted_packets);
+ EXPECT_EQ(fec, stats_.fec_packets);
+ }
+
+ uint32_t num_calls_;
+ uint32_t ssrc_;
+ StreamDataCounters stats_;
+};
+
TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
- class TestCallback : public StreamDataCountersCallback {
- public:
- TestCallback()
- : StreamDataCountersCallback(), num_calls_(0), ssrc_(0), stats_() {}
- virtual ~TestCallback() {}
-
- virtual void DataCountersUpdated(const StreamDataCounters& counters,
- uint32_t ssrc) {
- ssrc_ = ssrc;
- stats_ = counters;
- ++num_calls_;
- }
-
- void ExpectMatches(uint32_t num_calls,
- uint32_t ssrc,
- uint32_t bytes,
- uint32_t padding,
- uint32_t packets,
- uint32_t retransmits,
- uint32_t fec) {
- EXPECT_EQ(num_calls, num_calls_);
- EXPECT_EQ(ssrc, ssrc_);
- EXPECT_EQ(bytes, stats_.bytes);
- EXPECT_EQ(padding, stats_.padding_bytes);
- EXPECT_EQ(packets, stats_.packets);
- EXPECT_EQ(retransmits, stats_.retransmitted_packets);
- EXPECT_EQ(fec, stats_.fec_packets);
- }
-
- uint32_t num_calls_;
- uint32_t ssrc_;
- StreamDataCounters stats_;
- } callback;
-
+ RtpTestCallback callback;
receive_statistics_->RegisterRtpStatisticsCallback(&callback);
const uint32_t kHeaderLength = 20;
@@ -300,4 +301,23 @@
callback.ExpectMatches(
5, kSsrc1, 4 * kPacketSize1, kPaddingLength * 2, 4, 1, 1);
}
+
+TEST_F(ReceiveStatisticsTest, RtpCallbacksFecFirst) {
+ RtpTestCallback callback;
+ receive_statistics_->RegisterRtpStatisticsCallback(&callback);
+
+ const uint32_t kHeaderLength = 20;
+
+ // If first packet is FEC, ignore it.
+ receive_statistics_->FecPacketReceived(kSsrc1);
+ EXPECT_EQ(0u, callback.num_calls_);
+
+ header1_.headerLength = kHeaderLength;
+ receive_statistics_->IncomingPacket(
+ header1_, kPacketSize1 + kHeaderLength, false);
+ callback.ExpectMatches(1, kSsrc1, kPacketSize1, 0, 1, 0, 0);
+
+ receive_statistics_->FecPacketReceived(kSsrc1);
+ callback.ExpectMatches(2, kSsrc1, kPacketSize1, 0, 1, 0, 1);
+}
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc b/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
index 88463e4..5e580a3 100644
--- a/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
@@ -97,7 +97,6 @@
rtcp_receiver_ = new RTCPReceiver(0, system_clock_, dummy_rtp_rtcp_impl_);
test_transport_ = new TestTransport(rtcp_receiver_);
- EXPECT_EQ(0, rtcp_sender_->Init());
EXPECT_EQ(0, rtcp_sender_->RegisterSendTransport(test_transport_));
}
@@ -122,7 +121,8 @@
uint32_t SSRC = 456789;
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpNonCompound));
EXPECT_EQ(0, rtcp_sender_->SetREMBData(1234, 1, &SSRC));
- RTCPSender::FeedbackState feedback_state(dummy_rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state =
+ dummy_rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
}
@@ -130,7 +130,8 @@
uint32_t SSRCs[2] = {456789, 98765};
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
EXPECT_EQ(0, rtcp_sender_->SetREMBData(1234, 2, SSRCs));
- RTCPSender::FeedbackState feedback_state(dummy_rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state =
+ dummy_rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
}
} // namespace
diff --git a/modules/rtp_rtcp/source/rtcp_packet.cc b/modules/rtp_rtcp/source/rtcp_packet.cc
index a4cdfd9..4228cfb 100644
--- a/modules/rtp_rtcp/source/rtcp_packet.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet.cc
@@ -13,6 +13,10 @@
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
#include "webrtc/system_wrappers/interface/logging.h"
+using webrtc::RTCPUtility::kBtDlrr;
+using webrtc::RTCPUtility::kBtReceiverReferenceTime;
+using webrtc::RTCPUtility::kBtVoipMetric;
+
using webrtc::RTCPUtility::PT_APP;
using webrtc::RTCPUtility::PT_BYE;
using webrtc::RTCPUtility::PT_IJ;
@@ -57,18 +61,36 @@
buffer[(*offset)++] = value;
}
void AssignUWord16(uint8_t* buffer, size_t* offset, uint16_t value) {
- ModuleRTPUtility::AssignUWord16ToBuffer(buffer + *offset, value);
+ RtpUtility::AssignUWord16ToBuffer(buffer + *offset, value);
*offset += 2;
}
void AssignUWord24(uint8_t* buffer, size_t* offset, uint32_t value) {
- ModuleRTPUtility::AssignUWord24ToBuffer(buffer + *offset, value);
+ RtpUtility::AssignUWord24ToBuffer(buffer + *offset, value);
*offset += 3;
}
void AssignUWord32(uint8_t* buffer, size_t* offset, uint32_t value) {
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + *offset, value);
+ RtpUtility::AssignUWord32ToBuffer(buffer + *offset, value);
*offset += 4;
}
+void ComputeMantissaAnd6bitBase2Exponent(uint32_t input_base10,
+ uint8_t bits_mantissa,
+ uint32_t* mantissa,
+ uint8_t* exp) {
+ // input_base10 = mantissa * 2^exp
+ assert(bits_mantissa <= 32);
+ uint32_t mantissa_max = (1 << bits_mantissa) - 1;
+ uint8_t exponent = 0;
+ for (uint32_t i = 0; i < 64; ++i) {
+ if (input_base10 <= (mantissa_max << i)) {
+ exponent = i;
+ break;
+ }
+ }
+ *exp = exponent;
+ *mantissa = (input_base10 >> exponent);
+}
+
size_t BlockToHeaderLength(size_t length_in_bytes) {
// Length in 32-bit words minus 1.
assert(length_in_bytes > 0);
@@ -440,6 +462,264 @@
AssignUWord8(buffer, pos, fir_item.CommandSequenceNumber);
AssignUWord24(buffer, pos, 0);
}
+
+void CreateTmmbrItem(const RTCPPacketRTPFBTMMBRItem& tmmbr_item,
+ uint8_t* buffer,
+ size_t* pos) {
+ uint32_t bitrate_bps = tmmbr_item.MaxTotalMediaBitRate * 1000;
+ uint32_t mantissa = 0;
+ uint8_t exp = 0;
+ ComputeMantissaAnd6bitBase2Exponent(bitrate_bps, 17, &mantissa, &exp);
+
+ AssignUWord32(buffer, pos, tmmbr_item.SSRC);
+ AssignUWord8(buffer, pos, (exp << 2) + ((mantissa >> 15) & 0x03));
+ AssignUWord8(buffer, pos, mantissa >> 7);
+ AssignUWord8(buffer, pos, (mantissa << 1) +
+ ((tmmbr_item.MeasuredOverhead >> 8) & 0x01));
+ AssignUWord8(buffer, pos, tmmbr_item.MeasuredOverhead);
+}
+
+// Temporary Maximum Media Stream Bit Rate Request (TMMBR) (RFC 5104).
+//
+// FCI:
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | MxTBR Exp | MxTBR Mantissa |Measured Overhead|
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+void CreateTmmbr(const RTCPPacketRTPFBTMMBR& tmmbr,
+ const RTCPPacketRTPFBTMMBRItem& tmmbr_item,
+ size_t length,
+ uint8_t* buffer,
+ size_t* pos) {
+ const uint8_t kFmt = 3;
+ CreateHeader(kFmt, PT_RTPFB, length, buffer, pos);
+ AssignUWord32(buffer, pos, tmmbr.SenderSSRC);
+ AssignUWord32(buffer, pos, kUnusedMediaSourceSsrc0);
+ CreateTmmbrItem(tmmbr_item, buffer, pos);
+}
+
+// Temporary Maximum Media Stream Bit Rate Notification (TMMBN) (RFC 5104).
+//
+// FCI:
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | MxTBR Exp | MxTBR Mantissa |Measured Overhead|
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+void CreateTmmbn(const RTCPPacketRTPFBTMMBN& tmmbn,
+ const std::vector<RTCPPacketRTPFBTMMBRItem>& tmmbn_items,
+ size_t length,
+ uint8_t* buffer,
+ size_t* pos) {
+ const uint8_t kFmt = 4;
+ CreateHeader(kFmt, PT_RTPFB, length, buffer, pos);
+ AssignUWord32(buffer, pos, tmmbn.SenderSSRC);
+ AssignUWord32(buffer, pos, kUnusedMediaSourceSsrc0);
+ for (uint8_t i = 0; i < tmmbn_items.size(); ++i) {
+ CreateTmmbrItem(tmmbn_items[i], buffer, pos);
+ }
+}
+
+// Receiver Estimated Max Bitrate (REMB) (draft-alvestrand-rmcat-remb).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |V=2|P| FMT=15 | PT=206 | length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of packet sender |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of media source |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Unique identifier 'R' 'E' 'M' 'B' |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Num SSRC | BR Exp | BR Mantissa |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC feedback |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | ... |
+
+void CreateRemb(const RTCPPacketPSFBAPP& remb,
+ const RTCPPacketPSFBREMBItem& remb_item,
+ size_t length,
+ uint8_t* buffer,
+ size_t* pos) {
+ uint32_t mantissa = 0;
+ uint8_t exp = 0;
+ ComputeMantissaAnd6bitBase2Exponent(remb_item.BitRate, 18, &mantissa, &exp);
+
+ const uint8_t kFmt = 15;
+ CreateHeader(kFmt, PT_PSFB, length, buffer, pos);
+ AssignUWord32(buffer, pos, remb.SenderSSRC);
+ AssignUWord32(buffer, pos, kUnusedMediaSourceSsrc0);
+ AssignUWord8(buffer, pos, 'R');
+ AssignUWord8(buffer, pos, 'E');
+ AssignUWord8(buffer, pos, 'M');
+ AssignUWord8(buffer, pos, 'B');
+ AssignUWord8(buffer, pos, remb_item.NumberOfSSRCs);
+ AssignUWord8(buffer, pos, (exp << 2) + ((mantissa >> 16) & 0x03));
+ AssignUWord8(buffer, pos, mantissa >> 8);
+ AssignUWord8(buffer, pos, mantissa);
+ for (uint8_t i = 0; i < remb_item.NumberOfSSRCs; ++i) {
+ AssignUWord32(buffer, pos, remb_item.SSRCs[i]);
+ }
+}
+
+// From RFC 3611: RTP Control Protocol Extended Reports (RTCP XR).
+//
+// Format for XR packets:
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |V=2|P|reserved | PT=XR=207 | length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// : report blocks :
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+void CreateXrHeader(const RTCPPacketXR& header,
+ size_t length,
+ uint8_t* buffer,
+ size_t* pos) {
+ CreateHeader(0U, PT_XR, length, buffer, pos);
+ AssignUWord32(buffer, pos, header.OriginatorSSRC);
+}
+
+void CreateXrBlockHeader(uint8_t block_type,
+ uint16_t block_length,
+ uint8_t* buffer,
+ size_t* pos) {
+ AssignUWord8(buffer, pos, block_type);
+ AssignUWord8(buffer, pos, 0);
+ AssignUWord16(buffer, pos, block_length);
+}
+
+// Receiver Reference Time Report Block (RFC 3611).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | BT=4 | reserved | block length = 2 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | NTP timestamp, most significant word |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | NTP timestamp, least significant word |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+void CreateRrtr(const std::vector<RTCPPacketXRReceiverReferenceTimeItem>& rrtrs,
+ uint8_t* buffer,
+ size_t* pos) {
+ const uint16_t kBlockLength = 2;
+ for (std::vector<RTCPPacketXRReceiverReferenceTimeItem>::const_iterator it =
+ rrtrs.begin(); it != rrtrs.end(); ++it) {
+ CreateXrBlockHeader(kBtReceiverReferenceTime, kBlockLength, buffer, pos);
+ AssignUWord32(buffer, pos, (*it).NTPMostSignificant);
+ AssignUWord32(buffer, pos, (*it).NTPLeastSignificant);
+ }
+}
+
+// DLRR Report Block (RFC 3611).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | BT=5 | reserved | block length |
+// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+// | SSRC_1 (SSRC of first receiver) | sub-
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block
+// | last RR (LRR) | 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | delay since last RR (DLRR) |
+// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+// | SSRC_2 (SSRC of second receiver) | sub-
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block
+// : ... : 2
+
+void CreateDlrr(const std::vector<Xr::DlrrBlock>& dlrrs,
+ uint8_t* buffer,
+ size_t* pos) {
+ for (std::vector<Xr::DlrrBlock>::const_iterator it = dlrrs.begin();
+ it != dlrrs.end(); ++it) {
+ if ((*it).empty()) {
+ continue;
+ }
+ uint16_t block_length = 3 * (*it).size();
+ CreateXrBlockHeader(kBtDlrr, block_length, buffer, pos);
+ for (Xr::DlrrBlock::const_iterator it_block = (*it).begin();
+ it_block != (*it).end(); ++it_block) {
+ AssignUWord32(buffer, pos, (*it_block).SSRC);
+ AssignUWord32(buffer, pos, (*it_block).LastRR);
+ AssignUWord32(buffer, pos, (*it_block).DelayLastRR);
+ }
+ }
+}
+
+// VoIP Metrics Report Block (RFC 3611).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | BT=7 | reserved | block length = 8 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of source |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | loss rate | discard rate | burst density | gap density |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | burst duration | gap duration |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | round trip delay | end system delay |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | signal level | noise level | RERL | Gmin |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | R factor | ext. R factor | MOS-LQ | MOS-CQ |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | RX config | reserved | JB nominal |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | JB maximum | JB abs max |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+void CreateVoipMetric(const std::vector<RTCPPacketXRVOIPMetricItem>& metrics,
+ uint8_t* buffer,
+ size_t* pos) {
+ const uint16_t kBlockLength = 8;
+ for (std::vector<RTCPPacketXRVOIPMetricItem>::const_iterator it =
+ metrics.begin(); it != metrics.end(); ++it) {
+ CreateXrBlockHeader(kBtVoipMetric, kBlockLength, buffer, pos);
+ AssignUWord32(buffer, pos, (*it).SSRC);
+ AssignUWord8(buffer, pos, (*it).lossRate);
+ AssignUWord8(buffer, pos, (*it).discardRate);
+ AssignUWord8(buffer, pos, (*it).burstDensity);
+ AssignUWord8(buffer, pos, (*it).gapDensity);
+ AssignUWord16(buffer, pos, (*it).burstDuration);
+ AssignUWord16(buffer, pos, (*it).gapDuration);
+ AssignUWord16(buffer, pos, (*it).roundTripDelay);
+ AssignUWord16(buffer, pos, (*it).endSystemDelay);
+ AssignUWord8(buffer, pos, (*it).signalLevel);
+ AssignUWord8(buffer, pos, (*it).noiseLevel);
+ AssignUWord8(buffer, pos, (*it).RERL);
+ AssignUWord8(buffer, pos, (*it).Gmin);
+ AssignUWord8(buffer, pos, (*it).Rfactor);
+ AssignUWord8(buffer, pos, (*it).extRfactor);
+ AssignUWord8(buffer, pos, (*it).MOSLQ);
+ AssignUWord8(buffer, pos, (*it).MOSCQ);
+ AssignUWord8(buffer, pos, (*it).RXconfig);
+ AssignUWord8(buffer, pos, 0);
+ AssignUWord16(buffer, pos, (*it).JBnominal);
+ AssignUWord16(buffer, pos, (*it).JBmax);
+ AssignUWord16(buffer, pos, (*it).JBabsMax);
+ }
+}
} // namespace
void RtcpPacket::Append(RtcpPacket* packet) {
@@ -658,7 +938,7 @@
void Rpsi::WithPictureId(uint64_t picture_id) {
const uint32_t kPidBits = 7;
- const uint64_t k7MsbZeroMask = 0x1ffffffffffffff;
+ const uint64_t k7MsbZeroMask = 0x1ffffffffffffffULL;
uint8_t required_bytes = 0;
uint64_t shifted_pid = picture_id;
do {
@@ -691,5 +971,120 @@
CreateFir(fir_, fir_item_, BlockToHeaderLength(BlockLength()), packet,
length);
}
+
+void Remb::Create(uint8_t* packet, size_t* length, size_t max_length) const {
+ if (*length + BlockLength() > max_length) {
+ LOG(LS_WARNING) << "Max packet size reached.";
+ return;
+ }
+ CreateRemb(remb_, remb_item_, BlockToHeaderLength(BlockLength()), packet,
+ length);
+}
+
+void Remb::AppliesTo(uint32_t ssrc) {
+ if (remb_item_.NumberOfSSRCs >= kMaxNumberOfSsrcs) {
+ LOG(LS_WARNING) << "Max number of REMB feedback SSRCs reached.";
+ return;
+ }
+ remb_item_.SSRCs[remb_item_.NumberOfSSRCs++] = ssrc;
+}
+
+void Tmmbr::Create(uint8_t* packet, size_t* length, size_t max_length) const {
+ if (*length + BlockLength() > max_length) {
+ LOG(LS_WARNING) << "Max packet size reached.";
+ return;
+ }
+ CreateTmmbr(tmmbr_, tmmbr_item_, BlockToHeaderLength(BlockLength()), packet,
+ length);
+}
+
+void Tmmbn::WithTmmbr(uint32_t ssrc, uint32_t bitrate_kbps, uint16_t overhead) {
+ assert(overhead <= 0x1ff);
+ if (tmmbn_items_.size() >= kMaxNumberOfTmmbrs) {
+ LOG(LS_WARNING) << "Max TMMBN size reached.";
+ return;
+ }
+ RTCPPacketRTPFBTMMBRItem tmmbn_item;
+ tmmbn_item.SSRC = ssrc;
+ tmmbn_item.MaxTotalMediaBitRate = bitrate_kbps;
+ tmmbn_item.MeasuredOverhead = overhead;
+ tmmbn_items_.push_back(tmmbn_item);
+}
+
+void Tmmbn::Create(uint8_t* packet, size_t* length, size_t max_length) const {
+ if (*length + BlockLength() > max_length) {
+ LOG(LS_WARNING) << "Max packet size reached.";
+ return;
+ }
+ CreateTmmbn(tmmbn_, tmmbn_items_, BlockToHeaderLength(BlockLength()), packet,
+ length);
+}
+
+void Xr::Create(uint8_t* packet, size_t* length, size_t max_length) const {
+ if (*length + BlockLength() > max_length) {
+ LOG(LS_WARNING) << "Max packet size reached.";
+ return;
+ }
+ CreateXrHeader(xr_header_, BlockToHeaderLength(BlockLength()), packet,
+ length);
+ CreateRrtr(rrtr_blocks_, packet, length);
+ CreateDlrr(dlrr_blocks_, packet, length);
+ CreateVoipMetric(voip_metric_blocks_, packet, length);
+}
+
+void Xr::WithRrtr(Rrtr* rrtr) {
+ assert(rrtr);
+ if (rrtr_blocks_.size() >= kMaxNumberOfRrtrBlocks) {
+ LOG(LS_WARNING) << "Max RRTR blocks reached.";
+ return;
+ }
+ rrtr_blocks_.push_back(rrtr->rrtr_block_);
+}
+
+void Xr::WithDlrr(Dlrr* dlrr) {
+ assert(dlrr);
+ if (dlrr_blocks_.size() >= kMaxNumberOfDlrrBlocks) {
+ LOG(LS_WARNING) << "Max DLRR blocks reached.";
+ return;
+ }
+ dlrr_blocks_.push_back(dlrr->dlrr_block_);
+}
+
+void Xr::WithVoipMetric(VoipMetric* voip_metric) {
+ assert(voip_metric);
+ if (voip_metric_blocks_.size() >= kMaxNumberOfVoipMetricBlocks) {
+ LOG(LS_WARNING) << "Max Voip Metric blocks reached.";
+ return;
+ }
+ voip_metric_blocks_.push_back(voip_metric->metric_);
+}
+
+size_t Xr::DlrrLength() const {
+ const size_t kBlockHeaderLen = 4;
+ const size_t kSubBlockLen = 12;
+ size_t length = 0;
+ for (std::vector<DlrrBlock>::const_iterator it = dlrr_blocks_.begin();
+ it != dlrr_blocks_.end(); ++it) {
+ if (!(*it).empty()) {
+ length += kBlockHeaderLen + kSubBlockLen * (*it).size();
+ }
+ }
+ return length;
+}
+
+void Dlrr::WithDlrrItem(uint32_t ssrc,
+ uint32_t last_rr,
+ uint32_t delay_last_rr) {
+ if (dlrr_block_.size() >= kMaxNumberOfDlrrItems) {
+ LOG(LS_WARNING) << "Max DLRR items reached.";
+ return;
+ }
+ RTCPPacketXRDLRRReportBlockItem dlrr;
+ dlrr.SSRC = ssrc;
+ dlrr.LastRR = last_rr;
+ dlrr.DelayLastRR = delay_last_rr;
+ dlrr_block_.push_back(dlrr);
+}
+
} // namespace rtcp
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtcp_packet.h b/modules/rtp_rtcp/source/rtcp_packet.h
index f60e848..0ea98a2 100644
--- a/modules/rtp_rtcp/source/rtcp_packet.h
+++ b/modules/rtp_rtcp/source/rtcp_packet.h
@@ -26,7 +26,10 @@
enum { kCommonFbFmtLength = 12 };
enum { kReportBlockLength = 24 };
+class Dlrr;
class RawPacket;
+class Rrtr;
+class VoipMetric;
// Class for building RTCP packets.
//
@@ -82,12 +85,16 @@
class Empty : public RtcpPacket {
public:
- Empty() {}
+ Empty() : RtcpPacket() {}
virtual ~Empty() {}
protected:
- virtual void Create(uint8_t* packet, size_t* length, size_t max_length) const;
+ virtual void Create(
+ uint8_t* packet, size_t* length, size_t max_length) const OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Empty);
};
// From RFC 3550, RTP: A Transport Protocol for Real-Time Applications.
@@ -212,6 +219,8 @@
RTCPUtility::RTCPPacketSR sr_;
std::vector<RTCPUtility::RTCPPacketReportBlockItem> report_blocks_;
+
+ DISALLOW_COPY_AND_ASSIGN(SenderReport);
};
//
@@ -254,6 +263,8 @@
RTCPUtility::RTCPPacketRR rr_;
std::vector<RTCPUtility::RTCPPacketReportBlockItem> report_blocks_;
+
+ DISALLOW_COPY_AND_ASSIGN(ReceiverReport);
};
// Transmission Time Offsets in RTP Streams (RFC 5450).
@@ -394,6 +405,8 @@
RTCPUtility::RTCPPacketBYE bye_;
std::vector<uint32_t> csrcs_;
+
+ DISALLOW_COPY_AND_ASSIGN(Bye);
};
// Application-Defined packet (APP) (RFC 3550).
@@ -660,8 +673,7 @@
class Fir : public RtcpPacket {
public:
- Fir()
- : RtcpPacket() {
+ Fir() : RtcpPacket() {
memset(&fir_, 0, sizeof(fir_));
memset(&fir_item_, 0, sizeof(fir_item_));
}
@@ -692,6 +704,354 @@
RTCPUtility::RTCPPacketPSFBFIRItem fir_item_;
};
+// Temporary Maximum Media Stream Bit Rate Request (TMMBR) (RFC 5104).
+//
+// FCI:
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | MxTBR Exp | MxTBR Mantissa |Measured Overhead|
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+class Tmmbr : public RtcpPacket {
+ public:
+ Tmmbr() : RtcpPacket() {
+ memset(&tmmbr_, 0, sizeof(tmmbr_));
+ memset(&tmmbr_item_, 0, sizeof(tmmbr_item_));
+ }
+
+ virtual ~Tmmbr() {}
+
+ void From(uint32_t ssrc) {
+ tmmbr_.SenderSSRC = ssrc;
+ }
+ void To(uint32_t ssrc) {
+ tmmbr_item_.SSRC = ssrc;
+ }
+ void WithBitrateKbps(uint32_t bitrate_kbps) {
+ tmmbr_item_.MaxTotalMediaBitRate = bitrate_kbps;
+ }
+ void WithOverhead(uint16_t overhead) {
+ assert(overhead <= 0x1ff);
+ tmmbr_item_.MeasuredOverhead = overhead;
+ }
+
+ protected:
+ virtual void Create(
+ uint8_t* packet, size_t* length, size_t max_length) const OVERRIDE;
+
+ private:
+ size_t BlockLength() const {
+ const size_t kFciLen = 8;
+ return kCommonFbFmtLength + kFciLen;
+ }
+
+ RTCPUtility::RTCPPacketRTPFBTMMBR tmmbr_;
+ RTCPUtility::RTCPPacketRTPFBTMMBRItem tmmbr_item_;
+
+ DISALLOW_COPY_AND_ASSIGN(Tmmbr);
+};
+
+// Temporary Maximum Media Stream Bit Rate Notification (TMMBN) (RFC 5104).
+//
+// FCI:
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | MxTBR Exp | MxTBR Mantissa |Measured Overhead|
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+class Tmmbn : public RtcpPacket {
+ public:
+ Tmmbn() : RtcpPacket() {
+ memset(&tmmbn_, 0, sizeof(tmmbn_));
+ }
+
+ virtual ~Tmmbn() {}
+
+ void From(uint32_t ssrc) {
+ tmmbn_.SenderSSRC = ssrc;
+ }
+ void WithTmmbr(uint32_t ssrc, uint32_t bitrate_kbps, uint16_t overhead);
+
+ protected:
+ virtual void Create(
+ uint8_t* packet, size_t* length, size_t max_length) const OVERRIDE;
+
+ private:
+ enum { kMaxNumberOfTmmbrs = 50 };
+
+ size_t BlockLength() const {
+ const size_t kFciLen = 8;
+ return kCommonFbFmtLength + kFciLen * tmmbn_items_.size();
+ }
+
+ RTCPUtility::RTCPPacketRTPFBTMMBN tmmbn_;
+ std::vector<RTCPUtility::RTCPPacketRTPFBTMMBRItem> tmmbn_items_;
+
+ DISALLOW_COPY_AND_ASSIGN(Tmmbn);
+};
+
+// Receiver Estimated Max Bitrate (REMB) (draft-alvestrand-rmcat-remb).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |V=2|P| FMT=15 | PT=206 | length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of packet sender |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of media source |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Unique identifier 'R' 'E' 'M' 'B' |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Num SSRC | BR Exp | BR Mantissa |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC feedback |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | ...
+
+class Remb : public RtcpPacket {
+ public:
+ Remb() : RtcpPacket() {
+ memset(&remb_, 0, sizeof(remb_));
+ memset(&remb_item_, 0, sizeof(remb_item_));
+ }
+
+ virtual ~Remb() {}
+
+ void From(uint32_t ssrc) {
+ remb_.SenderSSRC = ssrc;
+ }
+ void AppliesTo(uint32_t ssrc);
+
+ void WithBitrateBps(uint32_t bitrate_bps) {
+ remb_item_.BitRate = bitrate_bps;
+ }
+
+ protected:
+ virtual void Create(
+ uint8_t* packet, size_t* length, size_t max_length) const OVERRIDE;
+
+ private:
+ enum { kMaxNumberOfSsrcs = 0xff };
+
+ size_t BlockLength() const {
+ return (remb_item_.NumberOfSSRCs + 5) * 4;
+ }
+
+ RTCPUtility::RTCPPacketPSFBAPP remb_;
+ RTCPUtility::RTCPPacketPSFBREMBItem remb_item_;
+
+ DISALLOW_COPY_AND_ASSIGN(Remb);
+};
+
+// From RFC 3611: RTP Control Protocol Extended Reports (RTCP XR).
+//
+// Format for XR packets:
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |V=2|P|reserved | PT=XR=207 | length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// : report blocks :
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+class Xr : public RtcpPacket {
+ public:
+ typedef std::vector<RTCPUtility::RTCPPacketXRDLRRReportBlockItem> DlrrBlock;
+ Xr() : RtcpPacket() {
+ memset(&xr_header_, 0, sizeof(xr_header_));
+ }
+
+ virtual ~Xr() {}
+
+ void From(uint32_t ssrc) {
+ xr_header_.OriginatorSSRC = ssrc;
+ }
+ void WithRrtr(Rrtr* rrtr);
+ void WithDlrr(Dlrr* dlrr);
+ void WithVoipMetric(VoipMetric* voip_metric);
+
+ protected:
+ virtual void Create(
+ uint8_t* packet, size_t* length, size_t max_length) const OVERRIDE;
+
+ private:
+ enum { kMaxNumberOfRrtrBlocks = 50 };
+ enum { kMaxNumberOfDlrrBlocks = 50 };
+ enum { kMaxNumberOfVoipMetricBlocks = 50 };
+
+ size_t BlockLength() const {
+ const size_t kXrHeaderLength = 8;
+ return kXrHeaderLength + RrtrLength() + DlrrLength() + VoipMetricLength();
+ }
+
+ size_t RrtrLength() const {
+ const size_t kRrtrBlockLength = 12;
+ return kRrtrBlockLength * rrtr_blocks_.size();
+ }
+
+ size_t DlrrLength() const;
+
+ size_t VoipMetricLength() const {
+ const size_t kVoipMetricBlockLength = 36;
+ return kVoipMetricBlockLength * voip_metric_blocks_.size();
+ }
+
+ RTCPUtility::RTCPPacketXR xr_header_;
+ std::vector<RTCPUtility::RTCPPacketXRReceiverReferenceTimeItem> rrtr_blocks_;
+ std::vector<DlrrBlock> dlrr_blocks_;
+ std::vector<RTCPUtility::RTCPPacketXRVOIPMetricItem> voip_metric_blocks_;
+
+ DISALLOW_COPY_AND_ASSIGN(Xr);
+};
+
+// Receiver Reference Time Report Block (RFC 3611).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | BT=4 | reserved | block length = 2 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | NTP timestamp, most significant word |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | NTP timestamp, least significant word |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+class Rrtr {
+ public:
+ Rrtr() {
+ memset(&rrtr_block_, 0, sizeof(rrtr_block_));
+ }
+ ~Rrtr() {}
+
+ void WithNtpSec(uint32_t sec) {
+ rrtr_block_.NTPMostSignificant = sec;
+ }
+ void WithNtpFrac(uint32_t frac) {
+ rrtr_block_.NTPLeastSignificant = frac;
+ }
+
+ private:
+ friend class Xr;
+ RTCPUtility::RTCPPacketXRReceiverReferenceTimeItem rrtr_block_;
+
+ DISALLOW_COPY_AND_ASSIGN(Rrtr);
+};
+
+// DLRR Report Block (RFC 3611).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | BT=5 | reserved | block length |
+// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+// | SSRC_1 (SSRC of first receiver) | sub-
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block
+// | last RR (LRR) | 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | delay since last RR (DLRR) |
+// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+// | SSRC_2 (SSRC of second receiver) | sub-
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block
+// : ... : 2
+
+class Dlrr {
+ public:
+ Dlrr() {}
+ ~Dlrr() {}
+
+ void WithDlrrItem(uint32_t ssrc, uint32_t last_rr, uint32_t delay_last_rr);
+
+ private:
+ friend class Xr;
+ enum { kMaxNumberOfDlrrItems = 100 };
+
+ std::vector<RTCPUtility::RTCPPacketXRDLRRReportBlockItem> dlrr_block_;
+
+ DISALLOW_COPY_AND_ASSIGN(Dlrr);
+};
+
+// VoIP Metrics Report Block (RFC 3611).
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | BT=7 | reserved | block length = 8 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of source |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | loss rate | discard rate | burst density | gap density |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | burst duration | gap duration |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | round trip delay | end system delay |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | signal level | noise level | RERL | Gmin |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | R factor | ext. R factor | MOS-LQ | MOS-CQ |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | RX config | reserved | JB nominal |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | JB maximum | JB abs max |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+class VoipMetric {
+ public:
+ VoipMetric() {
+ memset(&metric_, 0, sizeof(metric_));
+ }
+ ~VoipMetric() {}
+
+ void To(uint32_t ssrc) { metric_.SSRC = ssrc; }
+ void LossRate(uint8_t loss_rate) { metric_.lossRate = loss_rate; }
+ void DiscardRate(uint8_t discard_rate) { metric_.discardRate = discard_rate; }
+ void BurstDensity(uint8_t burst_density) {
+ metric_.burstDensity = burst_density;
+ }
+ void GapDensity(uint8_t gap_density) { metric_.gapDensity = gap_density; }
+ void BurstDuration(uint16_t burst_duration) {
+ metric_.burstDuration = burst_duration;
+ }
+ void GapDuration(uint16_t gap_duration) {
+ metric_.gapDuration = gap_duration;
+ }
+ void RoundTripDelay(uint16_t round_trip_delay) {
+ metric_.roundTripDelay = round_trip_delay;
+ }
+ void EndSystemDelay(uint16_t end_system_delay) {
+ metric_.endSystemDelay = end_system_delay;
+ }
+ void SignalLevel(uint8_t signal_level) { metric_.signalLevel = signal_level; }
+ void NoiseLevel(uint8_t noise_level) { metric_.noiseLevel = noise_level; }
+ void Rerl(uint8_t rerl) { metric_.RERL = rerl; }
+ void Gmin(uint8_t gmin) { metric_.Gmin = gmin; }
+ void Rfactor(uint8_t rfactor) { metric_.Rfactor = rfactor; }
+ void ExtRfactor(uint8_t extrfactor) { metric_.extRfactor = extrfactor; }
+ void MosLq(uint8_t moslq) { metric_.MOSLQ = moslq; }
+ void MosCq(uint8_t moscq) { metric_.MOSCQ = moscq; }
+ void RxConfig(uint8_t rxconfig) { metric_.RXconfig = rxconfig; }
+ void JbNominal(uint16_t jbnominal) { metric_.JBnominal = jbnominal; }
+ void JbMax(uint16_t jbmax) { metric_.JBmax = jbmax; }
+ void JbAbsMax(uint16_t jbabsmax) { metric_.JBabsMax = jbabsmax; }
+
+ private:
+ friend class Xr;
+ RTCPUtility::RTCPPacketXRVOIPMetricItem metric_;
+
+ DISALLOW_COPY_AND_ASSIGN(VoipMetric);
+};
+
// Class holding a RTCP packet.
//
// Takes a built rtcp packet.
diff --git a/modules/rtp_rtcp/source/rtcp_packet_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
index aa25c2e..095022e 100644
--- a/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
@@ -17,6 +17,7 @@
using webrtc::rtcp::App;
using webrtc::rtcp::Bye;
+using webrtc::rtcp::Dlrr;
using webrtc::rtcp::Empty;
using webrtc::rtcp::Fir;
using webrtc::rtcp::Ij;
@@ -27,8 +28,15 @@
using webrtc::rtcp::Sli;
using webrtc::rtcp::RawPacket;
using webrtc::rtcp::ReceiverReport;
+using webrtc::rtcp::Remb;
using webrtc::rtcp::ReportBlock;
using webrtc::rtcp::Rpsi;
+using webrtc::rtcp::Rrtr;
+using webrtc::rtcp::SenderReport;
+using webrtc::rtcp::Tmmbn;
+using webrtc::rtcp::Tmmbr;
+using webrtc::rtcp::VoipMetric;
+using webrtc::rtcp::Xr;
using webrtc::test::RtcpPacketParser;
namespace webrtc {
@@ -589,4 +597,307 @@
EXPECT_EQ(0, parser.report_block()->num_packets());
EXPECT_EQ(1, parser.fir()->num_packets());
}
+
+TEST(RtcpPacketTest, Remb) {
+ Remb remb;
+ remb.From(kSenderSsrc);
+ remb.AppliesTo(kRemoteSsrc);
+ remb.AppliesTo(kRemoteSsrc + 1);
+ remb.AppliesTo(kRemoteSsrc + 2);
+ remb.WithBitrateBps(261011);
+
+ RawPacket packet = remb.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.psfb_app()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.psfb_app()->Ssrc());
+ EXPECT_EQ(1, parser.remb_item()->num_packets());
+ EXPECT_EQ(261011, parser.remb_item()->last_bitrate_bps());
+ std::vector<uint32_t> ssrcs = parser.remb_item()->last_ssrc_list();
+ EXPECT_EQ(kRemoteSsrc, ssrcs[0]);
+ EXPECT_EQ(kRemoteSsrc + 1, ssrcs[1]);
+ EXPECT_EQ(kRemoteSsrc + 2, ssrcs[2]);
+}
+
+TEST(RtcpPacketTest, Tmmbr) {
+ Tmmbr tmmbr;
+ tmmbr.From(kSenderSsrc);
+ tmmbr.To(kRemoteSsrc);
+ tmmbr.WithBitrateKbps(312);
+ tmmbr.WithOverhead(60);
+
+ RawPacket packet = tmmbr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.tmmbr()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.tmmbr()->Ssrc());
+ EXPECT_EQ(1, parser.tmmbr_item()->num_packets());
+ EXPECT_EQ(312U, parser.tmmbr_item()->BitrateKbps());
+ EXPECT_EQ(60U, parser.tmmbr_item()->Overhead());
+}
+
+TEST(RtcpPacketTest, TmmbnWithNoItem) {
+ Tmmbn tmmbn;
+ tmmbn.From(kSenderSsrc);
+
+ RawPacket packet = tmmbn.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.tmmbn()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.tmmbn()->Ssrc());
+ EXPECT_EQ(0, parser.tmmbn_items()->num_packets());
+}
+
+TEST(RtcpPacketTest, TmmbnWithOneItem) {
+ Tmmbn tmmbn;
+ tmmbn.From(kSenderSsrc);
+ tmmbn.WithTmmbr(kRemoteSsrc, 312, 60);
+
+ RawPacket packet = tmmbn.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.tmmbn()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.tmmbn()->Ssrc());
+ EXPECT_EQ(1, parser.tmmbn_items()->num_packets());
+ EXPECT_EQ(kRemoteSsrc, parser.tmmbn_items()->Ssrc(0));
+ EXPECT_EQ(312U, parser.tmmbn_items()->BitrateKbps(0));
+ EXPECT_EQ(60U, parser.tmmbn_items()->Overhead(0));
+}
+
+TEST(RtcpPacketTest, TmmbnWithTwoItems) {
+ Tmmbn tmmbn;
+ tmmbn.From(kSenderSsrc);
+ tmmbn.WithTmmbr(kRemoteSsrc, 312, 60);
+ tmmbn.WithTmmbr(kRemoteSsrc + 1, 1288, 40);
+
+ RawPacket packet = tmmbn.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.tmmbn()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.tmmbn()->Ssrc());
+ EXPECT_EQ(2, parser.tmmbn_items()->num_packets());
+ EXPECT_EQ(kRemoteSsrc, parser.tmmbn_items()->Ssrc(0));
+ EXPECT_EQ(312U, parser.tmmbn_items()->BitrateKbps(0));
+ EXPECT_EQ(60U, parser.tmmbn_items()->Overhead(0));
+ EXPECT_EQ(kRemoteSsrc + 1, parser.tmmbn_items()->Ssrc(1));
+ EXPECT_EQ(1288U, parser.tmmbn_items()->BitrateKbps(1));
+ EXPECT_EQ(40U, parser.tmmbn_items()->Overhead(1));
+}
+
+TEST(RtcpPacketTest, XrWithNoReportBlocks) {
+ Xr xr;
+ xr.From(kSenderSsrc);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+}
+
+TEST(RtcpPacketTest, XrWithRrtr) {
+ Rrtr rrtr;
+ rrtr.WithNtpSec(0x11111111);
+ rrtr.WithNtpFrac(0x22222222);
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithRrtr(&rrtr);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(1, parser.rrtr()->num_packets());
+ EXPECT_EQ(0x11111111U, parser.rrtr()->NtpSec());
+ EXPECT_EQ(0x22222222U, parser.rrtr()->NtpFrac());
+}
+
+TEST(RtcpPacketTest, XrWithTwoRrtrBlocks) {
+ Rrtr rrtr1;
+ rrtr1.WithNtpSec(0x11111111);
+ rrtr1.WithNtpFrac(0x22222222);
+ Rrtr rrtr2;
+ rrtr2.WithNtpSec(0x33333333);
+ rrtr2.WithNtpFrac(0x44444444);
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithRrtr(&rrtr1);
+ xr.WithRrtr(&rrtr2);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(2, parser.rrtr()->num_packets());
+ EXPECT_EQ(0x33333333U, parser.rrtr()->NtpSec());
+ EXPECT_EQ(0x44444444U, parser.rrtr()->NtpFrac());
+}
+
+TEST(RtcpPacketTest, XrWithDlrrWithOneSubBlock) {
+ Dlrr dlrr;
+ dlrr.WithDlrrItem(0x11111111, 0x22222222, 0x33333333);
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithDlrr(&dlrr);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(1, parser.dlrr()->num_packets());
+ EXPECT_EQ(1, parser.dlrr_items()->num_packets());
+ EXPECT_EQ(0x11111111U, parser.dlrr_items()->Ssrc(0));
+ EXPECT_EQ(0x22222222U, parser.dlrr_items()->LastRr(0));
+ EXPECT_EQ(0x33333333U, parser.dlrr_items()->DelayLastRr(0));
+}
+
+TEST(RtcpPacketTest, XrWithDlrrWithTwoSubBlocks) {
+ Dlrr dlrr;
+ dlrr.WithDlrrItem(0x11111111, 0x22222222, 0x33333333);
+ dlrr.WithDlrrItem(0x44444444, 0x55555555, 0x66666666);
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithDlrr(&dlrr);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(1, parser.dlrr()->num_packets());
+ EXPECT_EQ(2, parser.dlrr_items()->num_packets());
+ EXPECT_EQ(0x11111111U, parser.dlrr_items()->Ssrc(0));
+ EXPECT_EQ(0x22222222U, parser.dlrr_items()->LastRr(0));
+ EXPECT_EQ(0x33333333U, parser.dlrr_items()->DelayLastRr(0));
+ EXPECT_EQ(0x44444444U, parser.dlrr_items()->Ssrc(1));
+ EXPECT_EQ(0x55555555U, parser.dlrr_items()->LastRr(1));
+ EXPECT_EQ(0x66666666U, parser.dlrr_items()->DelayLastRr(1));
+}
+
+TEST(RtcpPacketTest, XrWithTwoDlrrBlocks) {
+ Dlrr dlrr1;
+ dlrr1.WithDlrrItem(0x11111111, 0x22222222, 0x33333333);
+ Dlrr dlrr2;
+ dlrr2.WithDlrrItem(0x44444444, 0x55555555, 0x66666666);
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithDlrr(&dlrr1);
+ xr.WithDlrr(&dlrr2);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(2, parser.dlrr()->num_packets());
+ EXPECT_EQ(2, parser.dlrr_items()->num_packets());
+ EXPECT_EQ(0x11111111U, parser.dlrr_items()->Ssrc(0));
+ EXPECT_EQ(0x22222222U, parser.dlrr_items()->LastRr(0));
+ EXPECT_EQ(0x33333333U, parser.dlrr_items()->DelayLastRr(0));
+ EXPECT_EQ(0x44444444U, parser.dlrr_items()->Ssrc(1));
+ EXPECT_EQ(0x55555555U, parser.dlrr_items()->LastRr(1));
+ EXPECT_EQ(0x66666666U, parser.dlrr_items()->DelayLastRr(1));
+}
+
+TEST(RtcpPacketTest, XrWithVoipMetric) {
+ VoipMetric metric;
+ metric.To(kRemoteSsrc);
+ metric.LossRate(1);
+ metric.DiscardRate(2);
+ metric.BurstDensity(3);
+ metric.GapDensity(4);
+ metric.BurstDuration(0x1111);
+ metric.GapDuration(0x2222);
+ metric.RoundTripDelay(0x3333);
+ metric.EndSystemDelay(0x4444);
+ metric.SignalLevel(5);
+ metric.NoiseLevel(6);
+ metric.Rerl(7);
+ metric.Gmin(8);
+ metric.Rfactor(9);
+ metric.ExtRfactor(10);
+ metric.MosLq(11);
+ metric.MosCq(12);
+ metric.RxConfig(13);
+ metric.JbNominal(0x5555);
+ metric.JbMax(0x6666);
+ metric.JbAbsMax(0x7777);
+
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithVoipMetric(&metric);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(1, parser.voip_metric()->num_packets());
+ EXPECT_EQ(kRemoteSsrc, parser.voip_metric()->Ssrc());
+ EXPECT_EQ(1, parser.voip_metric()->LossRate());
+ EXPECT_EQ(2, parser.voip_metric()->DiscardRate());
+ EXPECT_EQ(3, parser.voip_metric()->BurstDensity());
+ EXPECT_EQ(4, parser.voip_metric()->GapDensity());
+ EXPECT_EQ(0x1111, parser.voip_metric()->BurstDuration());
+ EXPECT_EQ(0x2222, parser.voip_metric()->GapDuration());
+ EXPECT_EQ(0x3333, parser.voip_metric()->RoundTripDelay());
+ EXPECT_EQ(0x4444, parser.voip_metric()->EndSystemDelay());
+ EXPECT_EQ(5, parser.voip_metric()->SignalLevel());
+ EXPECT_EQ(6, parser.voip_metric()->NoiseLevel());
+ EXPECT_EQ(7, parser.voip_metric()->Rerl());
+ EXPECT_EQ(8, parser.voip_metric()->Gmin());
+ EXPECT_EQ(9, parser.voip_metric()->Rfactor());
+ EXPECT_EQ(10, parser.voip_metric()->ExtRfactor());
+ EXPECT_EQ(11, parser.voip_metric()->MosLq());
+ EXPECT_EQ(12, parser.voip_metric()->MosCq());
+ EXPECT_EQ(13, parser.voip_metric()->RxConfig());
+ EXPECT_EQ(0x5555, parser.voip_metric()->JbNominal());
+ EXPECT_EQ(0x6666, parser.voip_metric()->JbMax());
+ EXPECT_EQ(0x7777, parser.voip_metric()->JbAbsMax());
+}
+
+TEST(RtcpPacketTest, XrWithMultipleReportBlocks) {
+ Rrtr rrtr;
+ Dlrr dlrr;
+ dlrr.WithDlrrItem(1, 2, 3);
+ VoipMetric metric;
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithRrtr(&rrtr);
+ xr.WithDlrr(&dlrr);
+ xr.WithVoipMetric(&metric);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(1, parser.rrtr()->num_packets());
+ EXPECT_EQ(1, parser.dlrr()->num_packets());
+ EXPECT_EQ(1, parser.dlrr_items()->num_packets());
+ EXPECT_EQ(1, parser.voip_metric()->num_packets());
+}
+
+TEST(RtcpPacketTest, DlrrWithoutItemNotIncludedInPacket) {
+ Rrtr rrtr;
+ Dlrr dlrr;
+ VoipMetric metric;
+ Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithRrtr(&rrtr);
+ xr.WithDlrr(&dlrr);
+ xr.WithVoipMetric(&metric);
+
+ RawPacket packet = xr.Build();
+ RtcpPacketParser parser;
+ parser.Parse(packet.buffer(), packet.buffer_length());
+ EXPECT_EQ(1, parser.xr_header()->num_packets());
+ EXPECT_EQ(kSenderSsrc, parser.xr_header()->Ssrc());
+ EXPECT_EQ(1, parser.rrtr()->num_packets());
+ EXPECT_EQ(0, parser.dlrr()->num_packets());
+ EXPECT_EQ(1, parser.voip_metric()->num_packets());
+}
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc
index 896bd5f..a934314 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -224,12 +224,12 @@
return true;
}
-int32_t
-RTCPReceiver::NTP(uint32_t *ReceivedNTPsecs,
- uint32_t *ReceivedNTPfrac,
- uint32_t *RTCPArrivalTimeSecs,
- uint32_t *RTCPArrivalTimeFrac,
- uint32_t *rtcp_timestamp) const
+// TODO(pbos): Make this fail when we haven't received NTP.
+bool RTCPReceiver::NTP(uint32_t* ReceivedNTPsecs,
+ uint32_t* ReceivedNTPfrac,
+ uint32_t* RTCPArrivalTimeSecs,
+ uint32_t* RTCPArrivalTimeFrac,
+ uint32_t* rtcp_timestamp) const
{
CriticalSectionScoped lock(_criticalSectionRTCPReceiver);
if(ReceivedNTPsecs)
@@ -251,7 +251,7 @@
if (rtcp_timestamp) {
*rtcp_timestamp = _remoteSenderInfo.RTPtimeStamp;
}
- return 0;
+ return true;
}
bool RTCPReceiver::LastReceivedXrReferenceTimeInfo(
@@ -1361,8 +1361,6 @@
void RTCPReceiver::RegisterRtcpStatisticsCallback(
RtcpStatisticsCallback* callback) {
CriticalSectionScoped cs(_criticalSectionFeedbacks);
- if (callback != NULL)
- assert(stats_callback_ == NULL);
stats_callback_ = callback;
}
@@ -1472,7 +1470,7 @@
stats.fraction_lost = it->fractionLost;
stats.jitter = it->jitter;
- stats_callback_->StatisticsUpdated(stats, local_ssrc);
+ stats_callback_->StatisticsUpdated(stats, it->sourceSSRC);
}
}
}
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.h b/modules/rtp_rtcp/source/rtcp_receiver.h
index ebffb7c..84eb24c 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.h
+++ b/modules/rtp_rtcp/source/rtcp_receiver.h
@@ -63,11 +63,11 @@
char cName[RTCP_CNAME_SIZE]) const;
// get received NTP
- int32_t NTP(uint32_t *ReceivedNTPsecs,
- uint32_t *ReceivedNTPfrac,
- uint32_t *RTCPArrivalTimeSecs,
- uint32_t *RTCPArrivalTimeFrac,
- uint32_t *rtcp_timestamp) const;
+ bool NTP(uint32_t* ReceivedNTPsecs,
+ uint32_t* ReceivedNTPfrac,
+ uint32_t* RTCPArrivalTimeSecs,
+ uint32_t* RTCPArrivalTimeFrac,
+ uint32_t* rtcp_timestamp) const;
bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const;
diff --git a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index 399c133..6ae8954 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -19,6 +19,7 @@
#include "webrtc/common_types.h"
#include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
@@ -28,197 +29,6 @@
namespace { // Anonymous namespace; hide utility functions and classes.
-// A very simple packet builder class for building RTCP packets.
-class PacketBuilder {
- public:
- static const int kMaxPacketSize = 1024;
-
- struct ReportBlock {
- ReportBlock(uint32_t ssrc, uint32_t extended_max, uint8_t fraction_loss,
- uint32_t cumulative_loss, uint32_t jitter)
- : ssrc(ssrc),
- extended_max(extended_max),
- fraction_loss(fraction_loss),
- cumulative_loss(cumulative_loss),
- jitter(jitter) {}
-
- uint32_t ssrc;
- uint32_t extended_max;
- uint8_t fraction_loss;
- uint32_t cumulative_loss;
- uint32_t jitter;
- };
-
- PacketBuilder()
- : pos_(0),
- pos_of_len_(0) {
- }
-
-
- void Add8(uint8_t byte) {
- EXPECT_LT(pos_, kMaxPacketSize - 1);
- buffer_[pos_] = byte;
- ++pos_;
- }
-
- void Add16(uint16_t word) {
- Add8(word >> 8);
- Add8(word & 0xFF);
- }
-
- void Add32(uint32_t word) {
- Add8(word >> 24);
- Add8((word >> 16) & 0xFF);
- Add8((word >> 8) & 0xFF);
- Add8(word & 0xFF);
- }
-
- void Add64(uint32_t upper_half, uint32_t lower_half) {
- Add32(upper_half);
- Add32(lower_half);
- }
-
- // Set the 5-bit value in the 1st byte of the header
- // and the payload type. Set aside room for the length field,
- // and make provision for backpatching it.
- // Note: No way to set the padding bit.
- void AddRtcpHeader(int payload, int format_or_count) {
- PatchLengthField();
- Add8(0x80 | (format_or_count & 0x1F));
- Add8(payload);
- pos_of_len_ = pos_;
- Add16(0xDEAD); // Initialize length to "clearly illegal".
- }
-
- void AddTmmbrBandwidth(int mantissa, int exponent, int overhead) {
- // 6 bits exponent, 17 bits mantissa, 9 bits overhead.
- uint32_t word = 0;
- word |= (exponent << 26);
- word |= ((mantissa & 0x1FFFF) << 9);
- word |= (overhead & 0x1FF);
- Add32(word);
- }
-
- void AddSrPacket(uint32_t sender_ssrc) {
- AddRtcpHeader(200, 0);
- Add32(sender_ssrc);
- Add64(0x10203, 0x4050607); // NTP timestamp
- Add32(0x10203); // RTP timestamp
- Add32(0); // Sender's packet count
- Add32(0); // Sender's octet count
- }
-
- void AddRrPacket(uint32_t sender_ssrc, uint32_t rtp_ssrc,
- uint32_t extended_max, uint8_t fraction_loss,
- uint32_t cumulative_loss, uint32_t jitter) {
- ReportBlock report_block(rtp_ssrc, extended_max, fraction_loss,
- cumulative_loss, jitter);
- std::list<ReportBlock> report_block_vector(&report_block,
- &report_block + 1);
- AddRrPacketMultipleReportBlocks(sender_ssrc, report_block_vector);
- }
-
- void AddRrPacketMultipleReportBlocks(
- uint32_t sender_ssrc, const std::list<ReportBlock>& report_blocks) {
- AddRtcpHeader(201, report_blocks.size());
- Add32(sender_ssrc);
- for (std::list<ReportBlock>::const_iterator it = report_blocks.begin();
- it != report_blocks.end(); ++it) {
- AddReportBlock(it->ssrc, it->extended_max, it->fraction_loss,
- it->cumulative_loss, it->jitter);
- }
- }
-
- void AddReportBlock(uint32_t rtp_ssrc, uint32_t extended_max,
- uint8_t fraction_loss, uint32_t cumulative_loss,
- uint32_t jitter) {
- Add32(rtp_ssrc);
- Add32((fraction_loss << 24) + cumulative_loss);
- Add32(extended_max);
- Add32(jitter);
- Add32(0); // Last SR.
- Add32(0); // Delay since last SR.
- }
-
- void AddXrHeader(uint32_t sender_ssrc) {
- AddRtcpHeader(207, 0);
- Add32(sender_ssrc);
- }
-
- void AddXrReceiverReferenceTimeBlock(uint32_t ntp_sec, uint32_t ntp_frac) {
- Add8(4); // Block type.
- Add8(0); // Reserved.
- Add16(2); // Length.
- Add64(ntp_sec, ntp_frac); // NTP timestamp.
- }
-
- void AddXrDlrrBlock(std::vector<uint32_t>& remote_ssrc) {
- ASSERT_LT(pos_ + 4 + static_cast<int>(remote_ssrc.size())*4,
- kMaxPacketSize-1) << "Max buffer size reached.";
- Add8(5); // Block type.
- Add8(0); // Reserved.
- Add16(remote_ssrc.size() * 3); // Length.
- for (size_t i = 0; i < remote_ssrc.size(); ++i) {
- Add32(remote_ssrc.at(i)); // Receiver SSRC.
- Add32(0x10203); // Last RR.
- Add32(0x40506); // Delay since last RR.
- }
- }
-
- void AddXrUnknownBlock() {
- Add8(6); // Block type.
- Add8(0); // Reserved.
- Add16(9); // Length.
- Add32(0); // Receiver SSRC.
- Add64(0, 0); // Remaining fields (RFC 3611) are set to zero.
- Add64(0, 0);
- Add64(0, 0);
- Add64(0, 0);
- }
-
- void AddXrVoipBlock(uint32_t remote_ssrc, uint8_t loss) {
- Add8(7); // Block type.
- Add8(0); // Reserved.
- Add16(8); // Length.
- Add32(remote_ssrc); // Receiver SSRC.
- Add8(loss); // Loss rate.
- Add8(0); // Remaining statistics (RFC 3611) are set to zero.
- Add16(0);
- Add64(0, 0);
- Add64(0, 0);
- Add64(0, 0);
- }
-
- const uint8_t* packet() {
- PatchLengthField();
- return buffer_;
- }
-
- unsigned int length() {
- return pos_;
- }
- private:
- void PatchLengthField() {
- if (pos_of_len_ > 0) {
- // Backpatch the packet length. The client must have taken
- // care of proper padding to 32-bit words.
- int this_packet_length = (pos_ - pos_of_len_ - 2);
- ASSERT_EQ(0, this_packet_length % 4)
- << "Packets must be a multiple of 32 bits long"
- << " pos " << pos_ << " pos_of_len " << pos_of_len_;
- buffer_[pos_of_len_] = this_packet_length >> 10;
- buffer_[pos_of_len_+1] = (this_packet_length >> 2) & 0xFF;
- pos_of_len_ = 0;
- }
- }
-
- int pos_;
- // Where the length field of the current packet is.
- // Note that 0 is not a legal value, so is used for "uninitialized".
- int pos_of_len_;
- uint8_t buffer_[kMaxPacketSize];
-};
-
// This test transport verifies that no functions get called.
class TestTransport : public Transport,
public NullRtpData {
@@ -301,6 +111,8 @@
rtcp_packet_info_.applicationSubType =
rtcpPacketInformation.applicationSubType;
rtcp_packet_info_.applicationName = rtcpPacketInformation.applicationName;
+ rtcp_packet_info_.applicationLength =
+ rtcpPacketInformation.applicationLength;
rtcp_packet_info_.report_blocks = rtcpPacketInformation.report_blocks;
rtcp_packet_info_.rtt = rtcpPacketInformation.rtt;
rtcp_packet_info_.interArrivalJitter =
@@ -338,9 +150,10 @@
TEST_F(RtcpReceiverTest, InjectSrPacket) {
const uint32_t kSenderSsrc = 0x10203;
- PacketBuilder p;
- p.AddSrPacket(kSenderSsrc);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::SenderReport sr;
+ sr.From(kSenderSsrc);
+ rtcp::RawPacket p = sr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
// The parser will note the remote SSRC on a SR from other than his
// expected peer, but will not flag that he's gotten a packet.
EXPECT_EQ(kSenderSsrc, rtcp_packet_info_.remoteSSRC);
@@ -348,10 +161,268 @@
kRtcpSr & rtcp_packet_info_.rtcpPacketTypeFlags);
}
+TEST_F(RtcpReceiverTest, InjectSrPacketFromExpectedPeer) {
+ const uint32_t kSenderSsrc = 0x10203;
+ rtcp_receiver_->SetRemoteSSRC(kSenderSsrc);
+ rtcp::SenderReport sr;
+ sr.From(kSenderSsrc);
+ rtcp::RawPacket p = sr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kSenderSsrc, rtcp_packet_info_.remoteSSRC);
+ EXPECT_EQ(kRtcpSr, rtcp_packet_info_.rtcpPacketTypeFlags);
+}
+
+TEST_F(RtcpReceiverTest, InjectRrPacket) {
+ const uint32_t kSenderSsrc = 0x10203;
+ rtcp::ReceiverReport rr;
+ rr.From(kSenderSsrc);
+ rtcp::RawPacket p = rr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kSenderSsrc, rtcp_packet_info_.remoteSSRC);
+ EXPECT_EQ(kRtcpRr, rtcp_packet_info_.rtcpPacketTypeFlags);
+ ASSERT_EQ(0u, rtcp_packet_info_.report_blocks.size());
+}
+
+TEST_F(RtcpReceiverTest, InjectRrPacketWithReportBlockNotToUsIgnored) {
+ const uint32_t kSenderSsrc = 0x10203;
+ const uint32_t kSourceSsrc = 0x123456;
+ std::set<uint32_t> ssrcs;
+ ssrcs.insert(kSourceSsrc);
+ rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
+
+ rtcp::ReportBlock rb;
+ rb.To(kSourceSsrc + 1);
+ rtcp::ReceiverReport rr;
+ rr.From(kSenderSsrc);
+ rr.WithReportBlock(&rb);
+ rtcp::RawPacket p = rr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kSenderSsrc, rtcp_packet_info_.remoteSSRC);
+ EXPECT_EQ(kRtcpRr, rtcp_packet_info_.rtcpPacketTypeFlags);
+ ASSERT_EQ(0u, rtcp_packet_info_.report_blocks.size());
+}
+
+TEST_F(RtcpReceiverTest, InjectRrPacketWithOneReportBlock) {
+ const uint32_t kSenderSsrc = 0x10203;
+ const uint32_t kSourceSsrc = 0x123456;
+ std::set<uint32_t> ssrcs;
+ ssrcs.insert(kSourceSsrc);
+ rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
+
+ rtcp::ReportBlock rb;
+ rb.To(kSourceSsrc);
+ rtcp::ReceiverReport rr;
+ rr.From(kSenderSsrc);
+ rr.WithReportBlock(&rb);
+ rtcp::RawPacket p = rr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kSenderSsrc, rtcp_packet_info_.remoteSSRC);
+ EXPECT_EQ(kRtcpRr, rtcp_packet_info_.rtcpPacketTypeFlags);
+ ASSERT_EQ(1u, rtcp_packet_info_.report_blocks.size());
+}
+
+TEST_F(RtcpReceiverTest, InjectRrPacketWithTwoReportBlocks) {
+ const uint32_t kSenderSsrc = 0x10203;
+ const uint32_t kSourceSsrcs[] = {0x40506, 0x50607};
+ const uint16_t kSequenceNumbers[] = {10, 12423};
+ const int kNumSsrcs = sizeof(kSourceSsrcs) / sizeof(kSourceSsrcs[0]);
+
+ std::set<uint32_t> ssrcs(kSourceSsrcs, kSourceSsrcs + kNumSsrcs);
+ rtcp_receiver_->SetSsrcs(kSourceSsrcs[0], ssrcs);
+
+ rtcp::ReportBlock rb1;
+ rb1.To(kSourceSsrcs[0]);
+ rb1.WithExtHighestSeqNum(kSequenceNumbers[0]);
+ rb1.WithFractionLost(10);
+ rb1.WithCumulativeLost(5);
+
+ rtcp::ReportBlock rb2;
+ rb2.To(kSourceSsrcs[1]);
+ rb2.WithExtHighestSeqNum(kSequenceNumbers[1]);
+
+ rtcp::ReceiverReport rr1;
+ rr1.From(kSenderSsrc);
+ rr1.WithReportBlock(&rb1);
+ rr1.WithReportBlock(&rb2);
+
+ rtcp::RawPacket p1 = rr1.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p1.buffer(), p1.buffer_length()));
+ ASSERT_EQ(2u, rtcp_packet_info_.report_blocks.size());
+ EXPECT_EQ(10, rtcp_packet_info_.report_blocks.front().fractionLost);
+ EXPECT_EQ(0, rtcp_packet_info_.report_blocks.back().fractionLost);
+
+ rtcp::ReportBlock rb3;
+ rb3.To(kSourceSsrcs[0]);
+ rb3.WithExtHighestSeqNum(kSequenceNumbers[0]);
+
+ rtcp::ReportBlock rb4;
+ rb4.To(kSourceSsrcs[1]);
+ rb4.WithExtHighestSeqNum(kSequenceNumbers[1]);
+ rb4.WithFractionLost(20);
+ rb4.WithCumulativeLost(10);
+
+ rtcp::ReceiverReport rr2;
+ rr2.From(kSenderSsrc);
+ rr2.WithReportBlock(&rb3);
+ rr2.WithReportBlock(&rb4);
+
+ rtcp::RawPacket p2 = rr2.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p2.buffer(), p2.buffer_length()));
+ ASSERT_EQ(2u, rtcp_packet_info_.report_blocks.size());
+ EXPECT_EQ(0, rtcp_packet_info_.report_blocks.front().fractionLost);
+ EXPECT_EQ(20, rtcp_packet_info_.report_blocks.back().fractionLost);
+}
+
+TEST_F(RtcpReceiverTest, InjectIjWithNoItem) {
+ rtcp::Ij ij;
+ rtcp::RawPacket p = ij.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
+}
+
+TEST_F(RtcpReceiverTest, InjectIjWithOneItem) {
+ rtcp::Ij ij;
+ ij.WithJitterItem(0x11111111);
+
+ rtcp::RawPacket p = ij.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpTransmissionTimeOffset, rtcp_packet_info_.rtcpPacketTypeFlags);
+ EXPECT_EQ(0x11111111U, rtcp_packet_info_.interArrivalJitter);
+}
+
+TEST_F(RtcpReceiverTest, InjectAppWithNoData) {
+ rtcp::App app;
+ app.WithSubType(30);
+ uint32_t name = 'n' << 24;
+ name += 'a' << 16;
+ name += 'm' << 8;
+ name += 'e';
+ app.WithName(name);
+
+ rtcp::RawPacket p = app.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpApp, rtcp_packet_info_.rtcpPacketTypeFlags);
+ EXPECT_EQ(30, rtcp_packet_info_.applicationSubType);
+ EXPECT_EQ(name, rtcp_packet_info_.applicationName);
+ EXPECT_EQ(0, rtcp_packet_info_.applicationLength);
+}
+
+TEST_F(RtcpReceiverTest, InjectAppWithData) {
+ rtcp::App app;
+ app.WithSubType(30);
+ uint32_t name = 'n' << 24;
+ name += 'a' << 16;
+ name += 'm' << 8;
+ name += 'e';
+ app.WithName(name);
+ const char kData[] = {'t', 'e', 's', 't', 'd', 'a', 't', 'a'};
+ const size_t kDataLength = sizeof(kData) / sizeof(kData[0]);
+ app.WithData((const uint8_t*)kData, kDataLength);
+
+ rtcp::RawPacket p = app.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpApp, rtcp_packet_info_.rtcpPacketTypeFlags);
+ EXPECT_EQ(30, rtcp_packet_info_.applicationSubType);
+ EXPECT_EQ(name, rtcp_packet_info_.applicationName);
+ EXPECT_EQ(kDataLength, rtcp_packet_info_.applicationLength);
+}
+
+TEST_F(RtcpReceiverTest, InjectSdesWithOneChunk) {
+ const uint32_t kSenderSsrc = 0x123456;
+ rtcp::Sdes sdes;
+ sdes.WithCName(kSenderSsrc, "alice@host");
+
+ rtcp::RawPacket p = sdes.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ char cName[RTCP_CNAME_SIZE];
+ EXPECT_EQ(0, rtcp_receiver_->CNAME(kSenderSsrc, cName));
+ EXPECT_EQ(0, strncmp(cName, "alice@host", RTCP_CNAME_SIZE));
+}
+
+TEST_F(RtcpReceiverTest, InjectByePacket) {
+ const uint32_t kSenderSsrc = 0x123456;
+ rtcp::Sdes sdes;
+ sdes.WithCName(kSenderSsrc, "alice@host");
+
+ rtcp::RawPacket p = sdes.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ char cName[RTCP_CNAME_SIZE];
+ EXPECT_EQ(0, rtcp_receiver_->CNAME(kSenderSsrc, cName));
+
+ // Verify that BYE removes the CNAME.
+ rtcp::Bye bye;
+ bye.From(kSenderSsrc);
+ rtcp::RawPacket p2 = bye.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p2.buffer(), p2.buffer_length()));
+ EXPECT_EQ(-1, rtcp_receiver_->CNAME(kSenderSsrc, cName));
+}
+
+TEST_F(RtcpReceiverTest, InjectPliPacket) {
+ const uint32_t kSourceSsrc = 0x123456;
+ std::set<uint32_t> ssrcs;
+ ssrcs.insert(kSourceSsrc);
+ rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
+
+ rtcp::Pli pli;
+ pli.To(kSourceSsrc);
+ rtcp::RawPacket p = pli.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpPli, rtcp_packet_info_.rtcpPacketTypeFlags);
+}
+
+TEST_F(RtcpReceiverTest, PliPacketNotToUsIgnored) {
+ const uint32_t kSourceSsrc = 0x123456;
+ std::set<uint32_t> ssrcs;
+ ssrcs.insert(kSourceSsrc);
+ rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
+
+ rtcp::Pli pli;
+ pli.To(kSourceSsrc + 1);
+ rtcp::RawPacket p = pli.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
+}
+
+TEST_F(RtcpReceiverTest, InjectFirPacket) {
+ const uint32_t kSourceSsrc = 0x123456;
+ std::set<uint32_t> ssrcs;
+ ssrcs.insert(kSourceSsrc);
+ rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
+
+ rtcp::Fir fir;
+ fir.To(kSourceSsrc);
+ rtcp::RawPacket p = fir.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpFir, rtcp_packet_info_.rtcpPacketTypeFlags);
+}
+
+TEST_F(RtcpReceiverTest, FirPacketNotToUsIgnored) {
+ const uint32_t kSourceSsrc = 0x123456;
+ std::set<uint32_t> ssrcs;
+ ssrcs.insert(kSourceSsrc);
+ rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
+
+ rtcp::Fir fir;
+ fir.To(kSourceSsrc + 1);
+ rtcp::RawPacket p = fir.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
+}
+
+TEST_F(RtcpReceiverTest, InjectSliPacket) {
+ rtcp::Sli sli;
+ sli.WithPictureId(40);
+ rtcp::RawPacket p = sli.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpSli, rtcp_packet_info_.rtcpPacketTypeFlags);
+ EXPECT_EQ(40, rtcp_packet_info_.sliPictureId);
+}
+
TEST_F(RtcpReceiverTest, XrPacketWithZeroReportBlocksIgnored) {
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
}
@@ -362,37 +433,47 @@
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
const uint8_t kLossRate = 123;
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrVoipBlock(kSourceSsrc, kLossRate);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::VoipMetric voip_metric;
+ voip_metric.To(kSourceSsrc);
+ voip_metric.LossRate(kLossRate);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithVoipMetric(&voip_metric);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
ASSERT_TRUE(rtcp_packet_info_.VoIPMetric != NULL);
EXPECT_EQ(kLossRate, rtcp_packet_info_.VoIPMetric->lossRate);
EXPECT_EQ(kRtcpXrVoipMetric, rtcp_packet_info_.rtcpPacketTypeFlags);
}
-TEST_F(RtcpReceiverTest, InjectXrReceiverReferenceTimePacket) {
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrReceiverReferenceTimeBlock(0x10203, 0x40506);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
- EXPECT_EQ(kRtcpXrReceiverReferenceTime,
- rtcp_packet_info_.rtcpPacketTypeFlags);
-}
-
-TEST_F(RtcpReceiverTest, InjectXrDlrrPacketWithNoSubBlock) {
+TEST_F(RtcpReceiverTest, XrVoipPacketNotToUsIgnored) {
const uint32_t kSourceSsrc = 0x123456;
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- std::vector<uint32_t> remote_ssrcs;
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrDlrrBlock(remote_ssrcs);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::VoipMetric voip_metric;
+ voip_metric.To(kSourceSsrc + 1);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithVoipMetric(&voip_metric);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
- EXPECT_FALSE(rtcp_packet_info_.xr_dlrr_item);
+}
+
+TEST_F(RtcpReceiverTest, InjectXrReceiverReferenceTimePacket) {
+ rtcp::Rrtr rrtr;
+ rrtr.WithNtpSec(0x10203);
+ rrtr.WithNtpFrac(0x40506);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithRrtr(&rrtr);
+
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+ EXPECT_EQ(kRtcpXrReceiverReferenceTime,
+ rtcp_packet_info_.rtcpPacketTypeFlags);
}
TEST_F(RtcpReceiverTest, XrDlrrPacketNotToUsIgnored) {
@@ -400,13 +481,14 @@
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- std::vector<uint32_t> remote_ssrcs;
- remote_ssrcs.push_back(kSourceSsrc+1);
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrDlrrBlock(remote_ssrcs);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::Dlrr dlrr;
+ dlrr.WithDlrrItem(kSourceSsrc + 1, 0x12345, 0x67890);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithDlrr(&dlrr);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
EXPECT_FALSE(rtcp_packet_info_.xr_dlrr_item);
}
@@ -416,13 +498,14 @@
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- std::vector<uint32_t> remote_ssrcs;
- remote_ssrcs.push_back(kSourceSsrc);
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrDlrrBlock(remote_ssrcs);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::Dlrr dlrr;
+ dlrr.WithDlrrItem(kSourceSsrc, 0x12345, 0x67890);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithDlrr(&dlrr);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
// The parser should note the DLRR report block item, but not flag the packet
// since the RTT is not estimated.
EXPECT_TRUE(rtcp_packet_info_.xr_dlrr_item);
@@ -433,36 +516,39 @@
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- std::vector<uint32_t> remote_ssrcs;
- remote_ssrcs.push_back(kSourceSsrc+2);
- remote_ssrcs.push_back(kSourceSsrc+1);
- remote_ssrcs.push_back(kSourceSsrc);
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrDlrrBlock(remote_ssrcs);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::Dlrr dlrr;
+ dlrr.WithDlrrItem(kSourceSsrc + 1, 0x12345, 0x67890);
+ dlrr.WithDlrrItem(kSourceSsrc + 2, 0x12345, 0x67890);
+ dlrr.WithDlrrItem(kSourceSsrc, 0x12345, 0x67890);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithDlrr(&dlrr);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
// The parser should note the DLRR report block item, but not flag the packet
// since the RTT is not estimated.
EXPECT_TRUE(rtcp_packet_info_.xr_dlrr_item);
}
TEST_F(RtcpReceiverTest, InjectXrPacketWithMultipleReportBlocks) {
- const uint8_t kLossRate = 123;
const uint32_t kSourceSsrc = 0x123456;
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- std::vector<uint32_t> remote_ssrcs;
- remote_ssrcs.push_back(kSourceSsrc);
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrDlrrBlock(remote_ssrcs);
- p.AddXrVoipBlock(kSourceSsrc, kLossRate);
- p.AddXrReceiverReferenceTimeBlock(0x10203, 0x40506);
-
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::Rrtr rrtr;
+ rtcp::Dlrr dlrr;
+ dlrr.WithDlrrItem(kSourceSsrc, 0x12345, 0x67890);
+ rtcp::VoipMetric metric;
+ metric.To(kSourceSsrc);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithRrtr(&rrtr);
+ xr.WithDlrr(&dlrr);
+ xr.WithVoipMetric(&metric);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(static_cast<unsigned int>(kRtcpXrReceiverReferenceTime +
kRtcpXrVoipMetric),
rtcp_packet_info_.rtcpPacketTypeFlags);
@@ -472,7 +558,6 @@
}
TEST_F(RtcpReceiverTest, InjectXrPacketWithUnknownReportBlock) {
- const uint8_t kLossRate = 123;
const uint32_t kSourceSsrc = 0x123456;
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
@@ -480,16 +565,27 @@
std::vector<uint32_t> remote_ssrcs;
remote_ssrcs.push_back(kSourceSsrc);
- PacketBuilder p;
- p.AddXrHeader(0x2345);
- p.AddXrVoipBlock(kSourceSsrc, kLossRate);
- p.AddXrUnknownBlock();
- p.AddXrReceiverReferenceTimeBlock(0x10203, 0x40506);
+ rtcp::Rrtr rrtr;
+ rtcp::Dlrr dlrr;
+ dlrr.WithDlrrItem(kSourceSsrc, 0x12345, 0x67890);
+ rtcp::VoipMetric metric;
+ metric.To(kSourceSsrc);
+ rtcp::Xr xr;
+ xr.From(0x2345);
+ xr.WithRrtr(&rrtr);
+ xr.WithDlrr(&dlrr);
+ xr.WithVoipMetric(&metric);
+ rtcp::RawPacket p = xr.Build();
+ // Modify the DLRR block to have an unsupported block type, from 5 to 6.
+ uint8_t* buffer = const_cast<uint8_t*>(p.buffer());
+ EXPECT_EQ(5, buffer[20]);
+ buffer[20] = 6;
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(static_cast<unsigned int>(kRtcpXrReceiverReferenceTime +
kRtcpXrVoipMetric),
rtcp_packet_info_.rtcpPacketTypeFlags);
+ EXPECT_FALSE(rtcp_packet_info_.xr_dlrr_item);
}
TEST(RtcpUtilityTest, MidNtp) {
@@ -515,10 +611,14 @@
const uint32_t kNtpFrac = 0x40506;
const uint32_t kNtpMid = RTCPUtility::MidNtp(kNtpSec, kNtpFrac);
- PacketBuilder p;
- p.AddXrHeader(kSenderSsrc);
- p.AddXrReceiverReferenceTimeBlock(kNtpSec, kNtpFrac);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::Rrtr rrtr;
+ rrtr.WithNtpSec(kNtpSec);
+ rrtr.WithNtpFrac(kNtpFrac);
+ rtcp::Xr xr;
+ xr.From(kSenderSsrc);
+ xr.WithRrtr(&rrtr);
+ rtcp::RawPacket p = xr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(kRtcpXrReceiverReferenceTime,
rtcp_packet_info_.rtcpPacketTypeFlags);
@@ -542,7 +642,7 @@
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- uint32_t sequence_number = 1234;
+ const uint16_t kSequenceNumber = 1234;
system_clock_.AdvanceTimeMilliseconds(3 * kRtcpIntervalMs);
// No RR received, shouldn't trigger a timeout.
@@ -550,18 +650,21 @@
EXPECT_FALSE(rtcp_receiver_->RtcpRrSequenceNumberTimeout(kRtcpIntervalMs));
// Add a RR and advance the clock just enough to not trigger a timeout.
- PacketBuilder p1;
- p1.AddRrPacket(kSenderSsrc, kSourceSsrc, sequence_number, 0, 0, 0);
- EXPECT_EQ(0, InjectRtcpPacket(p1.packet(), p1.length()));
+ rtcp::ReportBlock rb1;
+ rb1.To(kSourceSsrc);
+ rb1.WithExtHighestSeqNum(kSequenceNumber);
+ rtcp::ReceiverReport rr1;
+ rr1.From(kSenderSsrc);
+ rr1.WithReportBlock(&rb1);
+ rtcp::RawPacket p1 = rr1.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p1.buffer(), p1.buffer_length()));
system_clock_.AdvanceTimeMilliseconds(3 * kRtcpIntervalMs - 1);
EXPECT_FALSE(rtcp_receiver_->RtcpRrTimeout(kRtcpIntervalMs));
EXPECT_FALSE(rtcp_receiver_->RtcpRrSequenceNumberTimeout(kRtcpIntervalMs));
// Add a RR with the same extended max as the previous RR to trigger a
// sequence number timeout, but not a RR timeout.
- PacketBuilder p2;
- p2.AddRrPacket(kSenderSsrc, kSourceSsrc, sequence_number, 0, 0, 0);
- EXPECT_EQ(0, InjectRtcpPacket(p2.packet(), p2.length()));
+ EXPECT_EQ(0, InjectRtcpPacket(p1.buffer(), p1.buffer_length()));
system_clock_.AdvanceTimeMilliseconds(2);
EXPECT_FALSE(rtcp_receiver_->RtcpRrTimeout(kRtcpIntervalMs));
EXPECT_TRUE(rtcp_receiver_->RtcpRrSequenceNumberTimeout(kRtcpIntervalMs));
@@ -576,18 +679,20 @@
EXPECT_FALSE(rtcp_receiver_->RtcpRrSequenceNumberTimeout(kRtcpIntervalMs));
// Add a new RR with increase sequence number to reset timers.
- PacketBuilder p3;
- sequence_number++;
- p2.AddRrPacket(kSenderSsrc, kSourceSsrc, sequence_number, 0, 0, 0);
- EXPECT_EQ(0, InjectRtcpPacket(p2.packet(), p2.length()));
+ rtcp::ReportBlock rb2;
+ rb2.To(kSourceSsrc);
+ rb2.WithExtHighestSeqNum(kSequenceNumber + 1);
+ rtcp::ReceiverReport rr2;
+ rr2.From(kSenderSsrc);
+ rr2.WithReportBlock(&rb2);
+ rtcp::RawPacket p2 = rr2.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p2.buffer(), p2.buffer_length()));
EXPECT_FALSE(rtcp_receiver_->RtcpRrTimeout(kRtcpIntervalMs));
EXPECT_FALSE(rtcp_receiver_->RtcpRrSequenceNumberTimeout(kRtcpIntervalMs));
// Verify we can get a timeout again once we've received new RR.
system_clock_.AdvanceTimeMilliseconds(2 * kRtcpIntervalMs);
- PacketBuilder p4;
- p4.AddRrPacket(kSenderSsrc, kSourceSsrc, sequence_number, 0, 0, 0);
- EXPECT_EQ(0, InjectRtcpPacket(p4.packet(), p4.length()));
+ EXPECT_EQ(0, InjectRtcpPacket(p2.buffer(), p2.buffer_length()));
system_clock_.AdvanceTimeMilliseconds(kRtcpIntervalMs + 1);
EXPECT_FALSE(rtcp_receiver_->RtcpRrTimeout(kRtcpIntervalMs));
EXPECT_TRUE(rtcp_receiver_->RtcpRrSequenceNumberTimeout(kRtcpIntervalMs));
@@ -600,135 +705,98 @@
EXPECT_EQ(-1, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
}
-TEST_F(RtcpReceiverTest, TwoReportBlocks) {
- const uint32_t kSenderSsrc = 0x10203;
- const int kNumSsrcs = 2;
- const uint32_t kSourceSsrcs[kNumSsrcs] = {0x40506, 0x50607};
- uint32_t sequence_numbers[kNumSsrcs] = {10, 12423};
-
- std::set<uint32_t> ssrcs(kSourceSsrcs, kSourceSsrcs + kNumSsrcs);
- rtcp_receiver_->SetSsrcs(kSourceSsrcs[0], ssrcs);
-
- PacketBuilder packet;
- std::list<PacketBuilder::ReportBlock> report_blocks;
- report_blocks.push_back(PacketBuilder::ReportBlock(
- kSourceSsrcs[0], sequence_numbers[0], 10, 5, 0));
- report_blocks.push_back(PacketBuilder::ReportBlock(
- kSourceSsrcs[1], sequence_numbers[1], 0, 0, 0));
- packet.AddRrPacketMultipleReportBlocks(kSenderSsrc, report_blocks);
- EXPECT_EQ(0, InjectRtcpPacket(packet.packet(), packet.length()));
- ASSERT_EQ(2u, rtcp_packet_info_.report_blocks.size());
- EXPECT_EQ(10, rtcp_packet_info_.report_blocks.front().fractionLost);
- EXPECT_EQ(0, rtcp_packet_info_.report_blocks.back().fractionLost);
-
- PacketBuilder packet2;
- report_blocks.clear();
- report_blocks.push_back(PacketBuilder::ReportBlock(
- kSourceSsrcs[0], sequence_numbers[0], 0, 0, 0));
- report_blocks.push_back(PacketBuilder::ReportBlock(
- kSourceSsrcs[1], sequence_numbers[1], 20, 10, 0));
- packet2.AddRrPacketMultipleReportBlocks(kSenderSsrc, report_blocks);
- EXPECT_EQ(0, InjectRtcpPacket(packet2.packet(), packet2.length()));
- ASSERT_EQ(2u, rtcp_packet_info_.report_blocks.size());
- EXPECT_EQ(0, rtcp_packet_info_.report_blocks.front().fractionLost);
- EXPECT_EQ(20, rtcp_packet_info_.report_blocks.back().fractionLost);
-}
-
TEST_F(RtcpReceiverTest, TmmbrPacketAccepted) {
const uint32_t kMediaFlowSsrc = 0x2040608;
const uint32_t kSenderSsrc = 0x10203;
- const uint32_t kMediaRecipientSsrc = 0x101;
std::set<uint32_t> ssrcs;
ssrcs.insert(kMediaFlowSsrc); // Matches "media source" above.
rtcp_receiver_->SetSsrcs(kMediaFlowSsrc, ssrcs);
- PacketBuilder p;
- p.AddSrPacket(kSenderSsrc);
- // TMMBR packet.
- p.AddRtcpHeader(205, 3);
- p.Add32(kSenderSsrc);
- p.Add32(kMediaRecipientSsrc);
- p.Add32(kMediaFlowSsrc);
- p.AddTmmbrBandwidth(30000, 0, 0); // 30 Kbits/sec bandwidth, no overhead.
+ rtcp::Tmmbr tmmbr;
+ tmmbr.From(kSenderSsrc);
+ tmmbr.To(kMediaFlowSsrc);
+ tmmbr.WithBitrateKbps(30);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::SenderReport sr;
+ sr.From(kSenderSsrc);
+ sr.Append(&tmmbr);
+ rtcp::RawPacket p = sr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
+
EXPECT_EQ(1, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
TMMBRSet candidate_set;
candidate_set.VerifyAndAllocateSet(1);
EXPECT_EQ(1, rtcp_receiver_->TMMBRReceived(1, 0, &candidate_set));
EXPECT_LT(0U, candidate_set.Tmmbr(0));
- EXPECT_EQ(kMediaRecipientSsrc, candidate_set.Ssrc(0));
+ EXPECT_EQ(kSenderSsrc, candidate_set.Ssrc(0));
}
TEST_F(RtcpReceiverTest, TmmbrPacketNotForUsIgnored) {
const uint32_t kMediaFlowSsrc = 0x2040608;
const uint32_t kSenderSsrc = 0x10203;
- const uint32_t kMediaRecipientSsrc = 0x101;
- const uint32_t kOtherMediaFlowSsrc = 0x9999;
- PacketBuilder p;
- p.AddSrPacket(kSenderSsrc);
- // TMMBR packet.
- p.AddRtcpHeader(205, 3);
- p.Add32(kSenderSsrc);
- p.Add32(kMediaRecipientSsrc);
- p.Add32(kOtherMediaFlowSsrc); // This SSRC is not what we're sending.
- p.AddTmmbrBandwidth(30000, 0, 0);
+ rtcp::Tmmbr tmmbr;
+ tmmbr.From(kSenderSsrc);
+ tmmbr.To(kMediaFlowSsrc + 1); // This SSRC is not what we are sending.
+ tmmbr.WithBitrateKbps(30);
+
+ rtcp::SenderReport sr;
+ sr.From(kSenderSsrc);
+ sr.Append(&tmmbr);
+ rtcp::RawPacket p = sr.Build();
std::set<uint32_t> ssrcs;
ssrcs.insert(kMediaFlowSsrc);
rtcp_receiver_->SetSsrcs(kMediaFlowSsrc, ssrcs);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(0, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
}
TEST_F(RtcpReceiverTest, TmmbrPacketZeroRateIgnored) {
const uint32_t kMediaFlowSsrc = 0x2040608;
const uint32_t kSenderSsrc = 0x10203;
- const uint32_t kMediaRecipientSsrc = 0x101;
std::set<uint32_t> ssrcs;
ssrcs.insert(kMediaFlowSsrc); // Matches "media source" above.
rtcp_receiver_->SetSsrcs(kMediaFlowSsrc, ssrcs);
- PacketBuilder p;
- p.AddSrPacket(kSenderSsrc);
- // TMMBR packet.
- p.AddRtcpHeader(205, 3);
- p.Add32(kSenderSsrc);
- p.Add32(kMediaRecipientSsrc);
- p.Add32(kMediaFlowSsrc);
- p.AddTmmbrBandwidth(0, 0, 0); // Rate zero.
+ rtcp::Tmmbr tmmbr;
+ tmmbr.From(kSenderSsrc);
+ tmmbr.To(kMediaFlowSsrc);
+ tmmbr.WithBitrateKbps(0);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::SenderReport sr;
+ sr.From(kSenderSsrc);
+ sr.Append(&tmmbr);
+ rtcp::RawPacket p = sr.Build();
+
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
EXPECT_EQ(0, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
}
TEST_F(RtcpReceiverTest, TmmbrThreeConstraintsTimeOut) {
const uint32_t kMediaFlowSsrc = 0x2040608;
const uint32_t kSenderSsrc = 0x10203;
- const uint32_t kMediaRecipientSsrc = 0x101;
std::set<uint32_t> ssrcs;
ssrcs.insert(kMediaFlowSsrc); // Matches "media source" above.
rtcp_receiver_->SetSsrcs(kMediaFlowSsrc, ssrcs);
- // Inject 3 packets "from" kMediaRecipientSsrc, Ssrc+1, Ssrc+2.
+ // Inject 3 packets "from" kSenderSsrc, kSenderSsrc+1, kSenderSsrc+2.
// The times of arrival are starttime + 0, starttime + 5 and starttime + 10.
- for (uint32_t ssrc = kMediaRecipientSsrc;
- ssrc < kMediaRecipientSsrc+3; ++ssrc) {
- PacketBuilder p;
- p.AddSrPacket(kSenderSsrc);
- // TMMBR packet.
- p.AddRtcpHeader(205, 3);
- p.Add32(kSenderSsrc);
- p.Add32(ssrc);
- p.Add32(kMediaFlowSsrc);
- p.AddTmmbrBandwidth(30000, 0, 0); // 30 Kbits/sec bandwidth, no overhead.
+ for (uint32_t ssrc = kSenderSsrc; ssrc < kSenderSsrc + 3; ++ssrc) {
+ rtcp::Tmmbr tmmbr;
+ tmmbr.From(ssrc);
+ tmmbr.To(kMediaFlowSsrc);
+ tmmbr.WithBitrateKbps(30);
- EXPECT_EQ(0, InjectRtcpPacket(p.packet(), p.length()));
+ rtcp::SenderReport sr;
+ sr.From(ssrc);
+ sr.Append(&tmmbr);
+ rtcp::RawPacket p = sr.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p.buffer(), p.buffer_length()));
// 5 seconds between each packet.
system_clock_.AdvanceTimeMilliseconds(5000);
}
- // It is now starttime+15.
+ // It is now starttime + 15.
EXPECT_EQ(3, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
TMMBRSet candidate_set;
candidate_set.VerifyAndAllocateSet(3);
@@ -739,9 +807,8 @@
system_clock_.AdvanceTimeMilliseconds(12000);
// Odd behaviour: Just counting them does not trigger the timeout.
EXPECT_EQ(3, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
- // Odd behaviour: There's only one left after timeout, not 2.
- EXPECT_EQ(1, rtcp_receiver_->TMMBRReceived(3, 0, &candidate_set));
- EXPECT_EQ(kMediaRecipientSsrc + 2, candidate_set.Ssrc(0));
+ EXPECT_EQ(2, rtcp_receiver_->TMMBRReceived(3, 0, &candidate_set));
+ EXPECT_EQ(kSenderSsrc + 1, candidate_set.Ssrc(0));
}
TEST_F(RtcpReceiverTest, Callbacks) {
@@ -773,31 +840,48 @@
const uint32_t kSenderSsrc = 0x10203;
const uint32_t kSourceSsrc = 0x123456;
- const uint8_t fraction_loss = 3;
- const uint32_t cumulative_loss = 7;
- const uint32_t jitter = 9;
- uint32_t sequence_number = 1234;
+ const uint8_t kFractionLoss = 3;
+ const uint32_t kCumulativeLoss = 7;
+ const uint32_t kJitter = 9;
+ const uint16_t kSequenceNumber = 1234;
std::set<uint32_t> ssrcs;
ssrcs.insert(kSourceSsrc);
rtcp_receiver_->SetSsrcs(kSourceSsrc, ssrcs);
- // First packet, all numbers should just propagate
- PacketBuilder p1;
- p1.AddRrPacket(kSenderSsrc, kSourceSsrc, sequence_number,
- fraction_loss, cumulative_loss, jitter);
- EXPECT_EQ(0, InjectRtcpPacket(p1.packet(), p1.length()));
- EXPECT_TRUE(callback.Matches(kSourceSsrc, sequence_number, fraction_loss,
- cumulative_loss, jitter));
+ // First packet, all numbers should just propagate.
+ rtcp::ReportBlock rb1;
+ rb1.To(kSourceSsrc);
+ rb1.WithExtHighestSeqNum(kSequenceNumber);
+ rb1.WithFractionLost(kFractionLoss);
+ rb1.WithCumulativeLost(kCumulativeLoss);
+ rb1.WithJitter(kJitter);
+
+ rtcp::ReceiverReport rr1;
+ rr1.From(kSenderSsrc);
+ rr1.WithReportBlock(&rb1);
+ rtcp::RawPacket p1 = rr1.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p1.buffer(), p1.buffer_length()));
+ EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss,
+ kCumulativeLoss, kJitter));
rtcp_receiver_->RegisterRtcpStatisticsCallback(NULL);
- // Add arbitrary numbers, callback should not be called (retain old values)
- PacketBuilder p2;
- p2.AddRrPacket(kSenderSsrc, kSourceSsrc, sequence_number + 1, 42, 137, 4711);
- EXPECT_EQ(0, InjectRtcpPacket(p2.packet(), p2.length()));
- EXPECT_TRUE(callback.Matches(kSourceSsrc, sequence_number, fraction_loss,
- cumulative_loss, jitter));
+ // Add arbitrary numbers, callback should not be called (retain old values).
+ rtcp::ReportBlock rb2;
+ rb2.To(kSourceSsrc);
+ rb2.WithExtHighestSeqNum(kSequenceNumber + 1);
+ rb2.WithFractionLost(42);
+ rb2.WithCumulativeLost(137);
+ rb2.WithJitter(4711);
+
+ rtcp::ReceiverReport rr2;
+ rr2.From(kSenderSsrc);
+ rr2.WithReportBlock(&rb2);
+ rtcp::RawPacket p2 = rr2.Build();
+ EXPECT_EQ(0, InjectRtcpPacket(p2.buffer(), p2.buffer_length()));
+ EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss,
+ kCumulativeLoss, kJitter));
}
} // Anonymous namespace
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
index d73de9c..1edbee4 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -65,30 +65,11 @@
return _stream.str();
}
-RTCPSender::FeedbackState::FeedbackState(ModuleRtpRtcpImpl* module)
- : send_payload_type(module->SendPayloadType()),
- frequency_hz(module->CurrentSendFrequencyHz()),
- packet_count_sent(module->PacketCountSent()),
- byte_count_sent(module->ByteCountSent()),
- module(module) {
- uint32_t last_ntp_secs = 0, last_ntp_frac = 0, last_remote_sr = 0;
- module->LastReceivedNTP(last_ntp_secs, last_ntp_frac, last_remote_sr);
- last_rr_ntp_secs = last_ntp_secs;
- last_rr_ntp_frac = last_ntp_frac;
- remote_sr = last_remote_sr;
-
- has_last_xr_rr = module->LastReceivedXrReferenceTimeInfo(&last_xr_rr);
-
- uint32_t send_bitrate = 0, tmp;
- module->BitrateSent(&send_bitrate, &tmp, &tmp, &tmp);
- this->send_bitrate = send_bitrate;
-}
-
RTCPSender::FeedbackState::FeedbackState()
: send_payload_type(0),
frequency_hz(0),
- packet_count_sent(0),
- byte_count_sent(0),
+ packets_sent(0),
+ media_bytes_sent(0),
send_bitrate(0),
last_rr_ntp_secs(0),
last_rr_ntp_frac(0),
@@ -188,61 +169,6 @@
}
int32_t
-RTCPSender::Init()
-{
- CriticalSectionScoped lock(_criticalSectionRTCPSender);
-
- _method = kRtcpOff;
- _cbTransport = NULL;
- _usingNack = false;
- _sending = false;
- _sendTMMBN = false;
- _TMMBR = false;
- _IJ = false;
- _REMB = false;
- _sendREMB = false;
- last_rtp_timestamp_ = 0;
- last_frame_capture_time_ms_ = -1;
- start_timestamp_ = -1;
- _SSRC = 0;
- _remoteSSRC = 0;
- _cameraDelayMS = 0;
- _sequenceNumberFIR = 0;
- _tmmbr_Send = 0;
- _packetOH_Send = 0;
- _nextTimeToSendRTCP = 0;
- _CSRCs = 0;
- _appSend = false;
- _appSubType = 0;
-
- if(_appData)
- {
- delete [] _appData;
- _appData = NULL;
- }
- _appLength = 0;
-
- xrSendReceiverReferenceTimeEnabled_ = false;
-
- _xrSendVoIPMetric = false;
-
- memset(&_xrVoIPMetric, 0, sizeof(_xrVoIPMetric));
- memset(_CNAME, 0, sizeof(_CNAME));
- memset(_lastSendReport, 0, sizeof(_lastSendReport));
- memset(_lastRTCPTime, 0, sizeof(_lastRTCPTime));
- last_xr_rr_.clear();
-
- memset(&packet_type_counter_, 0, sizeof(packet_type_counter_));
- return 0;
-}
-
-void
-RTCPSender::ChangeUniqueId(const int32_t id)
-{
- _id = id;
-}
-
-int32_t
RTCPSender::RegisterSendTransport(Transport* outgoingTransport)
{
CriticalSectionScoped lock(_criticalSectionTransport);
@@ -330,17 +256,17 @@
{
CriticalSectionScoped lock(_criticalSectionRTCPSender);
_rembBitrate = bitrate;
-
+
if(_sizeRembSSRC < numberOfSSRC)
{
delete [] _rembSSRC;
_rembSSRC = new uint32_t[numberOfSSRC];
_sizeRembSSRC = numberOfSSRC;
- }
+ }
_lengthRembSSRC = numberOfSSRC;
for (int i = 0; i < numberOfSSRC; i++)
- {
+ {
_rembSSRC[i] = SSRC[i];
}
_sendREMB = true;
@@ -381,6 +307,7 @@
}
void RTCPSender::SetStartTimestamp(uint32_t start_timestamp) {
+ CriticalSectionScoped lock(_criticalSectionRTCPSender);
start_timestamp_ = start_timestamp;
}
@@ -431,14 +358,6 @@
return 0;
}
-int32_t RTCPSender::CNAME(char cName[RTCP_CNAME_SIZE]) {
- assert(cName);
- CriticalSectionScoped lock(_criticalSectionRTCPSender);
- cName[RTCP_CNAME_SIZE - 1] = 0;
- strncpy(cName, _CNAME, RTCP_CNAME_SIZE - 1);
- return 0;
-}
-
int32_t RTCPSender::SetCNAME(const char cName[RTCP_CNAME_SIZE]) {
if (!cName)
return -1;
@@ -694,13 +613,9 @@
// the frame being captured at this moment. We are calculating that
// timestamp as the last frame's timestamp + the time since the last frame
// was captured.
- {
- // Needs protection since this method is called on the process thread.
- CriticalSectionScoped lock(_criticalSectionRTCPSender);
- RTPtime = start_timestamp_ + last_rtp_timestamp_ + (
- _clock->TimeInMilliseconds() - last_frame_capture_time_ms_) *
- (feedback_state.frequency_hz / 1000);
- }
+ RTPtime = start_timestamp_ + last_rtp_timestamp_ +
+ (_clock->TimeInMilliseconds() - last_frame_capture_time_ms_) *
+ (feedback_state.frequency_hz / 1000);
// Add sender data
// Save for our length field
@@ -708,24 +623,24 @@
pos++;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// NTP
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, NTPsec);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, NTPsec);
pos += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, NTPfrac);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, NTPfrac);
pos += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, RTPtime);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, RTPtime);
pos += 4;
//sender's packet count
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos,
- feedback_state.packet_count_sent);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos,
+ feedback_state.packets_sent);
pos += 4;
//sender's octet count
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos,
- feedback_state.byte_count_sent);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos,
+ feedback_state.media_bytes_sent);
pos += 4;
uint8_t numberOfReportBlocks = 0;
@@ -741,7 +656,7 @@
rtcpbuffer[posNumberOfReportBlocks] += numberOfReportBlocks;
uint16_t len = uint16_t((pos/4) -1);
- ModuleRTPUtility::AssignUWord16ToBuffer(rtcpbuffer+2, len);
+ RtpUtility::AssignUWord16ToBuffer(rtcpbuffer + 2, len);
return 0;
}
@@ -767,7 +682,7 @@
pos++;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// CNAME = 1
@@ -802,7 +717,7 @@
uint32_t SSRC = it->first;
// Add SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, SSRC);
pos += 4;
// CNAME = 1
@@ -833,8 +748,7 @@
}
// in 32-bit words minus one and we don't count the header
uint16_t buffer_length = (SDESLength / 4) - 1;
- ModuleRTPUtility::AssignUWord16ToBuffer(rtcpbuffer + SDESLengthPos,
- buffer_length);
+ RtpUtility::AssignUWord16ToBuffer(rtcpbuffer + SDESLengthPos, buffer_length);
return 0;
}
@@ -859,7 +773,7 @@
pos++;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
uint8_t numberOfReportBlocks = 0;
@@ -874,7 +788,7 @@
rtcpbuffer[posNumberOfReportBlocks] += numberOfReportBlocks;
uint16_t len = uint16_t((pos)/4 -1);
- ModuleRTPUtility::AssignUWord16ToBuffer(rtcpbuffer+2, len);
+ RtpUtility::AssignUWord16ToBuffer(rtcpbuffer + 2, len);
return 0;
}
@@ -925,8 +839,8 @@
rtcpbuffer[pos++]=(uint8_t)(1);
// Add inter-arrival jitter
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer + pos,
- jitterTransmissionTimeOffset);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos,
+ jitterTransmissionTimeOffset);
pos += 4;
return 0;
}
@@ -949,11 +863,11 @@
rtcpbuffer[pos++]=(uint8_t)(2);
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Add the remote SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
return 0;
}
@@ -979,7 +893,7 @@
rtcpbuffer[pos++] = (uint8_t)(4);
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// RFC 5104 4.3.1.2. Semantics
@@ -990,7 +904,7 @@
rtcpbuffer[pos++] = (uint8_t)0;
// Additional Feedback Control Information (FCI)
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
rtcpbuffer[pos++] = (uint8_t)(_sequenceNumberFIR);
@@ -1025,18 +939,18 @@
rtcpbuffer[pos++]=(uint8_t)(3);
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Add the remote SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
// Add first, number & picture ID 6 bits
// first = 0, 13 - bits
// number = 0x1fff, 13 - bits only ones for now
uint32_t sliField = (0x1fff << 6)+ (0x3f & pictureID);
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, sliField);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, sliField);
pos += 4;
return 0;
}
@@ -1090,11 +1004,11 @@
rtcpbuffer[pos++]=size;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Add the remote SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
// calc padding length
@@ -1147,11 +1061,11 @@
rtcpbuffer[pos++]=_lengthRembSSRC + 4;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Remote SSRC must be 0
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, 0);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, 0);
pos += 4;
rtcpbuffer[pos++]='R';
@@ -1176,9 +1090,9 @@
rtcpbuffer[pos++]=(uint8_t)(brMantissa >> 8);
rtcpbuffer[pos++]=(uint8_t)(brMantissa);
- for (int i = 0; i < _lengthRembSSRC; i++)
- {
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _rembSSRC[i]);
+ for (int i = 0; i < _lengthRembSSRC; i++)
+ {
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _rembSSRC[i]);
pos += 4;
}
return 0;
@@ -1264,7 +1178,7 @@
rtcpbuffer[pos++]=(uint8_t)(4);
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// RFC 5104 4.2.1.2. Semantics
@@ -1276,7 +1190,7 @@
rtcpbuffer[pos++]=(uint8_t)0;
// Additional Feedback Control Information (FCI)
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
uint32_t bitRate = _tmmbr_Send*1000;
@@ -1324,7 +1238,7 @@
pos++;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// RFC 5104 4.2.2.2. Semantics
@@ -1342,7 +1256,7 @@
if (boundingSet->Tmmbr(n) > 0)
{
uint32_t tmmbrSSRC = boundingSet->Ssrc(n);
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, tmmbrSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, tmmbrSSRC);
pos += 4;
uint32_t bitRate = boundingSet->Tmmbr(n) * 1000;
@@ -1395,11 +1309,11 @@
rtcpbuffer[pos++]=(uint8_t)(length);
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Add our application name
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _appName);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _appName);
pos += 4;
// Add the data
@@ -1433,11 +1347,11 @@
rtcpbuffer[pos++]=(uint8_t)(3); //setting it to one kNACK signal as default
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Add the remote SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
NACKStringBuilder stringBuilder;
@@ -1464,9 +1378,9 @@
}
// Write the sequence number and the bitmask to the packet.
assert(pos + 4 < IP_PACKET_SIZE);
- ModuleRTPUtility::AssignUWord16ToBuffer(rtcpbuffer + pos, nack);
+ RtpUtility::AssignUWord16ToBuffer(rtcpbuffer + pos, nack);
pos += 2;
- ModuleRTPUtility::AssignUWord16ToBuffer(rtcpbuffer + pos, bitmask);
+ RtpUtility::AssignUWord16ToBuffer(rtcpbuffer + pos, bitmask);
pos += 2;
numOfNackFields++;
}
@@ -1497,13 +1411,13 @@
rtcpbuffer[pos++]=(uint8_t)(1 + _CSRCs);
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// add CSRCs
for(int i = 0; i < _CSRCs; i++)
{
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _CSRC[i]);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _CSRC[i]);
pos += 4;
}
} else
@@ -1517,7 +1431,7 @@
rtcpbuffer[pos++]=(uint8_t)1;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
}
return 0;
@@ -1546,7 +1460,7 @@
buffer[pos++] = 4; // XR packet length.
// Add our own SSRC.
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, _SSRC);
pos += 4;
// 0 1 2 3
@@ -1566,9 +1480,9 @@
buffer[pos++] = 2; // Block length.
// NTP timestamp.
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, ntp_sec);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, ntp_sec);
pos += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, ntp_frac);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, ntp_frac);
pos += 4;
return 0;
@@ -1589,7 +1503,7 @@
buffer[pos++] = 5; // XR packet length.
// Add our own SSRC.
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, _SSRC);
pos += 4;
// 0 1 2 3
@@ -1614,11 +1528,11 @@
buffer[pos++] = 3; // Block length.
// NTP timestamp.
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, info.sourceSSRC);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, info.sourceSSRC);
pos += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, info.lastRR);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, info.lastRR);
pos += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(buffer + pos, info.delaySinceLastRR);
+ RtpUtility::AssignUWord32ToBuffer(buffer + pos, info.delaySinceLastRR);
pos += 4;
return 0;
@@ -1644,7 +1558,7 @@
pos++;
// Add our own SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _SSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _SSRC);
pos += 4;
// Add a VoIP metrics block
@@ -1654,7 +1568,7 @@
rtcpbuffer[pos++]=8;
// Add the remote SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+pos, _remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _remoteSSRC);
pos += 4;
rtcpbuffer[pos++] = _xrVoIPMetric.lossRate;
@@ -2111,6 +2025,7 @@
int32_t
RTCPSender::SetCSRCStatus(const bool include)
{
+ CriticalSectionScoped lock(_criticalSectionRTCPSender);
_includeCSRCs = include;
return 0;
}
@@ -2210,33 +2125,33 @@
RTCPReportBlock* reportBlock = it->second;
if (reportBlock) {
// Remote SSRC
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+position, remoteSSRC);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + position, remoteSSRC);
position += 4;
// fraction lost
rtcpbuffer[position++] = reportBlock->fractionLost;
// cumulative loss
- ModuleRTPUtility::AssignUWord24ToBuffer(rtcpbuffer+position,
- reportBlock->cumulativeLost);
+ RtpUtility::AssignUWord24ToBuffer(rtcpbuffer + position,
+ reportBlock->cumulativeLost);
position += 3;
// extended highest seq_no, contain the highest sequence number received
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+position,
- reportBlock->extendedHighSeqNum);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + position,
+ reportBlock->extendedHighSeqNum);
position += 4;
// Jitter
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+position,
- reportBlock->jitter);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + position,
+ reportBlock->jitter);
position += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+position,
- reportBlock->lastSR);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + position,
+ reportBlock->lastSR);
position += 4;
- ModuleRTPUtility::AssignUWord32ToBuffer(rtcpbuffer+position,
- reportBlock->delaySinceLastSR);
+ RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + position,
+ reportBlock->delaySinceLastSR);
position += 4;
}
}
diff --git a/modules/rtp_rtcp/source/rtcp_sender.h b/modules/rtp_rtcp/source/rtcp_sender.h
index cbbc32a..c0b8ebd 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/modules/rtp_rtcp/source/rtcp_sender.h
@@ -15,6 +15,7 @@
#include <sstream>
#include <string>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
@@ -50,13 +51,12 @@
{
public:
struct FeedbackState {
- explicit FeedbackState(ModuleRtpRtcpImpl* module);
FeedbackState();
uint8_t send_payload_type;
uint32_t frequency_hz;
- uint32_t packet_count_sent;
- uint32_t byte_count_sent;
+ uint32_t packets_sent;
+ uint32_t media_bytes_sent;
uint32_t send_bitrate;
uint32_t last_rr_ntp_secs;
@@ -74,10 +74,6 @@
ReceiveStatistics* receive_statistics);
virtual ~RTCPSender();
- void ChangeUniqueId(const int32_t id);
-
- int32_t Init();
-
int32_t RegisterSendTransport(Transport* outgoingTransport);
RTCPMethod Status() const;
@@ -100,7 +96,6 @@
int32_t SetCameraDelay(const int32_t delayMS);
- int32_t CNAME(char cName[RTCP_CNAME_SIZE]);
int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]);
int32_t AddMixedCNAME(const uint32_t SSRC,
@@ -185,13 +180,12 @@
private:
int32_t SendToNetwork(const uint8_t* dataBuffer, const uint16_t length);
- void UpdatePacketRate();
-
int32_t WriteAllReportBlocksToBuffer(uint8_t* rtcpbuffer,
int pos,
uint8_t& numberOfReportBlocks,
const uint32_t NTPsec,
- const uint32_t NTPfrac);
+ const uint32_t NTPfrac)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int32_t WriteReportBlocksToBuffer(
uint8_t* rtcpbuffer,
@@ -212,12 +206,14 @@
uint8_t* rtcpbuffer,
int& pos,
uint32_t NTPsec,
- uint32_t NTPfrac);
+ uint32_t NTPfrac)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int32_t BuildRR(uint8_t* rtcpbuffer,
int& pos,
const uint32_t NTPsec,
- const uint32_t NTPfrac);
+ const uint32_t NTPfrac)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int PrepareRTCP(
const FeedbackState& feedback_state,
@@ -234,117 +230,136 @@
int32_t BuildExtendedJitterReport(
uint8_t* rtcpbuffer,
int& pos,
- const uint32_t jitterTransmissionTimeOffset);
+ const uint32_t jitterTransmissionTimeOffset)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
- int32_t BuildSDEC(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildPLI(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildREMB(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildTMMBR(ModuleRtpRtcpImpl* module,
- uint8_t* rtcpbuffer,
- int& pos);
- int32_t BuildTMMBN(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildAPP(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildVoIPMetric(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildBYE(uint8_t* rtcpbuffer, int& pos);
- int32_t BuildFIR(uint8_t* rtcpbuffer, int& pos, bool repeat);
- int32_t BuildSLI(uint8_t* rtcpbuffer,
- int& pos,
- const uint8_t pictureID);
+ int32_t BuildSDEC(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildPLI(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildREMB(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildTMMBR(ModuleRtpRtcpImpl* module, uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildTMMBN(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildAPP(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildVoIPMetric(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildBYE(uint8_t* rtcpbuffer, int& pos)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildFIR(uint8_t* rtcpbuffer, int& pos, bool repeat)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
+ int32_t BuildSLI(uint8_t* rtcpbuffer, int& pos, const uint8_t pictureID)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int32_t BuildRPSI(uint8_t* rtcpbuffer,
int& pos,
const uint64_t pictureID,
- const uint8_t payloadType);
+ const uint8_t payloadType)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int32_t BuildNACK(uint8_t* rtcpbuffer,
int& pos,
const int32_t nackSize,
const uint16_t* nackList,
- std::string* nackString);
-
+ std::string* nackString)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int32_t BuildReceiverReferenceTime(uint8_t* buffer,
int& pos,
uint32_t ntp_sec,
- uint32_t ntp_frac);
+ uint32_t ntp_frac)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
int32_t BuildDlrr(uint8_t* buffer,
int& pos,
- const RtcpReceiveTimeInfo& info);
+ const RtcpReceiveTimeInfo& info)
+ EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender);
private:
- int32_t _id;
+ const int32_t _id;
const bool _audio;
- Clock* _clock;
- RTCPMethod _method;
+ Clock* const _clock;
+ RTCPMethod _method GUARDED_BY(_criticalSectionRTCPSender);
CriticalSectionWrapper* _criticalSectionTransport;
- Transport* _cbTransport;
+ Transport* _cbTransport GUARDED_BY(_criticalSectionTransport);
CriticalSectionWrapper* _criticalSectionRTCPSender;
- bool _usingNack;
- bool _sending;
- bool _sendTMMBN;
- bool _REMB;
- bool _sendREMB;
- bool _TMMBR;
- bool _IJ;
+ bool _usingNack GUARDED_BY(_criticalSectionRTCPSender);
+ bool _sending GUARDED_BY(_criticalSectionRTCPSender);
+ bool _sendTMMBN GUARDED_BY(_criticalSectionRTCPSender);
+ bool _REMB GUARDED_BY(_criticalSectionRTCPSender);
+ bool _sendREMB GUARDED_BY(_criticalSectionRTCPSender);
+ bool _TMMBR GUARDED_BY(_criticalSectionRTCPSender);
+ bool _IJ GUARDED_BY(_criticalSectionRTCPSender);
- int64_t _nextTimeToSendRTCP;
+ int64_t _nextTimeToSendRTCP GUARDED_BY(_criticalSectionRTCPSender);
- uint32_t start_timestamp_;
- uint32_t last_rtp_timestamp_;
- int64_t last_frame_capture_time_ms_;
- uint32_t _SSRC;
- uint32_t _remoteSSRC; // SSRC that we receive on our RTP channel
- char _CNAME[RTCP_CNAME_SIZE];
+ uint32_t start_timestamp_ GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t last_rtp_timestamp_ GUARDED_BY(_criticalSectionRTCPSender);
+ int64_t last_frame_capture_time_ms_ GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t _SSRC GUARDED_BY(_criticalSectionRTCPSender);
+ // SSRC that we receive on our RTP channel
+ uint32_t _remoteSSRC GUARDED_BY(_criticalSectionRTCPSender);
+ char _CNAME[RTCP_CNAME_SIZE] GUARDED_BY(_criticalSectionRTCPSender);
+ ReceiveStatistics* receive_statistics_
+ GUARDED_BY(_criticalSectionRTCPSender);
+ std::map<uint32_t, RTCPReportBlock*> internal_report_blocks_
+ GUARDED_BY(_criticalSectionRTCPSender);
+ std::map<uint32_t, RTCPReportBlock*> external_report_blocks_
+ GUARDED_BY(_criticalSectionRTCPSender);
+ std::map<uint32_t, RTCPUtility::RTCPCnameInformation*> _csrcCNAMEs
+ GUARDED_BY(_criticalSectionRTCPSender);
- ReceiveStatistics* receive_statistics_;
- std::map<uint32_t, RTCPReportBlock*> internal_report_blocks_;
- std::map<uint32_t, RTCPReportBlock*> external_report_blocks_;
- std::map<uint32_t, RTCPUtility::RTCPCnameInformation*> _csrcCNAMEs;
-
- int32_t _cameraDelayMS;
+ int32_t _cameraDelayMS GUARDED_BY(_criticalSectionRTCPSender);
// Sent
- uint32_t _lastSendReport[RTCP_NUMBER_OF_SR]; // allow packet loss and RTT above 1 sec
- uint32_t _lastRTCPTime[RTCP_NUMBER_OF_SR];
+ uint32_t _lastSendReport[RTCP_NUMBER_OF_SR] GUARDED_BY(
+ _criticalSectionRTCPSender); // allow packet loss and RTT above 1 sec
+ uint32_t _lastRTCPTime[RTCP_NUMBER_OF_SR] GUARDED_BY(
+ _criticalSectionRTCPSender);
// Sent XR receiver reference time report.
// <mid ntp (mid 32 bits of the 64 bits NTP timestamp), send time in ms>.
- std::map<uint32_t, int64_t> last_xr_rr_;
+ std::map<uint32_t, int64_t> last_xr_rr_
+ GUARDED_BY(_criticalSectionRTCPSender);
// send CSRCs
- uint8_t _CSRCs;
- uint32_t _CSRC[kRtpCsrcSize];
- bool _includeCSRCs;
+ uint8_t _CSRCs GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t _CSRC[kRtpCsrcSize] GUARDED_BY(_criticalSectionRTCPSender);
+ bool _includeCSRCs GUARDED_BY(_criticalSectionRTCPSender);
// Full intra request
- uint8_t _sequenceNumberFIR;
+ uint8_t _sequenceNumberFIR GUARDED_BY(_criticalSectionRTCPSender);
- // REMB
- uint8_t _lengthRembSSRC;
- uint8_t _sizeRembSSRC;
- uint32_t* _rembSSRC;
- uint32_t _rembBitrate;
+ // REMB
+ uint8_t _lengthRembSSRC GUARDED_BY(_criticalSectionRTCPSender);
+ uint8_t _sizeRembSSRC GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t* _rembSSRC GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t _rembBitrate GUARDED_BY(_criticalSectionRTCPSender);
- TMMBRHelp _tmmbrHelp;
- uint32_t _tmmbr_Send;
- uint32_t _packetOH_Send;
+ TMMBRHelp _tmmbrHelp GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t _tmmbr_Send GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t _packetOH_Send GUARDED_BY(_criticalSectionRTCPSender);
// APP
- bool _appSend;
- uint8_t _appSubType;
- uint32_t _appName;
- uint8_t* _appData;
- uint16_t _appLength;
+ bool _appSend GUARDED_BY(_criticalSectionRTCPSender);
+ uint8_t _appSubType GUARDED_BY(_criticalSectionRTCPSender);
+ uint32_t _appName GUARDED_BY(_criticalSectionRTCPSender);
+ uint8_t* _appData GUARDED_BY(_criticalSectionRTCPSender);
+ uint16_t _appLength GUARDED_BY(_criticalSectionRTCPSender);
// True if sending of XR Receiver reference time report is enabled.
- bool xrSendReceiverReferenceTimeEnabled_;
+ bool xrSendReceiverReferenceTimeEnabled_
+ GUARDED_BY(_criticalSectionRTCPSender);
// XR VoIP metric
- bool _xrSendVoIPMetric;
- RTCPVoIPMetric _xrVoIPMetric;
+ bool _xrSendVoIPMetric GUARDED_BY(_criticalSectionRTCPSender);
+ RTCPVoIPMetric _xrVoIPMetric GUARDED_BY(_criticalSectionRTCPSender);
- RtcpPacketTypeCounter packet_type_counter_;
+ RtcpPacketTypeCounter packet_type_counter_
+ GUARDED_BY(_criticalSectionRTCPSender);
};
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
index dfb655c..b8d5395 100644
--- a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
@@ -304,7 +304,6 @@
rtcp_receiver_ = new RTCPReceiver(0, &clock_, rtp_rtcp_impl_);
test_transport_->SetRTCPReceiver(rtcp_receiver_);
// Initialize
- EXPECT_EQ(0, rtcp_sender_->Init());
EXPECT_EQ(0, rtcp_sender_->RegisterSendTransport(test_transport_));
}
~RtcpSenderTest() {
@@ -338,7 +337,7 @@
TEST_F(RtcpSenderTest, RtcpOff) {
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpOff));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(-1, rtcp_sender_->SendRTCP(feedback_state, kRtcpSr));
}
@@ -382,7 +381,7 @@
EXPECT_EQ(0, rtcp_sender_->SetIJStatus(true));
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRr));
// Transmission time offset packet should be received.
@@ -393,7 +392,7 @@
TEST_F(RtcpSenderTest, TestCompound_NoRtpReceived) {
EXPECT_EQ(0, rtcp_sender_->SetIJStatus(true));
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRr));
// Transmission time offset packet should not be received.
@@ -403,7 +402,7 @@
TEST_F(RtcpSenderTest, TestXrReceiverReferenceTime) {
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SetSendingStatus(feedback_state, false));
rtcp_sender_->SendRtcpXrReceiverReferenceTime(true);
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpReport));
@@ -414,7 +413,7 @@
TEST_F(RtcpSenderTest, TestNoXrReceiverReferenceTimeIfSending) {
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SetSendingStatus(feedback_state, true));
rtcp_sender_->SendRtcpXrReceiverReferenceTime(true);
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpReport));
@@ -425,7 +424,7 @@
TEST_F(RtcpSenderTest, TestNoXrReceiverReferenceTimeIfNotEnabled) {
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SetSendingStatus(feedback_state, false));
rtcp_sender_->SendRtcpXrReceiverReferenceTime(false);
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpReport));
@@ -436,7 +435,7 @@
TEST_F(RtcpSenderTest, TestSendTimeOfXrRrReport) {
EXPECT_EQ(0, rtcp_sender_->SetRTCPStatus(kRtcpCompound));
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SetSendingStatus(feedback_state, false));
rtcp_sender_->SendRtcpXrReceiverReferenceTime(true);
uint32_t ntp_sec;
@@ -476,7 +475,7 @@
TMMBRSet bounding_set;
EXPECT_EQ(0, rtcp_sender_->SetTMMBN(&bounding_set, 3));
ASSERT_EQ(0U, test_transport_->rtcp_packet_info_.rtcpPacketTypeFlags);
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state,kRtcpSr));
// We now expect the packet to show up in the rtcp_packet_info_ of
// test_transport_.
@@ -499,7 +498,7 @@
EXPECT_EQ(0, rtcp_sender_->SetTMMBN(&bounding_set, 3));
ASSERT_EQ(0U, test_transport_->rtcp_packet_info_.rtcpPacketTypeFlags);
- RTCPSender::FeedbackState feedback_state(rtp_rtcp_impl_);
+ RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpSr));
// We now expect the packet to show up in the rtcp_packet_info_ of
// test_transport_.
diff --git a/modules/rtp_rtcp/source/rtp_fec_unittest.cc b/modules/rtp_rtcp/source/rtp_fec_unittest.cc
index fa84762..9d19fde 100644
--- a/modules/rtp_rtcp/source/rtp_fec_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_fec_unittest.cc
@@ -155,6 +155,174 @@
EXPECT_FALSE(IsRecoveryComplete());
}
+// Verify that we don't use an old FEC packet for FEC decoding.
+TEST_F(RtpFecTest, FecRecoveryWithSeqNumGapTwoFrames) {
+ const int kNumImportantPackets = 0;
+ const bool kUseUnequalProtection = false;
+ uint8_t kProtectionFactor = 20;
+
+ // Two frames: first frame (old) with two media packets and 1 FEC packet.
+ // Second frame (new) with 3 media packets, and no FEC packets.
+ // ---Frame 1---- ----Frame 2------
+ // #0(media) #1(media) #2(FEC) #65535(media) #0(media) #1(media).
+ // If we lose either packet 0 or 1 of second frame, FEC decoding should not
+ // try to decode using "old" FEC packet #2.
+
+ // Construct media packets for first frame, starting at sequence number 0.
+ fec_seq_num_ = ConstructMediaPacketsSeqNum(2, 0);
+
+ EXPECT_EQ(0, fec_->GenerateFEC(media_packet_list_, kProtectionFactor,
+ kNumImportantPackets, kUseUnequalProtection,
+ webrtc::kFecMaskBursty, &fec_packet_list_));
+ // Expect 1 FEC packet.
+ EXPECT_EQ(1, static_cast<int>(fec_packet_list_.size()));
+ // Add FEC packet (seq#2) of this first frame to received list (i.e., assume
+ // the two media packet were lost).
+ memset(fec_loss_mask_, 0, sizeof(fec_loss_mask_));
+ ReceivedPackets(fec_packet_list_, fec_loss_mask_, true);
+
+ // Construct media packets for second frame, with sequence number wrap.
+ ClearList(&media_packet_list_);
+ fec_seq_num_ = ConstructMediaPacketsSeqNum(3, 65535);
+
+ // Expect 3 media packets for this frame.
+ EXPECT_EQ(3, static_cast<int>(media_packet_list_.size()));
+
+ // Second media packet lost (seq#0).
+ memset(media_loss_mask_, 0, sizeof(media_loss_mask_));
+ media_loss_mask_[1] = 1;
+ // Add packets #65535, and #1 to received list.
+ ReceivedPackets(media_packet_list_, media_loss_mask_, false);
+
+ EXPECT_EQ(0,
+ fec_->DecodeFEC(&received_packet_list_, &recovered_packet_list_));
+
+ // Expect that no decoding is done to get missing packet (seq#0) of second
+ // frame, using old FEC packet (seq#2) from first (old) frame. So number of
+ // recovered packets is 2, and not equal to number of media packets (=3).
+ EXPECT_EQ(2, static_cast<int>(recovered_packet_list_.size()));
+ EXPECT_TRUE(recovered_packet_list_.size() != media_packet_list_.size());
+ FreeRecoveredPacketList();
+}
+
+// Verify we can still recovery frame if sequence number wrap occurs within
+// the frame and FEC packet following wrap is received after media packets.
+TEST_F(RtpFecTest, FecRecoveryWithSeqNumGapOneFrameRecovery) {
+ const int kNumImportantPackets = 0;
+ const bool kUseUnequalProtection = false;
+ uint8_t kProtectionFactor = 20;
+
+ // One frame, with sequence number wrap in media packets.
+ // -----Frame 1----
+ // #65534(media) #65535(media) #0(media) #1(FEC).
+ fec_seq_num_ = ConstructMediaPacketsSeqNum(3, 65534);
+
+ EXPECT_EQ(0, fec_->GenerateFEC(media_packet_list_, kProtectionFactor,
+ kNumImportantPackets, kUseUnequalProtection,
+ webrtc::kFecMaskBursty, &fec_packet_list_));
+
+ // Expect 1 FEC packet.
+ EXPECT_EQ(1, static_cast<int>(fec_packet_list_.size()));
+
+ // Lose one media packet (seq# 65535).
+ memset(media_loss_mask_, 0, sizeof(media_loss_mask_));
+ memset(fec_loss_mask_, 0, sizeof(fec_loss_mask_));
+ media_loss_mask_[1] = 1;
+ ReceivedPackets(media_packet_list_, media_loss_mask_, false);
+ // Add FEC packet to received list following the media packets.
+ ReceivedPackets(fec_packet_list_, fec_loss_mask_, true);
+
+ EXPECT_EQ(0,
+ fec_->DecodeFEC(&received_packet_list_, &recovered_packet_list_));
+
+ // Expect 3 media packets in recovered list, and complete recovery.
+ // Wrap-around won't remove FEC packet, as it follows the wrap.
+ EXPECT_EQ(3, static_cast<int>(recovered_packet_list_.size()));
+ EXPECT_TRUE(IsRecoveryComplete());
+ FreeRecoveredPacketList();
+}
+
+// Sequence number wrap occurs within the FEC packets for the frame.
+// In this case we will discard FEC packet and full recovery is not expected.
+// Same problem will occur if wrap is within media packets but FEC packet is
+// received before the media packets. This may be improved if timing information
+// is used to detect old FEC packets.
+// TODO(marpan): Update test if wrap-around handling changes in FEC decoding.
+TEST_F(RtpFecTest, FecRecoveryWithSeqNumGapOneFrameNoRecovery) {
+ const int kNumImportantPackets = 0;
+ const bool kUseUnequalProtection = false;
+ uint8_t kProtectionFactor = 200;
+
+ // 1 frame: 3 media packets and 2 FEC packets.
+ // Sequence number wrap in FEC packets.
+ // -----Frame 1----
+ // #65532(media) #65533(media) #65534(media) #65535(FEC) #0(FEC).
+ fec_seq_num_ = ConstructMediaPacketsSeqNum(3, 65532);
+
+ EXPECT_EQ(0, fec_->GenerateFEC(media_packet_list_, kProtectionFactor,
+ kNumImportantPackets, kUseUnequalProtection,
+ webrtc::kFecMaskBursty, &fec_packet_list_));
+
+ // Expect 2 FEC packets.
+ EXPECT_EQ(2, static_cast<int>(fec_packet_list_.size()));
+
+ // Lose the last two media packets (seq# 65533, 65534).
+ memset(media_loss_mask_, 0, sizeof(media_loss_mask_));
+ memset(fec_loss_mask_, 0, sizeof(fec_loss_mask_));
+ media_loss_mask_[1] = 1;
+ media_loss_mask_[2] = 1;
+ ReceivedPackets(media_packet_list_, media_loss_mask_, false);
+ ReceivedPackets(fec_packet_list_, fec_loss_mask_, true);
+
+ EXPECT_EQ(0,
+ fec_->DecodeFEC(&received_packet_list_, &recovered_packet_list_));
+
+ // The two FEC packets are received and should allow for complete recovery,
+ // but because of the wrap the second FEC packet will be discarded, and only
+ // one media packet is recoverable. So exepct 2 media packets on recovered
+ // list and no complete recovery.
+ EXPECT_EQ(2, static_cast<int>(recovered_packet_list_.size()));
+ EXPECT_TRUE(recovered_packet_list_.size() != media_packet_list_.size());
+ EXPECT_FALSE(IsRecoveryComplete());
+ FreeRecoveredPacketList();
+}
+
+// Verify we can still recovery frame if FEC is received before media packets.
+TEST_F(RtpFecTest, FecRecoveryWithFecOutOfOrder) {
+ const int kNumImportantPackets = 0;
+ const bool kUseUnequalProtection = false;
+ uint8_t kProtectionFactor = 20;
+
+ // One frame: 3 media packets, 1 FEC packet.
+ // -----Frame 1----
+ // #0(media) #1(media) #2(media) #3(FEC).
+ fec_seq_num_ = ConstructMediaPacketsSeqNum(3, 0);
+
+ EXPECT_EQ(0, fec_->GenerateFEC(media_packet_list_, kProtectionFactor,
+ kNumImportantPackets, kUseUnequalProtection,
+ webrtc::kFecMaskBursty, &fec_packet_list_));
+
+ // Expect 1 FEC packet.
+ EXPECT_EQ(1, static_cast<int>(fec_packet_list_.size()));
+
+ // Lose one media packet (seq# 1).
+ memset(media_loss_mask_, 0, sizeof(media_loss_mask_));
+ memset(fec_loss_mask_, 0, sizeof(fec_loss_mask_));
+ media_loss_mask_[1] = 1;
+ // Add FEC packet to received list before the media packets.
+ ReceivedPackets(fec_packet_list_, fec_loss_mask_, true);
+ // Add media packets to received list.
+ ReceivedPackets(media_packet_list_, media_loss_mask_, false);
+
+ EXPECT_EQ(0,
+ fec_->DecodeFEC(&received_packet_list_, &recovered_packet_list_));
+
+ // Expect 3 media packets in recovered list, and complete recovery.
+ EXPECT_EQ(3, static_cast<int>(recovered_packet_list_.size()));
+ EXPECT_TRUE(IsRecoveryComplete());
+ FreeRecoveredPacketList();
+}
+
// Test 50% protection with random mask type: Two cases are considered:
// a 50% non-consecutive loss which can be fully recovered, and a 50%
// consecutive loss which cannot be fully recovered.
@@ -625,8 +793,6 @@
EXPECT_FALSE(IsRecoveryComplete());
}
-// TODO(marpan): Add more test cases.
-
void RtpFecTest::TearDown() {
fec_->ResetState(&recovered_packet_list_);
delete fec_;
@@ -700,7 +866,7 @@
// For media packets, the sequence number and marker bit is
// obtained from RTP header. These were set in ConstructMediaPackets().
received_packet->seq_num =
- webrtc::ModuleRTPUtility::BufferToUWord16(&packet->data[2]);
+ webrtc::RtpUtility::BufferToUWord16(&packet->data[2]);
} else {
// The sequence number, marker bit, and ssrc number are defined in the
// RTP header of the FEC packet, which is not constructed in this test.
@@ -755,12 +921,11 @@
// Only push one (fake) frame to the FEC.
media_packet->data[1] &= 0x7f;
- webrtc::ModuleRTPUtility::AssignUWord16ToBuffer(&media_packet->data[2],
- sequence_number);
- webrtc::ModuleRTPUtility::AssignUWord32ToBuffer(&media_packet->data[4],
- time_stamp);
- webrtc::ModuleRTPUtility::AssignUWord32ToBuffer(&media_packet->data[8],
- ssrc_);
+ webrtc::RtpUtility::AssignUWord16ToBuffer(&media_packet->data[2],
+ sequence_number);
+ webrtc::RtpUtility::AssignUWord32ToBuffer(&media_packet->data[4],
+ time_stamp);
+ webrtc::RtpUtility::AssignUWord32ToBuffer(&media_packet->data[8], ssrc_);
// Generate random values for payload.
for (int j = 12; j < media_packet->length; ++j) {
diff --git a/modules/rtp_rtcp/source/rtp_format.cc b/modules/rtp_rtcp/source/rtp_format.cc
new file mode 100644
index 0000000..afb6c06
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format.cc
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
+
+#include "webrtc/modules/rtp_rtcp/source/rtp_format_h264.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
+
+namespace webrtc {
+RtpPacketizer* RtpPacketizer::Create(RtpVideoCodecTypes type,
+ size_t max_payload_len,
+ const RTPVideoTypeHeader* rtp_type_header,
+ FrameType frame_type) {
+ switch (type) {
+ case kRtpVideoH264:
+ return new RtpPacketizerH264(frame_type, max_payload_len);
+ case kRtpVideoVp8:
+ assert(rtp_type_header != NULL);
+ return new RtpPacketizerVp8(rtp_type_header->VP8, max_payload_len);
+ case kRtpVideoGeneric:
+ return new RtpPacketizerGeneric(frame_type, max_payload_len);
+ case kRtpVideoNone:
+ assert(false);
+ }
+ return NULL;
+}
+
+RtpDepacketizer* RtpDepacketizer::Create(RtpVideoCodecTypes type,
+ RtpData* const callback) {
+ switch (type) {
+ case kRtpVideoH264:
+ return new RtpDepacketizerH264(callback);
+ case kRtpVideoVp8:
+ return new RtpDepacketizerVp8(callback);
+ case kRtpVideoGeneric:
+ return new RtpDepacketizerGeneric(callback);
+ case kRtpVideoNone:
+ assert(false);
+ }
+ return NULL;
+}
+} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format.h b/modules/rtp_rtcp/source/rtp_format.h
new file mode 100644
index 0000000..07dc225
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_
+#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_
+
+#include <string>
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
+
+namespace webrtc {
+
+class RtpPacketizer {
+ public:
+ static RtpPacketizer* Create(RtpVideoCodecTypes type,
+ size_t max_payload_len,
+ const RTPVideoTypeHeader* rtp_type_header,
+ FrameType frame_type);
+
+ virtual ~RtpPacketizer() {}
+
+ virtual void SetPayloadData(const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) = 0;
+
+ // Get the next payload with payload header.
+ // buffer is a pointer to where the output will be written.
+ // bytes_to_send is an output variable that will contain number of bytes
+ // written to buffer. The parameter last_packet is true for the last packet of
+ // the frame, false otherwise (i.e., call the function again to get the
+ // next packet).
+ // Returns true on success or false if there was no payload to packetize.
+ virtual bool NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) = 0;
+
+ virtual ProtectionType GetProtectionType() = 0;
+
+ virtual StorageType GetStorageType(uint32_t retransmission_settings) = 0;
+
+ virtual std::string ToString() = 0;
+};
+
+class RtpDepacketizer {
+ public:
+ static RtpDepacketizer* Create(RtpVideoCodecTypes type,
+ RtpData* const callback);
+
+ virtual ~RtpDepacketizer() {}
+
+ virtual bool Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) = 0;
+};
+} // namespace webrtc
+#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.cc b/modules/rtp_rtcp/source/rtp_format_h264.cc
new file mode 100644
index 0000000..6b25f9c
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format_h264.cc
@@ -0,0 +1,318 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <string.h>
+
+#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format_h264.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
+
+namespace webrtc {
+namespace {
+
+enum Nalu {
+ kSlice = 1,
+ kIdr = 5,
+ kSei = 6,
+ kSps = 7,
+ kPps = 8,
+ kStapA = 24,
+ kFuA = 28
+};
+
+static const size_t kNalHeaderSize = 1;
+static const size_t kFuAHeaderSize = 2;
+static const size_t kLengthFieldSize = 2;
+
+// Bit masks for FU (A and B) indicators.
+enum NalDefs { kFBit = 0x80, kNriMask = 0x60, kTypeMask = 0x1F };
+
+// Bit masks for FU (A and B) headers.
+enum FuDefs { kSBit = 0x80, kEBit = 0x40, kRBit = 0x20 };
+
+void ParseSingleNalu(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) {
+ rtp_header->type.Video.codec = kRtpVideoH264;
+ rtp_header->type.Video.isFirstPacket = true;
+ RTPVideoHeaderH264* h264_header = &rtp_header->type.Video.codecHeader.H264;
+ h264_header->single_nalu = true;
+ h264_header->stap_a = false;
+
+ uint8_t nal_type = payload_data[0] & kTypeMask;
+ if (nal_type == kStapA) {
+ nal_type = payload_data[3] & kTypeMask;
+ h264_header->stap_a = true;
+ }
+
+ switch (nal_type) {
+ case kSps:
+ case kPps:
+ case kIdr:
+ rtp_header->frameType = kVideoFrameKey;
+ break;
+ default:
+ rtp_header->frameType = kVideoFrameDelta;
+ break;
+ }
+}
+
+void ParseFuaNalu(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length,
+ size_t* offset) {
+ uint8_t fnri = payload_data[0] & (kFBit | kNriMask);
+ uint8_t original_nal_type = payload_data[1] & kTypeMask;
+ bool first_fragment = (payload_data[1] & kSBit) > 0;
+
+ uint8_t original_nal_header = fnri | original_nal_type;
+ if (first_fragment) {
+ *offset = kNalHeaderSize;
+ uint8_t* payload = const_cast<uint8_t*>(payload_data + *offset);
+ payload[0] = original_nal_header;
+ } else {
+ *offset = kFuAHeaderSize;
+ }
+
+ if (original_nal_type == kIdr) {
+ rtp_header->frameType = kVideoFrameKey;
+ } else {
+ rtp_header->frameType = kVideoFrameDelta;
+ }
+ rtp_header->type.Video.codec = kRtpVideoH264;
+ rtp_header->type.Video.isFirstPacket = first_fragment;
+ RTPVideoHeaderH264* h264_header = &rtp_header->type.Video.codecHeader.H264;
+ h264_header->single_nalu = false;
+ h264_header->stap_a = false;
+}
+} // namespace
+
+RtpPacketizerH264::RtpPacketizerH264(FrameType frame_type,
+ size_t max_payload_len)
+ : payload_data_(NULL),
+ payload_size_(0),
+ max_payload_len_(max_payload_len),
+ frame_type_(frame_type) {
+}
+
+RtpPacketizerH264::~RtpPacketizerH264() {
+}
+
+void RtpPacketizerH264::SetPayloadData(
+ const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) {
+ assert(packets_.empty());
+ assert(fragmentation);
+ payload_data_ = payload_data;
+ payload_size_ = payload_size;
+ fragmentation_.CopyFrom(*fragmentation);
+ GeneratePackets();
+}
+
+void RtpPacketizerH264::GeneratePackets() {
+ for (size_t i = 0; i < fragmentation_.fragmentationVectorSize;) {
+ size_t fragment_offset = fragmentation_.fragmentationOffset[i];
+ size_t fragment_length = fragmentation_.fragmentationLength[i];
+ if (fragment_length > max_payload_len_) {
+ PacketizeFuA(fragment_offset, fragment_length);
+ ++i;
+ } else {
+ i = PacketizeStapA(i, fragment_offset, fragment_length);
+ }
+ }
+}
+
+void RtpPacketizerH264::PacketizeFuA(size_t fragment_offset,
+ size_t fragment_length) {
+ // Fragment payload into packets (FU-A).
+ // Strip out the original header and leave room for the FU-A header.
+ fragment_length -= kNalHeaderSize;
+ size_t offset = fragment_offset + kNalHeaderSize;
+ size_t bytes_available = max_payload_len_ - kFuAHeaderSize;
+ size_t fragments =
+ (fragment_length + (bytes_available - 1)) / bytes_available;
+ size_t avg_size = (fragment_length + fragments - 1) / fragments;
+ while (fragment_length > 0) {
+ size_t packet_length = avg_size;
+ if (fragment_length < avg_size)
+ packet_length = fragment_length;
+ uint8_t header = payload_data_[fragment_offset];
+ packets_.push(Packet(offset,
+ packet_length,
+ offset - kNalHeaderSize == fragment_offset,
+ fragment_length == packet_length,
+ false,
+ header));
+ offset += packet_length;
+ fragment_length -= packet_length;
+ }
+}
+
+int RtpPacketizerH264::PacketizeStapA(size_t fragment_index,
+ size_t fragment_offset,
+ size_t fragment_length) {
+ // Aggregate fragments into one packet (STAP-A).
+ size_t payload_size_left = max_payload_len_;
+ int aggregated_fragments = 0;
+ size_t fragment_headers_length = 0;
+ assert(payload_size_left >= fragment_length);
+ while (payload_size_left >= fragment_length + fragment_headers_length) {
+ assert(fragment_length > 0);
+ uint8_t header = payload_data_[fragment_offset];
+ packets_.push(Packet(fragment_offset,
+ fragment_length,
+ aggregated_fragments == 0,
+ false,
+ true,
+ header));
+ payload_size_left -= fragment_length;
+ payload_size_left -= fragment_headers_length;
+
+ // Next fragment.
+ ++fragment_index;
+ if (fragment_index == fragmentation_.fragmentationVectorSize)
+ break;
+ fragment_offset = fragmentation_.fragmentationOffset[fragment_index];
+ fragment_length = fragmentation_.fragmentationLength[fragment_index];
+
+ fragment_headers_length = kLengthFieldSize;
+ // If we are going to try to aggregate more fragments into this packet
+ // we need to add the STAP-A NALU header and a length field for the first
+ // NALU of this packet.
+ if (aggregated_fragments == 0)
+ fragment_headers_length += kNalHeaderSize + kLengthFieldSize;
+ ++aggregated_fragments;
+ }
+ packets_.back().last_fragment = true;
+ return fragment_index;
+}
+
+bool RtpPacketizerH264::NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) {
+ *bytes_to_send = 0;
+ if (packets_.empty()) {
+ *bytes_to_send = 0;
+ *last_packet = true;
+ return false;
+ }
+
+ Packet packet = packets_.front();
+
+ if (packet.first_fragment && packet.last_fragment) {
+ // Single NAL unit packet.
+ *bytes_to_send = packet.size;
+ memcpy(buffer, &payload_data_[packet.offset], packet.size);
+ packets_.pop();
+ assert(*bytes_to_send <= max_payload_len_);
+ } else if (packet.aggregated) {
+ NextAggregatePacket(buffer, bytes_to_send);
+ assert(*bytes_to_send <= max_payload_len_);
+ } else {
+ NextFragmentPacket(buffer, bytes_to_send);
+ assert(*bytes_to_send <= max_payload_len_);
+ }
+ *last_packet = packets_.empty();
+ return true;
+}
+
+void RtpPacketizerH264::NextAggregatePacket(uint8_t* buffer,
+ size_t* bytes_to_send) {
+ Packet packet = packets_.front();
+ assert(packet.first_fragment);
+ // STAP-A NALU header.
+ buffer[0] = (packet.header & (kFBit | kNriMask)) | kStapA;
+ int index = kNalHeaderSize;
+ *bytes_to_send += kNalHeaderSize;
+ while (packet.aggregated) {
+ // Add NAL unit length field.
+ RtpUtility::AssignUWord16ToBuffer(&buffer[index], packet.size);
+ index += kLengthFieldSize;
+ *bytes_to_send += kLengthFieldSize;
+ // Add NAL unit.
+ memcpy(&buffer[index], &payload_data_[packet.offset], packet.size);
+ index += packet.size;
+ *bytes_to_send += packet.size;
+ packets_.pop();
+ if (packet.last_fragment)
+ break;
+ packet = packets_.front();
+ }
+ assert(packet.last_fragment);
+}
+
+void RtpPacketizerH264::NextFragmentPacket(uint8_t* buffer,
+ size_t* bytes_to_send) {
+ Packet packet = packets_.front();
+ // NAL unit fragmented over multiple packets (FU-A).
+ // We do not send original NALU header, so it will be replaced by the
+ // FU indicator header of the first packet.
+ uint8_t fu_indicator = (packet.header & (kFBit | kNriMask)) | kFuA;
+ uint8_t fu_header = 0;
+
+ // S | E | R | 5 bit type.
+ fu_header |= (packet.first_fragment ? kSBit : 0);
+ fu_header |= (packet.last_fragment ? kEBit : 0);
+ uint8_t type = packet.header & kTypeMask;
+ fu_header |= type;
+ buffer[0] = fu_indicator;
+ buffer[1] = fu_header;
+
+ if (packet.last_fragment) {
+ *bytes_to_send = packet.size + kFuAHeaderSize;
+ memcpy(buffer + kFuAHeaderSize, &payload_data_[packet.offset], packet.size);
+ } else {
+ *bytes_to_send = packet.size + kFuAHeaderSize;
+ memcpy(buffer + kFuAHeaderSize, &payload_data_[packet.offset], packet.size);
+ }
+ packets_.pop();
+}
+
+ProtectionType RtpPacketizerH264::GetProtectionType() {
+ return (frame_type_ == kVideoFrameKey) ? kProtectedPacket
+ : kUnprotectedPacket;
+}
+
+StorageType RtpPacketizerH264::GetStorageType(
+ uint32_t retransmission_settings) {
+ return kAllowRetransmission;
+}
+
+std::string RtpPacketizerH264::ToString() {
+ return "RtpPacketizerH264";
+}
+
+RtpDepacketizerH264::RtpDepacketizerH264(RtpData* const callback)
+ : callback_(callback) {
+}
+
+bool RtpDepacketizerH264::Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) {
+ uint8_t nal_type = payload_data[0] & kTypeMask;
+ size_t offset = 0;
+ if (nal_type == kFuA) {
+ // Fragmented NAL units (FU-A).
+ ParseFuaNalu(rtp_header, payload_data, payload_data_length, &offset);
+ } else {
+ // We handle STAP-A and single NALU's the same way here. The jitter buffer
+ // will depacketize the STAP-A into NAL units later.
+ ParseSingleNalu(rtp_header, payload_data, payload_data_length);
+ }
+ if (callback_->OnReceivedPayloadData(payload_data + offset,
+ payload_data_length - offset,
+ rtp_header) != 0) {
+ return false;
+ }
+ return true;
+}
+
+} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.h b/modules/rtp_rtcp/source/rtp_format_h264.h
new file mode 100644
index 0000000..830d765
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format_h264.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H264_H_
+#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H264_H_
+
+#include <queue>
+
+#include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
+
+namespace webrtc {
+
+class RtpPacketizerH264 : public RtpPacketizer {
+ public:
+ // Initialize with payload from encoder.
+ // The payload_data must be exactly one encoded H264 frame.
+ RtpPacketizerH264(FrameType frame_type, size_t max_payload_len);
+
+ virtual ~RtpPacketizerH264();
+
+ virtual void SetPayloadData(
+ const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
+
+ // Get the next payload with H264 payload header.
+ // buffer is a pointer to where the output will be written.
+ // bytes_to_send is an output variable that will contain number of bytes
+ // written to buffer. The parameter last_packet is true for the last packet of
+ // the frame, false otherwise (i.e., call the function again to get the
+ // next packet).
+ // Returns true on success or false if there was no payload to packetize.
+ virtual bool NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) OVERRIDE;
+
+ virtual ProtectionType GetProtectionType() OVERRIDE;
+
+ virtual StorageType GetStorageType(uint32_t retransmission_settings) OVERRIDE;
+
+ virtual std::string ToString() OVERRIDE;
+
+ private:
+ struct Packet {
+ Packet(size_t offset,
+ size_t size,
+ bool first_fragment,
+ bool last_fragment,
+ bool aggregated,
+ uint8_t header)
+ : offset(offset),
+ size(size),
+ first_fragment(first_fragment),
+ last_fragment(last_fragment),
+ aggregated(aggregated),
+ header(header) {}
+
+ size_t offset;
+ size_t size;
+ bool first_fragment;
+ bool last_fragment;
+ bool aggregated;
+ uint8_t header;
+ };
+ typedef std::queue<Packet> PacketQueue;
+
+ void GeneratePackets();
+ void PacketizeFuA(size_t fragment_offset, size_t fragment_length);
+ int PacketizeStapA(size_t fragment_index,
+ size_t fragment_offset,
+ size_t fragment_length);
+ void NextAggregatePacket(uint8_t* buffer, size_t* bytes_to_send);
+ void NextFragmentPacket(uint8_t* buffer, size_t* bytes_to_send);
+
+ const uint8_t* payload_data_;
+ size_t payload_size_;
+ const size_t max_payload_len_;
+ RTPFragmentationHeader fragmentation_;
+ PacketQueue packets_;
+ FrameType frame_type_;
+
+ DISALLOW_COPY_AND_ASSIGN(RtpPacketizerH264);
+};
+
+// Depacketizer for H264.
+class RtpDepacketizerH264 : public RtpDepacketizer {
+ public:
+ explicit RtpDepacketizerH264(RtpData* const callback);
+
+ virtual ~RtpDepacketizerH264() {}
+
+ virtual bool Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) OVERRIDE;
+
+ private:
+ RtpData* const callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(RtpDepacketizerH264);
+};
+} // namespace webrtc
+#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H264_H_
diff --git a/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc b/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
new file mode 100644
index 0000000..fc30a06
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
@@ -0,0 +1,503 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <vector>
+
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+
+using ::testing::_;
+using ::testing::Args;
+using ::testing::ElementsAreArray;
+using ::testing::Return;
+using ::testing::SaveArgPointee;
+
+namespace webrtc {
+namespace {
+const size_t kMaxPayloadSize = 1200;
+const size_t kLengthFieldLength = 2;
+
+enum Nalu {
+ kSlice = 1,
+ kIdr = 5,
+ kSei = 6,
+ kSps = 7,
+ kPps = 8,
+ kStapA = 24,
+ kFuA = 28
+};
+
+static const size_t kNalHeaderSize = 1;
+static const size_t kFuAHeaderSize = 2;
+
+// Bit masks for FU (A and B) indicators.
+enum NalDefs { kFBit = 0x80, kNriMask = 0x60, kTypeMask = 0x1F };
+
+// Bit masks for FU (A and B) headers.
+enum FuDefs { kSBit = 0x80, kEBit = 0x40, kRBit = 0x20 };
+
+void VerifyFua(size_t fua_index,
+ const uint8_t* expected_payload,
+ int offset,
+ const uint8_t* packet,
+ size_t length,
+ const std::vector<size_t>& expected_sizes) {
+ ASSERT_EQ(expected_sizes[fua_index] + kFuAHeaderSize, length)
+ << "FUA index: " << fua_index;
+ const uint8_t kFuIndicator = 0x1C; // F=0, NRI=0, Type=28.
+ EXPECT_EQ(kFuIndicator, packet[0]) << "FUA index: " << fua_index;
+ bool should_be_last_fua = (fua_index == expected_sizes.size() - 1);
+ uint8_t fu_header = 0;
+ if (fua_index == 0)
+ fu_header = 0x85; // S=1, E=0, R=0, Type=5.
+ else if (should_be_last_fua)
+ fu_header = 0x45; // S=0, E=1, R=0, Type=5.
+ else
+ fu_header = 0x05; // S=0, E=0, R=0, Type=5.
+ EXPECT_EQ(fu_header, packet[1]) << "FUA index: " << fua_index;
+ std::vector<uint8_t> expected_packet_payload(
+ &expected_payload[offset],
+ &expected_payload[offset + expected_sizes[fua_index]]);
+ EXPECT_THAT(
+ expected_packet_payload,
+ ::testing::ElementsAreArray(&packet[2], expected_sizes[fua_index]))
+ << "FUA index: " << fua_index;
+}
+
+void TestFua(size_t frame_size,
+ size_t max_payload_size,
+ const std::vector<size_t>& expected_sizes) {
+ scoped_ptr<uint8_t[]> frame;
+ frame.reset(new uint8_t[frame_size]);
+ frame[0] = 0x05; // F=0, NRI=0, Type=5.
+ for (size_t i = 0; i < frame_size - kNalHeaderSize; ++i) {
+ frame[i + kNalHeaderSize] = i;
+ }
+ RTPFragmentationHeader fragmentation;
+ fragmentation.VerifyAndAllocateFragmentationHeader(1);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = frame_size;
+ scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
+ kRtpVideoH264, max_payload_size, NULL, kFrameEmpty));
+ packetizer->SetPayloadData(frame.get(), frame_size, &fragmentation);
+
+ scoped_ptr<uint8_t[]> packet(new uint8_t[max_payload_size]);
+ size_t length = 0;
+ bool last = false;
+ size_t offset = kNalHeaderSize;
+ for (size_t i = 0; i < expected_sizes.size(); ++i) {
+ ASSERT_TRUE(packetizer->NextPacket(packet.get(), &length, &last));
+ VerifyFua(i, frame.get(), offset, packet.get(), length, expected_sizes);
+ EXPECT_EQ(i == expected_sizes.size() - 1, last) << "FUA index: " << i;
+ offset += expected_sizes[i];
+ }
+
+ EXPECT_FALSE(packetizer->NextPacket(packet.get(), &length, &last));
+}
+
+size_t GetExpectedNaluOffset(const RTPFragmentationHeader& fragmentation,
+ size_t start_index,
+ size_t nalu_index) {
+ assert(nalu_index < fragmentation.fragmentationVectorSize);
+ size_t expected_nalu_offset = kNalHeaderSize; // STAP-A header.
+ for (size_t i = start_index; i < nalu_index; ++i) {
+ expected_nalu_offset +=
+ kLengthFieldLength + fragmentation.fragmentationLength[i];
+ }
+ return expected_nalu_offset;
+}
+
+void VerifyStapAPayload(const RTPFragmentationHeader& fragmentation,
+ size_t first_stapa_index,
+ size_t nalu_index,
+ const uint8_t* frame,
+ size_t frame_length,
+ const uint8_t* packet,
+ size_t packet_length) {
+ size_t expected_payload_offset =
+ GetExpectedNaluOffset(fragmentation, first_stapa_index, nalu_index) +
+ kLengthFieldLength;
+ size_t offset = fragmentation.fragmentationOffset[nalu_index];
+ const uint8_t* expected_payload = &frame[offset];
+ size_t expected_payload_length =
+ fragmentation.fragmentationLength[nalu_index];
+ ASSERT_LE(offset + expected_payload_length, frame_length);
+ ASSERT_LE(expected_payload_offset + expected_payload_length, packet_length);
+ std::vector<uint8_t> expected_payload_vector(
+ expected_payload, &expected_payload[expected_payload_length]);
+ EXPECT_THAT(expected_payload_vector,
+ ::testing::ElementsAreArray(&packet[expected_payload_offset],
+ expected_payload_length));
+}
+
+void VerifySingleNaluPayload(const RTPFragmentationHeader& fragmentation,
+ size_t nalu_index,
+ const uint8_t* frame,
+ size_t frame_length,
+ const uint8_t* packet,
+ size_t packet_length) {
+ std::vector<uint8_t> expected_payload_vector(
+ &frame[fragmentation.fragmentationOffset[nalu_index]],
+ &frame[fragmentation.fragmentationOffset[nalu_index] +
+ fragmentation.fragmentationLength[nalu_index]]);
+ EXPECT_THAT(expected_payload_vector,
+ ::testing::ElementsAreArray(packet, packet_length));
+}
+} // namespace
+
+TEST(RtpPacketizerH264Test, TestSingleNalu) {
+ const uint8_t frame[2] = {0x05, 0xFF}; // F=0, NRI=0, Type=5.
+ RTPFragmentationHeader fragmentation;
+ fragmentation.VerifyAndAllocateFragmentationHeader(1);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = sizeof(frame);
+ scoped_ptr<RtpPacketizer> packetizer(
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
+ packetizer->SetPayloadData(frame, sizeof(frame), &fragmentation);
+ uint8_t packet[kMaxPayloadSize] = {0};
+ size_t length = 0;
+ bool last = false;
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ EXPECT_EQ(2u, length);
+ EXPECT_TRUE(last);
+ VerifySingleNaluPayload(
+ fragmentation, 0, frame, sizeof(frame), packet, length);
+ EXPECT_FALSE(packetizer->NextPacket(packet, &length, &last));
+}
+
+TEST(RtpPacketizerH264Test, TestSingleNaluTwoPackets) {
+ const size_t kFrameSize = kMaxPayloadSize + 100;
+ uint8_t frame[kFrameSize] = {0};
+ for (size_t i = 0; i < kFrameSize; ++i)
+ frame[i] = i;
+ RTPFragmentationHeader fragmentation;
+ fragmentation.VerifyAndAllocateFragmentationHeader(2);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = kMaxPayloadSize;
+ fragmentation.fragmentationOffset[1] = kMaxPayloadSize;
+ fragmentation.fragmentationLength[1] = 100;
+ // Set NAL headers.
+ frame[fragmentation.fragmentationOffset[0]] = 0x01;
+ frame[fragmentation.fragmentationOffset[1]] = 0x01;
+
+ scoped_ptr<RtpPacketizer> packetizer(
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
+ packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
+
+ uint8_t packet[kMaxPayloadSize] = {0};
+ size_t length = 0;
+ bool last = false;
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ ASSERT_EQ(fragmentation.fragmentationOffset[1], length);
+ VerifySingleNaluPayload(fragmentation, 0, frame, kFrameSize, packet, length);
+
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ ASSERT_EQ(fragmentation.fragmentationLength[1], length);
+ VerifySingleNaluPayload(fragmentation, 1, frame, kFrameSize, packet, length);
+ EXPECT_TRUE(last);
+
+ EXPECT_FALSE(packetizer->NextPacket(packet, &length, &last));
+}
+
+TEST(RtpPacketizerH264Test, TestStapA) {
+ const size_t kFrameSize = kMaxPayloadSize - 3 * kLengthFieldLength -
+ kNalHeaderSize;
+ uint8_t frame[kFrameSize] = {0x07, 0xFF, // F=0, NRI=0, Type=7.
+ 0x08, 0xFF, // F=0, NRI=0, Type=8.
+ 0x05}; // F=0, NRI=0, Type=5.
+ const size_t kPayloadOffset = 5;
+ for (size_t i = 0; i < kFrameSize - kPayloadOffset; ++i)
+ frame[i + kPayloadOffset] = i;
+ RTPFragmentationHeader fragmentation;
+ fragmentation.VerifyAndAllocateFragmentationHeader(3);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = 2;
+ fragmentation.fragmentationOffset[1] = 2;
+ fragmentation.fragmentationLength[1] = 2;
+ fragmentation.fragmentationOffset[2] = 4;
+ fragmentation.fragmentationLength[2] =
+ kNalHeaderSize + kFrameSize - kPayloadOffset;
+ scoped_ptr<RtpPacketizer> packetizer(
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
+ packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
+
+ uint8_t packet[kMaxPayloadSize] = {0};
+ size_t length = 0;
+ bool last = false;
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ size_t expected_packet_size =
+ kNalHeaderSize + 3 * kLengthFieldLength + kFrameSize;
+ ASSERT_EQ(expected_packet_size, length);
+ EXPECT_TRUE(last);
+ for (size_t i = 0; i < fragmentation.fragmentationVectorSize; ++i)
+ VerifyStapAPayload(fragmentation, 0, i, frame, kFrameSize, packet, length);
+
+ EXPECT_FALSE(packetizer->NextPacket(packet, &length, &last));
+}
+
+TEST(RtpPacketizerH264Test, TestTooSmallForStapAHeaders) {
+ const size_t kFrameSize = kMaxPayloadSize - 1;
+ uint8_t frame[kFrameSize] = {0x07, 0xFF, // F=0, NRI=0, Type=7.
+ 0x08, 0xFF, // F=0, NRI=0, Type=8.
+ 0x05}; // F=0, NRI=0, Type=5.
+ const size_t kPayloadOffset = 5;
+ for (size_t i = 0; i < kFrameSize - kPayloadOffset; ++i)
+ frame[i + kPayloadOffset] = i;
+ RTPFragmentationHeader fragmentation;
+ fragmentation.VerifyAndAllocateFragmentationHeader(3);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = 2;
+ fragmentation.fragmentationOffset[1] = 2;
+ fragmentation.fragmentationLength[1] = 2;
+ fragmentation.fragmentationOffset[2] = 4;
+ fragmentation.fragmentationLength[2] =
+ kNalHeaderSize + kFrameSize - kPayloadOffset;
+ scoped_ptr<RtpPacketizer> packetizer(
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
+ packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
+
+ uint8_t packet[kMaxPayloadSize] = {0};
+ size_t length = 0;
+ bool last = false;
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ size_t expected_packet_size = kNalHeaderSize;
+ for (size_t i = 0; i < 2; ++i) {
+ expected_packet_size += kLengthFieldLength +
+ fragmentation.fragmentationLength[i];
+ }
+ ASSERT_EQ(expected_packet_size, length);
+ EXPECT_FALSE(last);
+ for (size_t i = 0; i < 2; ++i)
+ VerifyStapAPayload(fragmentation, 0, i, frame, kFrameSize, packet, length);
+
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ expected_packet_size = fragmentation.fragmentationLength[2];
+ ASSERT_EQ(expected_packet_size, length);
+ EXPECT_TRUE(last);
+ VerifySingleNaluPayload(fragmentation, 2, frame, kFrameSize, packet, length);
+
+ EXPECT_FALSE(packetizer->NextPacket(packet, &length, &last));
+}
+
+TEST(RtpPacketizerH264Test, TestMixedStapA_FUA) {
+ const size_t kFuaNaluSize = 2 * (kMaxPayloadSize - 100);
+ const size_t kStapANaluSize = 100;
+ RTPFragmentationHeader fragmentation;
+ fragmentation.VerifyAndAllocateFragmentationHeader(3);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = kFuaNaluSize;
+ fragmentation.fragmentationOffset[1] = kFuaNaluSize;
+ fragmentation.fragmentationLength[1] = kStapANaluSize;
+ fragmentation.fragmentationOffset[2] = kFuaNaluSize + kStapANaluSize;
+ fragmentation.fragmentationLength[2] = kStapANaluSize;
+ const size_t kFrameSize = kFuaNaluSize + 2 * kStapANaluSize;
+ uint8_t frame[kFrameSize];
+ size_t nalu_offset = 0;
+ for (size_t i = 0; i < fragmentation.fragmentationVectorSize; ++i) {
+ nalu_offset = fragmentation.fragmentationOffset[i];
+ frame[nalu_offset] = 0x05; // F=0, NRI=0, Type=5.
+ for (size_t j = 1; j < fragmentation.fragmentationLength[i]; ++j) {
+ frame[nalu_offset + j] = i + j;
+ }
+ }
+ scoped_ptr<RtpPacketizer> packetizer(
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
+ packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
+
+ // First expecting two FU-A packets.
+ std::vector<size_t> fua_sizes;
+ fua_sizes.push_back(1100);
+ fua_sizes.push_back(1099);
+ uint8_t packet[kMaxPayloadSize] = {0};
+ size_t length = 0;
+ bool last = false;
+ int fua_offset = kNalHeaderSize;
+ for (size_t i = 0; i < 2; ++i) {
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ VerifyFua(i, frame, fua_offset, packet, length, fua_sizes);
+ EXPECT_FALSE(last);
+ fua_offset += fua_sizes[i];
+ }
+ // Then expecting one STAP-A packet with two nal units.
+ ASSERT_TRUE(packetizer->NextPacket(packet, &length, &last));
+ size_t expected_packet_size =
+ kNalHeaderSize + 2 * kLengthFieldLength + 2 * kStapANaluSize;
+ ASSERT_EQ(expected_packet_size, length);
+ EXPECT_TRUE(last);
+ for (size_t i = 1; i < fragmentation.fragmentationVectorSize; ++i)
+ VerifyStapAPayload(fragmentation, 1, i, frame, kFrameSize, packet, length);
+
+ EXPECT_FALSE(packetizer->NextPacket(packet, &length, &last));
+}
+
+TEST(RtpPacketizerH264Test, TestFUAOddSize) {
+ const size_t kExpectedPayloadSizes[2] = {600, 600};
+ TestFua(
+ kMaxPayloadSize + 1,
+ kMaxPayloadSize,
+ std::vector<size_t>(kExpectedPayloadSizes,
+ kExpectedPayloadSizes +
+ sizeof(kExpectedPayloadSizes) / sizeof(size_t)));
+}
+
+TEST(RtpPacketizerH264Test, TestFUAEvenSize) {
+ const size_t kExpectedPayloadSizes[2] = {601, 600};
+ TestFua(
+ kMaxPayloadSize + 2,
+ kMaxPayloadSize,
+ std::vector<size_t>(kExpectedPayloadSizes,
+ kExpectedPayloadSizes +
+ sizeof(kExpectedPayloadSizes) / sizeof(size_t)));
+}
+
+TEST(RtpPacketizerH264Test, TestFUARounding) {
+ const size_t kExpectedPayloadSizes[8] = {1266, 1266, 1266, 1266,
+ 1266, 1266, 1266, 1261};
+ TestFua(
+ 10124,
+ 1448,
+ std::vector<size_t>(kExpectedPayloadSizes,
+ kExpectedPayloadSizes +
+ sizeof(kExpectedPayloadSizes) / sizeof(size_t)));
+}
+
+TEST(RtpPacketizerH264Test, TestFUABig) {
+ const size_t kExpectedPayloadSizes[10] = {1198, 1198, 1198, 1198, 1198,
+ 1198, 1198, 1198, 1198, 1198};
+ // Generate 10 full sized packets, leave room for FU-A headers minus the NALU
+ // header.
+ TestFua(
+ 10 * (kMaxPayloadSize - kFuAHeaderSize) + kNalHeaderSize,
+ kMaxPayloadSize,
+ std::vector<size_t>(kExpectedPayloadSizes,
+ kExpectedPayloadSizes +
+ sizeof(kExpectedPayloadSizes) / sizeof(size_t)));
+}
+
+class RtpDepacketizerH264Test : public ::testing::Test {
+ protected:
+ RtpDepacketizerH264Test()
+ : callback_(),
+ depacketizer_(RtpDepacketizer::Create(kRtpVideoH264, &callback_)) {
+ memset(&last_header_, 0, sizeof(last_header_));
+ }
+
+ void ExpectPacket(const uint8_t* data, size_t length) {
+ EXPECT_CALL(callback_, OnReceivedPayloadData(_, length, _))
+ .With(Args<0, 1>(ElementsAreArray(data, length)))
+ .Times(1)
+ .WillRepeatedly(DoAll(SaveArgPointee<2>(&last_header_), Return(0)));
+ }
+
+ MockRtpData callback_;
+ scoped_ptr<RtpDepacketizer> depacketizer_;
+ WebRtcRTPHeader last_header_;
+};
+
+TEST_F(RtpDepacketizerH264Test, TestSingleNalu) {
+ uint8_t packet[2] = {0x05, 0xFF}; // F=0, NRI=0, Type=5.
+
+ WebRtcRTPHeader expected_header;
+ memset(&expected_header, 0, sizeof(expected_header));
+ ExpectPacket(packet, sizeof(packet));
+ EXPECT_TRUE(depacketizer_->Parse(&expected_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameKey, last_header_.frameType);
+ EXPECT_TRUE(last_header_.type.Video.isFirstPacket);
+ EXPECT_TRUE(last_header_.type.Video.codecHeader.H264.single_nalu);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.stap_a);
+}
+
+TEST_F(RtpDepacketizerH264Test, TestStapAKey) {
+ uint8_t packet[16] = {kStapA, // F=0, NRI=0, Type=24.
+ // Length, nal header, payload.
+ 0, 0x02, kIdr, 0xFF, 0, 0x03, kIdr, 0xFF,
+ 0x00, 0, 0x04, kIdr, 0xFF, 0x00, 0x11};
+
+ WebRtcRTPHeader expected_header;
+ memset(&expected_header, 0, sizeof(expected_header));
+ ExpectPacket(packet, sizeof(packet));
+ EXPECT_TRUE(depacketizer_->Parse(&expected_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameKey, last_header_.frameType);
+ EXPECT_TRUE(last_header_.type.Video.isFirstPacket);
+ EXPECT_TRUE(last_header_.type.Video.codecHeader.H264.single_nalu);
+ EXPECT_TRUE(last_header_.type.Video.codecHeader.H264.stap_a);
+}
+
+TEST_F(RtpDepacketizerH264Test, TestStapADelta) {
+ uint8_t packet[16] = {kStapA, // F=0, NRI=0, Type=24.
+ // Length, nal header, payload.
+ 0, 0x02, kSlice, 0xFF, 0, 0x03, kSlice, 0xFF,
+ 0x00, 0, 0x04, kSlice, 0xFF, 0x00, 0x11};
+
+ WebRtcRTPHeader expected_header;
+ memset(&expected_header, 0, sizeof(expected_header));
+ ExpectPacket(packet, sizeof(packet));
+ EXPECT_TRUE(depacketizer_->Parse(&expected_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameDelta, last_header_.frameType);
+ EXPECT_TRUE(last_header_.type.Video.isFirstPacket);
+ EXPECT_TRUE(last_header_.type.Video.codecHeader.H264.single_nalu);
+ EXPECT_TRUE(last_header_.type.Video.codecHeader.H264.stap_a);
+}
+
+TEST_F(RtpDepacketizerH264Test, TestFuA) {
+ uint8_t packet1[3] = {
+ kFuA, // F=0, NRI=0, Type=28.
+ kSBit | kIdr, // FU header.
+ 0x01 // Payload.
+ };
+ const uint8_t kExpected1[2] = {kIdr, 0x01};
+
+ uint8_t packet2[3] = {
+ kFuA, // F=0, NRI=0, Type=28.
+ kIdr, // FU header.
+ 0x02 // Payload.
+ };
+ const uint8_t kExpected2[1] = {0x02};
+
+ uint8_t packet3[3] = {
+ kFuA, // F=0, NRI=0, Type=28.
+ kEBit | kIdr, // FU header.
+ 0x03 // Payload.
+ };
+ const uint8_t kExpected3[1] = {0x03};
+
+ WebRtcRTPHeader expected_header;
+ memset(&expected_header, 0, sizeof(expected_header));
+
+ // We expect that the first packet is one byte shorter since the FU-A header
+ // has been replaced by the original nal header.
+ ExpectPacket(kExpected1, sizeof(kExpected1));
+ EXPECT_TRUE(depacketizer_->Parse(&expected_header, packet1, sizeof(packet1)));
+ EXPECT_EQ(kVideoFrameKey, last_header_.frameType);
+ EXPECT_TRUE(last_header_.type.Video.isFirstPacket);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.single_nalu);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.stap_a);
+
+ // Following packets will be 2 bytes shorter since they will only be appended
+ // onto the first packet.
+ ExpectPacket(kExpected2, sizeof(kExpected2));
+ EXPECT_TRUE(depacketizer_->Parse(&expected_header, packet2, sizeof(packet2)));
+ EXPECT_EQ(kVideoFrameKey, last_header_.frameType);
+ EXPECT_FALSE(last_header_.type.Video.isFirstPacket);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.single_nalu);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.stap_a);
+
+ ExpectPacket(kExpected3, sizeof(kExpected3));
+ EXPECT_TRUE(depacketizer_->Parse(&expected_header, packet3, sizeof(packet3)));
+ EXPECT_EQ(kVideoFrameKey, last_header_.frameType);
+ EXPECT_FALSE(last_header_.type.Video.isFirstPacket);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.single_nalu);
+ EXPECT_FALSE(last_header_.type.Video.codecHeader.H264.stap_a);
+}
+} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format_video_generic.cc b/modules/rtp_rtcp/source/rtp_format_video_generic.cc
new file mode 100644
index 0000000..c28aa13
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format_video_generic.cc
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <string>
+
+#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
+
+namespace webrtc {
+
+static const size_t kGenericHeaderLength = 1;
+
+RtpPacketizerGeneric::RtpPacketizerGeneric(FrameType frame_type,
+ size_t max_payload_len)
+ : payload_data_(NULL),
+ payload_size_(0),
+ max_payload_len_(max_payload_len - kGenericHeaderLength),
+ frame_type_(frame_type) {
+}
+
+RtpPacketizerGeneric::~RtpPacketizerGeneric() {
+}
+
+void RtpPacketizerGeneric::SetPayloadData(
+ const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) {
+ payload_data_ = payload_data;
+ payload_size_ = payload_size;
+
+ // Fragment packets more evenly by splitting the payload up evenly.
+ uint32_t num_packets =
+ (payload_size_ + max_payload_len_ - 1) / max_payload_len_;
+ payload_length_ = (payload_size_ + num_packets - 1) / num_packets;
+ assert(payload_length_ <= max_payload_len_);
+
+ generic_header_ = RtpFormatVideoGeneric::kFirstPacketBit;
+}
+
+bool RtpPacketizerGeneric::NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) {
+ if (payload_size_ < payload_length_) {
+ payload_length_ = payload_size_;
+ }
+
+ payload_size_ -= payload_length_;
+ *bytes_to_send = payload_length_ + kGenericHeaderLength;
+ assert(payload_length_ <= max_payload_len_);
+
+ uint8_t* out_ptr = buffer;
+ // Put generic header in packet
+ if (frame_type_ == kVideoFrameKey) {
+ generic_header_ |= RtpFormatVideoGeneric::kKeyFrameBit;
+ }
+ *out_ptr++ = generic_header_;
+ // Remove first-packet bit, following packets are intermediate
+ generic_header_ &= ~RtpFormatVideoGeneric::kFirstPacketBit;
+
+ // Put payload in packet
+ memcpy(out_ptr, payload_data_, payload_length_);
+ payload_data_ += payload_length_;
+
+ *last_packet = payload_size_ <= 0;
+
+ return true;
+}
+
+ProtectionType RtpPacketizerGeneric::GetProtectionType() {
+ return kProtectedPacket;
+}
+
+StorageType RtpPacketizerGeneric::GetStorageType(
+ uint32_t retransmission_settings) {
+ return kAllowRetransmission;
+}
+
+std::string RtpPacketizerGeneric::ToString() {
+ return "RtpPacketizerGeneric";
+}
+
+RtpDepacketizerGeneric::RtpDepacketizerGeneric(RtpData* const callback)
+ : callback_(callback) {
+}
+
+bool RtpDepacketizerGeneric::Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) {
+ uint8_t generic_header = *payload_data++;
+ --payload_data_length;
+
+ rtp_header->frameType =
+ ((generic_header & RtpFormatVideoGeneric::kKeyFrameBit) != 0)
+ ? kVideoFrameKey
+ : kVideoFrameDelta;
+ rtp_header->type.Video.isFirstPacket =
+ (generic_header & RtpFormatVideoGeneric::kFirstPacketBit) != 0;
+
+ if (callback_->OnReceivedPayloadData(
+ payload_data, payload_data_length, rtp_header) != 0) {
+ return false;
+ }
+ return true;
+}
+} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format_video_generic.h b/modules/rtp_rtcp/source/rtp_format_video_generic.h
index 93fcfa8..23a4e6b 100644
--- a/modules/rtp_rtcp/source/rtp_format_video_generic.h
+++ b/modules/rtp_rtcp/source/rtp_format_video_generic.h
@@ -10,13 +10,72 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_
+#include "webrtc/common_types.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
#include "webrtc/typedefs.h"
namespace webrtc {
namespace RtpFormatVideoGeneric {
- static const uint8_t kKeyFrameBit = 0x01;
- static const uint8_t kFirstPacketBit = 0x02;
+static const uint8_t kKeyFrameBit = 0x01;
+static const uint8_t kFirstPacketBit = 0x02;
} // namespace RtpFormatVideoGeneric
-} // namespace webrtc
+class RtpPacketizerGeneric : public RtpPacketizer {
+ public:
+ // Initialize with payload from encoder.
+ // The payload_data must be exactly one encoded generic frame.
+ RtpPacketizerGeneric(FrameType frametype, size_t max_payload_len);
+
+ virtual ~RtpPacketizerGeneric();
+
+ virtual void SetPayloadData(
+ const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
+
+ // Get the next payload with generic payload header.
+ // buffer is a pointer to where the output will be written.
+ // bytes_to_send is an output variable that will contain number of bytes
+ // written to buffer. The parameter last_packet is true for the last packet of
+ // the frame, false otherwise (i.e., call the function again to get the
+ // next packet).
+ // Returns true on success or false if there was no payload to packetize.
+ virtual bool NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) OVERRIDE;
+
+ virtual ProtectionType GetProtectionType() OVERRIDE;
+
+ virtual StorageType GetStorageType(uint32_t retransmission_settings) OVERRIDE;
+
+ virtual std::string ToString() OVERRIDE;
+
+ private:
+ const uint8_t* payload_data_;
+ size_t payload_size_;
+ const size_t max_payload_len_;
+ FrameType frame_type_;
+ uint32_t payload_length_;
+ uint8_t generic_header_;
+
+ DISALLOW_COPY_AND_ASSIGN(RtpPacketizerGeneric);
+};
+
+// Depacketizer for generic codec.
+class RtpDepacketizerGeneric : public RtpDepacketizer {
+ public:
+ explicit RtpDepacketizerGeneric(RtpData* const callback);
+
+ virtual ~RtpDepacketizerGeneric() {}
+
+ virtual bool Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) OVERRIDE;
+
+ private:
+ RtpData* const callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(RtpDepacketizerGeneric);
+};
+} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8.cc b/modules/rtp_rtcp/source/rtp_format_vp8.cc
index 360176b..a3d673b 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.cc
@@ -10,68 +10,290 @@
#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
-#include <assert.h> // assert
+#include <assert.h> // assert
#include <string.h> // memcpy
#include <vector>
#include "webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.h"
+#include "webrtc/system_wrappers/interface/logging.h"
namespace webrtc {
+namespace {
+struct ParsedPayload {
+ ParsedPayload() : data(NULL), data_length(0) {}
+
+ const uint8_t* data; // Start address of parsed payload data.
+ int data_length; // Length of parsed payload data.
+};
+
+int ParseVP8PictureID(RTPVideoHeaderVP8* vp8,
+ const uint8_t** data,
+ int* data_length,
+ int* parsed_bytes) {
+ assert(vp8 != NULL);
+ if (*data_length <= 0)
+ return -1;
+
+ vp8->pictureId = (**data & 0x7F);
+ if (**data & 0x80) {
+ (*data)++;
+ (*parsed_bytes)++;
+ if (--(*data_length) <= 0)
+ return -1;
+ // PictureId is 15 bits
+ vp8->pictureId = (vp8->pictureId << 8) + **data;
+ }
+ (*data)++;
+ (*parsed_bytes)++;
+ (*data_length)--;
+ return 0;
+}
+
+int ParseVP8Tl0PicIdx(RTPVideoHeaderVP8* vp8,
+ const uint8_t** data,
+ int* data_length,
+ int* parsed_bytes) {
+ assert(vp8 != NULL);
+ if (*data_length <= 0)
+ return -1;
+
+ vp8->tl0PicIdx = **data;
+ (*data)++;
+ (*parsed_bytes)++;
+ (*data_length)--;
+ return 0;
+}
+
+int ParseVP8TIDAndKeyIdx(RTPVideoHeaderVP8* vp8,
+ const uint8_t** data,
+ int* data_length,
+ int* parsed_bytes,
+ bool has_tid,
+ bool has_key_idx) {
+ assert(vp8 != NULL);
+ if (*data_length <= 0)
+ return -1;
+
+ if (has_tid) {
+ vp8->temporalIdx = ((**data >> 6) & 0x03);
+ vp8->layerSync = (**data & 0x20) ? true : false; // Y bit
+ }
+ if (has_key_idx) {
+ vp8->keyIdx = (**data & 0x1F);
+ }
+ (*data)++;
+ (*parsed_bytes)++;
+ (*data_length)--;
+ return 0;
+}
+
+int ParseVP8Extension(RTPVideoHeaderVP8* vp8,
+ const uint8_t* data,
+ int data_length) {
+ assert(vp8 != NULL);
+ int parsed_bytes = 0;
+ if (data_length <= 0)
+ return -1;
+ // Optional X field is present.
+ bool has_picture_id = (*data & 0x80) ? true : false; // I bit
+ bool has_tl0_pic_idx = (*data & 0x40) ? true : false; // L bit
+ bool has_tid = (*data & 0x20) ? true : false; // T bit
+ bool has_key_idx = (*data & 0x10) ? true : false; // K bit
+
+ // Advance data and decrease remaining payload size.
+ data++;
+ parsed_bytes++;
+ data_length--;
+
+ if (has_picture_id) {
+ if (ParseVP8PictureID(vp8, &data, &data_length, &parsed_bytes) != 0) {
+ return -1;
+ }
+ }
+
+ if (has_tl0_pic_idx) {
+ if (ParseVP8Tl0PicIdx(vp8, &data, &data_length, &parsed_bytes) != 0) {
+ return -1;
+ }
+ }
+
+ if (has_tid || has_key_idx) {
+ if (ParseVP8TIDAndKeyIdx(
+ vp8, &data, &data_length, &parsed_bytes, has_tid, has_key_idx) !=
+ 0) {
+ return -1;
+ }
+ }
+ return parsed_bytes;
+}
+
+int ParseVP8FrameSize(WebRtcRTPHeader* rtp_header,
+ const uint8_t* data,
+ int data_length) {
+ assert(rtp_header != NULL);
+ if (rtp_header->frameType != kVideoFrameKey) {
+ // Included in payload header for I-frames.
+ return 0;
+ }
+ if (data_length < 10) {
+ // For an I-frame we should always have the uncompressed VP8 header
+ // in the beginning of the partition.
+ return -1;
+ }
+ rtp_header->type.Video.width = ((data[7] << 8) + data[6]) & 0x3FFF;
+ rtp_header->type.Video.height = ((data[9] << 8) + data[8]) & 0x3FFF;
+ return 0;
+}
+
+//
+// VP8 format:
+//
+// Payload descriptor
+// 0 1 2 3 4 5 6 7
+// +-+-+-+-+-+-+-+-+
+// |X|R|N|S|PartID | (REQUIRED)
+// +-+-+-+-+-+-+-+-+
+// X: |I|L|T|K| RSV | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+// I: | PictureID | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+// L: | TL0PICIDX | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+// T/K: |TID:Y| KEYIDX | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+//
+// Payload header (considered part of the actual payload, sent to decoder)
+// 0 1 2 3 4 5 6 7
+// +-+-+-+-+-+-+-+-+
+// |Size0|H| VER |P|
+// +-+-+-+-+-+-+-+-+
+// | ... |
+// + +
+bool ParseVP8(WebRtcRTPHeader* rtp_header,
+ const uint8_t* data,
+ int data_length,
+ ParsedPayload* payload) {
+ assert(rtp_header != NULL);
+ // Parse mandatory first byte of payload descriptor.
+ bool extension = (*data & 0x80) ? true : false; // X bit
+ bool beginning_of_partition = (*data & 0x10) ? true : false; // S bit
+ int partition_id = (*data & 0x0F); // PartID field
+
+ rtp_header->type.Video.isFirstPacket =
+ beginning_of_partition && (partition_id == 0);
+
+ rtp_header->type.Video.codecHeader.VP8.nonReference =
+ (*data & 0x20) ? true : false; // N bit
+ rtp_header->type.Video.codecHeader.VP8.partitionId = partition_id;
+ rtp_header->type.Video.codecHeader.VP8.beginningOfPartition =
+ beginning_of_partition;
+ rtp_header->type.Video.codecHeader.VP8.pictureId = kNoPictureId;
+ rtp_header->type.Video.codecHeader.VP8.tl0PicIdx = kNoTl0PicIdx;
+ rtp_header->type.Video.codecHeader.VP8.temporalIdx = kNoTemporalIdx;
+ rtp_header->type.Video.codecHeader.VP8.layerSync = false;
+ rtp_header->type.Video.codecHeader.VP8.keyIdx = kNoKeyIdx;
+
+ if (partition_id > 8) {
+ // Weak check for corrupt data: PartID MUST NOT be larger than 8.
+ return false;
+ }
+
+ // Advance data and decrease remaining payload size.
+ data++;
+ data_length--;
+
+ if (extension) {
+ const int parsed_bytes = ParseVP8Extension(
+ &rtp_header->type.Video.codecHeader.VP8, data, data_length);
+ if (parsed_bytes < 0)
+ return false;
+ data += parsed_bytes;
+ data_length -= parsed_bytes;
+ }
+
+ if (data_length <= 0) {
+ LOG(LS_ERROR) << "Error parsing VP8 payload descriptor!";
+ return false;
+ }
+
+ // Read P bit from payload header (only at beginning of first partition).
+ if (data_length > 0 && beginning_of_partition && partition_id == 0) {
+ rtp_header->frameType = (*data & 0x01) ? kVideoFrameDelta : kVideoFrameKey;
+ } else {
+ rtp_header->frameType = kVideoFrameDelta;
+ }
+
+ if (0 != ParseVP8FrameSize(rtp_header, data, data_length)) {
+ return false;
+ }
+ payload->data = data;
+ payload->data_length = data_length;
+ return true;
+}
+} // namespace
// Define how the VP8PacketizerModes are implemented.
// Modes are: kStrict, kAggregate, kEqualSize.
-const RtpFormatVp8::AggregationMode RtpFormatVp8::aggr_modes_[kNumModes] =
- { kAggrNone, kAggrPartitions, kAggrFragments };
-const bool RtpFormatVp8::balance_modes_[kNumModes] =
- { true, true, true };
-const bool RtpFormatVp8::separate_first_modes_[kNumModes] =
- { true, false, false };
+const RtpPacketizerVp8::AggregationMode RtpPacketizerVp8::aggr_modes_
+ [kNumModes] = {kAggrNone, kAggrPartitions, kAggrFragments};
+const bool RtpPacketizerVp8::balance_modes_[kNumModes] = {true, true, true};
+const bool RtpPacketizerVp8::separate_first_modes_[kNumModes] = {true, false,
+ false};
-RtpFormatVp8::RtpFormatVp8(const uint8_t* payload_data,
- uint32_t payload_size,
- const RTPVideoHeaderVP8& hdr_info,
- int max_payload_len,
- const RTPFragmentationHeader& fragmentation,
- VP8PacketizerMode mode)
- : payload_data_(payload_data),
- payload_size_(static_cast<int>(payload_size)),
+RtpPacketizerVp8::RtpPacketizerVp8(const RTPVideoHeaderVP8& hdr_info,
+ int max_payload_len,
+ VP8PacketizerMode mode)
+ : payload_data_(NULL),
+ payload_size_(0),
vp8_fixed_payload_descriptor_bytes_(1),
aggr_mode_(aggr_modes_[mode]),
balance_(balance_modes_[mode]),
separate_first_(separate_first_modes_[mode]),
hdr_info_(hdr_info),
- num_partitions_(fragmentation.fragmentationVectorSize),
+ num_partitions_(0),
max_payload_len_(max_payload_len),
packets_calculated_(false) {
- part_info_.CopyFrom(fragmentation);
}
-RtpFormatVp8::RtpFormatVp8(const uint8_t* payload_data,
- uint32_t payload_size,
- const RTPVideoHeaderVP8& hdr_info,
- int max_payload_len)
- : payload_data_(payload_data),
- payload_size_(static_cast<int>(payload_size)),
+RtpPacketizerVp8::RtpPacketizerVp8(const RTPVideoHeaderVP8& hdr_info,
+ int max_payload_len)
+ : payload_data_(NULL),
+ payload_size_(0),
part_info_(),
vp8_fixed_payload_descriptor_bytes_(1),
aggr_mode_(aggr_modes_[kEqualSize]),
balance_(balance_modes_[kEqualSize]),
separate_first_(separate_first_modes_[kEqualSize]),
hdr_info_(hdr_info),
- num_partitions_(1),
+ num_partitions_(0),
max_payload_len_(max_payload_len),
packets_calculated_(false) {
+}
+
+RtpPacketizerVp8::~RtpPacketizerVp8() {
+}
+
+void RtpPacketizerVp8::SetPayloadData(
+ const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) {
+ payload_data_ = payload_data;
+ payload_size_ = payload_size;
+ if (fragmentation) {
+ part_info_.CopyFrom(*fragmentation);
+ num_partitions_ = fragmentation->fragmentationVectorSize;
+ } else {
part_info_.VerifyAndAllocateFragmentationHeader(1);
part_info_.fragmentationLength[0] = payload_size;
part_info_.fragmentationOffset[0] = 0;
+ num_partitions_ = part_info_.fragmentationVectorSize;
+ }
}
-RtpFormatVp8::~RtpFormatVp8() {}
-
-int RtpFormatVp8::NextPacket(uint8_t* buffer,
- int* bytes_to_send,
- bool* last_packet) {
+bool RtpPacketizerVp8::NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) {
if (!packets_calculated_) {
int ret = 0;
if (aggr_mode_ == kAggrPartitions && balance_) {
@@ -80,26 +302,51 @@
ret = GeneratePackets();
}
if (ret < 0) {
- return ret;
+ return false;
}
}
if (packets_.empty()) {
- return -1;
+ return false;
}
InfoStruct packet_info = packets_.front();
packets_.pop();
- *bytes_to_send = WriteHeaderAndPayload(packet_info, buffer, max_payload_len_);
- if (*bytes_to_send < 0) {
- return -1;
+ int bytes = WriteHeaderAndPayload(packet_info, buffer, max_payload_len_);
+ if (bytes < 0) {
+ return false;
}
+ *bytes_to_send = bytes;
*last_packet = packets_.empty();
- return packet_info.first_partition_ix;
+ return true;
}
-int RtpFormatVp8::CalcNextSize(int max_payload_len, int remaining_bytes,
- bool split_payload) const {
+ProtectionType RtpPacketizerVp8::GetProtectionType() {
+ bool protect =
+ hdr_info_.temporalIdx == 0 || hdr_info_.temporalIdx == kNoTemporalIdx;
+ return protect ? kProtectedPacket : kUnprotectedPacket;
+}
+
+StorageType RtpPacketizerVp8::GetStorageType(uint32_t retransmission_settings) {
+ StorageType storage = kAllowRetransmission;
+ if (hdr_info_.temporalIdx == 0 &&
+ !(retransmission_settings & kRetransmitBaseLayer)) {
+ storage = kDontRetransmit;
+ } else if (hdr_info_.temporalIdx != kNoTemporalIdx &&
+ hdr_info_.temporalIdx > 0 &&
+ !(retransmission_settings & kRetransmitHigherLayers)) {
+ storage = kDontRetransmit;
+ }
+ return storage;
+}
+
+std::string RtpPacketizerVp8::ToString() {
+ return "RtpPacketizerVp8";
+}
+
+int RtpPacketizerVp8::CalcNextSize(int max_payload_len,
+ int remaining_bytes,
+ bool split_payload) const {
if (max_payload_len == 0 || remaining_bytes == 0) {
return 0;
}
@@ -113,17 +360,17 @@
// Number of fragments for remaining_bytes:
int num_frags = remaining_bytes / max_payload_len + 1;
// Number of bytes in this fragment:
- return static_cast<int>(static_cast<double>(remaining_bytes)
- / num_frags + 0.5);
+ return static_cast<int>(static_cast<double>(remaining_bytes) / num_frags +
+ 0.5);
} else {
return max_payload_len >= remaining_bytes ? remaining_bytes
- : max_payload_len;
+ : max_payload_len;
}
}
-int RtpFormatVp8::GeneratePackets() {
- if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_
- + PayloadDescriptorExtraLength() + 1) {
+int RtpPacketizerVp8::GeneratePackets() {
+ if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_ +
+ PayloadDescriptorExtraLength() + 1) {
// The provided payload length is not long enough for the payload
// descriptor and one payload byte. Return an error.
return -1;
@@ -133,16 +380,18 @@
bool beginning = true;
int part_ix = 0;
while (total_bytes_processed < payload_size_) {
- int packet_bytes = 0; // How much data to send in this packet.
+ int packet_bytes = 0; // How much data to send in this packet.
bool split_payload = true; // Splitting of partitions is initially allowed.
int remaining_in_partition = part_info_.fragmentationOffset[part_ix] -
- total_bytes_processed + part_info_.fragmentationLength[part_ix];
- int rem_payload_len = max_payload_len_ -
+ total_bytes_processed +
+ part_info_.fragmentationLength[part_ix];
+ int rem_payload_len =
+ max_payload_len_ -
(vp8_fixed_payload_descriptor_bytes_ + PayloadDescriptorExtraLength());
int first_partition_in_packet = part_ix;
- while (int next_size = CalcNextSize(rem_payload_len, remaining_in_partition,
- split_payload)) {
+ while (int next_size = CalcNextSize(
+ rem_payload_len, remaining_in_partition, split_payload)) {
packet_bytes += next_size;
rem_payload_len -= next_size;
remaining_in_partition -= next_size;
@@ -155,7 +404,7 @@
// with an intact partition (indicated by first_fragment_ == true).
if (part_ix + 1 < num_partitions_ &&
((aggr_mode_ == kAggrFragments) ||
- (aggr_mode_ == kAggrPartitions && start_on_new_fragment))) {
+ (aggr_mode_ == kAggrPartitions && start_on_new_fragment))) {
assert(part_ix < num_partitions_);
remaining_in_partition = part_info_.fragmentationLength[++part_ix];
// Disallow splitting unless kAggrFragments. In kAggrPartitions,
@@ -171,7 +420,9 @@
}
assert(packet_bytes > 0);
- QueuePacket(total_bytes_processed, packet_bytes, first_partition_in_packet,
+ QueuePacket(total_bytes_processed,
+ packet_bytes,
+ first_partition_in_packet,
start_on_new_fragment);
total_bytes_processed += packet_bytes;
start_on_new_fragment = (remaining_in_partition == 0);
@@ -182,16 +433,16 @@
return 0;
}
-int RtpFormatVp8::GeneratePacketsBalancedAggregates() {
- if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_
- + PayloadDescriptorExtraLength() + 1) {
+int RtpPacketizerVp8::GeneratePacketsBalancedAggregates() {
+ if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_ +
+ PayloadDescriptorExtraLength() + 1) {
// The provided payload length is not long enough for the payload
// descriptor and one payload byte. Return an error.
return -1;
}
std::vector<int> partition_decision;
- const int overhead = vp8_fixed_payload_descriptor_bytes_ +
- PayloadDescriptorExtraLength();
+ const int overhead =
+ vp8_fixed_payload_descriptor_bytes_ + PayloadDescriptorExtraLength();
const uint32_t max_payload_len = max_payload_len_ - overhead;
int min_size, max_size;
AggregateSmallPartitions(&partition_decision, &min_size, &max_size);
@@ -207,10 +458,11 @@
const int packet_bytes =
(remaining_partition + num_fragments - 1) / num_fragments;
for (int n = 0; n < num_fragments; ++n) {
- const int this_packet_bytes = packet_bytes < remaining_partition ?
- packet_bytes : remaining_partition;
- QueuePacket(total_bytes_processed, this_packet_bytes, part_ix,
- (n == 0));
+ const int this_packet_bytes = packet_bytes < remaining_partition
+ ? packet_bytes
+ : remaining_partition;
+ QueuePacket(
+ total_bytes_processed, this_packet_bytes, part_ix, (n == 0));
remaining_partition -= this_packet_bytes;
total_bytes_processed += this_packet_bytes;
if (this_packet_bytes < min_size) {
@@ -227,13 +479,15 @@
const int first_partition_in_packet = part_ix;
const int aggregation_index = partition_decision[part_ix];
while (static_cast<size_t>(part_ix) < partition_decision.size() &&
- partition_decision[part_ix] == aggregation_index) {
+ partition_decision[part_ix] == aggregation_index) {
// Collect all partitions that were aggregated into the same packet.
this_packet_bytes += part_info_.fragmentationLength[part_ix];
++part_ix;
}
- QueuePacket(total_bytes_processed, this_packet_bytes,
- first_partition_in_packet, true);
+ QueuePacket(total_bytes_processed,
+ this_packet_bytes,
+ first_partition_in_packet,
+ true);
total_bytes_processed += this_packet_bytes;
}
}
@@ -241,16 +495,16 @@
return 0;
}
-void RtpFormatVp8::AggregateSmallPartitions(std::vector<int>* partition_vec,
- int* min_size,
- int* max_size) {
+void RtpPacketizerVp8::AggregateSmallPartitions(std::vector<int>* partition_vec,
+ int* min_size,
+ int* max_size) {
assert(min_size && max_size);
*min_size = -1;
*max_size = -1;
assert(partition_vec);
partition_vec->assign(num_partitions_, -1);
- const int overhead = vp8_fixed_payload_descriptor_bytes_ +
- PayloadDescriptorExtraLength();
+ const int overhead =
+ vp8_fixed_payload_descriptor_bytes_ + PayloadDescriptorExtraLength();
const uint32_t max_payload_len = max_payload_len_ - overhead;
int first_in_set = 0;
int last_in_set = 0;
@@ -261,12 +515,12 @@
// Found start of a set.
last_in_set = first_in_set;
while (last_in_set + 1 < num_partitions_ &&
- part_info_.fragmentationLength[last_in_set + 1] < max_payload_len) {
+ part_info_.fragmentationLength[last_in_set + 1] <
+ max_payload_len) {
++last_in_set;
}
// Found end of a set. Run optimized aggregator. It is ok if start == end.
- Vp8PartitionAggregator aggregator(part_info_, first_in_set,
- last_in_set);
+ Vp8PartitionAggregator aggregator(part_info_, first_in_set, last_in_set);
if (*min_size >= 0 && *max_size >= 0) {
aggregator.SetPriorMinMax(*min_size, *max_size);
}
@@ -285,10 +539,10 @@
}
}
-void RtpFormatVp8::QueuePacket(int start_pos,
- int packet_size,
- int first_partition_in_packet,
- bool start_on_new_fragment) {
+void RtpPacketizerVp8::QueuePacket(int start_pos,
+ int packet_size,
+ int first_partition_in_packet,
+ bool start_on_new_fragment) {
// Write info to packet info struct and store in packet info queue.
InfoStruct packet_info;
packet_info.payload_start_pos = start_pos;
@@ -298,9 +552,9 @@
packets_.push(packet_info);
}
-int RtpFormatVp8::WriteHeaderAndPayload(const InfoStruct& packet_info,
- uint8_t* buffer,
- int buffer_length) const {
+int RtpPacketizerVp8::WriteHeaderAndPayload(const InfoStruct& packet_info,
+ uint8_t* buffer,
+ int buffer_length) const {
// Write the VP8 payload descriptor.
// 0
// 0 1 2 3 4 5 6 7 8
@@ -318,43 +572,47 @@
assert(packet_info.size > 0);
buffer[0] = 0;
- if (XFieldPresent()) buffer[0] |= kXBit;
- if (hdr_info_.nonReference) buffer[0] |= kNBit;
- if (packet_info.first_fragment) buffer[0] |= kSBit;
+ if (XFieldPresent())
+ buffer[0] |= kXBit;
+ if (hdr_info_.nonReference)
+ buffer[0] |= kNBit;
+ if (packet_info.first_fragment)
+ buffer[0] |= kSBit;
buffer[0] |= (packet_info.first_partition_ix & kPartIdField);
const int extension_length = WriteExtensionFields(buffer, buffer_length);
memcpy(&buffer[vp8_fixed_payload_descriptor_bytes_ + extension_length],
- &payload_data_[packet_info.payload_start_pos], packet_info.size);
+ &payload_data_[packet_info.payload_start_pos],
+ packet_info.size);
// Return total length of written data.
- return packet_info.size + vp8_fixed_payload_descriptor_bytes_
- + extension_length;
+ return packet_info.size + vp8_fixed_payload_descriptor_bytes_ +
+ extension_length;
}
-int RtpFormatVp8::WriteExtensionFields(uint8_t* buffer,
- int buffer_length) const {
+int RtpPacketizerVp8::WriteExtensionFields(uint8_t* buffer,
+ int buffer_length) const {
int extension_length = 0;
if (XFieldPresent()) {
uint8_t* x_field = buffer + vp8_fixed_payload_descriptor_bytes_;
*x_field = 0;
extension_length = 1; // One octet for the X field.
if (PictureIdPresent()) {
- if (WritePictureIDFields(x_field, buffer, buffer_length,
- &extension_length) < 0) {
+ if (WritePictureIDFields(
+ x_field, buffer, buffer_length, &extension_length) < 0) {
return -1;
}
}
if (TL0PicIdxFieldPresent()) {
- if (WriteTl0PicIdxFields(x_field, buffer, buffer_length,
- &extension_length) < 0) {
+ if (WriteTl0PicIdxFields(
+ x_field, buffer, buffer_length, &extension_length) < 0) {
return -1;
}
}
if (TIDFieldPresent() || KeyIdxFieldPresent()) {
- if (WriteTIDAndKeyIdxFields(x_field, buffer, buffer_length,
- &extension_length) < 0) {
+ if (WriteTIDAndKeyIdxFields(
+ x_field, buffer, buffer_length, &extension_length) < 0) {
return -1;
}
}
@@ -363,26 +621,25 @@
return extension_length;
}
-int RtpFormatVp8::WritePictureIDFields(uint8_t* x_field,
- uint8_t* buffer,
- int buffer_length,
- int* extension_length) const {
+int RtpPacketizerVp8::WritePictureIDFields(uint8_t* x_field,
+ uint8_t* buffer,
+ int buffer_length,
+ int* extension_length) const {
*x_field |= kIBit;
const int pic_id_length = WritePictureID(
buffer + vp8_fixed_payload_descriptor_bytes_ + *extension_length,
- buffer_length - vp8_fixed_payload_descriptor_bytes_
- - *extension_length);
- if (pic_id_length < 0) return -1;
+ buffer_length - vp8_fixed_payload_descriptor_bytes_ - *extension_length);
+ if (pic_id_length < 0)
+ return -1;
*extension_length += pic_id_length;
return 0;
}
-int RtpFormatVp8::WritePictureID(uint8_t* buffer,
- int buffer_length) const {
- const uint16_t pic_id =
- static_cast<uint16_t> (hdr_info_.pictureId);
+int RtpPacketizerVp8::WritePictureID(uint8_t* buffer, int buffer_length) const {
+ const uint16_t pic_id = static_cast<uint16_t>(hdr_info_.pictureId);
int picture_id_len = PictureIdLength();
- if (picture_id_len > buffer_length) return -1;
+ if (picture_id_len > buffer_length)
+ return -1;
if (picture_id_len == 2) {
buffer[0] = 0x80 | ((pic_id >> 8) & 0x7F);
buffer[1] = pic_id & 0xFF;
@@ -392,27 +649,27 @@
return picture_id_len;
}
-int RtpFormatVp8::WriteTl0PicIdxFields(uint8_t* x_field,
- uint8_t* buffer,
- int buffer_length,
- int* extension_length) const {
- if (buffer_length < vp8_fixed_payload_descriptor_bytes_ + *extension_length
- + 1) {
+int RtpPacketizerVp8::WriteTl0PicIdxFields(uint8_t* x_field,
+ uint8_t* buffer,
+ int buffer_length,
+ int* extension_length) const {
+ if (buffer_length <
+ vp8_fixed_payload_descriptor_bytes_ + *extension_length + 1) {
return -1;
}
*x_field |= kLBit;
- buffer[vp8_fixed_payload_descriptor_bytes_
- + *extension_length] = hdr_info_.tl0PicIdx;
+ buffer[vp8_fixed_payload_descriptor_bytes_ + *extension_length] =
+ hdr_info_.tl0PicIdx;
++*extension_length;
return 0;
}
-int RtpFormatVp8::WriteTIDAndKeyIdxFields(uint8_t* x_field,
- uint8_t* buffer,
- int buffer_length,
- int* extension_length) const {
- if (buffer_length < vp8_fixed_payload_descriptor_bytes_ + *extension_length
- + 1) {
+int RtpPacketizerVp8::WriteTIDAndKeyIdxFields(uint8_t* x_field,
+ uint8_t* buffer,
+ int buffer_length,
+ int* extension_length) const {
+ if (buffer_length <
+ vp8_fixed_payload_descriptor_bytes_ + *extension_length + 1) {
return -1;
}
uint8_t* data_field =
@@ -420,7 +677,7 @@
*data_field = 0;
if (TIDFieldPresent()) {
*x_field |= kTBit;
- assert(hdr_info_.temporalIdx >= 0 && hdr_info_.temporalIdx <= 3);
+ assert(hdr_info_.temporalIdx <= 3);
*data_field |= hdr_info_.temporalIdx << 6;
*data_field |= hdr_info_.layerSync ? kYBit : 0;
}
@@ -432,15 +689,18 @@
return 0;
}
-int RtpFormatVp8::PayloadDescriptorExtraLength() const {
+int RtpPacketizerVp8::PayloadDescriptorExtraLength() const {
int length_bytes = PictureIdLength();
- if (TL0PicIdxFieldPresent()) ++length_bytes;
- if (TIDFieldPresent() || KeyIdxFieldPresent()) ++length_bytes;
- if (length_bytes > 0) ++length_bytes; // Include the extension field.
+ if (TL0PicIdxFieldPresent())
+ ++length_bytes;
+ if (TIDFieldPresent() || KeyIdxFieldPresent())
+ ++length_bytes;
+ if (length_bytes > 0)
+ ++length_bytes; // Include the extension field.
return length_bytes;
}
-int RtpFormatVp8::PictureIdLength() const {
+int RtpPacketizerVp8::PictureIdLength() const {
if (hdr_info_.pictureId == kNoPictureId) {
return 0;
}
@@ -450,22 +710,43 @@
return 2;
}
-bool RtpFormatVp8::XFieldPresent() const {
- return (TIDFieldPresent() || TL0PicIdxFieldPresent() || PictureIdPresent()
- || KeyIdxFieldPresent());
+bool RtpPacketizerVp8::XFieldPresent() const {
+ return (TIDFieldPresent() || TL0PicIdxFieldPresent() || PictureIdPresent() ||
+ KeyIdxFieldPresent());
}
-bool RtpFormatVp8::TIDFieldPresent() const {
+bool RtpPacketizerVp8::TIDFieldPresent() const {
assert((hdr_info_.layerSync == false) ||
(hdr_info_.temporalIdx != kNoTemporalIdx));
return (hdr_info_.temporalIdx != kNoTemporalIdx);
}
-bool RtpFormatVp8::KeyIdxFieldPresent() const {
+bool RtpPacketizerVp8::KeyIdxFieldPresent() const {
return (hdr_info_.keyIdx != kNoKeyIdx);
}
-bool RtpFormatVp8::TL0PicIdxFieldPresent() const {
+bool RtpPacketizerVp8::TL0PicIdxFieldPresent() const {
return (hdr_info_.tl0PicIdx != kNoTl0PicIdx);
}
+
+RtpDepacketizerVp8::RtpDepacketizerVp8(RtpData* const callback)
+ : callback_(callback) {
+}
+
+bool RtpDepacketizerVp8::Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) {
+ ParsedPayload payload;
+ if (!ParseVP8(rtp_header, payload_data, payload_data_length, &payload))
+ return false;
+
+ if (payload.data_length == 0)
+ return true;
+
+ if (callback_->OnReceivedPayloadData(
+ payload.data, payload.data_length, rtp_header) != 0) {
+ return false;
+ }
+ return true;
+}
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8.h b/modules/rtp_rtcp/source/rtp_format_vp8.h
index e4d3dc0..85a3304 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.h
@@ -30,6 +30,7 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -44,25 +45,24 @@
};
// Packetizer for VP8.
-class RtpFormatVp8 {
+class RtpPacketizerVp8 : public RtpPacketizer {
public:
// Initialize with payload from encoder and fragmentation info.
// The payload_data must be exactly one encoded VP8 frame.
- RtpFormatVp8(const uint8_t* payload_data,
- uint32_t payload_size,
- const RTPVideoHeaderVP8& hdr_info,
- int max_payload_len,
- const RTPFragmentationHeader& fragmentation,
- VP8PacketizerMode mode);
+ RtpPacketizerVp8(const RTPVideoHeaderVP8& hdr_info,
+ int max_payload_len,
+ VP8PacketizerMode mode);
// Initialize without fragmentation info. Mode kEqualSize will be used.
// The payload_data must be exactly one encoded VP8 frame.
- RtpFormatVp8(const uint8_t* payload_data,
- uint32_t payload_size,
- const RTPVideoHeaderVP8& hdr_info,
- int max_payload_len);
+ RtpPacketizerVp8(const RTPVideoHeaderVP8& hdr_info, int max_payload_len);
- ~RtpFormatVp8();
+ virtual ~RtpPacketizerVp8();
+
+ virtual void SetPayloadData(
+ const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
// Get the next payload with VP8 payload header.
// max_payload_len limits the sum length of payload and VP8 payload header.
@@ -75,9 +75,15 @@
// the first payload byte in the packet is taken, with the first partition
// having index 0; returns negative on error.
// For the kEqualSize mode: returns 0 on success, return negative on error.
- int NextPacket(uint8_t* buffer,
- int* bytes_to_send,
- bool* last_packet);
+ virtual bool NextPacket(uint8_t* buffer,
+ size_t* bytes_to_send,
+ bool* last_packet) OVERRIDE;
+
+ virtual ProtectionType GetProtectionType() OVERRIDE;
+
+ virtual StorageType GetStorageType(uint32_t retransmission_settings) OVERRIDE;
+
+ virtual std::string ToString() OVERRIDE;
private:
typedef struct {
@@ -96,19 +102,20 @@
static const AggregationMode aggr_modes_[kNumModes];
static const bool balance_modes_[kNumModes];
static const bool separate_first_modes_[kNumModes];
- static const int kXBit = 0x80;
- static const int kNBit = 0x20;
- static const int kSBit = 0x10;
+ static const int kXBit = 0x80;
+ static const int kNBit = 0x20;
+ static const int kSBit = 0x10;
static const int kPartIdField = 0x0F;
static const int kKeyIdxField = 0x1F;
- static const int kIBit = 0x80;
- static const int kLBit = 0x40;
- static const int kTBit = 0x20;
- static const int kKBit = 0x10;
- static const int kYBit = 0x20;
+ static const int kIBit = 0x80;
+ static const int kLBit = 0x40;
+ static const int kTBit = 0x20;
+ static const int kKBit = 0x10;
+ static const int kYBit = 0x20;
// Calculate size of next chunk to send. Returns 0 if none can be sent.
- int CalcNextSize(int max_payload_len, int remaining_bytes,
+ int CalcNextSize(int max_payload_len,
+ int remaining_bytes,
bool split_payload) const;
// Calculate all packet sizes and load to packet info queue.
@@ -144,7 +151,6 @@
uint8_t* buffer,
int buffer_length) const;
-
// Write the X field and the appropriate extension fields to buffer.
// The function returns the extension length (including X field), or -1
// on error.
@@ -152,19 +158,25 @@
// Set the I bit in the x_field, and write PictureID to the appropriate
// position in buffer. The function returns 0 on success, -1 otherwise.
- int WritePictureIDFields(uint8_t* x_field, uint8_t* buffer,
- int buffer_length, int* extension_length) const;
+ int WritePictureIDFields(uint8_t* x_field,
+ uint8_t* buffer,
+ int buffer_length,
+ int* extension_length) const;
// Set the L bit in the x_field, and write Tl0PicIdx to the appropriate
// position in buffer. The function returns 0 on success, -1 otherwise.
- int WriteTl0PicIdxFields(uint8_t* x_field, uint8_t* buffer,
- int buffer_length, int* extension_length) const;
+ int WriteTl0PicIdxFields(uint8_t* x_field,
+ uint8_t* buffer,
+ int buffer_length,
+ int* extension_length) const;
// Set the T and K bits in the x_field, and write TID, Y and KeyIdx to the
// appropriate position in buffer. The function returns 0 on success,
// -1 otherwise.
- int WriteTIDAndKeyIdxFields(uint8_t* x_field, uint8_t* buffer,
- int buffer_length, int* extension_length) const;
+ int WriteTIDAndKeyIdxFields(uint8_t* x_field,
+ uint8_t* buffer,
+ int buffer_length,
+ int* extension_length) const;
// Write the PictureID from codec_specific_info_ to buffer. One or two
// bytes are written, depending on magnitude of PictureID. The function
@@ -187,7 +199,7 @@
bool PictureIdPresent() const { return (PictureIdLength() > 0); }
const uint8_t* payload_data_;
- const int payload_size_;
+ int payload_size_;
RTPFragmentationHeader part_info_;
const int vp8_fixed_payload_descriptor_bytes_; // Length of VP8 payload
// descriptors's fixed part.
@@ -195,14 +207,29 @@
const bool balance_;
const bool separate_first_;
const RTPVideoHeaderVP8 hdr_info_;
- const int num_partitions_;
+ int num_partitions_;
const int max_payload_len_;
InfoQueue packets_;
bool packets_calculated_;
- DISALLOW_COPY_AND_ASSIGN(RtpFormatVp8);
+ DISALLOW_COPY_AND_ASSIGN(RtpPacketizerVp8);
};
-} // namespace
+// Depacketizer for VP8.
+class RtpDepacketizerVp8 : public RtpDepacketizer {
+ public:
+ explicit RtpDepacketizerVp8(RtpData* const callback);
+ virtual ~RtpDepacketizerVp8() {}
+
+ virtual bool Parse(WebRtcRTPHeader* rtp_header,
+ const uint8_t* payload_data,
+ size_t payload_data_length) OVERRIDE;
+
+ private:
+ RtpData* const callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(RtpDepacketizerVp8);
+};
+} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP8_H_
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.cc b/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.cc
index a121a69..549512b 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.cc
@@ -64,20 +64,19 @@
}
void RtpFormatVp8TestHelper::GetAllPacketsAndCheck(
- RtpFormatVp8* packetizer,
+ RtpPacketizerVp8* packetizer,
const int* expected_sizes,
const int* expected_part,
const bool* expected_frag_start,
int expected_num_packets) {
ASSERT_TRUE(inited_);
- int send_bytes = 0;
+ size_t send_bytes = 0;
bool last = false;
for (int i = 0; i < expected_num_packets; ++i) {
std::ostringstream ss;
ss << "Checking packet " << i;
SCOPED_TRACE(ss.str());
- EXPECT_EQ(expected_part[i],
- packetizer->NextPacket(buffer_, &send_bytes, &last));
+ EXPECT_TRUE(packetizer->NextPacket(buffer_, &send_bytes, &last));
CheckPacket(send_bytes, expected_sizes[i], last,
expected_frag_start[i]);
}
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h b/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h
index e146492..22e6803 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h
@@ -32,7 +32,7 @@
explicit RtpFormatVp8TestHelper(const RTPVideoHeaderVP8* hdr);
~RtpFormatVp8TestHelper();
bool Init(const int* partition_sizes, int num_partitions);
- void GetAllPacketsAndCheck(RtpFormatVp8* packetizer,
+ void GetAllPacketsAndCheck(RtpPacketizerVp8* packetizer,
const int* expected_sizes,
const int* expected_part,
const bool* expected_frag_start,
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index 1d8b2be..7a4dbcf 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -12,21 +12,80 @@
* This file includes unit tests for the VP8 packetizer.
*/
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h"
#include "webrtc/system_wrappers/interface/compile_assert.h"
#include "webrtc/typedefs.h"
-#define CHECK_ARRAY_SIZE(expected_size, array) \
- COMPILE_ASSERT(expected_size == sizeof(array) / sizeof(array[0]), \
+#define CHECK_ARRAY_SIZE(expected_size, array) \
+ COMPILE_ASSERT(expected_size == sizeof(array) / sizeof(array[0]), \
check_array_size);
-namespace webrtc {
+using ::testing::_;
+using ::testing::Args;
+using ::testing::ElementsAreArray;
+using ::testing::Return;
-class RtpFormatVp8Test : public ::testing::Test {
+namespace webrtc {
+namespace {
+// Payload descriptor
+// 0 1 2 3 4 5 6 7
+// +-+-+-+-+-+-+-+-+
+// |X|R|N|S|PartID | (REQUIRED)
+// +-+-+-+-+-+-+-+-+
+// X: |I|L|T|K| RSV | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+// I: | PictureID | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+// L: | TL0PICIDX | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+// T/K: |TID:Y| KEYIDX | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+
+//
+// Payload header
+// 0 1 2 3 4 5 6 7
+// +-+-+-+-+-+-+-+-+
+// |Size0|H| VER |P|
+// +-+-+-+-+-+-+-+-+
+// | Size1 |
+// +-+-+-+-+-+-+-+-+
+// | Size2 |
+// +-+-+-+-+-+-+-+-+
+// | Bytes 4..N of |
+// | VP8 payload |
+// : :
+// +-+-+-+-+-+-+-+-+
+// | OPTIONAL RTP |
+// | padding |
+// : :
+// +-+-+-+-+-+-+-+-+
+
+void VerifyBasicHeader(WebRtcRTPHeader* header, bool N, bool S, int part_id) {
+ ASSERT_TRUE(header != NULL);
+ EXPECT_EQ(N, header->type.Video.codecHeader.VP8.nonReference);
+ EXPECT_EQ(S, header->type.Video.codecHeader.VP8.beginningOfPartition);
+ EXPECT_EQ(part_id, header->type.Video.codecHeader.VP8.partitionId);
+}
+
+void VerifyExtensions(WebRtcRTPHeader* header,
+ int16_t picture_id, /* I */
+ int16_t tl0_pic_idx, /* L */
+ uint8_t temporal_idx, /* T */
+ int key_idx /* K */) {
+ ASSERT_TRUE(header != NULL);
+ EXPECT_EQ(picture_id, header->type.Video.codecHeader.VP8.pictureId);
+ EXPECT_EQ(tl0_pic_idx, header->type.Video.codecHeader.VP8.tl0PicIdx);
+ EXPECT_EQ(temporal_idx, header->type.Video.codecHeader.VP8.temporalIdx);
+ EXPECT_EQ(key_idx, header->type.Video.codecHeader.VP8.keyIdx);
+}
+} // namespace
+
+class RtpPacketizerVp8Test : public ::testing::Test {
protected:
- RtpFormatVp8Test() : helper_(NULL) {}
+ RtpPacketizerVp8Test() : helper_(NULL) {}
virtual void TearDown() { delete helper_; }
bool Init(const int* partition_sizes, int num_partitions) {
hdr_info_.pictureId = kNoPictureId;
@@ -35,7 +94,8 @@
hdr_info_.layerSync = false;
hdr_info_.tl0PicIdx = kNoTl0PicIdx;
hdr_info_.keyIdx = kNoKeyIdx;
- if (helper_ != NULL) return false;
+ if (helper_ != NULL)
+ return false;
helper_ = new test::RtpFormatVp8TestHelper(&hdr_info_);
return helper_->Init(partition_sizes, num_partitions);
}
@@ -44,46 +104,45 @@
test::RtpFormatVp8TestHelper* helper_;
};
-TEST_F(RtpFormatVp8Test, TestStrictMode) {
+TEST_F(RtpPacketizerVp8Test, TestStrictMode) {
const int kSizeVector[] = {10, 8, 27};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.pictureId = 200; // > 0x7F should produce 2-byte PictureID.
const int kMaxSize = 13;
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kStrict);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kStrict);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// The expected sizes are obtained by running a verified good implementation.
const int kExpectedSizes[] = {9, 9, 12, 11, 11, 11, 10};
const int kExpectedPart[] = {0, 0, 1, 2, 2, 2, 2};
- const bool kExpectedFragStart[] =
- {true, false, true, true, false, false, false};
+ const bool kExpectedFragStart[] = {true, false, true, true,
+ false, false, false};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
-TEST_F(RtpFormatVp8Test, TestAggregateMode) {
+TEST_F(RtpPacketizerVp8Test, TestAggregateMode) {
const int kSizeVector[] = {60, 10, 10};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.pictureId = 20; // <= 0x7F should produce 1-byte PictureID.
const int kMaxSize = 25;
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// The expected sizes are obtained by running a verified good implementation.
const int kExpectedSizes[] = {23, 23, 23, 23};
@@ -93,23 +152,24 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
-TEST_F(RtpFormatVp8Test, TestAggregateModeManyPartitions1) {
+TEST_F(RtpPacketizerVp8Test, TestAggregateModeManyPartitions1) {
const int kSizeVector[] = {1600, 200, 200, 200, 200, 200, 200, 200, 200};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.pictureId = 20; // <= 0x7F should produce 1-byte PictureID.
const int kMaxSize = 1500;
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// The expected sizes are obtained by running a verified good implementation.
const int kExpectedSizes[] = {803, 803, 803, 803};
@@ -119,23 +179,24 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
-TEST_F(RtpFormatVp8Test, TestAggregateModeManyPartitions2) {
+TEST_F(RtpPacketizerVp8Test, TestAggregateModeManyPartitions2) {
const int kSizeVector[] = {1599, 200, 200, 200, 1600, 200, 200, 200, 200};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.pictureId = 20; // <= 0x7F should produce 1-byte PictureID.
const int kMaxSize = 1500;
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// The expected sizes are obtained by running a verified good implementation.
const int kExpectedSizes[] = {803, 802, 603, 803, 803, 803};
@@ -145,23 +206,24 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
-TEST_F(RtpFormatVp8Test, TestAggregateModeTwoLargePartitions) {
+TEST_F(RtpPacketizerVp8Test, TestAggregateModeTwoLargePartitions) {
const int kSizeVector[] = {1654, 2268};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.pictureId = 20; // <= 0x7F should produce 1-byte PictureID.
const int kMaxSize = 1460;
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// The expected sizes are obtained by running a verified good implementation.
const int kExpectedSizes[] = {830, 830, 1137, 1137};
@@ -171,22 +233,24 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
// Verify that EqualSize mode is forced if fragmentation info is missing.
-TEST_F(RtpFormatVp8Test, TestEqualSizeModeFallback) {
+TEST_F(RtpPacketizerVp8Test, TestEqualSizeModeFallback) {
const int kSizeVector[] = {10, 10, 10};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.pictureId = 200; // > 0x7F should produce 2-byte PictureID
- const int kMaxSize = 12; // Small enough to produce 4 packets.
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize);
+ const int kMaxSize = 12; // Small enough to produce 4 packets.
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize);
+ packetizer.SetPayloadData(
+ helper_->payload_data(), helper_->payload_size(), NULL);
// Expecting three full packets, and one with the remainder.
const int kExpectedSizes[] = {12, 11, 12, 11};
@@ -198,22 +262,24 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->set_sloppy_partitioning(true);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
// Verify that non-reference bit is set. EqualSize mode fallback is expected.
-TEST_F(RtpFormatVp8Test, TestNonReferenceBit) {
+TEST_F(RtpPacketizerVp8Test, TestNonReferenceBit) {
const int kSizeVector[] = {10, 10, 10};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
hdr_info_.nonReference = true;
const int kMaxSize = 25; // Small enough to produce two packets.
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize);
+ packetizer.SetPayloadData(
+ helper_->payload_data(), helper_->payload_size(), NULL);
// EqualSize mode => First packet full; other not.
const int kExpectedSizes[] = {16, 16};
@@ -225,12 +291,15 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->set_sloppy_partitioning(true);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
// Verify Tl0PicIdx and TID fields, and layerSync bit.
-TEST_F(RtpFormatVp8Test, TestTl0PicIdxAndTID) {
+TEST_F(RtpPacketizerVp8Test, TestTl0PicIdxAndTID) {
const int kSizeVector[] = {10, 10, 10};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
@@ -240,12 +309,10 @@
hdr_info_.layerSync = true;
// kMaxSize is only limited by allocated buffer size.
const int kMaxSize = helper_->buffer_size();
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// Expect one single packet of payload_size() + 4 bytes header.
const int kExpectedSizes[1] = {helper_->payload_size() + 4};
@@ -255,12 +322,15 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
// Verify KeyIdx field.
-TEST_F(RtpFormatVp8Test, TestKeyIdx) {
+TEST_F(RtpPacketizerVp8Test, TestKeyIdx) {
const int kSizeVector[] = {10, 10, 10};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
@@ -268,12 +338,10 @@
hdr_info_.keyIdx = 17;
// kMaxSize is only limited by allocated buffer size.
const int kMaxSize = helper_->buffer_size();
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// Expect one single packet of payload_size() + 3 bytes header.
const int kExpectedSizes[1] = {helper_->payload_size() + 3};
@@ -283,12 +351,15 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
// Verify TID field and KeyIdx field in combination.
-TEST_F(RtpFormatVp8Test, TestTIDAndKeyIdx) {
+TEST_F(RtpPacketizerVp8Test, TestTIDAndKeyIdx) {
const int kSizeVector[] = {10, 10, 10};
const int kNumPartitions = sizeof(kSizeVector) / sizeof(kSizeVector[0]);
ASSERT_TRUE(Init(kSizeVector, kNumPartitions));
@@ -297,12 +368,10 @@
hdr_info_.keyIdx = 5;
// kMaxSize is only limited by allocated buffer size.
const int kMaxSize = helper_->buffer_size();
- RtpFormatVp8 packetizer(helper_->payload_data(),
- helper_->payload_size(),
- hdr_info_,
- kMaxSize,
- *(helper_->fragmentation()),
- kAggregate);
+ RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize, kAggregate);
+ packetizer.SetPayloadData(helper_->payload_data(),
+ helper_->payload_size(),
+ helper_->fragmentation());
// Expect one single packet of payload_size() + 3 bytes header.
const int kExpectedSizes[1] = {helper_->payload_size() + 3};
@@ -312,8 +381,202 @@
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
- helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
- kExpectedFragStart, kExpectedNum);
+ helper_->GetAllPacketsAndCheck(&packetizer,
+ kExpectedSizes,
+ kExpectedPart,
+ kExpectedFragStart,
+ kExpectedNum);
}
-} // namespace
+class RtpDepacketizerVp8Test : public ::testing::Test {
+ protected:
+ RtpDepacketizerVp8Test()
+ : callback_(),
+ depacketizer_(RtpDepacketizer::Create(kRtpVideoVp8, &callback_)) {}
+
+ void ExpectPacket(const uint8_t* data, size_t length) {
+ EXPECT_CALL(callback_, OnReceivedPayloadData(_, length, _))
+ .With(Args<0, 1>(ElementsAreArray(data, length)))
+ .Times(1)
+ .WillOnce(Return(0));
+ }
+
+ MockRtpData callback_;
+ scoped_ptr<RtpDepacketizer> depacketizer_;
+};
+
+TEST_F(RtpDepacketizerVp8Test, BasicHeader) {
+ const uint8_t kHeaderLength = 1;
+ uint8_t packet[4] = {0};
+ packet[0] = 0x14; // Binary 0001 0100; S = 1, PartID = 4.
+ packet[1] = 0x01; // P frame.
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength, sizeof(packet) - kHeaderLength);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+
+ EXPECT_EQ(kVideoFrameDelta, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 0, 1, 4);
+ VerifyExtensions(
+ &rtp_header, kNoPictureId, kNoTl0PicIdx, kNoTemporalIdx, kNoKeyIdx);
+}
+
+TEST_F(RtpDepacketizerVp8Test, PictureID) {
+ const uint8_t kHeaderLength1 = 3;
+ const uint8_t kHeaderLength2 = 4;
+ const uint8_t kPictureId = 17;
+ uint8_t packet[10] = {0};
+ packet[0] = 0xA0;
+ packet[1] = 0x80;
+ packet[2] = kPictureId;
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength1, sizeof(packet) - kHeaderLength1);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameDelta, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 1, 0, 0);
+ VerifyExtensions(
+ &rtp_header, kPictureId, kNoTl0PicIdx, kNoTemporalIdx, kNoKeyIdx);
+
+ // Re-use packet, but change to long PictureID.
+ packet[2] = 0x80 | kPictureId;
+ packet[3] = kPictureId;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength2, sizeof(packet) - kHeaderLength2);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ VerifyBasicHeader(&rtp_header, 1, 0, 0);
+ VerifyExtensions(&rtp_header,
+ (kPictureId << 8) + kPictureId,
+ kNoTl0PicIdx,
+ kNoTemporalIdx,
+ kNoKeyIdx);
+}
+
+TEST_F(RtpDepacketizerVp8Test, Tl0PicIdx) {
+ const uint8_t kHeaderLength = 3;
+ const uint8_t kTl0PicIdx = 17;
+ uint8_t packet[13] = {0};
+ packet[0] = 0x90;
+ packet[1] = 0x40;
+ packet[2] = kTl0PicIdx;
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength, sizeof(packet) - kHeaderLength);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameKey, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 0, 1, 0);
+ VerifyExtensions(
+ &rtp_header, kNoPictureId, kTl0PicIdx, kNoTemporalIdx, kNoKeyIdx);
+}
+
+TEST_F(RtpDepacketizerVp8Test, TIDAndLayerSync) {
+ const uint8_t kHeaderLength = 3;
+ uint8_t packet[10] = {0};
+ packet[0] = 0x88;
+ packet[1] = 0x20;
+ packet[2] = 0x80; // TID(2) + LayerSync(false)
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength, sizeof(packet) - kHeaderLength);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameDelta, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 0, 0, 8);
+ VerifyExtensions(&rtp_header, kNoPictureId, kNoTl0PicIdx, 2, kNoKeyIdx);
+ EXPECT_FALSE(rtp_header.type.Video.codecHeader.VP8.layerSync);
+}
+
+TEST_F(RtpDepacketizerVp8Test, KeyIdx) {
+ const uint8_t kHeaderLength = 3;
+ const uint8_t kKeyIdx = 17;
+ uint8_t packet[10] = {0};
+ packet[0] = 0x88;
+ packet[1] = 0x10; // K = 1.
+ packet[2] = kKeyIdx;
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength, sizeof(packet) - kHeaderLength);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameDelta, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 0, 0, 8);
+ VerifyExtensions(
+ &rtp_header, kNoPictureId, kNoTl0PicIdx, kNoTemporalIdx, kKeyIdx);
+}
+
+TEST_F(RtpDepacketizerVp8Test, MultipleExtensions) {
+ const uint8_t kHeaderLength = 6;
+ uint8_t packet[10] = {0};
+ packet[0] = 0x88;
+ packet[1] = 0x80 | 0x40 | 0x20 | 0x10;
+ packet[2] = 0x80 | 17; // PictureID, high 7 bits.
+ packet[3] = 17; // PictureID, low 8 bits.
+ packet[4] = 42; // Tl0PicIdx.
+ packet[5] = 0x40 | 0x20 | 0x11; // TID(1) + LayerSync(true) + KEYIDX(17).
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength, sizeof(packet) - kHeaderLength);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameDelta, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 0, 0, 8);
+ VerifyExtensions(&rtp_header, (17 << 8) + 17, 42, 1, 17);
+}
+
+TEST_F(RtpDepacketizerVp8Test, TooShortHeader) {
+ uint8_t packet[4] = {0};
+ packet[0] = 0x88;
+ packet[1] = 0x80 | 0x40 | 0x20 | 0x10; // All extensions are enabled...
+ packet[2] = 0x80 | 17; // ... but only 2 bytes PictureID is provided.
+ packet[3] = 17; // PictureID, low 8 bits.
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ EXPECT_FALSE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+}
+
+TEST_F(RtpDepacketizerVp8Test, TestWithPacketizer) {
+ const uint8_t kHeaderLength = 5;
+ uint8_t payload[10] = {0};
+ uint8_t packet[20] = {0};
+ RTPVideoHeaderVP8 input_header;
+ input_header.nonReference = true;
+ input_header.pictureId = 300;
+ input_header.temporalIdx = 1;
+ input_header.layerSync = false;
+ input_header.tl0PicIdx = kNoTl0PicIdx; // Disable.
+ input_header.keyIdx = 31;
+ RtpPacketizerVp8 packetizer(input_header, 20);
+ packetizer.SetPayloadData(payload, 10, NULL);
+ bool last;
+ size_t send_bytes;
+ ASSERT_TRUE(packetizer.NextPacket(packet, &send_bytes, &last));
+ ASSERT_TRUE(last);
+
+ WebRtcRTPHeader rtp_header;
+ memset(&rtp_header, 0, sizeof(rtp_header));
+
+ ExpectPacket(packet + kHeaderLength, sizeof(packet) - kHeaderLength);
+ EXPECT_TRUE(depacketizer_->Parse(&rtp_header, packet, sizeof(packet)));
+ EXPECT_EQ(kVideoFrameKey, rtp_header.frameType);
+ VerifyBasicHeader(&rtp_header, 1, 1, 0);
+ VerifyExtensions(&rtp_header,
+ input_header.pictureId,
+ input_header.tl0PicIdx,
+ input_header.temporalIdx,
+ input_header.keyIdx);
+ EXPECT_EQ(rtp_header.type.Video.codecHeader.VP8.layerSync,
+ input_header.layerSync);
+}
+} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_header_extension.cc b/modules/rtp_rtcp/source/rtp_header_extension.cc
index 2e72d75..9a1836e 100644
--- a/modules/rtp_rtcp/source/rtp_header_extension.cc
+++ b/modules/rtp_rtcp/source/rtp_header_extension.cc
@@ -65,6 +65,16 @@
return 0;
}
+bool RtpHeaderExtensionMap::IsRegistered(RTPExtensionType type) const {
+ std::map<uint8_t, HeaderExtension*>::const_iterator it =
+ extensionMap_.begin();
+ for (; it != extensionMap_.end(); ++it) {
+ if (it->second->type == type)
+ return true;
+ }
+ return false;
+}
+
int32_t RtpHeaderExtensionMap::GetType(const uint8_t id,
RTPExtensionType* type) const {
assert(type);
diff --git a/modules/rtp_rtcp/source/rtp_header_parser.cc b/modules/rtp_rtcp/source/rtp_header_parser.cc
index bb24d4d..3fc2666 100644
--- a/modules/rtp_rtcp/source/rtp_header_parser.cc
+++ b/modules/rtp_rtcp/source/rtp_header_parser.cc
@@ -21,7 +21,8 @@
RtpHeaderParserImpl();
virtual ~RtpHeaderParserImpl() {}
- virtual bool Parse(const uint8_t* packet, int length,
+ virtual bool Parse(const uint8_t* packet,
+ size_t length,
RTPHeader* header) const OVERRIDE;
virtual bool RegisterRtpHeaderExtension(RTPExtensionType type,
@@ -31,7 +32,7 @@
private:
scoped_ptr<CriticalSectionWrapper> critical_section_;
- RtpHeaderExtensionMap rtp_header_extension_map_;
+ RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(critical_section_);
};
RtpHeaderParser* RtpHeaderParser::Create() {
@@ -41,14 +42,15 @@
RtpHeaderParserImpl::RtpHeaderParserImpl()
: critical_section_(CriticalSectionWrapper::CreateCriticalSection()) {}
-bool RtpHeaderParser::IsRtcp(const uint8_t* packet, int length) {
- ModuleRTPUtility::RTPHeaderParser rtp_parser(packet, length);
+bool RtpHeaderParser::IsRtcp(const uint8_t* packet, size_t length) {
+ RtpUtility::RtpHeaderParser rtp_parser(packet, length);
return rtp_parser.RTCP();
}
-bool RtpHeaderParserImpl::Parse(const uint8_t* packet, int length,
- RTPHeader* header) const {
- ModuleRTPUtility::RTPHeaderParser rtp_parser(packet, length);
+bool RtpHeaderParserImpl::Parse(const uint8_t* packet,
+ size_t length,
+ RTPHeader* header) const {
+ RtpUtility::RtpHeaderParser rtp_parser(packet, length);
memset(header, 0, sizeof(*header));
RtpHeaderExtensionMap map;
diff --git a/modules/rtp_rtcp/source/rtp_packet_history.h b/modules/rtp_rtcp/source/rtp_packet_history.h
index 190e505..253f6d0 100644
--- a/modules/rtp_rtcp/source/rtp_packet_history.h
+++ b/modules/rtp_rtcp/source/rtp_packet_history.h
@@ -15,10 +15,10 @@
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/typedefs.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtp_payload_registry.cc b/modules/rtp_rtcp/source/rtp_payload_registry.cc
index db2e4cd..ec05a73 100644
--- a/modules/rtp_rtcp/source/rtp_payload_registry.cc
+++ b/modules/rtp_rtcp/source/rtp_payload_registry.cc
@@ -29,7 +29,7 @@
RTPPayloadRegistry::~RTPPayloadRegistry() {
while (!payload_type_map_.empty()) {
- ModuleRTPUtility::PayloadTypeMap::iterator it = payload_type_map_.begin();
+ RtpUtility::PayloadTypeMap::iterator it = payload_type_map_.begin();
delete it->second;
payload_type_map_.erase(it);
}
@@ -69,12 +69,12 @@
CriticalSectionScoped cs(crit_sect_.get());
- ModuleRTPUtility::PayloadTypeMap::iterator it =
- payload_type_map_.find(payload_type);
+ RtpUtility::PayloadTypeMap::iterator it =
+ payload_type_map_.find(payload_type);
if (it != payload_type_map_.end()) {
// We already use this payload type.
- ModuleRTPUtility::Payload* payload = it->second;
+ RtpUtility::Payload* payload = it->second;
assert(payload);
@@ -83,7 +83,7 @@
// Check if it's the same as we already have.
// If same, ignore sending an error.
if (payload_name_length == name_length &&
- ModuleRTPUtility::StringCompare(
+ RtpUtility::StringCompare(
payload->name, payload_name, payload_name_length)) {
if (rtp_payload_strategy_->PayloadIsCompatible(*payload, frequency,
channels, rate)) {
@@ -100,18 +100,18 @@
payload_name, payload_name_length, frequency, channels, rate);
}
- ModuleRTPUtility::Payload* payload = NULL;
+ RtpUtility::Payload* payload = NULL;
// Save the RED payload type. Used in both audio and video.
- if (ModuleRTPUtility::StringCompare(payload_name, "red", 3)) {
+ if (RtpUtility::StringCompare(payload_name, "red", 3)) {
red_payload_type_ = payload_type;
- payload = new ModuleRTPUtility::Payload;
+ payload = new RtpUtility::Payload;
memset(payload, 0, sizeof(*payload));
payload->audio = false;
strncpy(payload->name, payload_name, RTP_PAYLOAD_NAME_SIZE - 1);
- } else if (ModuleRTPUtility::StringCompare(payload_name, "ulpfec", 3)) {
+ } else if (RtpUtility::StringCompare(payload_name, "ulpfec", 3)) {
ulpfec_payload_type_ = payload_type;
- payload = new ModuleRTPUtility::Payload;
+ payload = new RtpUtility::Payload;
memset(payload, 0, sizeof(*payload));
payload->audio = false;
strncpy(payload->name, payload_name, RTP_PAYLOAD_NAME_SIZE - 1);
@@ -132,7 +132,7 @@
int32_t RTPPayloadRegistry::DeRegisterReceivePayload(
const int8_t payload_type) {
CriticalSectionScoped cs(crit_sect_.get());
- ModuleRTPUtility::PayloadTypeMap::iterator it =
+ RtpUtility::PayloadTypeMap::iterator it =
payload_type_map_.find(payload_type);
assert(it != payload_type_map_.end());
delete it->second;
@@ -149,15 +149,14 @@
const uint32_t frequency,
const uint8_t channels,
const uint32_t rate) {
- ModuleRTPUtility::PayloadTypeMap::iterator iterator =
- payload_type_map_.begin();
+ RtpUtility::PayloadTypeMap::iterator iterator = payload_type_map_.begin();
for (; iterator != payload_type_map_.end(); ++iterator) {
- ModuleRTPUtility::Payload* payload = iterator->second;
+ RtpUtility::Payload* payload = iterator->second;
size_t name_length = strlen(payload->name);
- if (payload_name_length == name_length
- && ModuleRTPUtility::StringCompare(payload->name, payload_name,
- payload_name_length)) {
+ if (payload_name_length == name_length &&
+ RtpUtility::StringCompare(
+ payload->name, payload_name, payload_name_length)) {
// We found the payload name in the list.
// If audio, check frequency and rate.
if (payload->audio) {
@@ -168,7 +167,7 @@
payload_type_map_.erase(iterator);
break;
}
- } else if (ModuleRTPUtility::StringCompare(payload_name, "red", 3)) {
+ } else if (RtpUtility::StringCompare(payload_name, "red", 3)) {
delete payload;
payload_type_map_.erase(iterator);
break;
@@ -188,16 +187,15 @@
CriticalSectionScoped cs(crit_sect_.get());
- ModuleRTPUtility::PayloadTypeMap::const_iterator it =
- payload_type_map_.begin();
+ RtpUtility::PayloadTypeMap::const_iterator it = payload_type_map_.begin();
for (; it != payload_type_map_.end(); ++it) {
- ModuleRTPUtility::Payload* payload = it->second;
+ RtpUtility::Payload* payload = it->second;
assert(payload);
size_t name_length = strlen(payload->name);
if (payload_name_length == name_length &&
- ModuleRTPUtility::StringCompare(
+ RtpUtility::StringCompare(
payload->name, payload_name, payload_name_length)) {
// Name matches.
if (payload->audio) {
@@ -261,9 +259,9 @@
*packet_length -= kRtxHeaderSize;
// Replace the SSRC and the sequence number with the originals.
- ModuleRTPUtility::AssignUWord16ToBuffer(*restored_packet + 2,
- original_sequence_number);
- ModuleRTPUtility::AssignUWord32ToBuffer(*restored_packet + 8, original_ssrc);
+ RtpUtility::AssignUWord16ToBuffer(*restored_packet + 2,
+ original_sequence_number);
+ RtpUtility::AssignUWord32ToBuffer(*restored_packet + 8, original_ssrc);
CriticalSectionScoped cs(crit_sect_.get());
@@ -307,8 +305,8 @@
bool RTPPayloadRegistry::GetPayloadSpecifics(uint8_t payload_type,
PayloadUnion* payload) const {
CriticalSectionScoped cs(crit_sect_.get());
- ModuleRTPUtility::PayloadTypeMap::const_iterator it =
- payload_type_map_.find(payload_type);
+ RtpUtility::PayloadTypeMap::const_iterator it =
+ payload_type_map_.find(payload_type);
// Check that this is a registered payload type.
if (it == payload_type_map_.end()) {
@@ -320,7 +318,7 @@
int RTPPayloadRegistry::GetPayloadTypeFrequency(
uint8_t payload_type) const {
- ModuleRTPUtility::Payload* payload;
+ RtpUtility::Payload* payload;
if (!PayloadTypeToPayload(payload_type, payload)) {
return -1;
}
@@ -329,12 +327,12 @@
}
bool RTPPayloadRegistry::PayloadTypeToPayload(
- const uint8_t payload_type,
- ModuleRTPUtility::Payload*& payload) const {
+ const uint8_t payload_type,
+ RtpUtility::Payload*& payload) const {
CriticalSectionScoped cs(crit_sect_.get());
- ModuleRTPUtility::PayloadTypeMap::const_iterator it =
- payload_type_map_.find(payload_type);
+ RtpUtility::PayloadTypeMap::const_iterator it =
+ payload_type_map_.find(payload_type);
// Check that this is a registered payload type.
if (it == payload_type_map_.end()) {
@@ -365,11 +363,10 @@
public:
virtual bool CodecsMustBeUnique() const OVERRIDE { return true; }
- virtual bool PayloadIsCompatible(
- const ModuleRTPUtility::Payload& payload,
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate) const OVERRIDE {
+ virtual bool PayloadIsCompatible(const RtpUtility::Payload& payload,
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate) const OVERRIDE {
return
payload.audio &&
payload.typeSpecific.Audio.frequency == frequency &&
@@ -378,19 +375,18 @@
payload.typeSpecific.Audio.rate == 0 || rate == 0);
}
- virtual void UpdatePayloadRate(
- ModuleRTPUtility::Payload* payload,
- const uint32_t rate) const OVERRIDE {
+ virtual void UpdatePayloadRate(RtpUtility::Payload* payload,
+ const uint32_t rate) const OVERRIDE {
payload->typeSpecific.Audio.rate = rate;
}
- virtual ModuleRTPUtility::Payload* CreatePayloadType(
+ virtual RtpUtility::Payload* CreatePayloadType(
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const int8_t payloadType,
const uint32_t frequency,
const uint8_t channels,
const uint32_t rate) const OVERRIDE {
- ModuleRTPUtility::Payload* payload = new ModuleRTPUtility::Payload;
+ RtpUtility::Payload* payload = new RtpUtility::Payload;
payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
assert(frequency >= 1000);
@@ -401,8 +397,7 @@
return payload;
}
- int GetPayloadTypeFrequency(
- const ModuleRTPUtility::Payload& payload) const {
+ int GetPayloadTypeFrequency(const RtpUtility::Payload& payload) const {
return payload.typeSpecific.Audio.frequency;
}
};
@@ -411,37 +406,37 @@
public:
virtual bool CodecsMustBeUnique() const OVERRIDE { return false; }
- virtual bool PayloadIsCompatible(
- const ModuleRTPUtility::Payload& payload,
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate) const OVERRIDE {
+ virtual bool PayloadIsCompatible(const RtpUtility::Payload& payload,
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate) const OVERRIDE {
return !payload.audio;
}
- virtual void UpdatePayloadRate(
- ModuleRTPUtility::Payload* payload,
- const uint32_t rate) const OVERRIDE {
+ virtual void UpdatePayloadRate(RtpUtility::Payload* payload,
+ const uint32_t rate) const OVERRIDE {
payload->typeSpecific.Video.maxRate = rate;
}
- virtual ModuleRTPUtility::Payload* CreatePayloadType(
+ virtual RtpUtility::Payload* CreatePayloadType(
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const int8_t payloadType,
const uint32_t frequency,
const uint8_t channels,
const uint32_t rate) const OVERRIDE {
RtpVideoCodecTypes videoType = kRtpVideoGeneric;
- if (ModuleRTPUtility::StringCompare(payloadName, "VP8", 3)) {
+ if (RtpUtility::StringCompare(payloadName, "VP8", 3)) {
videoType = kRtpVideoVp8;
- } else if (ModuleRTPUtility::StringCompare(payloadName, "I420", 4)) {
+ } else if (RtpUtility::StringCompare(payloadName, "H264", 4)) {
+ videoType = kRtpVideoH264;
+ } else if (RtpUtility::StringCompare(payloadName, "I420", 4)) {
videoType = kRtpVideoGeneric;
- } else if (ModuleRTPUtility::StringCompare(payloadName, "ULPFEC", 6)) {
+ } else if (RtpUtility::StringCompare(payloadName, "ULPFEC", 6)) {
videoType = kRtpVideoNone;
} else {
videoType = kRtpVideoGeneric;
}
- ModuleRTPUtility::Payload* payload = new ModuleRTPUtility::Payload;
+ RtpUtility::Payload* payload = new RtpUtility::Payload;
payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
@@ -451,8 +446,7 @@
return payload;
}
- int GetPayloadTypeFrequency(
- const ModuleRTPUtility::Payload& payload) const {
+ int GetPayloadTypeFrequency(const RtpUtility::Payload& payload) const {
return kVideoPayloadTypeFrequency;
}
};
diff --git a/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc b/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
index c03ffcd..2dacbdd 100644
--- a/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
@@ -36,18 +36,19 @@
}
protected:
- ModuleRTPUtility::Payload* ExpectReturnOfTypicalAudioPayload(
- uint8_t payload_type, uint32_t rate) {
+ RtpUtility::Payload* ExpectReturnOfTypicalAudioPayload(uint8_t payload_type,
+ uint32_t rate) {
bool audio = true;
- ModuleRTPUtility::Payload returned_payload = { "name", audio, {
- // Initialize the audio struct in this case.
- { kTypicalFrequency, kTypicalChannels, rate }
- }};
+ RtpUtility::Payload returned_payload = {
+ "name",
+ audio,
+ {// Initialize the audio struct in this case.
+ {kTypicalFrequency, kTypicalChannels, rate}}};
// Note: we return a new payload since the payload registry takes ownership
// of the created object.
- ModuleRTPUtility::Payload* returned_payload_on_heap =
- new ModuleRTPUtility::Payload(returned_payload);
+ RtpUtility::Payload* returned_payload_on_heap =
+ new RtpUtility::Payload(returned_payload);
EXPECT_CALL(*mock_payload_strategy_,
CreatePayloadType(kTypicalPayloadName, payload_type,
kTypicalFrequency,
@@ -62,7 +63,7 @@
TEST_F(RtpPayloadRegistryTest, RegistersAndRemembersPayloadsUntilDeregistered) {
uint8_t payload_type = 97;
- ModuleRTPUtility::Payload* returned_payload_on_heap =
+ RtpUtility::Payload* returned_payload_on_heap =
ExpectReturnOfTypicalAudioPayload(payload_type, kTypicalRate);
bool new_payload_created = false;
@@ -72,7 +73,7 @@
EXPECT_TRUE(new_payload_created) << "A new payload WAS created.";
- ModuleRTPUtility::Payload* retrieved_payload = NULL;
+ RtpUtility::Payload* retrieved_payload = NULL;
EXPECT_TRUE(rtp_payload_registry_->PayloadTypeToPayload(payload_type,
retrieved_payload));
@@ -99,7 +100,7 @@
ASSERT_EQ(red_type_of_the_day, rtp_payload_registry_->red_payload_type());
- ModuleRTPUtility::Payload* retrieved_payload = NULL;
+ RtpUtility::Payload* retrieved_payload = NULL;
EXPECT_TRUE(rtp_payload_registry_->PayloadTypeToPayload(red_type_of_the_day,
retrieved_payload));
EXPECT_FALSE(retrieved_payload->audio);
@@ -111,7 +112,7 @@
uint8_t payload_type = 97;
bool ignored = false;
- ModuleRTPUtility::Payload* first_payload_on_heap =
+ RtpUtility::Payload* first_payload_on_heap =
ExpectReturnOfTypicalAudioPayload(payload_type, kTypicalRate);
EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload(
kTypicalPayloadName, payload_type, kTypicalFrequency, kTypicalChannels,
@@ -121,7 +122,7 @@
kTypicalPayloadName, payload_type, kTypicalFrequency, kTypicalChannels,
kTypicalRate, &ignored)) << "Adding same codec twice = bad.";
- ModuleRTPUtility::Payload* second_payload_on_heap =
+ RtpUtility::Payload* second_payload_on_heap =
ExpectReturnOfTypicalAudioPayload(payload_type - 1, kTypicalRate);
EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload(
kTypicalPayloadName, payload_type - 1, kTypicalFrequency,
@@ -129,7 +130,7 @@
"With a different payload type is fine though.";
// Ensure both payloads are preserved.
- ModuleRTPUtility::Payload* retrieved_payload = NULL;
+ RtpUtility::Payload* retrieved_payload = NULL;
EXPECT_TRUE(rtp_payload_registry_->PayloadTypeToPayload(payload_type,
retrieved_payload));
EXPECT_EQ(first_payload_on_heap, retrieved_payload);
@@ -168,7 +169,7 @@
kTypicalPayloadName, payload_type - 1, kTypicalFrequency,
kTypicalChannels, kTypicalRate, &ignored));
- ModuleRTPUtility::Payload* retrieved_payload = NULL;
+ RtpUtility::Payload* retrieved_payload = NULL;
EXPECT_FALSE(rtp_payload_registry_->PayloadTypeToPayload(
payload_type, retrieved_payload)) << "The first payload should be "
"deregistered because the only thing that differs is payload type.";
diff --git a/modules/rtp_rtcp/source/rtp_receiver_audio.cc b/modules/rtp_rtcp/source/rtp_receiver_audio.cc
index c8104cc..05eefbe 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_audio.cc
+++ b/modules/rtp_rtcp/source/rtp_receiver_audio.cc
@@ -159,10 +159,10 @@
uint32_t frequency) {
CriticalSectionScoped lock(crit_sect_.get());
- if (ModuleRTPUtility::StringCompare(payload_name, "telephone-event", 15)) {
+ if (RtpUtility::StringCompare(payload_name, "telephone-event", 15)) {
telephone_event_payload_type_ = payload_type;
}
- if (ModuleRTPUtility::StringCompare(payload_name, "cn", 2)) {
+ if (RtpUtility::StringCompare(payload_name, "cn", 2)) {
// we can have three CNG on 8000Hz, 16000Hz and 32000Hz
if (frequency == 8000) {
cng_nb_payload_type_ = payload_type;
diff --git a/modules/rtp_rtcp/source/rtp_receiver_audio.h b/modules/rtp_rtcp/source/rtp_receiver_audio.h
index 0ffd4bf..4fb7256 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_audio.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_audio.h
@@ -83,7 +83,7 @@
// We do not allow codecs to have multiple payload types for audio, so we
// need to override the default behavior (which is to do nothing).
void PossiblyRemoveExistingPayloadType(
- ModuleRTPUtility::PayloadTypeMap* payload_type_map,
+ RtpUtility::PayloadTypeMap* payload_type_map,
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
size_t payload_name_length,
uint32_t frequency,
diff --git a/modules/rtp_rtcp/source/rtp_receiver_impl.cc b/modules/rtp_rtcp/source/rtp_receiver_impl.cc
index d92618f..22fae10 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.cc
@@ -22,10 +22,9 @@
namespace webrtc {
-using ModuleRTPUtility::GetCurrentRTP;
-using ModuleRTPUtility::Payload;
-using ModuleRTPUtility::RTPPayloadParser;
-using ModuleRTPUtility::StringCompare;
+using RtpUtility::GetCurrentRTP;
+using RtpUtility::Payload;
+using RtpUtility::StringCompare;
RtpReceiver* RtpReceiver::CreateVideoReceiver(
int id, Clock* clock,
@@ -96,16 +95,6 @@
}
}
-RTPReceiverStrategy* RtpReceiverImpl::GetMediaReceiver() const {
- return rtp_media_receiver_.get();
-}
-
-RtpVideoCodecTypes RtpReceiverImpl::VideoCodecType() const {
- PayloadUnion media_specific;
- rtp_media_receiver_->GetLastMediaSpecificPayload(&media_specific);
- return media_specific.Video.videoCodecType;
-}
-
int32_t RtpReceiverImpl::RegisterReceivePayload(
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
const int8_t payload_type,
diff --git a/modules/rtp_rtcp/source/rtp_receiver_impl.h b/modules/rtp_rtcp/source/rtp_receiver_impl.h
index 264225c..6068811 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.h
@@ -34,53 +34,42 @@
virtual ~RtpReceiverImpl();
- RTPReceiverStrategy* GetMediaReceiver() const;
-
- int32_t RegisterReceivePayload(
+ virtual int32_t RegisterReceivePayload(
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
const int8_t payload_type,
const uint32_t frequency,
const uint8_t channels,
- const uint32_t rate);
+ const uint32_t rate) OVERRIDE;
- int32_t DeRegisterReceivePayload(const int8_t payload_type);
+ virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) OVERRIDE;
- bool IncomingRtpPacket(
+ virtual bool IncomingRtpPacket(
const RTPHeader& rtp_header,
const uint8_t* payload,
int payload_length,
PayloadUnion payload_specific,
- bool in_order);
+ bool in_order) OVERRIDE;
- NACKMethod NACK() const;
+ virtual NACKMethod NACK() const OVERRIDE;
// Turn negative acknowledgement requests on/off.
- void SetNACKStatus(const NACKMethod method);
+ virtual void SetNACKStatus(const NACKMethod method) OVERRIDE;
// Returns the last received timestamp.
- bool Timestamp(uint32_t* timestamp) const;
- bool LastReceivedTimeMs(int64_t* receive_time_ms) const;
+ virtual bool Timestamp(uint32_t* timestamp) const OVERRIDE;
+ virtual bool LastReceivedTimeMs(int64_t* receive_time_ms) const OVERRIDE;
- uint32_t SSRC() const;
+ virtual uint32_t SSRC() const OVERRIDE;
- int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const;
+ virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const OVERRIDE;
- int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const;
+ virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const OVERRIDE;
- // RTX.
- void SetRTXStatus(bool enable, uint32_t ssrc);
-
- void RTXStatus(bool* enable, uint32_t* ssrc, int* payload_type) const;
-
- void SetRtxPayloadType(int payload_type);
-
- TelephoneEventHandler* GetTelephoneEventHandler();
+ virtual TelephoneEventHandler* GetTelephoneEventHandler() OVERRIDE;
private:
bool HaveReceivedFrame() const;
- RtpVideoCodecTypes VideoCodecType() const;
-
void CheckSSRCChanged(const RTPHeader& rtp_header);
void CheckCSRC(const WebRtcRTPHeader& rtp_header);
int32_t CheckPayloadChanged(const RTPHeader& rtp_header,
diff --git a/modules/rtp_rtcp/source/rtp_receiver_video.cc b/modules/rtp_rtcp/source/rtp_receiver_video.cc
index 5bb519f..058d91e 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_video.cc
+++ b/modules/rtp_rtcp/source/rtp_receiver_video.cc
@@ -14,6 +14,7 @@
#include <string.h>
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
@@ -28,13 +29,13 @@
}
RTPReceiverVideo::RTPReceiverVideo(RtpData* data_callback)
- : RTPReceiverStrategy(data_callback) {}
+ : RTPReceiverStrategy(data_callback) {
+}
RTPReceiverVideo::~RTPReceiverVideo() {
}
-bool RTPReceiverVideo::ShouldReportCsrcChanges(
- uint8_t payload_type) const {
+bool RTPReceiverVideo::ShouldReportCsrcChanges(uint8_t payload_type) const {
// Always do this for video packets.
return true;
}
@@ -46,17 +47,19 @@
return 0;
}
-int32_t RTPReceiverVideo::ParseRtpPacket(
- WebRtcRTPHeader* rtp_header,
- const PayloadUnion& specific_payload,
- bool is_red,
- const uint8_t* payload,
- uint16_t payload_length,
- int64_t timestamp_ms,
- bool is_first_packet) {
- TRACE_EVENT2("webrtc_rtp", "Video::ParseRtp",
- "seqnum", rtp_header->header.sequenceNumber,
- "timestamp", rtp_header->header.timestamp);
+int32_t RTPReceiverVideo::ParseRtpPacket(WebRtcRTPHeader* rtp_header,
+ const PayloadUnion& specific_payload,
+ bool is_red,
+ const uint8_t* payload,
+ uint16_t payload_length,
+ int64_t timestamp_ms,
+ bool is_first_packet) {
+ TRACE_EVENT2("webrtc_rtp",
+ "Video::ParseRtp",
+ "seqnum",
+ rtp_header->header.sequenceNumber,
+ "timestamp",
+ rtp_header->header.timestamp);
rtp_header->type.Video.codec = specific_payload.Video.videoCodecType;
const uint16_t payload_data_length =
@@ -66,12 +69,16 @@
return data_callback_->OnReceivedPayloadData(NULL, 0, rtp_header) == 0 ? 0
: -1;
- return ParseVideoCodecSpecific(rtp_header,
- payload,
- payload_data_length,
- specific_payload.Video.videoCodecType,
- timestamp_ms,
- is_first_packet);
+ // We are not allowed to hold a critical section when calling below functions.
+ scoped_ptr<RtpDepacketizer> depacketizer(
+ RtpDepacketizer::Create(rtp_header->type.Video.codec, data_callback_));
+ if (depacketizer.get() == NULL) {
+ LOG(LS_ERROR) << "Failed to create depacketizer.";
+ return -1;
+ }
+
+ rtp_header->type.Video.isFirstPacket = is_first_packet;
+ return depacketizer->Parse(rtp_header, payload, payload_data_length) ? 0 : -1;
}
int RTPReceiverVideo::GetPayloadTypeFrequency() const {
@@ -90,8 +97,9 @@
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
const PayloadUnion& specific_payload) const {
// For video we just go with default values.
- if (-1 == callback->OnInitializeDecoder(
- id, payload_type, payload_name, kVideoPayloadTypeFrequency, 1, 0)) {
+ if (-1 ==
+ callback->OnInitializeDecoder(
+ id, payload_type, payload_name, kVideoPayloadTypeFrequency, 1, 0)) {
LOG(LS_ERROR) << "Failed to created decoder for payload type: "
<< payload_type;
return -1;
@@ -99,40 +107,18 @@
return 0;
}
-// We are not allowed to hold a critical section when calling this function.
-int32_t RTPReceiverVideo::ParseVideoCodecSpecific(
- WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length,
- RtpVideoCodecTypes video_type,
- int64_t now_ms,
- bool is_first_packet) {
- switch (rtp_header->type.Video.codec) {
- case kRtpVideoGeneric:
- rtp_header->type.Video.isFirstPacket = is_first_packet;
- return ReceiveGenericCodec(rtp_header, payload_data, payload_data_length);
- case kRtpVideoVp8:
- return ReceiveVp8Codec(rtp_header, payload_data, payload_data_length);
- case kRtpVideoNone:
- break;
- }
- return -1;
-}
-
-int32_t RTPReceiverVideo::BuildRTPheader(
- const WebRtcRTPHeader* rtp_header,
- uint8_t* data_buffer) const {
+int32_t RTPReceiverVideo::BuildRTPheader(const WebRtcRTPHeader* rtp_header,
+ uint8_t* data_buffer) const {
data_buffer[0] = static_cast<uint8_t>(0x80); // version 2
data_buffer[1] = static_cast<uint8_t>(rtp_header->header.payloadType);
if (rtp_header->header.markerBit) {
data_buffer[1] |= kRtpMarkerBitMask; // MarkerBit is 1
}
- ModuleRTPUtility::AssignUWord16ToBuffer(data_buffer + 2,
- rtp_header->header.sequenceNumber);
- ModuleRTPUtility::AssignUWord32ToBuffer(data_buffer + 4,
- rtp_header->header.timestamp);
- ModuleRTPUtility::AssignUWord32ToBuffer(data_buffer + 8,
- rtp_header->header.ssrc);
+ RtpUtility::AssignUWord16ToBuffer(data_buffer + 2,
+ rtp_header->header.sequenceNumber);
+ RtpUtility::AssignUWord32ToBuffer(data_buffer + 4,
+ rtp_header->header.timestamp);
+ RtpUtility::AssignUWord32ToBuffer(data_buffer + 8, rtp_header->header.ssrc);
int32_t rtp_header_length = 12;
@@ -144,8 +130,7 @@
}
uint8_t* ptr = &data_buffer[rtp_header_length];
for (uint32_t i = 0; i < rtp_header->header.numCSRCs; ++i) {
- ModuleRTPUtility::AssignUWord32ToBuffer(ptr,
- rtp_header->header.arrOfCSRCs[i]);
+ RtpUtility::AssignUWord32ToBuffer(ptr, rtp_header->header.arrOfCSRCs[i]);
ptr += 4;
}
data_buffer[0] = (data_buffer[0] & 0xf0) | rtp_header->header.numCSRCs;
@@ -155,72 +140,4 @@
return rtp_header_length;
}
-int32_t RTPReceiverVideo::ReceiveVp8Codec(WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length) {
- ModuleRTPUtility::RTPPayload parsed_packet;
- ModuleRTPUtility::RTPPayloadParser rtp_payload_parser(
- kRtpVideoVp8, payload_data, payload_data_length);
-
- if (!rtp_payload_parser.Parse(parsed_packet))
- return -1;
-
- if (parsed_packet.info.VP8.dataLength == 0)
- return 0;
-
- rtp_header->frameType = (parsed_packet.frameType == ModuleRTPUtility::kIFrame)
- ? kVideoFrameKey : kVideoFrameDelta;
-
- RTPVideoHeaderVP8* to_header = &rtp_header->type.Video.codecHeader.VP8;
- ModuleRTPUtility::RTPPayloadVP8* from_header = &parsed_packet.info.VP8;
-
- rtp_header->type.Video.isFirstPacket =
- from_header->beginningOfPartition && (from_header->partitionID == 0);
- to_header->nonReference = from_header->nonReferenceFrame;
- to_header->pictureId =
- from_header->hasPictureID ? from_header->pictureID : kNoPictureId;
- to_header->tl0PicIdx =
- from_header->hasTl0PicIdx ? from_header->tl0PicIdx : kNoTl0PicIdx;
- if (from_header->hasTID) {
- to_header->temporalIdx = from_header->tID;
- to_header->layerSync = from_header->layerSync;
- } else {
- to_header->temporalIdx = kNoTemporalIdx;
- to_header->layerSync = false;
- }
- to_header->keyIdx = from_header->hasKeyIdx ? from_header->keyIdx : kNoKeyIdx;
-
- rtp_header->type.Video.width = from_header->frameWidth;
- rtp_header->type.Video.height = from_header->frameHeight;
-
- to_header->partitionId = from_header->partitionID;
- to_header->beginningOfPartition = from_header->beginningOfPartition;
-
- if (data_callback_->OnReceivedPayloadData(parsed_packet.info.VP8.data,
- parsed_packet.info.VP8.dataLength,
- rtp_header) != 0) {
- return -1;
- }
- return 0;
-}
-
-int32_t RTPReceiverVideo::ReceiveGenericCodec(
- WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length) {
- uint8_t generic_header = *payload_data++;
- --payload_data_length;
-
- rtp_header->frameType =
- ((generic_header & RtpFormatVideoGeneric::kKeyFrameBit) != 0) ?
- kVideoFrameKey : kVideoFrameDelta;
- rtp_header->type.Video.isFirstPacket =
- (generic_header & RtpFormatVideoGeneric::kFirstPacketBit) != 0;
-
- if (data_callback_->OnReceivedPayloadData(
- payload_data, payload_data_length, rtp_header) != 0) {
- return -1;
- }
- return 0;
-}
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_receiver_video.h b/modules/rtp_rtcp/source/rtp_receiver_video.h
index 4d81cb3..8fe4acb 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_video.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_video.h
@@ -22,27 +22,24 @@
class RTPReceiverVideo : public RTPReceiverStrategy {
public:
- RTPReceiverVideo(RtpData* data_callback);
+ explicit RTPReceiverVideo(RtpData* data_callback);
virtual ~RTPReceiverVideo();
- virtual int32_t ParseRtpPacket(
- WebRtcRTPHeader* rtp_header,
- const PayloadUnion& specific_payload,
- bool is_red,
- const uint8_t* packet,
- uint16_t packet_length,
- int64_t timestamp,
- bool is_first_packet) OVERRIDE;
+ virtual int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header,
+ const PayloadUnion& specific_payload,
+ bool is_red,
+ const uint8_t* packet,
+ uint16_t packet_length,
+ int64_t timestamp,
+ bool is_first_packet) OVERRIDE;
- TelephoneEventHandler* GetTelephoneEventHandler() {
- return NULL;
- }
+ TelephoneEventHandler* GetTelephoneEventHandler() { return NULL; }
int GetPayloadTypeFrequency() const OVERRIDE;
- virtual RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const
- OVERRIDE;
+ virtual RTPAliveType ProcessDeadOrAlive(
+ uint16_t last_payload_length) const OVERRIDE;
virtual bool ShouldReportCsrcChanges(uint8_t payload_type) const OVERRIDE;
@@ -60,26 +57,9 @@
void SetPacketOverHead(uint16_t packet_over_head);
- protected:
- int32_t ReceiveGenericCodec(WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length);
-
- int32_t ReceiveVp8Codec(WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length);
-
+ private:
int32_t BuildRTPheader(const WebRtcRTPHeader* rtp_header,
uint8_t* data_buffer) const;
-
- private:
- int32_t ParseVideoCodecSpecific(
- WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length,
- RtpVideoCodecTypes video_type,
- int64_t now_ms,
- bool is_first_packet);
};
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_rtcp.gypi b/modules/rtp_rtcp/source/rtp_rtcp.gypi
index dcd6598..a6d2115 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp.gypi
+++ b/modules/rtp_rtcp/source/rtp_rtcp.gypi
@@ -86,8 +86,13 @@
'rtp_sender_video.cc',
'rtp_sender_video.h',
'video_codec_information.h',
+ 'rtp_format.cc',
+ 'rtp_format.h',
+ 'rtp_format_h264.cc',
+ 'rtp_format_h264.h',
'rtp_format_vp8.cc',
'rtp_format_vp8.h',
+ 'rtp_format_video_generic.cc',
'rtp_format_video_generic.h',
'vp8_partition_aggregator.cc',
'vp8_partition_aggregator.h',
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 469a41e..69b5bb4 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -37,20 +37,22 @@
rtt_stats(NULL),
audio_messages(NullObjectRtpAudioFeedback()),
remote_bitrate_estimator(NULL),
- paced_sender(NULL) {
+ paced_sender(NULL),
+ send_bitrate_observer(NULL),
+ send_frame_count_observer(NULL),
+ send_side_delay_observer(NULL) {
}
RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) {
if (configuration.clock) {
return new ModuleRtpRtcpImpl(configuration);
} else {
+ // No clock implementation provided, use default clock.
RtpRtcp::Configuration configuration_copy;
memcpy(&configuration_copy, &configuration,
sizeof(RtpRtcp::Configuration));
configuration_copy.clock = Clock::GetRealTimeClock();
- ModuleRtpRtcpImpl* rtp_rtcp_instance =
- new ModuleRtpRtcpImpl(configuration_copy);
- return rtp_rtcp_instance;
+ return new ModuleRtpRtcpImpl(configuration_copy);
}
}
@@ -60,7 +62,10 @@
configuration.clock,
configuration.outgoing_transport,
configuration.audio_messages,
- configuration.paced_sender),
+ configuration.paced_sender,
+ configuration.send_bitrate_observer,
+ configuration.send_frame_count_observer,
+ configuration.send_side_delay_observer),
rtcp_sender_(configuration.id,
configuration.audio,
configuration.clock,
@@ -80,7 +85,7 @@
CriticalSectionWrapper::CreateCriticalSection()),
default_module_(
static_cast<ModuleRtpRtcpImpl*>(configuration.default_module)),
- padding_index_(-1), // Start padding at the first child module.
+ padding_index_(static_cast<size_t>(-1)), // Start padding at first child.
nack_method_(kNackOff),
nack_last_time_sent_full_(0),
nack_last_seq_number_sent_(0),
@@ -225,8 +230,7 @@
}
if (rtcp_sender_.TimeToSendRTCPReport()) {
- RTCPSender::FeedbackState feedback_state(this);
- rtcp_sender_.SendRTCP(feedback_state, kRtcpReport);
+ rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport);
}
}
@@ -333,6 +337,42 @@
return 0; // TODO(pwestin): change to void.
}
+void ModuleRtpRtcpImpl::SetRtpStateForSsrc(uint32_t ssrc,
+ const RtpState& rtp_state) {
+ if (rtp_sender_.SSRC() == ssrc) {
+ rtp_sender_.SetRtpState(rtp_state);
+ return;
+ }
+ if (rtp_sender_.RtxSsrc() == ssrc) {
+ rtp_sender_.SetRtxRtpState(rtp_state);
+ return;
+ }
+
+ CriticalSectionScoped lock(critical_section_module_ptrs_.get());
+ for (size_t i = 0; i < child_modules_.size(); ++i) {
+ child_modules_[i]->SetRtpStateForSsrc(ssrc, rtp_state);
+ }
+}
+
+bool ModuleRtpRtcpImpl::GetRtpStateForSsrc(uint32_t ssrc, RtpState* rtp_state) {
+ if (rtp_sender_.SSRC() == ssrc) {
+ *rtp_state = rtp_sender_.GetRtpState();
+ return true;
+ }
+
+ if (rtp_sender_.RtxSsrc() == ssrc) {
+ *rtp_state = rtp_sender_.GetRtxRtpState();
+ return true;
+ }
+
+ CriticalSectionScoped lock(critical_section_module_ptrs_.get());
+ for (size_t i = 0; i < child_modules_.size(); ++i) {
+ if (child_modules_[i]->GetRtpStateForSsrc(ssrc, rtp_state))
+ return true;
+ }
+ return false;
+}
+
uint32_t ModuleRtpRtcpImpl::SSRC() const {
return rtp_sender_.SSRC();
}
@@ -377,12 +417,29 @@
return 0; // TODO(pwestin): change to void.
}
-uint32_t ModuleRtpRtcpImpl::PacketCountSent() const {
- return rtp_sender_.Packets();
-}
+// TODO(pbos): Handle media and RTX streams separately (separate RTCP
+// feedbacks).
+RTCPSender::FeedbackState ModuleRtpRtcpImpl::GetFeedbackState() {
+ StreamDataCounters rtp_stats;
+ StreamDataCounters rtx_stats;
+ rtp_sender_.GetDataCounters(&rtp_stats, &rtx_stats);
-uint32_t ModuleRtpRtcpImpl::ByteCountSent() const {
- return rtp_sender_.Bytes();
+ RTCPSender::FeedbackState state;
+ state.send_payload_type = SendPayloadType();
+ state.frequency_hz = CurrentSendFrequencyHz();
+ state.packets_sent = rtp_stats.packets + rtx_stats.packets;
+ state.media_bytes_sent = rtp_stats.bytes + rtx_stats.bytes;
+ state.module = this;
+
+ LastReceivedNTP(&state.last_rr_ntp_secs,
+ &state.last_rr_ntp_frac,
+ &state.remote_sr);
+
+ state.has_last_xr_rr = LastReceivedXrReferenceTimeInfo(&state.last_xr_rr);
+
+ uint32_t tmp;
+ BitrateSent(&state.send_bitrate, &tmp, &tmp, &tmp);
+ return state;
}
int ModuleRtpRtcpImpl::CurrentSendFrequencyHz() const {
@@ -392,8 +449,7 @@
int32_t ModuleRtpRtcpImpl::SetSendingStatus(const bool sending) {
if (rtcp_sender_.Sending() != sending) {
// Sends RTCP BYE when going from true to false
- RTCPSender::FeedbackState feedback_state(this);
- if (rtcp_sender_.SetSendingStatus(feedback_state, sending) != 0) {
+ if (rtcp_sender_.SetSendingStatus(GetFeedbackState(), sending) != 0) {
LOG(LS_WARNING) << "Failed to send RTCP BYE";
}
@@ -458,8 +514,7 @@
if (!IsDefaultModule()) {
// Don't send RTCP from default module.
if (rtcp_sender_.TimeToSendRTCPReport(kVideoFrameKey == frame_type)) {
- RTCPSender::FeedbackState feedback_state(this);
- rtcp_sender_.SendRTCP(feedback_state, kRtcpReport);
+ rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport);
}
return rtp_sender_.SendOutgoingData(frame_type,
payload_type,
@@ -553,9 +608,7 @@
int ModuleRtpRtcpImpl::TimeToSendPadding(int bytes) {
if (!IsDefaultModule()) {
// Don't send from default module.
- if (SendingMedia()) {
- return rtp_sender_.TimeToSendPadding(bytes);
- }
+ return rtp_sender_.TimeToSendPadding(bytes);
} else {
CriticalSectionScoped lock(critical_section_module_ptrs_.get());
for (size_t i = 0; i < child_modules_.size(); ++i) {
@@ -680,10 +733,6 @@
return rtcp_sender_.SetCNAME(c_name);
}
-int32_t ModuleRtpRtcpImpl::CNAME(char c_name[RTCP_CNAME_SIZE]) {
- return rtcp_sender_.CNAME(c_name);
-}
-
int32_t ModuleRtpRtcpImpl::AddMixedCNAME(
const uint32_t ssrc,
const char c_name[RTCP_CNAME_SIZE]) {
@@ -710,7 +759,9 @@
received_ntpfrac,
rtcp_arrival_time_secs,
rtcp_arrival_time_frac,
- rtcp_timestamp);
+ rtcp_timestamp)
+ ? 0
+ : -1;
}
// Get RoundTripTime.
@@ -741,8 +792,7 @@
// Force a send of an RTCP packet.
// Normal SR and RR are triggered via the process function.
int32_t ModuleRtpRtcpImpl::SendRTCP(uint32_t rtcp_packet_type) {
- RTCPSender::FeedbackState feedback_state(this);
- return rtcp_sender_.SendRTCP(feedback_state, rtcp_packet_type);
+ return rtcp_sender_.SendRTCP(GetFeedbackState(), rtcp_packet_type);
}
int32_t ModuleRtpRtcpImpl::SetRTCPApplicationSpecificData(
@@ -770,11 +820,17 @@
int32_t ModuleRtpRtcpImpl::DataCountersRTP(
uint32_t* bytes_sent,
uint32_t* packets_sent) const {
+ StreamDataCounters rtp_stats;
+ StreamDataCounters rtx_stats;
+ rtp_sender_.GetDataCounters(&rtp_stats, &rtx_stats);
+
if (bytes_sent) {
- *bytes_sent = rtp_sender_.Bytes();
+ *bytes_sent = rtp_stats.bytes + rtp_stats.padding_bytes +
+ rtp_stats.header_bytes + rtx_stats.bytes +
+ rtx_stats.padding_bytes + rtx_stats.header_bytes;
}
if (packets_sent) {
- *packets_sent = rtp_sender_.Packets();
+ *packets_sent = rtp_stats.packets + rtx_stats.packets;
}
return 0;
}
@@ -914,9 +970,8 @@
}
nack_last_seq_number_sent_ = nack_list[start_id + nackLength - 1];
- RTCPSender::FeedbackState feedback_state(this);
return rtcp_sender_.SendRTCP(
- feedback_state, kRtcpNack, nackLength, &nack_list[start_id]);
+ GetFeedbackState(), kRtcpNack, nackLength, &nack_list[start_id]);
}
// Store the sent packets, needed to answer to a Negative acknowledgment
@@ -979,10 +1034,6 @@
return rtp_sender_.RED(&payload_type);
}
-RtpVideoCodecTypes ModuleRtpRtcpImpl::SendVideoCodec() const {
- return rtp_sender_.VideoCodecType();
-}
-
void ModuleRtpRtcpImpl::SetTargetSendBitrate(
const std::vector<uint32_t>& stream_bitrates) {
if (IsDefaultModule()) {
@@ -1033,9 +1084,8 @@
int32_t ModuleRtpRtcpImpl::SendRTCPSliceLossIndication(
const uint8_t picture_id) {
- RTCPSender::FeedbackState feedback_state(this);
return rtcp_sender_.SendRTCP(
- feedback_state, kRtcpSli, 0, 0, false, picture_id);
+ GetFeedbackState(), kRtcpSli, 0, 0, false, picture_id);
}
int32_t ModuleRtpRtcpImpl::SetCameraDelay(const int32_t delay_ms) {
@@ -1194,16 +1244,6 @@
*nack_rate = rtp_sender_.NackOverheadRate();
}
-void ModuleRtpRtcpImpl::RegisterVideoBitrateObserver(
- BitrateStatisticsObserver* observer) {
- assert(!IsDefaultModule());
- rtp_sender_.RegisterBitrateObserver(observer);
-}
-
-BitrateStatisticsObserver* ModuleRtpRtcpImpl::GetVideoBitrateObserver() const {
- return rtp_sender_.GetBitrateObserver();
-}
-
void ModuleRtpRtcpImpl::OnRequestIntraFrame() {
RequestKeyFrame();
}
@@ -1214,9 +1254,8 @@
int32_t ModuleRtpRtcpImpl::SendRTCPReferencePictureSelection(
const uint64_t picture_id) {
- RTCPSender::FeedbackState feedback_state(this);
return rtcp_sender_.SendRTCP(
- feedback_state, kRtcpRpsi, 0, 0, false, picture_id);
+ GetFeedbackState(), kRtcpRpsi, 0, 0, false, picture_id);
}
uint32_t ModuleRtpRtcpImpl::SendTimeOfSendReport(
@@ -1243,23 +1282,24 @@
rtp_sender_.OnReceivedNACK(nack_sequence_numbers, rtt);
}
-int32_t ModuleRtpRtcpImpl::LastReceivedNTP(
- uint32_t& rtcp_arrival_time_secs, // When we got the last report.
- uint32_t& rtcp_arrival_time_frac,
- uint32_t& remote_sr) {
+bool ModuleRtpRtcpImpl::LastReceivedNTP(
+ uint32_t* rtcp_arrival_time_secs, // When we got the last report.
+ uint32_t* rtcp_arrival_time_frac,
+ uint32_t* remote_sr) const {
// Remote SR: NTP inside the last received (mid 16 bits from sec and frac).
uint32_t ntp_secs = 0;
uint32_t ntp_frac = 0;
- if (-1 == rtcp_receiver_.NTP(&ntp_secs,
- &ntp_frac,
- &rtcp_arrival_time_secs,
- &rtcp_arrival_time_frac,
- NULL)) {
- return -1;
+ if (!rtcp_receiver_.NTP(&ntp_secs,
+ &ntp_frac,
+ rtcp_arrival_time_secs,
+ rtcp_arrival_time_frac,
+ NULL)) {
+ return false;
}
- remote_sr = ((ntp_secs & 0x0000ffff) << 16) + ((ntp_frac & 0xffff0000) >> 16);
- return 0;
+ *remote_sr =
+ ((ntp_secs & 0x0000ffff) << 16) + ((ntp_frac & 0xffff0000) >> 16);
+ return true;
}
bool ModuleRtpRtcpImpl::LastReceivedXrReferenceTimeInfo(
@@ -1318,15 +1358,6 @@
return rtp_sender_.GetRtpStatisticsCallback();
}
-void ModuleRtpRtcpImpl::RegisterSendFrameCountObserver(
- FrameCountObserver* observer) {
- rtp_sender_.RegisterFrameCountObserver(observer);
-}
-
-FrameCountObserver* ModuleRtpRtcpImpl::GetSendFrameCountObserver() const {
- return rtp_sender_.GetFrameCountObserver();
-}
-
bool ModuleRtpRtcpImpl::IsDefaultModule() const {
CriticalSectionScoped cs(critical_section_module_ptrs_.get());
return !child_modules_.empty();
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 55826b6..a015a3e 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -42,7 +42,7 @@
virtual int32_t IncomingRtcpPacket(const uint8_t* incoming_packet,
uint16_t incoming_packet_length) OVERRIDE;
- virtual void SetRemoteSSRC(const uint32_t ssrc);
+ virtual void SetRemoteSSRC(const uint32_t ssrc) OVERRIDE;
// Sender part.
@@ -52,7 +52,7 @@
virtual int32_t DeRegisterSendPayload(const int8_t payload_type) OVERRIDE;
- virtual int8_t SendPayloadType() const;
+ int8_t SendPayloadType() const;
// Register RTP header extension.
virtual int32_t RegisterSendRtpHeaderExtension(
@@ -73,6 +73,10 @@
// Set SequenceNumber, default is a random number.
virtual int32_t SetSequenceNumber(const uint16_t seq) OVERRIDE;
+ virtual void SetRtpStateForSsrc(uint32_t ssrc,
+ const RtpState& rtp_state) OVERRIDE;
+ virtual bool GetRtpStateForSsrc(uint32_t ssrc, RtpState* rtp_state) OVERRIDE;
+
virtual uint32_t SSRC() const OVERRIDE;
// Configure SSRC, default is a random number.
@@ -85,11 +89,9 @@
virtual int32_t SetCSRCStatus(const bool include) OVERRIDE;
- virtual uint32_t PacketCountSent() const;
+ RTCPSender::FeedbackState GetFeedbackState();
- virtual int CurrentSendFrequencyHz() const;
-
- virtual uint32_t ByteCountSent() const;
+ int CurrentSendFrequencyHz() const;
virtual void SetRTXSendStatus(const int mode) OVERRIDE;
@@ -144,9 +146,6 @@
// Set RTCP CName.
virtual int32_t SetCNAME(const char c_name[RTCP_CNAME_SIZE]) OVERRIDE;
- // Get RTCP CName.
- virtual int32_t CNAME(char c_name[RTCP_CNAME_SIZE]) OVERRIDE;
-
// Get remote CName.
virtual int32_t RemoteCNAME(const uint32_t remote_ssrc,
char c_name[RTCP_CNAME_SIZE]) const OVERRIDE;
@@ -296,8 +295,6 @@
// Video part.
- virtual RtpVideoCodecTypes SendVideoCodec() const;
-
virtual int32_t SendRTCPSliceLossIndication(
const uint8_t picture_id) OVERRIDE;
@@ -327,11 +324,11 @@
const FecProtectionParams* delta_params,
const FecProtectionParams* key_params) OVERRIDE;
- virtual int32_t LastReceivedNTP(uint32_t& NTPsecs,
- uint32_t& NTPfrac,
- uint32_t& remote_sr);
+ bool LastReceivedNTP(uint32_t* NTPsecs,
+ uint32_t* NTPfrac,
+ uint32_t* remote_sr) const;
- virtual bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const;
+ bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const;
virtual int32_t BoundingSet(bool& tmmbr_owner, TMMBRSet*& bounding_set_rec);
@@ -340,23 +337,18 @@
uint32_t* fec_rate,
uint32_t* nackRate) const OVERRIDE;
- virtual void RegisterVideoBitrateObserver(BitrateStatisticsObserver* observer)
- OVERRIDE;
+ uint32_t SendTimeOfSendReport(const uint32_t send_report);
- virtual BitrateStatisticsObserver* GetVideoBitrateObserver() const OVERRIDE;
-
- virtual uint32_t SendTimeOfSendReport(const uint32_t send_report);
-
- virtual bool SendTimeOfXrRrReport(uint32_t mid_ntp, int64_t* time_ms) const;
+ bool SendTimeOfXrRrReport(uint32_t mid_ntp, int64_t* time_ms) const;
// Good state of RTP receiver inform sender.
virtual int32_t SendRTCPReferencePictureSelection(
const uint64_t picture_id) OVERRIDE;
virtual void RegisterSendChannelRtpStatisticsCallback(
- StreamDataCountersCallback* callback);
+ StreamDataCountersCallback* callback) OVERRIDE;
virtual StreamDataCountersCallback*
- GetSendChannelRtpStatisticsCallback() const;
+ GetSendChannelRtpStatisticsCallback() const OVERRIDE;
void OnReceivedTMMBR();
@@ -374,10 +366,6 @@
void OnRequestSendReport();
- virtual void RegisterSendFrameCountObserver(
- FrameCountObserver* observer) OVERRIDE;
- virtual FrameCountObserver* GetSendFrameCountObserver() const OVERRIDE;
-
protected:
void RegisterChildModule(RtpRtcp* module);
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index eba4e01..9486abd 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -15,6 +15,7 @@
#include "webrtc/modules/pacing/include/mock/mock_paced_sender.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
#include "webrtc/system_wrappers/interface/scoped_vector.h"
@@ -29,6 +30,9 @@
const uint32_t kReceiverSsrc = 0x23456;
const uint32_t kSenderRtxSsrc = 0x32345;
const uint32_t kOneWayNetworkDelayMs = 100;
+const uint8_t kBaseLayerTid = 0;
+const uint8_t kHigherLayerTid = 1;
+const uint16_t kSequenceNumber = 100;
class RtcpRttStatsTestImpl : public RtcpRttStats {
public:
@@ -47,7 +51,12 @@
class SendTransport : public Transport,
public NullRtpData {
public:
- SendTransport() : receiver_(NULL), clock_(NULL), delay_ms_(0) {}
+ SendTransport()
+ : receiver_(NULL),
+ clock_(NULL),
+ delay_ms_(0),
+ rtp_packets_sent_(0) {
+ }
void SetRtpRtcpModule(ModuleRtpRtcpImpl* receiver) {
receiver_ = receiver;
@@ -56,8 +65,15 @@
clock_ = clock;
delay_ms_ = delay_ms;
}
- virtual int SendPacket(int /*ch*/, const void* /*data*/, int /*len*/) {
- return -1;
+ virtual int SendPacket(int /*ch*/, const void* data, int len) {
+ RTPHeader header;
+ scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+ EXPECT_TRUE(parser->Parse(static_cast<const uint8_t*>(data),
+ static_cast<size_t>(len),
+ &header));
+ ++rtp_packets_sent_;
+ last_rtp_header_ = header;
+ return len;
}
virtual int SendRTCPPacket(int /*ch*/, const void *data, int len) {
if (clock_) {
@@ -71,6 +87,8 @@
ModuleRtpRtcpImpl* receiver_;
SimulatedClock* clock_;
uint32_t delay_ms_;
+ int rtp_packets_sent_;
+ RTPHeader last_rtp_header_;
};
class RtpRtcpModule {
@@ -105,6 +123,12 @@
impl_->GetRtcpPacketTypeCounters(&packets_sent_, &packets_received_);
return packets_received_;
}
+ int RtpSent() {
+ return transport_.rtp_packets_sent_;
+ }
+ uint16_t LastRtpSequenceNumber() {
+ return transport_.last_rtp_header_.sequenceNumber;
+ }
};
} // namespace
@@ -116,10 +140,22 @@
receiver_(&clock_) {
// Send module.
EXPECT_EQ(0, sender_.impl_->SetSendingStatus(true));
+ EXPECT_EQ(0, sender_.impl_->SetSendingMediaStatus(true));
sender_.impl_->SetSSRC(kSenderSsrc);
sender_.impl_->SetRemoteSSRC(kReceiverSsrc);
+ sender_.impl_->SetSequenceNumber(kSequenceNumber);
+ sender_.impl_->SetStorePacketsStatus(true, 100);
+
+ memset(&codec_, 0, sizeof(VideoCodec));
+ codec_.plType = 100;
+ strncpy(codec_.plName, "VP8", 3);
+ codec_.width = 320;
+ codec_.height = 180;
+ EXPECT_EQ(0, sender_.impl_->RegisterSendPayload(codec_));
+
// Receive module.
EXPECT_EQ(0, receiver_.impl_->SetSendingStatus(false));
+ EXPECT_EQ(0, receiver_.impl_->SetSendingMediaStatus(false));
receiver_.impl_->SetSSRC(kReceiverSsrc);
receiver_.impl_->SetRemoteSSRC(kSenderSsrc);
// Transport settings.
@@ -129,8 +165,91 @@
SimulatedClock clock_;
RtpRtcpModule sender_;
RtpRtcpModule receiver_;
+ VideoCodec codec_;
+
+ void SendFrame(const RtpRtcpModule* module, uint8_t tid) {
+ RTPVideoHeaderVP8 vp8_header = {};
+ vp8_header.temporalIdx = tid;
+ RTPVideoHeader rtp_video_header = {
+ codec_.width, codec_.height, true, 0, kRtpVideoVp8, {vp8_header}};
+
+ const uint8_t payload[100] = {0};
+ EXPECT_EQ(0, module->impl_->SendOutgoingData(kVideoFrameKey,
+ codec_.plType,
+ 0,
+ 0,
+ payload,
+ sizeof(payload),
+ NULL,
+ &rtp_video_header));
+ }
+
+ void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) {
+ rtcp::Nack nack;
+ uint16_t list[1];
+ list[0] = sequence_number;
+ const uint16_t kListLength = sizeof(list) / sizeof(list[0]);
+ nack.From(kReceiverSsrc);
+ nack.To(kSenderSsrc);
+ nack.WithList(list, kListLength);
+ rtcp::RawPacket packet = nack.Build();
+ EXPECT_EQ(0, module->impl_->IncomingRtcpPacket(packet.buffer(),
+ packet.buffer_length()));
+ }
};
+TEST_F(RtpRtcpImplTest, SetSelectiveRetransmissions_BaseLayer) {
+ sender_.impl_->SetSelectiveRetransmissions(kRetransmitBaseLayer);
+ EXPECT_EQ(kRetransmitBaseLayer, sender_.impl_->SelectiveRetransmissions());
+
+ // Send frames.
+ EXPECT_EQ(0, sender_.RtpSent());
+ SendFrame(&sender_, kBaseLayerTid); // kSequenceNumber
+ SendFrame(&sender_, kHigherLayerTid); // kSequenceNumber + 1
+ SendFrame(&sender_, kNoTemporalIdx); // kSequenceNumber + 2
+ EXPECT_EQ(3, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
+
+ // Frame with kBaseLayerTid re-sent.
+ IncomingRtcpNack(&sender_, kSequenceNumber);
+ EXPECT_EQ(4, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber, sender_.LastRtpSequenceNumber());
+ // Frame with kHigherLayerTid not re-sent.
+ IncomingRtcpNack(&sender_, kSequenceNumber + 1);
+ EXPECT_EQ(4, sender_.RtpSent());
+ // Frame with kNoTemporalIdx re-sent.
+ IncomingRtcpNack(&sender_, kSequenceNumber + 2);
+ EXPECT_EQ(5, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
+}
+
+TEST_F(RtpRtcpImplTest, SetSelectiveRetransmissions_HigherLayers) {
+ const uint8_t kSetting = kRetransmitBaseLayer + kRetransmitHigherLayers;
+ sender_.impl_->SetSelectiveRetransmissions(kSetting);
+ EXPECT_EQ(kSetting, sender_.impl_->SelectiveRetransmissions());
+
+ // Send frames.
+ EXPECT_EQ(0, sender_.RtpSent());
+ SendFrame(&sender_, kBaseLayerTid); // kSequenceNumber
+ SendFrame(&sender_, kHigherLayerTid); // kSequenceNumber + 1
+ SendFrame(&sender_, kNoTemporalIdx); // kSequenceNumber + 2
+ EXPECT_EQ(3, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
+
+ // Frame with kBaseLayerTid re-sent.
+ IncomingRtcpNack(&sender_, kSequenceNumber);
+ EXPECT_EQ(4, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber, sender_.LastRtpSequenceNumber());
+ // Frame with kHigherLayerTid re-sent.
+ IncomingRtcpNack(&sender_, kSequenceNumber + 1);
+ EXPECT_EQ(5, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber + 1, sender_.LastRtpSequenceNumber());
+ // Frame with kNoTemporalIdx re-sent.
+ IncomingRtcpNack(&sender_, kSequenceNumber + 2);
+ EXPECT_EQ(6, sender_.RtpSent());
+ EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
+}
+
TEST_F(RtpRtcpImplTest, Rtt) {
RTPHeader header;
header.timestamp = 1;
@@ -232,8 +351,9 @@
virtual int SendPacket(int channel, const void* data, int length) {
RTPHeader header;
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
- EXPECT_TRUE(
- parser->Parse(static_cast<const uint8_t*>(data), length, &header));
+ EXPECT_TRUE(parser->Parse(static_cast<const uint8_t*>(data),
+ static_cast<size_t>(length),
+ &header));
bytes_received_[header.ssrc] += length;
++packets_received_[header.ssrc];
return length;
@@ -412,6 +532,10 @@
TEST_F(RtpSendingTest, DISABLED_RoundRobinPaddingRtx) {
// Enable RTX to allow padding to be sent prior to media.
for (int i = 1; i < codec_.numberOfSimulcastStreams + 1; ++i) {
+ // Abs-send-time is needed to be allowed to send padding prior to media,
+ // as otherwise the timestmap used for BWE will be broken.
+ senders_[i]->RegisterSendRtpHeaderExtension(kRtpExtensionAbsoluteSendTime,
+ 1);
senders_[i]->SetRtxSendPayloadType(96);
senders_[i]->SetRtxSsrc(kSenderRtxSsrc + i);
senders_[i]->SetRTXSendStatus(kRtxRetransmitted);
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index 7cfcd72..f544db2 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -16,6 +16,7 @@
#include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logging.h"
+#include "webrtc/system_wrappers/interface/tick_util.h"
#include "webrtc/system_wrappers/interface/trace_event.h"
namespace webrtc {
@@ -44,7 +45,10 @@
Clock* clock,
Transport* transport,
RtpAudioFeedback* audio_feedback,
- PacedSender* paced_sender)
+ PacedSender* paced_sender,
+ BitrateStatisticsObserver* bitrate_callback,
+ FrameCountObserver* frame_count_observer,
+ SendSideDelayObserver* send_side_delay_observer)
: clock_(clock),
bitrate_sent_(clock, this),
id_(id),
@@ -69,12 +73,13 @@
packet_history_(clock),
// Statistics
statistics_crit_(CriticalSectionWrapper::CreateCriticalSection()),
- frame_count_observer_(NULL),
rtp_stats_callback_(NULL),
- bitrate_callback_(NULL),
+ bitrate_callback_(bitrate_callback),
+ frame_count_observer_(frame_count_observer),
+ send_side_delay_observer_(send_side_delay_observer),
// RTP variables
- start_time_stamp_forced_(false),
- start_time_stamp_(0),
+ start_timestamp_forced_(false),
+ start_timestamp_(0),
ssrc_db_(*SSRCDatabase::GetSSRCDatabase()),
remote_ssrc_(0),
sequence_number_forced_(false),
@@ -82,6 +87,7 @@
timestamp_(0),
capture_time_ms_(0),
last_timestamp_time_ms_(0),
+ media_has_been_sent_(false),
last_packet_marker_bit_(false),
num_csrcs_(0),
csrcs_(),
@@ -118,7 +124,7 @@
SSRCDatabase::ReturnSSRCDatabase();
delete send_critsect_;
while (!payload_type_map_.empty()) {
- std::map<int8_t, ModuleRTPUtility::Payload *>::iterator it =
+ std::map<int8_t, RtpUtility::Payload*>::iterator it =
payload_type_map_.begin();
delete it->second;
payload_type_map_.erase(it);
@@ -161,9 +167,7 @@
bool RTPSender::GetSendSideDelay(int* avg_send_delay_ms,
int* max_send_delay_ms) const {
- if (!SendingMedia())
- return false;
- CriticalSectionScoped cs(statistics_crit_.get());
+ CriticalSectionScoped lock(statistics_crit_.get());
SendDelayMap::const_iterator it = send_delays_.upper_bound(
clock_->TimeInMilliseconds() - kSendSideDelayWindowMs);
if (it == send_delays_.end())
@@ -223,17 +227,17 @@
assert(payload_name);
CriticalSectionScoped cs(send_critsect_);
- std::map<int8_t, ModuleRTPUtility::Payload *>::iterator it =
+ std::map<int8_t, RtpUtility::Payload*>::iterator it =
payload_type_map_.find(payload_number);
if (payload_type_map_.end() != it) {
// We already use this payload type.
- ModuleRTPUtility::Payload *payload = it->second;
+ RtpUtility::Payload* payload = it->second;
assert(payload);
// Check if it's the same as we already have.
- if (ModuleRTPUtility::StringCompare(payload->name, payload_name,
- RTP_PAYLOAD_NAME_SIZE - 1)) {
+ if (RtpUtility::StringCompare(
+ payload->name, payload_name, RTP_PAYLOAD_NAME_SIZE - 1)) {
if (audio_configured_ && payload->audio &&
payload->typeSpecific.Audio.frequency == frequency &&
(payload->typeSpecific.Audio.rate == rate ||
@@ -249,7 +253,7 @@
return -1;
}
int32_t ret_val = -1;
- ModuleRTPUtility::Payload *payload = NULL;
+ RtpUtility::Payload* payload = NULL;
if (audio_configured_) {
ret_val = audio_->RegisterAudioPayload(payload_name, payload_number,
frequency, channels, rate, payload);
@@ -267,18 +271,23 @@
const int8_t payload_type) {
CriticalSectionScoped lock(send_critsect_);
- std::map<int8_t, ModuleRTPUtility::Payload *>::iterator it =
+ std::map<int8_t, RtpUtility::Payload*>::iterator it =
payload_type_map_.find(payload_type);
if (payload_type_map_.end() == it) {
return -1;
}
- ModuleRTPUtility::Payload *payload = it->second;
+ RtpUtility::Payload* payload = it->second;
delete payload;
payload_type_map_.erase(it);
return 0;
}
+void RTPSender::SetSendPayloadType(int8_t payload_type) {
+ CriticalSectionScoped cs(send_critsect_);
+ payload_type_ = payload_type;
+}
+
int8_t RTPSender::SendPayloadType() const {
CriticalSectionScoped cs(send_critsect_);
return payload_type_;
@@ -303,12 +312,17 @@
}
uint16_t RTPSender::MaxDataPayloadLength() const {
+ int rtx;
+ {
+ CriticalSectionScoped rtx_lock(send_critsect_);
+ rtx = rtx_;
+ }
if (audio_configured_) {
return max_payload_length_ - RTPHeaderLength();
} else {
return max_payload_length_ - RTPHeaderLength() // RTP overhead.
- video_->FECPacketOverhead() // FEC/ULP/RED overhead.
- - ((rtx_) ? 2 : 0); // RTX overhead.
+ - ((rtx) ? 2 : 0); // RTX overhead.
}
}
@@ -328,6 +342,11 @@
ssrc_rtx_ = ssrc;
}
+uint32_t RTPSender::RtxSsrc() const {
+ CriticalSectionScoped cs(send_critsect_);
+ return ssrc_rtx_;
+}
+
void RTPSender::RTXStatus(int* mode, uint32_t* ssrc,
int* payload_type) const {
CriticalSectionScoped cs(send_critsect_);
@@ -365,14 +384,14 @@
}
return 0;
}
- std::map<int8_t, ModuleRTPUtility::Payload *>::iterator it =
+ std::map<int8_t, RtpUtility::Payload*>::iterator it =
payload_type_map_.find(payload_type);
if (it == payload_type_map_.end()) {
LOG(LS_WARNING) << "Payload type " << payload_type << " not registered.";
return -1;
}
- payload_type_ = payload_type;
- ModuleRTPUtility::Payload *payload = it->second;
+ SetSendPayloadType(payload_type);
+ RtpUtility::Payload* payload = it->second;
assert(payload);
if (!payload->audio && !audio_configured_) {
video_->SetVideoCodecType(payload->typeSpecific.Video.videoCodecType);
@@ -388,9 +407,11 @@
const uint8_t *payload_data, const uint32_t payload_size,
const RTPFragmentationHeader *fragmentation,
VideoCodecInformation *codec_info, const RTPVideoTypeHeader *rtp_type_hdr) {
+ uint32_t ssrc;
{
// Drop this packet if we're not sending media packets.
CriticalSectionScoped cs(send_critsect_);
+ ssrc = ssrc_;
if (!sending_media_) {
return 0;
}
@@ -415,14 +436,9 @@
"Send", "type", FrameTypeToString(frame_type));
assert(frame_type != kAudioFrameSpeech && frame_type != kAudioFrameCN);
- if (frame_type == kFrameEmpty) {
- if (paced_sender_->Enabled()) {
- // Padding is driven by the pacer and not by the encoder.
- return 0;
- }
- return SendPaddingAccordingToBitrate(payload_type, capture_timestamp,
- capture_time_ms) ? 0 : -1;
- }
+ if (frame_type == kFrameEmpty)
+ return 0;
+
ret_val = video_->SendVideo(video_type, frame_type, payload_type,
capture_timestamp, capture_time_ms,
payload_data, payload_size,
@@ -434,17 +450,19 @@
CriticalSectionScoped cs(statistics_crit_.get());
uint32_t frame_count = ++frame_counts_[frame_type];
if (frame_count_observer_) {
- frame_count_observer_->FrameCountUpdated(frame_type,
- frame_count,
- ssrc_);
+ frame_count_observer_->FrameCountUpdated(frame_type, frame_count, ssrc);
}
return ret_val;
}
-int RTPSender::SendRedundantPayloads(int payload_type, int bytes_to_send) {
- if (!(rtx_ & kRtxRedundantPayloads))
- return 0;
+int RTPSender::TrySendRedundantPayloads(int bytes_to_send) {
+ {
+ CriticalSectionScoped cs(send_critsect_);
+ if ((rtx_ & kRtxRedundantPayloads) == 0)
+ return 0;
+ }
+
uint8_t buffer[IP_PACKET_SIZE];
int bytes_left = bytes_to_send;
while (bytes_left > 0) {
@@ -456,7 +474,7 @@
}
if (!PrepareAndSendPacket(buffer, length, capture_time_ms, true, false))
return -1;
- ModuleRTPUtility::RTPHeaderParser rtp_parser(buffer, length);
+ RtpUtility::RtpHeaderParser rtp_parser(buffer, length);
RTPHeader rtp_header;
rtp_parser.Parse(rtp_header);
bytes_left -= length - rtp_header.headerLength;
@@ -464,45 +482,6 @@
return bytes_to_send - bytes_left;
}
-bool RTPSender::SendPaddingAccordingToBitrate(
- int8_t payload_type, uint32_t capture_timestamp,
- int64_t capture_time_ms) {
- // Current bitrate since last estimate(1 second) averaged with the
- // estimate since then, to get the most up to date bitrate.
- uint32_t current_bitrate = bitrate_sent_.BitrateNow();
- uint32_t target_bitrate = GetTargetBitrate();
- int bitrate_diff = target_bitrate - current_bitrate;
- if (bitrate_diff <= 0) {
- return true;
- }
- int bytes = 0;
- if (current_bitrate == 0) {
- // Start up phase. Send one 33.3 ms batch to start with.
- bytes = (bitrate_diff / 8) / 30;
- } else {
- bytes = (bitrate_diff / 8);
- // Cap at 200 ms of target send data.
- int bytes_cap = target_bitrate / 1000 * 25; // 1000 / 8 / 5.
- if (bytes > bytes_cap) {
- bytes = bytes_cap;
- }
- }
- uint32_t timestamp;
- {
- CriticalSectionScoped cs(send_critsect_);
- // Add the random RTP timestamp offset and store the capture time for
- // later calculation of the send time offset.
- timestamp = start_time_stamp_ + capture_timestamp;
- timestamp_ = timestamp;
- capture_time_ms_ = capture_time_ms;
- last_timestamp_time_ms_ = clock_->TimeInMilliseconds();
- }
- int bytes_sent = SendPadData(payload_type, timestamp, capture_time_ms,
- bytes, kDontRetransmit, false, false);
- // We did not manage to send all bytes. Comparing with 31 due to modulus 32.
- return bytes - bytes_sent < 31;
-}
-
int RTPSender::BuildPaddingPacket(uint8_t* packet, int header_length,
int32_t bytes) {
int padding_bytes_in_packet = kMaxPaddingLength;
@@ -522,64 +501,95 @@
return padding_bytes_in_packet;
}
-int RTPSender::SendPadData(int payload_type, uint32_t timestamp,
- int64_t capture_time_ms, int32_t bytes,
- StorageType store, bool force_full_size_packets,
- bool only_pad_after_markerbit) {
- // Drop this packet if we're not sending media packets.
- if (!SendingMedia()) {
- return bytes;
+int RTPSender::TrySendPadData(int bytes) {
+ int64_t capture_time_ms;
+ uint32_t timestamp;
+ {
+ CriticalSectionScoped cs(send_critsect_);
+ timestamp = timestamp_;
+ capture_time_ms = capture_time_ms_;
+ if (last_timestamp_time_ms_ > 0) {
+ timestamp +=
+ (clock_->TimeInMilliseconds() - last_timestamp_time_ms_) * 90;
+ capture_time_ms +=
+ (clock_->TimeInMilliseconds() - last_timestamp_time_ms_);
+ }
}
+ return SendPadData(timestamp, capture_time_ms, bytes);
+}
+
+int RTPSender::SendPadData(uint32_t timestamp,
+ int64_t capture_time_ms,
+ int32_t bytes) {
int padding_bytes_in_packet = 0;
int bytes_sent = 0;
for (; bytes > 0; bytes -= padding_bytes_in_packet) {
// Always send full padding packets.
- if (force_full_size_packets && bytes < kMaxPaddingLength)
+ if (bytes < kMaxPaddingLength)
bytes = kMaxPaddingLength;
- if (bytes < kMaxPaddingLength) {
- if (force_full_size_packets) {
- bytes = kMaxPaddingLength;
- } else {
- // Round to the nearest multiple of 32.
- bytes = (bytes + 16) & 0xffe0;
- }
- }
- if (bytes < 32) {
- // Sanity don't send empty packets.
- break;
- }
+
uint32_t ssrc;
uint16_t sequence_number;
+ int payload_type;
+ bool over_rtx;
{
CriticalSectionScoped cs(send_critsect_);
// Only send padding packets following the last packet of a frame,
// indicated by the marker bit.
- if (only_pad_after_markerbit && !last_packet_marker_bit_)
- return bytes_sent;
if (rtx_ == kRtxOff) {
+ // Without RTX we can't send padding in the middle of frames.
+ if (!last_packet_marker_bit_)
+ return 0;
ssrc = ssrc_;
sequence_number = sequence_number_;
++sequence_number_;
+ payload_type = payload_type_;
+ over_rtx = false;
} else {
+ // Without abs-send-time a media packet must be sent before padding so
+ // that the timestamps used for estimation are correct.
+ if (!media_has_been_sent_ && !rtp_header_extension_map_.IsRegistered(
+ kRtpExtensionAbsoluteSendTime))
+ return 0;
ssrc = ssrc_rtx_;
sequence_number = sequence_number_rtx_;
++sequence_number_rtx_;
+ payload_type = ((rtx_ & kRtxRedundantPayloads) > 0) ? payload_type_rtx_
+ : payload_type_;
+ over_rtx = true;
}
}
+
uint8_t padding_packet[IP_PACKET_SIZE];
- int header_length = CreateRTPHeader(padding_packet, payload_type, ssrc,
- false, timestamp, sequence_number, NULL,
+ int header_length = CreateRTPHeader(padding_packet,
+ payload_type,
+ ssrc,
+ false,
+ timestamp,
+ sequence_number,
+ NULL,
0);
- padding_bytes_in_packet = BuildPaddingPacket(padding_packet, header_length,
- bytes);
- if (0 > SendToNetwork(padding_packet, padding_bytes_in_packet,
- header_length, capture_time_ms, store,
- PacedSender::kLowPriority)) {
- // Error sending the packet.
- break;
+ padding_bytes_in_packet =
+ BuildPaddingPacket(padding_packet, header_length, bytes);
+ int length = padding_bytes_in_packet + header_length;
+ int64_t now_ms = clock_->TimeInMilliseconds();
+
+ RtpUtility::RtpHeaderParser rtp_parser(padding_packet, length);
+ RTPHeader rtp_header;
+ rtp_parser.Parse(rtp_header);
+
+ if (capture_time_ms > 0) {
+ UpdateTransmissionTimeOffset(
+ padding_packet, length, rtp_header, now_ms - capture_time_ms);
}
+
+ UpdateAbsoluteSendTime(padding_packet, length, rtp_header, now_ms);
+ if (!SendPacketToNetwork(padding_packet, length))
+ break;
bytes_sent += padding_bytes_in_packet;
+ UpdateRtpStats(padding_packet, length, rtp_header, over_rtx, false);
}
+
return bytes_sent;
}
@@ -604,16 +614,21 @@
}
if (paced_sender_) {
- ModuleRTPUtility::RTPHeaderParser rtp_parser(data_buffer, length);
+ RtpUtility::RtpHeaderParser rtp_parser(data_buffer, length);
RTPHeader header;
if (!rtp_parser.Parse(header)) {
assert(false);
return -1;
}
+ // Convert from TickTime to Clock since capture_time_ms is based on
+ // TickTime.
+ // TODO(holmer): Remove this conversion when we remove the use of TickTime.
+ int64_t clock_delta_ms = clock_->TimeInMilliseconds() -
+ TickTime::MillisecondTimestamp();
if (!paced_sender_->SendPacket(PacedSender::kHighPriority,
header.ssrc,
header.sequenceNumber,
- capture_time_ms,
+ capture_time_ms + clock_delta_ms,
length - header.headerLength,
true)) {
// We can't send the packet right now.
@@ -621,9 +636,13 @@
return length;
}
}
-
+ int rtx = kRtxOff;
+ {
+ CriticalSectionScoped lock(send_critsect_);
+ rtx = rtx_;
+ }
return PrepareAndSendPacket(data_buffer, length, capture_time_ms,
- (rtx_ & kRtxRetransmitted) > 0, true) ?
+ (rtx & kRtxRetransmitted) > 0, true) ?
length : -1;
}
@@ -705,7 +724,7 @@
bool RTPSender::ProcessNACKBitRate(const uint32_t now) {
uint32_t num = 0;
int byte_count = 0;
- const int kAvgIntervalMs = 1000;
+ const uint32_t kAvgIntervalMs = 1000;
uint32_t target_bitrate = GetTargetBitrate();
CriticalSectionScoped cs(send_critsect_);
@@ -721,13 +740,12 @@
byte_count += nack_byte_count_[num];
}
}
- int time_interval = kAvgIntervalMs;
+ uint32_t time_interval = kAvgIntervalMs;
if (num == NACK_BYTECOUNT_SIZE) {
// More than NACK_BYTECOUNT_SIZE nack messages has been received
// during the last msg_interval.
- time_interval = now - nack_byte_count_times_[num - 1];
- if (time_interval < 0) {
- time_interval = kAvgIntervalMs;
+ if (nack_byte_count_times_[num - 1] <= now) {
+ time_interval = now - nack_byte_count_times_[num - 1];
}
}
return (byte_count * 8) <
@@ -779,8 +797,15 @@
if (!retransmission && capture_time_ms > 0) {
UpdateDelayStatistics(capture_time_ms, clock_->TimeInMilliseconds());
}
- return PrepareAndSendPacket(data_buffer, length, capture_time_ms,
- retransmission && (rtx_ & kRtxRetransmitted) > 0,
+ int rtx;
+ {
+ CriticalSectionScoped lock(send_critsect_);
+ rtx = rtx_;
+ }
+ return PrepareAndSendPacket(data_buffer,
+ length,
+ capture_time_ms,
+ retransmission && (rtx & kRtxRetransmitted) > 0,
retransmission);
}
@@ -791,7 +816,7 @@
bool is_retransmit) {
uint8_t *buffer_to_send_ptr = buffer;
- ModuleRTPUtility::RTPHeaderParser rtp_parser(buffer, length);
+ RtpUtility::RtpHeaderParser rtp_parser(buffer, length);
RTPHeader rtp_header;
rtp_parser.Parse(rtp_header);
TRACE_EVENT_INSTANT2("webrtc_rtp", "PrepareAndSendPacket",
@@ -810,6 +835,10 @@
diff_ms);
UpdateAbsoluteSendTime(buffer_to_send_ptr, length, rtp_header, now_ms);
bool ret = SendPacketToNetwork(buffer_to_send_ptr, length);
+ if (ret) {
+ CriticalSectionScoped lock(send_critsect_);
+ media_has_been_sent_ = true;
+ }
UpdateRtpStats(buffer_to_send_ptr, length, rtp_header, send_over_rtx,
is_retransmit);
return ret;
@@ -822,12 +851,11 @@
bool is_retransmit) {
StreamDataCounters* counters;
// Get ssrc before taking statistics_crit_ to avoid possible deadlock.
- uint32_t ssrc = SSRC();
+ uint32_t ssrc = is_rtx ? RtxSsrc() : SSRC();
CriticalSectionScoped lock(statistics_crit_.get());
if (is_rtx) {
counters = &rtx_rtp_stats_;
- ssrc = ssrc_rtx_;
} else {
counters = &rtp_stats_;
}
@@ -866,47 +894,25 @@
}
int RTPSender::TimeToSendPadding(int bytes) {
- int payload_type;
- int64_t capture_time_ms;
- uint32_t timestamp;
{
CriticalSectionScoped cs(send_critsect_);
- if (!sending_media_) {
- return 0;
- }
- payload_type = ((rtx_ & kRtxRedundantPayloads) > 0) ? payload_type_rtx_ :
- payload_type_;
- timestamp = timestamp_;
- capture_time_ms = capture_time_ms_;
- if (last_timestamp_time_ms_ > 0) {
- timestamp +=
- (clock_->TimeInMilliseconds() - last_timestamp_time_ms_) * 90;
- capture_time_ms +=
- (clock_->TimeInMilliseconds() - last_timestamp_time_ms_);
- }
+ if (!sending_media_) return 0;
}
- int bytes_sent = SendRedundantPayloads(payload_type, bytes);
- bytes -= bytes_sent;
- if (bytes > 0) {
- int padding_sent = SendPadData(payload_type,
- timestamp,
- capture_time_ms,
- bytes,
- kDontStore,
- true,
- rtx_ == kRtxOff);
- bytes_sent += padding_sent;
- }
- return bytes_sent;
+ int available_bytes = bytes;
+ if (available_bytes > 0)
+ available_bytes -= TrySendRedundantPayloads(available_bytes);
+ if (available_bytes > 0)
+ available_bytes -= TrySendPadData(available_bytes);
+ return bytes - available_bytes;
}
-// TODO(pwestin): send in the RTPHeaderParser to avoid parsing it again.
+// TODO(pwestin): send in the RtpHeaderParser to avoid parsing it again.
int32_t RTPSender::SendToNetwork(
uint8_t *buffer, int payload_length, int rtp_header_length,
int64_t capture_time_ms, StorageType storage,
PacedSender::Priority priority) {
- ModuleRTPUtility::RTPHeaderParser rtp_parser(
- buffer, payload_length + rtp_header_length);
+ RtpUtility::RtpHeaderParser rtp_parser(buffer,
+ payload_length + rtp_header_length);
RTPHeader rtp_header;
rtp_parser.Parse(rtp_header);
@@ -931,8 +937,11 @@
}
if (paced_sender_ && storage != kDontStore) {
+ int64_t clock_delta_ms = clock_->TimeInMilliseconds() -
+ TickTime::MillisecondTimestamp();
if (!paced_sender_->SendPacket(priority, rtp_header.ssrc,
- rtp_header.sequenceNumber, capture_time_ms,
+ rtp_header.sequenceNumber,
+ capture_time_ms + clock_delta_ms,
payload_length, false)) {
// We can't send the packet right now.
// We will be called when it is time.
@@ -945,15 +954,36 @@
uint32_t length = payload_length + rtp_header_length;
if (!SendPacketToNetwork(buffer, length))
return -1;
+ assert(payload_length - rtp_header.paddingLength > 0);
+ {
+ CriticalSectionScoped lock(send_critsect_);
+ media_has_been_sent_ = true;
+ }
UpdateRtpStats(buffer, length, rtp_header, false, false);
return 0;
}
void RTPSender::UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms) {
- CriticalSectionScoped cs(statistics_crit_.get());
- send_delays_[now_ms] = now_ms - capture_time_ms;
- send_delays_.erase(send_delays_.begin(),
- send_delays_.lower_bound(now_ms - kSendSideDelayWindowMs));
+ uint32_t ssrc;
+ int avg_delay_ms = 0;
+ int max_delay_ms = 0;
+ {
+ CriticalSectionScoped lock(send_critsect_);
+ ssrc = ssrc_;
+ }
+ {
+ CriticalSectionScoped cs(statistics_crit_.get());
+ // TODO(holmer): Compute this iteratively instead.
+ send_delays_[now_ms] = now_ms - capture_time_ms;
+ send_delays_.erase(send_delays_.begin(),
+ send_delays_.lower_bound(now_ms -
+ kSendSideDelayWindowMs));
+ }
+ if (send_side_delay_observer_ &&
+ GetSendSideDelay(&avg_delay_ms, &max_delay_ms)) {
+ send_side_delay_observer_->SendSideDelayUpdated(avg_delay_ms,
+ max_delay_ms, ssrc);
+ }
}
void RTPSender::ProcessBitrate() {
@@ -967,6 +997,7 @@
}
uint16_t RTPSender::RTPHeaderLength() const {
+ CriticalSectionScoped lock(send_critsect_);
uint16_t rtp_header_length = 12;
if (include_csrcs_) {
rtp_header_length += sizeof(uint32_t) * num_csrcs_;
@@ -981,24 +1012,27 @@
}
void RTPSender::ResetDataCounters() {
+ uint32_t ssrc;
+ uint32_t ssrc_rtx;
+ {
+ CriticalSectionScoped ssrc_lock(send_critsect_);
+ ssrc = ssrc_;
+ ssrc_rtx = ssrc_rtx_;
+ }
CriticalSectionScoped lock(statistics_crit_.get());
rtp_stats_ = StreamDataCounters();
rtx_rtp_stats_ = StreamDataCounters();
if (rtp_stats_callback_) {
- rtp_stats_callback_->DataCountersUpdated(rtp_stats_, ssrc_);
- rtp_stats_callback_->DataCountersUpdated(rtx_rtp_stats_, ssrc_rtx_);
+ rtp_stats_callback_->DataCountersUpdated(rtp_stats_, ssrc);
+ rtp_stats_callback_->DataCountersUpdated(rtx_rtp_stats_, ssrc_rtx);
}
}
-uint32_t RTPSender::Packets() const {
+void RTPSender::GetDataCounters(StreamDataCounters* rtp_stats,
+ StreamDataCounters* rtx_stats) const {
CriticalSectionScoped lock(statistics_crit_.get());
- return rtp_stats_.packets + rtx_rtp_stats_.packets;
-}
-
-// Number of sent RTP bytes.
-uint32_t RTPSender::Bytes() const {
- CriticalSectionScoped lock(statistics_crit_.get());
- return rtp_stats_.bytes + rtx_rtp_stats_.bytes;
+ *rtp_stats = rtp_stats_;
+ *rtx_stats = rtx_rtp_stats_;
}
int RTPSender::CreateRTPHeader(
@@ -1010,9 +1044,9 @@
if (marker_bit) {
header[1] |= kRtpMarkerBitMask; // Marker bit is set.
}
- ModuleRTPUtility::AssignUWord16ToBuffer(header + 2, sequence_number);
- ModuleRTPUtility::AssignUWord32ToBuffer(header + 4, timestamp);
- ModuleRTPUtility::AssignUWord32ToBuffer(header + 8, ssrc);
+ RtpUtility::AssignUWord16ToBuffer(header + 2, sequence_number);
+ RtpUtility::AssignUWord32ToBuffer(header + 4, timestamp);
+ RtpUtility::AssignUWord32ToBuffer(header + 8, ssrc);
int32_t rtp_header_length = 12;
// Add the CSRCs if any.
@@ -1024,7 +1058,7 @@
}
uint8_t *ptr = &header[rtp_header_length];
for (int i = 0; i < num_csrcs; ++i) {
- ModuleRTPUtility::AssignUWord32ToBuffer(ptr, csrcs[i]);
+ RtpUtility::AssignUWord32ToBuffer(ptr, csrcs[i]);
ptr += 4;
}
header[0] = (header[0] & 0xf0) | num_csrcs;
@@ -1041,16 +1075,18 @@
return rtp_header_length;
}
-int32_t RTPSender::BuildRTPheader(
- uint8_t *data_buffer, const int8_t payload_type,
- const bool marker_bit, const uint32_t capture_timestamp,
- int64_t capture_time_ms, const bool time_stamp_provided,
- const bool inc_sequence_number) {
+int32_t RTPSender::BuildRTPheader(uint8_t* data_buffer,
+ const int8_t payload_type,
+ const bool marker_bit,
+ const uint32_t capture_timestamp,
+ int64_t capture_time_ms,
+ const bool timestamp_provided,
+ const bool inc_sequence_number) {
assert(payload_type >= 0);
CriticalSectionScoped cs(send_critsect_);
- if (time_stamp_provided) {
- timestamp_ = start_time_stamp_ + capture_timestamp;
+ if (timestamp_provided) {
+ timestamp_ = start_timestamp_ + capture_timestamp;
} else {
// Make a unique time stamp.
// We can't inc by the actual time, since then we increase the risk of back
@@ -1085,8 +1121,7 @@
const uint32_t kHeaderLength = kRtpOneByteHeaderLength;
// Add extension ID (0xBEDE).
- ModuleRTPUtility::AssignUWord16ToBuffer(data_buffer,
- kRtpOneByteHeaderExtensionId);
+ RtpUtility::AssignUWord16ToBuffer(data_buffer, kRtpOneByteHeaderExtensionId);
// Add extensions.
uint16_t total_block_length = 0;
@@ -1119,8 +1154,8 @@
}
// Set header length (in number of Word32, header excluded).
assert(total_block_length % 4 == 0);
- ModuleRTPUtility::AssignUWord16ToBuffer(data_buffer + kPosLength,
- total_block_length / 4);
+ RtpUtility::AssignUWord16ToBuffer(data_buffer + kPosLength,
+ total_block_length / 4);
// Total added length.
return kHeaderLength + total_block_length;
}
@@ -1154,8 +1189,8 @@
size_t pos = 0;
const uint8_t len = 2;
data_buffer[pos++] = (id << 4) + len;
- ModuleRTPUtility::AssignUWord24ToBuffer(data_buffer + pos,
- transmission_time_offset_);
+ RtpUtility::AssignUWord24ToBuffer(data_buffer + pos,
+ transmission_time_offset_);
pos += 3;
assert(pos == kTransmissionTimeOffsetLength);
return kTransmissionTimeOffsetLength;
@@ -1223,8 +1258,7 @@
size_t pos = 0;
const uint8_t len = 2;
data_buffer[pos++] = (id << 4) + len;
- ModuleRTPUtility::AssignUWord24ToBuffer(data_buffer + pos,
- absolute_send_time_);
+ RtpUtility::AssignUWord24ToBuffer(data_buffer + pos, absolute_send_time_);
pos += 3;
assert(pos == kAbsoluteSendTimeLength);
return kAbsoluteSendTimeLength;
@@ -1272,8 +1306,8 @@
return;
}
// Update transmission offset field (converting to a 90 kHz timestamp).
- ModuleRTPUtility::AssignUWord24ToBuffer(rtp_packet + block_pos + 1,
- time_diff_ms * 90); // RTP timestamp.
+ RtpUtility::AssignUWord24ToBuffer(rtp_packet + block_pos + 1,
+ time_diff_ms * 90); // RTP timestamp.
}
bool RTPSender::UpdateAudioLevel(uint8_t *rtp_packet,
@@ -1360,18 +1394,19 @@
}
// Update absolute send time field (convert ms to 24-bit unsigned with 18 bit
// fractional part).
- ModuleRTPUtility::AssignUWord24ToBuffer(rtp_packet + block_pos + 1,
- ((now_ms << 18) / 1000) & 0x00ffffff);
+ RtpUtility::AssignUWord24ToBuffer(rtp_packet + block_pos + 1,
+ ((now_ms << 18) / 1000) & 0x00ffffff);
}
void RTPSender::SetSendingStatus(bool enabled) {
if (enabled) {
uint32_t frequency_hz = SendPayloadFrequency();
- uint32_t RTPtime = ModuleRTPUtility::GetCurrentRTP(clock_, frequency_hz);
+ uint32_t RTPtime = RtpUtility::GetCurrentRTP(clock_, frequency_hz);
// Will be ignored if it's already configured via API.
SetStartTimestamp(RTPtime, false);
} else {
+ CriticalSectionScoped lock(send_critsect_);
if (!ssrc_forced_) {
// Generate a new SSRC.
ssrc_db_.ReturnSSRC(ssrc_);
@@ -1404,18 +1439,18 @@
void RTPSender::SetStartTimestamp(uint32_t timestamp, bool force) {
CriticalSectionScoped cs(send_critsect_);
if (force) {
- start_time_stamp_forced_ = force;
- start_time_stamp_ = timestamp;
+ start_timestamp_forced_ = true;
+ start_timestamp_ = timestamp;
} else {
- if (!start_time_stamp_forced_) {
- start_time_stamp_ = timestamp;
+ if (!start_timestamp_forced_) {
+ start_timestamp_ = timestamp;
}
}
}
uint32_t RTPSender::StartTimestamp() const {
CriticalSectionScoped cs(send_critsect_);
- return start_time_stamp_;
+ return start_timestamp_;
}
uint32_t RTPSender::GenerateNewSSRC() {
@@ -1452,6 +1487,7 @@
}
void RTPSender::SetCSRCStatus(const bool include) {
+ CriticalSectionScoped lock(send_critsect_);
include_csrcs_ = include;
}
@@ -1590,8 +1626,8 @@
CriticalSectionScoped cs(send_critsect_);
uint8_t* data_buffer_rtx = buffer_rtx;
// Add RTX header.
- ModuleRTPUtility::RTPHeaderParser rtp_parser(
- reinterpret_cast<const uint8_t *>(buffer), *length);
+ RtpUtility::RtpHeaderParser rtp_parser(
+ reinterpret_cast<const uint8_t*>(buffer), *length);
RTPHeader rtp_header;
rtp_parser.Parse(rtp_header);
@@ -1608,15 +1644,15 @@
// Replace sequence number.
uint8_t *ptr = data_buffer_rtx + 2;
- ModuleRTPUtility::AssignUWord16ToBuffer(ptr, sequence_number_rtx_++);
+ RtpUtility::AssignUWord16ToBuffer(ptr, sequence_number_rtx_++);
// Replace SSRC.
ptr += 6;
- ModuleRTPUtility::AssignUWord32ToBuffer(ptr, ssrc_rtx_);
+ RtpUtility::AssignUWord32ToBuffer(ptr, ssrc_rtx_);
// Add OSN (original sequence number).
ptr = data_buffer_rtx + rtp_header.headerLength;
- ModuleRTPUtility::AssignUWord16ToBuffer(ptr, rtp_header.sequenceNumber);
+ RtpUtility::AssignUWord16ToBuffer(ptr, rtp_header.sequenceNumber);
ptr += 2;
// Add original payload data.
@@ -1625,23 +1661,9 @@
*length += 2;
}
-void RTPSender::RegisterFrameCountObserver(FrameCountObserver* observer) {
- CriticalSectionScoped cs(statistics_crit_.get());
- if (observer != NULL)
- assert(frame_count_observer_ == NULL);
- frame_count_observer_ = observer;
-}
-
-FrameCountObserver* RTPSender::GetFrameCountObserver() const {
- CriticalSectionScoped cs(statistics_crit_.get());
- return frame_count_observer_;
-}
-
void RTPSender::RegisterRtpStatisticsCallback(
StreamDataCountersCallback* callback) {
CriticalSectionScoped cs(statistics_crit_.get());
- if (callback != NULL)
- assert(rtp_stats_callback_ == NULL);
rtp_stats_callback_ = callback;
}
@@ -1650,24 +1672,57 @@
return rtp_stats_callback_;
}
-void RTPSender::RegisterBitrateObserver(BitrateStatisticsObserver* observer) {
- CriticalSectionScoped cs(statistics_crit_.get());
- if (observer != NULL)
- assert(bitrate_callback_ == NULL);
- bitrate_callback_ = observer;
-}
-
-BitrateStatisticsObserver* RTPSender::GetBitrateObserver() const {
- CriticalSectionScoped cs(statistics_crit_.get());
- return bitrate_callback_;
-}
-
uint32_t RTPSender::BitrateSent() const { return bitrate_sent_.BitrateLast(); }
void RTPSender::BitrateUpdated(const BitrateStatistics& stats) {
- CriticalSectionScoped cs(statistics_crit_.get());
+ uint32_t ssrc;
+ {
+ CriticalSectionScoped ssrc_lock(send_critsect_);
+ ssrc = ssrc_;
+ }
if (bitrate_callback_) {
- bitrate_callback_->Notify(stats, ssrc_);
+ bitrate_callback_->Notify(stats, ssrc);
}
}
+
+void RTPSender::SetRtpState(const RtpState& rtp_state) {
+ SetStartTimestamp(rtp_state.start_timestamp, true);
+ CriticalSectionScoped lock(send_critsect_);
+ sequence_number_ = rtp_state.sequence_number;
+ sequence_number_forced_ = true;
+ timestamp_ = rtp_state.timestamp;
+ capture_time_ms_ = rtp_state.capture_time_ms;
+ last_timestamp_time_ms_ = rtp_state.last_timestamp_time_ms;
+ media_has_been_sent_ = rtp_state.media_has_been_sent;
+}
+
+RtpState RTPSender::GetRtpState() const {
+ CriticalSectionScoped lock(send_critsect_);
+
+ RtpState state;
+ state.sequence_number = sequence_number_;
+ state.start_timestamp = start_timestamp_;
+ state.timestamp = timestamp_;
+ state.capture_time_ms = capture_time_ms_;
+ state.last_timestamp_time_ms = last_timestamp_time_ms_;
+ state.media_has_been_sent = media_has_been_sent_;
+
+ return state;
+}
+
+void RTPSender::SetRtxRtpState(const RtpState& rtp_state) {
+ CriticalSectionScoped lock(send_critsect_);
+ sequence_number_rtx_ = rtp_state.sequence_number;
+}
+
+RtpState RTPSender::GetRtxRtpState() const {
+ CriticalSectionScoped lock(send_critsect_);
+
+ RtpState state;
+ state.sequence_number = sequence_number_rtx_;
+ state.start_timestamp = start_timestamp_;
+
+ return state;
+}
+
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index 291e619..b2f2e0c 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -16,6 +16,7 @@
#include <map>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/pacing/include/paced_sender.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
@@ -25,7 +26,6 @@
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
#include "webrtc/modules/rtp_rtcp/source/ssrc_database.h"
#include "webrtc/modules/rtp_rtcp/source/video_codec_information.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#define MAX_INIT_RTP_SEQ_NUMBER 32767 // 2^15 -1.
@@ -43,12 +43,13 @@
virtual uint32_t SSRC() const = 0;
virtual uint32_t Timestamp() const = 0;
- virtual int32_t BuildRTPheader(
- uint8_t *data_buffer, const int8_t payload_type,
- const bool marker_bit, const uint32_t capture_time_stamp,
- int64_t capture_time_ms,
- const bool time_stamp_provided = true,
- const bool inc_sequence_number = true) = 0;
+ virtual int32_t BuildRTPheader(uint8_t* data_buffer,
+ const int8_t payload_type,
+ const bool marker_bit,
+ const uint32_t capture_timestamp,
+ int64_t capture_time_ms,
+ const bool timestamp_provided = true,
+ const bool inc_sequence_number = true) = 0;
virtual uint16_t RTPHeaderLength() const = 0;
virtual uint16_t IncrementSequenceNumber() = 0;
@@ -68,7 +69,10 @@
public:
RTPSender(const int32_t id, const bool audio, Clock *clock,
Transport *transport, RtpAudioFeedback *audio_feedback,
- PacedSender *paced_sender);
+ PacedSender *paced_sender,
+ BitrateStatisticsObserver* bitrate_callback,
+ FrameCountObserver* frame_count_observer,
+ SendSideDelayObserver* send_side_delay_observer);
virtual ~RTPSender();
void ProcessBitrate();
@@ -96,6 +100,8 @@
int32_t DeRegisterSendPayload(const int8_t payload_type);
+ void SetSendPayloadType(int8_t payload_type);
+
int8_t SendPayloadType() const;
int SendPayloadFrequency() const;
@@ -105,11 +111,8 @@
void SetSendingMediaStatus(const bool enabled);
bool SendingMedia() const;
- // Number of sent RTP packets.
- uint32_t Packets() const;
-
- // Number of sent RTP bytes.
- uint32_t Bytes() const;
+ void GetDataCounters(StreamDataCounters* rtp_stats,
+ StreamDataCounters* rtx_stats) const;
void ResetDataCounters();
@@ -132,13 +135,15 @@
int32_t SetMaxPayloadLength(const uint16_t length,
const uint16_t packet_over_head);
- int32_t SendOutgoingData(
- const FrameType frame_type, const int8_t payload_type,
- const uint32_t time_stamp, int64_t capture_time_ms,
- const uint8_t *payload_data, const uint32_t payload_size,
- const RTPFragmentationHeader *fragmentation,
- VideoCodecInformation *codec_info = NULL,
- const RTPVideoTypeHeader * rtp_type_hdr = NULL);
+ int32_t SendOutgoingData(const FrameType frame_type,
+ const int8_t payload_type,
+ const uint32_t timestamp,
+ int64_t capture_time_ms,
+ const uint8_t* payload_data,
+ const uint32_t payload_size,
+ const RTPFragmentationHeader* fragmentation,
+ VideoCodecInformation* codec_info = NULL,
+ const RTPVideoTypeHeader* rtp_type_hdr = NULL);
// RTP header extension
int32_t SetTransmissionTimeOffset(
@@ -189,16 +194,19 @@
void RTXStatus(int* mode, uint32_t* ssrc, int* payload_type) const;
+ uint32_t RtxSsrc() const;
void SetRtxSsrc(uint32_t ssrc);
void SetRtxPayloadType(int payloadType);
// Functions wrapping RTPSenderInterface.
virtual int32_t BuildRTPheader(
- uint8_t *data_buffer, const int8_t payload_type,
- const bool marker_bit, const uint32_t capture_time_stamp,
+ uint8_t* data_buffer,
+ const int8_t payload_type,
+ const bool marker_bit,
+ const uint32_t capture_timestamp,
int64_t capture_time_ms,
- const bool time_stamp_provided = true,
+ const bool timestamp_provided = true,
const bool inc_sequence_number = true) OVERRIDE;
virtual uint16_t RTPHeaderLength() const OVERRIDE;
@@ -258,25 +266,23 @@
int32_t SetFecParameters(const FecProtectionParams *delta_params,
const FecProtectionParams *key_params);
- virtual void RegisterFrameCountObserver(FrameCountObserver* observer);
- virtual FrameCountObserver* GetFrameCountObserver() const;
-
- int SendPadData(int payload_type, uint32_t timestamp, int64_t capture_time_ms,
- int32_t bytes, StorageType store,
- bool force_full_size_packets, bool only_pad_after_markerbit);
+ int SendPadData(uint32_t timestamp,
+ int64_t capture_time_ms,
+ int32_t bytes);
// Called on update of RTP statistics.
void RegisterRtpStatisticsCallback(StreamDataCountersCallback* callback);
StreamDataCountersCallback* GetRtpStatisticsCallback() const;
- // Called on new send bitrate estimate.
- void RegisterBitrateObserver(BitrateStatisticsObserver* observer);
- BitrateStatisticsObserver* GetBitrateObserver() const;
-
uint32_t BitrateSent() const;
virtual void BitrateUpdated(const BitrateStatistics& stats) OVERRIDE;
+ void SetRtpState(const RtpState& rtp_state);
+ RtpState GetRtpState() const;
+ void SetRtxRtpState(const RtpState& rtp_state);
+ RtpState GetRtxRtpState() const;
+
protected:
int32_t CheckPayloadType(const int8_t payload_type,
RtpVideoCodecTypes *video_type);
@@ -300,11 +306,10 @@
bool send_over_rtx,
bool is_retransmit);
- int SendRedundantPayloads(int payload_type, int bytes);
+ // Return the number of bytes sent.
+ int TrySendRedundantPayloads(int bytes);
+ int TrySendPadData(int bytes);
- bool SendPaddingAccordingToBitrate(int8_t payload_type,
- uint32_t capture_timestamp,
- int64_t capture_time_ms);
int BuildPaddingPacket(uint8_t* packet, int header_length, int32_t bytes);
void BuildRtxPacket(uint8_t* buffer, uint16_t* length,
@@ -348,7 +353,7 @@
uint16_t packet_over_head_;
int8_t payload_type_ GUARDED_BY(send_critsect_);
- std::map<int8_t, ModuleRTPUtility::Payload *> payload_type_map_;
+ std::map<int8_t, RtpUtility::Payload*> payload_type_map_;
RtpHeaderExtensionMap rtp_header_extension_map_;
int32_t transmission_time_offset_;
@@ -363,34 +368,36 @@
// Statistics
scoped_ptr<CriticalSectionWrapper> statistics_crit_;
- SendDelayMap send_delays_;
- std::map<FrameType, uint32_t> frame_counts_;
- FrameCountObserver* frame_count_observer_;
- StreamDataCounters rtp_stats_;
- StreamDataCounters rtx_rtp_stats_;
- StreamDataCountersCallback* rtp_stats_callback_;
- BitrateStatisticsObserver* bitrate_callback_;
+ SendDelayMap send_delays_ GUARDED_BY(statistics_crit_);
+ std::map<FrameType, uint32_t> frame_counts_ GUARDED_BY(statistics_crit_);
+ StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_);
+ StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_);
+ StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_);
+ BitrateStatisticsObserver* const bitrate_callback_;
+ FrameCountObserver* const frame_count_observer_;
+ SendSideDelayObserver* const send_side_delay_observer_;
// RTP variables
- bool start_time_stamp_forced_;
- uint32_t start_time_stamp_;
- SSRCDatabase &ssrc_db_;
- uint32_t remote_ssrc_;
- bool sequence_number_forced_;
- uint16_t sequence_number_;
- uint16_t sequence_number_rtx_;
- bool ssrc_forced_;
- uint32_t ssrc_;
- uint32_t timestamp_;
- int64_t capture_time_ms_;
- int64_t last_timestamp_time_ms_;
- bool last_packet_marker_bit_;
- uint8_t num_csrcs_;
- uint32_t csrcs_[kRtpCsrcSize];
- bool include_csrcs_;
- int rtx_;
- uint32_t ssrc_rtx_;
- int payload_type_rtx_;
+ bool start_timestamp_forced_ GUARDED_BY(send_critsect_);
+ uint32_t start_timestamp_ GUARDED_BY(send_critsect_);
+ SSRCDatabase& ssrc_db_ GUARDED_BY(send_critsect_);
+ uint32_t remote_ssrc_ GUARDED_BY(send_critsect_);
+ bool sequence_number_forced_ GUARDED_BY(send_critsect_);
+ uint16_t sequence_number_ GUARDED_BY(send_critsect_);
+ uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_);
+ bool ssrc_forced_ GUARDED_BY(send_critsect_);
+ uint32_t ssrc_ GUARDED_BY(send_critsect_);
+ uint32_t timestamp_ GUARDED_BY(send_critsect_);
+ int64_t capture_time_ms_ GUARDED_BY(send_critsect_);
+ int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_);
+ bool media_has_been_sent_ GUARDED_BY(send_critsect_);
+ bool last_packet_marker_bit_ GUARDED_BY(send_critsect_);
+ uint8_t num_csrcs_ GUARDED_BY(send_critsect_);
+ uint32_t csrcs_[kRtpCsrcSize] GUARDED_BY(send_critsect_);
+ bool include_csrcs_ GUARDED_BY(send_critsect_);
+ int rtx_ GUARDED_BY(send_critsect_);
+ uint32_t ssrc_rtx_ GUARDED_BY(send_critsect_);
+ int payload_type_rtx_ GUARDED_BY(send_critsect_);
// Note: Don't access this variable directly, always go through
// SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio.cc b/modules/rtp_rtcp/source/rtp_sender_audio.cc
index 6b3e227..7efe987 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_audio.cc
@@ -89,10 +89,10 @@
const uint32_t frequency,
const uint8_t channels,
const uint32_t rate,
- ModuleRTPUtility::Payload*& payload) {
+ RtpUtility::Payload*& payload) {
CriticalSectionScoped cs(_sendAudioCritsect);
- if (ModuleRTPUtility::StringCompare(payloadName, "cn", 2)) {
+ if (RtpUtility::StringCompare(payloadName, "cn", 2)) {
// we can have multiple CNG payload types
if (frequency == 8000) {
_cngNBPayloadType = payloadType;
@@ -110,14 +110,14 @@
return -1;
}
}
- if (ModuleRTPUtility::StringCompare(payloadName, "telephone-event", 15)) {
+ if (RtpUtility::StringCompare(payloadName, "telephone-event", 15)) {
// Don't add it to the list
// we dont want to allow send with a DTMF payloadtype
_dtmfPayloadType = payloadType;
return 0;
// The default timestamp rate is 8000 Hz, but other rates may be defined.
}
- payload = new ModuleRTPUtility::Payload;
+ payload = new RtpUtility::Payload;
payload->typeSpecific.Audio.frequency = frequency;
payload->typeSpecific.Audio.channels = channels;
payload->typeSpecific.Audio.rate = rate;
@@ -318,13 +318,15 @@
static_cast<uint16_t>(dtmfDurationSamples),
false);
} else {
- // set markerBit on the first packet in the burst
+ if (SendTelephoneEventPacket(
+ ended,
+ _dtmfTimestamp,
+ static_cast<uint16_t>(dtmfDurationSamples),
+ !_dtmfEventFirstPacketSent) != 0) {
+ return -1;
+ }
_dtmfEventFirstPacketSent = true;
- return SendTelephoneEventPacket(
- ended,
- _dtmfTimestamp,
- static_cast<uint16_t>(dtmfDurationSamples),
- !_dtmfEventFirstPacketSent);
+ return 0;
}
}
return 0;
@@ -388,8 +390,8 @@
return -1;
}
uint32_t REDheader = (timestampOffset << 10) + blockLength;
- ModuleRTPUtility::AssignUWord24ToBuffer(dataBuffer + rtpHeaderLength,
- REDheader);
+ RtpUtility::AssignUWord24ToBuffer(dataBuffer + rtpHeaderLength,
+ REDheader);
rtpHeaderLength += 3;
dataBuffer[rtpHeaderLength++] = fragmentation->fragmentationPlType[0];
@@ -436,7 +438,7 @@
// Update audio level extension, if included.
{
uint16_t packetSize = payloadSize + rtpHeaderLength;
- ModuleRTPUtility::RTPHeaderParser rtp_parser(dataBuffer, packetSize);
+ RtpUtility::RtpHeaderParser rtp_parser(dataBuffer, packetSize);
RTPHeader rtp_header;
rtp_parser.Parse(rtp_header);
_rtpSender->UpdateAudioLevel(dataBuffer, packetSize, rtp_header,
@@ -558,7 +560,7 @@
// First byte is Event number, equals key number
dtmfbuffer[12] = _dtmfKey;
dtmfbuffer[13] = E|R|volume;
- ModuleRTPUtility::AssignUWord16ToBuffer(dtmfbuffer+14, duration);
+ RtpUtility::AssignUWord16ToBuffer(dtmfbuffer + 14, duration);
_sendAudioCritsect->Leave();
TRACE_EVENT_INSTANT2("webrtc_rtp",
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio.h b/modules/rtp_rtcp/source/rtp_sender_audio.h
index 732199c..d3f67e5 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio.h
+++ b/modules/rtp_rtcp/source/rtp_sender_audio.h
@@ -26,13 +26,12 @@
RTPSender* rtpSender);
virtual ~RTPSenderAudio();
- int32_t RegisterAudioPayload(
- const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- const int8_t payloadType,
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate,
- ModuleRTPUtility::Payload*& payload);
+ int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE],
+ const int8_t payloadType,
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate,
+ RtpUtility::Payload*& payload);
int32_t SendAudio(const FrameType frameType,
const int8_t payloadType,
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index 1848289..7b62d0b 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -39,6 +39,7 @@
const uint8_t kAudioLevelExtensionId = 9;
const int kAudioPayload = 103;
const uint64_t kStartTime = 123456789;
+const size_t kMaxPaddingSize = 224u;
} // namespace
using testing::_;
@@ -62,13 +63,12 @@
class LoopbackTransportTest : public webrtc::Transport {
public:
LoopbackTransportTest()
- : packets_sent_(0),
- last_sent_packet_len_(0) {
- }
+ : packets_sent_(0), last_sent_packet_len_(0), total_bytes_sent_(0) {}
virtual int SendPacket(int channel, const void *data, int len) {
packets_sent_++;
memcpy(last_sent_packet_, data, len);
last_sent_packet_len_ = len;
+ total_bytes_sent_ += static_cast<size_t>(len);
return len;
}
virtual int SendRTCPPacket(int channel, const void *data, int len) {
@@ -76,6 +76,7 @@
}
int packets_sent_;
int last_sent_packet_len_;
+ size_t total_bytes_sent_;
uint8_t last_sent_packet_[kMaxPacketLength];
};
@@ -94,7 +95,7 @@
virtual void SetUp() {
rtp_sender_.reset(new RTPSender(0, false, &fake_clock_, &transport_, NULL,
- &mock_paced_sender_));
+ &mock_paced_sender_, NULL, NULL, NULL));
rtp_sender_->SetSequenceNumber(kSeqNum);
}
@@ -204,7 +205,7 @@
EXPECT_EQ(kRtpHeaderSize, length);
// Verify
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(packet_, length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(packet_, length);
webrtc::RTPHeader rtp_header;
const bool valid_rtp_header = rtp_parser.Parse(rtp_header, NULL);
@@ -235,7 +236,7 @@
length);
// Verify
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(packet_, length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(packet_, length);
webrtc::RTPHeader rtp_header;
RtpHeaderExtensionMap map;
@@ -276,7 +277,7 @@
length);
// Verify
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(packet_, length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(packet_, length);
webrtc::RTPHeader rtp_header;
RtpHeaderExtensionMap map;
@@ -306,7 +307,7 @@
length);
// Verify
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(packet_, length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(packet_, length);
webrtc::RTPHeader rtp_header;
RtpHeaderExtensionMap map;
@@ -344,7 +345,7 @@
length);
// Verify
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(packet_, length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(packet_, length);
webrtc::RTPHeader rtp_header;
// Updating audio level is done in RTPSenderAudio, so simulate it here.
@@ -394,7 +395,7 @@
length);
// Verify
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(packet_, length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(packet_, length);
webrtc::RTPHeader rtp_header;
// Updating audio level is done in RTPSenderAudio, so simulate it here.
@@ -471,8 +472,8 @@
EXPECT_EQ(1, transport_.packets_sent_);
EXPECT_EQ(rtp_length, transport_.last_sent_packet_len_);
// Parse sent packet.
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(
- transport_.last_sent_packet_, rtp_length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(transport_.last_sent_packet_,
+ rtp_length);
webrtc::RTPHeader rtp_header;
RtpHeaderExtensionMap map;
map.Register(kRtpExtensionTransmissionTimeOffset,
@@ -533,8 +534,8 @@
EXPECT_EQ(rtp_length, transport_.last_sent_packet_len_);
// Parse sent packet.
- webrtc::ModuleRTPUtility::RTPHeaderParser rtp_parser(
- transport_.last_sent_packet_, rtp_length);
+ webrtc::RtpUtility::RtpHeaderParser rtp_parser(transport_.last_sent_packet_,
+ rtp_length);
webrtc::RTPHeader rtp_header;
RtpHeaderExtensionMap map;
map.Register(kRtpExtensionTransmissionTimeOffset,
@@ -672,7 +673,7 @@
TEST_F(RtpSenderTest, SendRedundantPayloads) {
MockTransport transport;
rtp_sender_.reset(new RTPSender(0, false, &fake_clock_, &transport, NULL,
- &mock_paced_sender_));
+ &mock_paced_sender_, NULL, NULL, NULL));
rtp_sender_->SetSequenceNumber(kSeqNum);
// Make all packets go through the pacer.
EXPECT_CALL(mock_paced_sender_,
@@ -700,7 +701,7 @@
kAbsoluteSendTimeExtensionId);
rtp_sender_->SetTargetBitrate(300000);
const size_t kNumPayloadSizes = 10;
- const int kPayloadSizes[kNumPayloadSizes] = {500, 550, 600, 650, 700, 750,
+ const size_t kPayloadSizes[kNumPayloadSizes] = {500, 550, 600, 650, 700, 750,
800, 850, 900, 950};
// Send 10 packets of increasing size.
for (size_t i = 0; i < kNumPayloadSizes; ++i) {
@@ -711,25 +712,27 @@
rtp_sender_->TimeToSendPacket(seq_num++, capture_time_ms, false);
fake_clock_.AdvanceTimeMilliseconds(33);
}
- const int kPaddingPayloadSize = 224;
// The amount of padding to send it too small to send a payload packet.
- EXPECT_CALL(transport, SendPacket(_, _, kPaddingPayloadSize + rtp_header_len))
+ EXPECT_CALL(transport,
+ SendPacket(_, _, kMaxPaddingSize + rtp_header_len))
.WillOnce(testing::ReturnArg<2>());
- EXPECT_EQ(kPaddingPayloadSize, rtp_sender_->TimeToSendPadding(49));
+ EXPECT_EQ(kMaxPaddingSize,
+ static_cast<size_t>(rtp_sender_->TimeToSendPadding(49)));
const int kRtxHeaderSize = 2;
EXPECT_CALL(transport, SendPacket(_, _, kPayloadSizes[0] +
rtp_header_len + kRtxHeaderSize))
.WillOnce(testing::ReturnArg<2>());
- EXPECT_EQ(kPayloadSizes[0], rtp_sender_->TimeToSendPadding(500));
+ EXPECT_EQ(kPayloadSizes[0],
+ static_cast<size_t>(rtp_sender_->TimeToSendPadding(500)));
EXPECT_CALL(transport, SendPacket(_, _, kPayloadSizes[kNumPayloadSizes - 1] +
rtp_header_len + kRtxHeaderSize))
.WillOnce(testing::ReturnArg<2>());
- EXPECT_CALL(transport, SendPacket(_, _, kPaddingPayloadSize + rtp_header_len))
+ EXPECT_CALL(transport, SendPacket(_, _, kMaxPaddingSize + rtp_header_len))
.WillOnce(testing::ReturnArg<2>());
- EXPECT_EQ(kPayloadSizes[kNumPayloadSizes - 1] + kPaddingPayloadSize,
- rtp_sender_->TimeToSendPadding(999));
+ EXPECT_EQ(kPayloadSizes[kNumPayloadSizes - 1] + kMaxPaddingSize,
+ static_cast<size_t>(rtp_sender_->TimeToSendPadding(999)));
}
TEST_F(RtpSenderTest, SendGenericVideo) {
@@ -744,8 +747,8 @@
4321, payload, sizeof(payload),
NULL));
- ModuleRTPUtility::RTPHeaderParser rtp_parser(transport_.last_sent_packet_,
- transport_.last_sent_packet_len_);
+ RtpUtility::RtpHeaderParser rtp_parser(transport_.last_sent_packet_,
+ transport_.last_sent_packet_len_);
webrtc::RTPHeader rtp_header;
ASSERT_TRUE(rtp_parser.Parse(rtp_header));
@@ -770,8 +773,8 @@
1234, 4321, payload,
sizeof(payload), NULL));
- ModuleRTPUtility::RTPHeaderParser rtp_parser2(transport_.last_sent_packet_,
- transport_.last_sent_packet_len_);
+ RtpUtility::RtpHeaderParser rtp_parser2(transport_.last_sent_packet_,
+ transport_.last_sent_packet_len_);
ASSERT_TRUE(rtp_parser.Parse(rtp_header));
payload_data = GetPayloadData(rtp_header, transport_.last_sent_packet_);
@@ -817,6 +820,9 @@
uint32_t delta_frames_;
} callback;
+ rtp_sender_.reset(new RTPSender(0, false, &fake_clock_, &transport_, NULL,
+ &mock_paced_sender_, NULL, &callback, NULL));
+
char payload_name[RTP_PAYLOAD_NAME_SIZE] = "GENERIC";
const uint8_t payload_type = 127;
ASSERT_EQ(0, rtp_sender_->RegisterPayload(payload_name, payload_type, 90000,
@@ -825,8 +831,6 @@
rtp_sender_->SetStorePacketsStatus(true, 1);
uint32_t ssrc = rtp_sender_->SSRC();
- rtp_sender_->RegisterFrameCountObserver(&callback);
-
ASSERT_EQ(0, rtp_sender_->SendOutgoingData(kVideoFrameKey, payload_type, 1234,
4321, payload, sizeof(payload),
NULL));
@@ -845,7 +849,7 @@
EXPECT_EQ(1U, callback.key_frames_);
EXPECT_EQ(1U, callback.delta_frames_);
- rtp_sender_->RegisterFrameCountObserver(NULL);
+ rtp_sender_.reset();
}
TEST_F(RtpSenderTest, BitrateCallbacks) {
@@ -865,6 +869,8 @@
uint32_t ssrc_;
BitrateStatistics bitrate_;
} callback;
+ rtp_sender_.reset(new RTPSender(0, false, &fake_clock_, &transport_, NULL,
+ &mock_paced_sender_, &callback, NULL, NULL));
// Simulate kNumPackets sent with kPacketInterval ms intervals.
const uint32_t kNumPackets = 15;
@@ -881,8 +887,6 @@
rtp_sender_->SetStorePacketsStatus(true, 1);
uint32_t ssrc = rtp_sender_->SSRC();
- rtp_sender_->RegisterBitrateObserver(&callback);
-
// Initial process call so we get a new time window.
rtp_sender_->ProcessBitrate();
uint64_t start_time = fake_clock_.CurrentNtpInMilliseconds();
@@ -912,7 +916,7 @@
EXPECT_EQ((kPacketOverhead + sizeof(payload)) * 8 * expected_packet_rate,
callback.bitrate_.bitrate_bps);
- rtp_sender_->RegisterBitrateObserver(NULL);
+ rtp_sender_.reset();
}
class RtpSenderAudioTest : public RtpSenderTest {
@@ -922,7 +926,7 @@
virtual void SetUp() {
payload_ = kAudioPayload;
rtp_sender_.reset(new RTPSender(0, true, &fake_clock_, &transport_, NULL,
- &mock_paced_sender_));
+ &mock_paced_sender_, NULL, NULL, NULL));
rtp_sender_->SetSequenceNumber(kSeqNum);
}
};
@@ -958,7 +962,6 @@
const uint8_t kRedPayloadType = 96;
const uint8_t kUlpfecPayloadType = 97;
- const uint32_t kMaxPaddingSize = 224;
char payload_name[RTP_PAYLOAD_NAME_SIZE] = "GENERIC";
const uint8_t payload_type = 127;
ASSERT_EQ(0, rtp_sender_->RegisterPayload(payload_name, payload_type, 90000,
@@ -987,7 +990,7 @@
// Send padding.
rtp_sender_->TimeToSendPadding(kMaxPaddingSize);
// {bytes = 6, header = 24, padding = 224, packets = 3, retrans = 1, fec = 0}
- EXPECT_TRUE(callback.Matches(ssrc, 6, 24, 224, 3, 1, 0));
+ EXPECT_TRUE(callback.Matches(ssrc, 6, 24, kMaxPaddingSize, 3, 1, 0));
// Send FEC.
rtp_sender_->SetGenericFECStatus(true, kRedPayloadType, kUlpfecPayloadType);
@@ -1002,7 +1005,7 @@
sizeof(payload), NULL));
// {bytes = 34, header = 48, padding = 224, packets = 5, retrans = 1, fec = 1}
- EXPECT_TRUE(callback.Matches(ssrc, 34, 48, 224, 5, 1, 1));
+ EXPECT_TRUE(callback.Matches(ssrc, 34, 48, kMaxPaddingSize, 5, 1, 1));
rtp_sender_->RegisterRtpStatisticsCallback(NULL);
}
@@ -1018,8 +1021,8 @@
4321, payload, sizeof(payload),
NULL));
- ModuleRTPUtility::RTPHeaderParser rtp_parser(transport_.last_sent_packet_,
- transport_.last_sent_packet_len_);
+ RtpUtility::RtpHeaderParser rtp_parser(transport_.last_sent_packet_,
+ transport_.last_sent_packet_len_);
webrtc::RTPHeader rtp_header;
ASSERT_TRUE(rtp_parser.Parse(rtp_header));
@@ -1047,8 +1050,8 @@
4321, payload, sizeof(payload),
NULL));
- ModuleRTPUtility::RTPHeaderParser rtp_parser(transport_.last_sent_packet_,
- transport_.last_sent_packet_len_);
+ RtpUtility::RtpHeaderParser rtp_parser(transport_.last_sent_packet_,
+ transport_.last_sent_packet_len_);
webrtc::RTPHeader rtp_header;
ASSERT_TRUE(rtp_parser.Parse(rtp_header));
@@ -1070,4 +1073,102 @@
sizeof(extension)));
}
+// As RFC4733, named telephone events are carried as part of the audio stream
+// and must use the same sequence number and timestamp base as the regular
+// audio channel.
+// This test checks the marker bit for the first packet and the consequent
+// packets of the same telephone event. Since it is specifically for DTMF
+// events, ignoring audio packets and sending kFrameEmpty instead of those.
+TEST_F(RtpSenderAudioTest, CheckMarkerBitForTelephoneEvents) {
+ char payload_name[RTP_PAYLOAD_NAME_SIZE] = "telephone-event";
+ uint8_t payload_type = 126;
+ ASSERT_EQ(0, rtp_sender_->RegisterPayload(payload_name, payload_type, 0,
+ 0, 0));
+ // For Telephone events, payload is not added to the registered payload list,
+ // it will register only the payload used for audio stream.
+ // Registering the payload again for audio stream with different payload name.
+ strcpy(payload_name, "payload_name");
+ ASSERT_EQ(0, rtp_sender_->RegisterPayload(payload_name, payload_type, 8000,
+ 1, 0));
+ int64_t capture_time_ms = fake_clock_.TimeInMilliseconds();
+ // DTMF event key=9, duration=500 and attenuationdB=10
+ rtp_sender_->SendTelephoneEvent(9, 500, 10);
+ // During start, it takes the starting timestamp as last sent timestamp.
+ // The duration is calculated as the difference of current and last sent
+ // timestamp. So for first call it will skip since the duration is zero.
+ ASSERT_EQ(0, rtp_sender_->SendOutgoingData(kFrameEmpty, payload_type,
+ capture_time_ms,
+ 0, NULL, 0,
+ NULL));
+ // DTMF Sample Length is (Frequency/1000) * Duration.
+ // So in this case, it is (8000/1000) * 500 = 4000.
+ // Sending it as two packets.
+ ASSERT_EQ(0, rtp_sender_->SendOutgoingData(kFrameEmpty, payload_type,
+ capture_time_ms+2000,
+ 0, NULL, 0,
+ NULL));
+ scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
+ webrtc::RtpHeaderParser::Create());
+ ASSERT_TRUE(rtp_parser.get() != NULL);
+ webrtc::RTPHeader rtp_header;
+ ASSERT_TRUE(rtp_parser->Parse(transport_.last_sent_packet_,
+ transport_.last_sent_packet_len_,
+ &rtp_header));
+ // Marker Bit should be set to 1 for first packet.
+ EXPECT_TRUE(rtp_header.markerBit);
+
+ ASSERT_EQ(0, rtp_sender_->SendOutgoingData(kFrameEmpty, payload_type,
+ capture_time_ms+4000,
+ 0, NULL, 0,
+ NULL));
+ ASSERT_TRUE(rtp_parser->Parse(transport_.last_sent_packet_,
+ transport_.last_sent_packet_len_,
+ &rtp_header));
+ // Marker Bit should be set to 0 for rest of the packets.
+ EXPECT_FALSE(rtp_header.markerBit);
+}
+
+TEST_F(RtpSenderTest, BytesReportedCorrectly) {
+ const char* kPayloadName = "GENERIC";
+ const uint8_t kPayloadType = 127;
+ rtp_sender_->SetSSRC(1234);
+ rtp_sender_->SetRtxSsrc(4321);
+ rtp_sender_->SetRtxPayloadType(kPayloadType - 1);
+ rtp_sender_->SetRTXStatus(kRtxRetransmitted | kRtxRedundantPayloads);
+
+ ASSERT_EQ(
+ 0,
+ rtp_sender_->RegisterPayload(kPayloadName, kPayloadType, 90000, 0, 1500));
+ uint8_t payload[] = {47, 11, 32, 93, 89};
+
+ ASSERT_EQ(0,
+ rtp_sender_->SendOutgoingData(kVideoFrameKey,
+ kPayloadType,
+ 1234,
+ 4321,
+ payload,
+ sizeof(payload),
+ 0));
+
+ // Will send 2 full-size padding packets.
+ rtp_sender_->TimeToSendPadding(1);
+ rtp_sender_->TimeToSendPadding(1);
+
+ StreamDataCounters rtp_stats;
+ StreamDataCounters rtx_stats;
+ rtp_sender_->GetDataCounters(&rtp_stats, &rtx_stats);
+
+ // Payload + 1-byte generic header.
+ EXPECT_EQ(rtp_stats.bytes, sizeof(payload) + 1);
+ EXPECT_EQ(rtp_stats.header_bytes, 12u);
+ EXPECT_EQ(rtp_stats.padding_bytes, 0u);
+ EXPECT_EQ(rtx_stats.bytes, 0u);
+ EXPECT_EQ(rtx_stats.header_bytes, 24u);
+ EXPECT_EQ(rtx_stats.padding_bytes, 2 * kMaxPaddingSize);
+
+ EXPECT_EQ(transport_.total_bytes_sent_,
+ rtp_stats.bytes + rtp_stats.header_bytes + rtp_stats.padding_bytes +
+ rtx_stats.bytes + rtx_stats.header_bytes +
+ rtx_stats.padding_bytes);
+}
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc
index 5d8ae16..ec031df 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -31,8 +31,7 @@
ForwardErrorCorrection::Packet* pkt;
};
-RTPSenderVideo::RTPSenderVideo(Clock* clock,
- RTPSenderInterface* rtpSender)
+RTPSenderVideo::RTPSenderVideo(Clock* clock, RTPSenderInterface* rtpSender)
: _rtpSender(*rtpSender),
_sendVideoCritsect(CriticalSectionWrapper::CreateCriticalSection()),
_videoType(kRtpVideoGeneric),
@@ -55,47 +54,43 @@
memset(&key_fec_params_, 0, sizeof(key_fec_params_));
delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1;
delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type =
- kFecMaskRandom;
+ kFecMaskRandom;
}
-RTPSenderVideo::~RTPSenderVideo()
-{
- if(_videoCodecInformation)
- {
- delete _videoCodecInformation;
- }
- delete _sendVideoCritsect;
+RTPSenderVideo::~RTPSenderVideo() {
+ if (_videoCodecInformation) {
+ delete _videoCodecInformation;
+ }
+ delete _sendVideoCritsect;
}
-void
-RTPSenderVideo::SetVideoCodecType(RtpVideoCodecTypes videoType)
-{
- CriticalSectionScoped cs(_sendVideoCritsect);
- _videoType = videoType;
+void RTPSenderVideo::SetVideoCodecType(RtpVideoCodecTypes videoType) {
+ CriticalSectionScoped cs(_sendVideoCritsect);
+ _videoType = videoType;
}
-RtpVideoCodecTypes
-RTPSenderVideo::VideoCodecType() const
-{
- return _videoType;
+RtpVideoCodecTypes RTPSenderVideo::VideoCodecType() const {
+ return _videoType;
}
int32_t RTPSenderVideo::RegisterVideoPayload(
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const int8_t payloadType,
const uint32_t maxBitRate,
- ModuleRTPUtility::Payload*& payload) {
+ RtpUtility::Payload*& payload) {
CriticalSectionScoped cs(_sendVideoCritsect);
RtpVideoCodecTypes videoType = kRtpVideoGeneric;
- if (ModuleRTPUtility::StringCompare(payloadName, "VP8",3)) {
+ if (RtpUtility::StringCompare(payloadName, "VP8", 3)) {
videoType = kRtpVideoVp8;
- } else if (ModuleRTPUtility::StringCompare(payloadName, "I420", 4)) {
+ } else if (RtpUtility::StringCompare(payloadName, "H264", 4)) {
+ videoType = kRtpVideoH264;
+ } else if (RtpUtility::StringCompare(payloadName, "I420", 4)) {
videoType = kRtpVideoGeneric;
} else {
videoType = kRtpVideoGeneric;
}
- payload = new ModuleRTPUtility::Payload;
+ payload = new RtpUtility::Payload;
payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
payload->typeSpecific.Video.videoCodecType = videoType;
@@ -104,34 +99,34 @@
return 0;
}
-int32_t
-RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer,
- const uint16_t payload_length,
- const uint16_t rtp_header_length,
- const uint32_t capture_timestamp,
- int64_t capture_time_ms,
- StorageType storage,
- bool protect) {
- if(_fecEnabled) {
+int32_t RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer,
+ const uint16_t payload_length,
+ const uint16_t rtp_header_length,
+ const uint32_t capture_timestamp,
+ int64_t capture_time_ms,
+ StorageType storage,
+ bool protect) {
+ if (_fecEnabled) {
int ret = 0;
int fec_overhead_sent = 0;
int video_sent = 0;
- RedPacket* red_packet = producer_fec_.BuildRedPacket(data_buffer,
- payload_length,
- rtp_header_length,
- _payloadTypeRED);
- TRACE_EVENT_INSTANT2("webrtc_rtp", "Video::PacketRed",
- "timestamp", capture_timestamp,
- "seqnum", _rtpSender.SequenceNumber());
+ RedPacket* red_packet = producer_fec_.BuildRedPacket(
+ data_buffer, payload_length, rtp_header_length, _payloadTypeRED);
+ TRACE_EVENT_INSTANT2("webrtc_rtp",
+ "Video::PacketRed",
+ "timestamp",
+ capture_timestamp,
+ "seqnum",
+ _rtpSender.SequenceNumber());
// Sending the media packet with RED header.
- int packet_success = _rtpSender.SendToNetwork(
- red_packet->data(),
- red_packet->length() - rtp_header_length,
- rtp_header_length,
- capture_time_ms,
- storage,
- PacedSender::kNormalPriority);
+ int packet_success =
+ _rtpSender.SendToNetwork(red_packet->data(),
+ red_packet->length() - rtp_header_length,
+ rtp_header_length,
+ capture_time_ms,
+ storage,
+ PacedSender::kNormalPriority);
ret |= packet_success;
@@ -142,34 +137,36 @@
red_packet = NULL;
if (protect) {
- ret = producer_fec_.AddRtpPacketAndGenerateFec(data_buffer,
- payload_length,
- rtp_header_length);
+ ret = producer_fec_.AddRtpPacketAndGenerateFec(
+ data_buffer, payload_length, rtp_header_length);
if (ret != 0)
return ret;
}
while (producer_fec_.FecAvailable()) {
- red_packet = producer_fec_.GetFecPacket(
- _payloadTypeRED,
- _payloadTypeFEC,
- _rtpSender.IncrementSequenceNumber(),
- rtp_header_length);
+ red_packet =
+ producer_fec_.GetFecPacket(_payloadTypeRED,
+ _payloadTypeFEC,
+ _rtpSender.IncrementSequenceNumber(),
+ rtp_header_length);
StorageType storage = kDontRetransmit;
if (_retransmissionSettings & kRetransmitFECPackets) {
storage = kAllowRetransmission;
}
- TRACE_EVENT_INSTANT2("webrtc_rtp", "Video::PacketFec",
- "timestamp", capture_timestamp,
- "seqnum", _rtpSender.SequenceNumber());
+ TRACE_EVENT_INSTANT2("webrtc_rtp",
+ "Video::PacketFec",
+ "timestamp",
+ capture_timestamp,
+ "seqnum",
+ _rtpSender.SequenceNumber());
// Sending FEC packet with RED header.
- int packet_success = _rtpSender.SendToNetwork(
- red_packet->data(),
- red_packet->length() - rtp_header_length,
- rtp_header_length,
- capture_time_ms,
- storage,
- PacedSender::kNormalPriority);
+ int packet_success =
+ _rtpSender.SendToNetwork(red_packet->data(),
+ red_packet->length() - rtp_header_length,
+ rtp_header_length,
+ capture_time_ms,
+ storage,
+ PacedSender::kNormalPriority);
ret |= packet_success;
@@ -183,9 +180,12 @@
_fecOverheadRate.Update(fec_overhead_sent);
return ret;
}
- TRACE_EVENT_INSTANT2("webrtc_rtp", "Video::PacketNormal",
- "timestamp", capture_timestamp,
- "seqnum", _rtpSender.SequenceNumber());
+ TRACE_EVENT_INSTANT2("webrtc_rtp",
+ "Video::PacketNormal",
+ "timestamp",
+ capture_timestamp,
+ "seqnum",
+ _rtpSender.SequenceNumber());
int ret = _rtpSender.SendToNetwork(data_buffer,
payload_length,
rtp_header_length,
@@ -198,69 +198,61 @@
return ret;
}
-int32_t
-RTPSenderVideo::SendRTPIntraRequest()
-{
- // RFC 2032
- // 5.2.1. Full intra-frame Request (FIR) packet
+int32_t RTPSenderVideo::SendRTPIntraRequest() {
+ // RFC 2032
+ // 5.2.1. Full intra-frame Request (FIR) packet
- uint16_t length = 8;
- uint8_t data[8];
- data[0] = 0x80;
- data[1] = 192;
- data[2] = 0;
- data[3] = 1; // length
+ uint16_t length = 8;
+ uint8_t data[8];
+ data[0] = 0x80;
+ data[1] = 192;
+ data[2] = 0;
+ data[3] = 1; // length
- ModuleRTPUtility::AssignUWord32ToBuffer(data+4, _rtpSender.SSRC());
+ RtpUtility::AssignUWord32ToBuffer(data + 4, _rtpSender.SSRC());
- TRACE_EVENT_INSTANT1("webrtc_rtp",
- "Video::IntraRequest",
- "seqnum", _rtpSender.SequenceNumber());
- return _rtpSender.SendToNetwork(data, 0, length, -1, kDontStore,
- PacedSender::kNormalPriority);
+ TRACE_EVENT_INSTANT1("webrtc_rtp",
+ "Video::IntraRequest",
+ "seqnum",
+ _rtpSender.SequenceNumber());
+ return _rtpSender.SendToNetwork(
+ data, 0, length, -1, kDontStore, PacedSender::kNormalPriority);
}
-int32_t
-RTPSenderVideo::SetGenericFECStatus(const bool enable,
- const uint8_t payloadTypeRED,
- const uint8_t payloadTypeFEC)
-{
- _fecEnabled = enable;
- _payloadTypeRED = payloadTypeRED;
- _payloadTypeFEC = payloadTypeFEC;
- memset(&delta_fec_params_, 0, sizeof(delta_fec_params_));
- memset(&key_fec_params_, 0, sizeof(key_fec_params_));
- delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1;
- delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type =
- kFecMaskRandom;
- return 0;
+int32_t RTPSenderVideo::SetGenericFECStatus(const bool enable,
+ const uint8_t payloadTypeRED,
+ const uint8_t payloadTypeFEC) {
+ _fecEnabled = enable;
+ _payloadTypeRED = payloadTypeRED;
+ _payloadTypeFEC = payloadTypeFEC;
+ memset(&delta_fec_params_, 0, sizeof(delta_fec_params_));
+ memset(&key_fec_params_, 0, sizeof(key_fec_params_));
+ delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1;
+ delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type =
+ kFecMaskRandom;
+ return 0;
}
-int32_t
-RTPSenderVideo::GenericFECStatus(bool& enable,
- uint8_t& payloadTypeRED,
- uint8_t& payloadTypeFEC) const
-{
- enable = _fecEnabled;
- payloadTypeRED = _payloadTypeRED;
- payloadTypeFEC = _payloadTypeFEC;
- return 0;
+int32_t RTPSenderVideo::GenericFECStatus(bool& enable,
+ uint8_t& payloadTypeRED,
+ uint8_t& payloadTypeFEC) const {
+ enable = _fecEnabled;
+ payloadTypeRED = _payloadTypeRED;
+ payloadTypeFEC = _payloadTypeFEC;
+ return 0;
}
-uint16_t
-RTPSenderVideo::FECPacketOverhead() const
-{
- if (_fecEnabled)
- {
- // Overhead is FEC headers plus RED for FEC header plus anything in RTP
- // header beyond the 12 bytes base header (CSRC list, extensions...)
- // This reason for the header extensions to be included here is that
- // from an FEC viewpoint, they are part of the payload to be protected.
- // (The base RTP header is already protected by the FEC header.)
- return ForwardErrorCorrection::PacketOverhead() + REDForFECHeaderLength +
- (_rtpSender.RTPHeaderLength() - kRtpHeaderSize);
- }
- return 0;
+uint16_t RTPSenderVideo::FECPacketOverhead() const {
+ if (_fecEnabled) {
+ // Overhead is FEC headers plus RED for FEC header plus anything in RTP
+ // header beyond the 12 bytes base header (CSRC list, extensions...)
+ // This reason for the header extensions to be included here is that
+ // from an FEC viewpoint, they are part of the payload to be protected.
+ // (The base RTP header is already protected by the FEC header.)
+ return ForwardErrorCorrection::PacketOverhead() + REDForFECHeaderLength +
+ (_rtpSender.RTPHeaderLength() - kRtpHeaderSize);
+ }
+ return 0;
}
int32_t RTPSenderVideo::SetFecParameters(
@@ -273,8 +265,56 @@
return 0;
}
-int32_t
-RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType,
+int32_t RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType,
+ const FrameType frameType,
+ const int8_t payloadType,
+ const uint32_t captureTimeStamp,
+ int64_t capture_time_ms,
+ const uint8_t* payloadData,
+ const uint32_t payloadSize,
+ const RTPFragmentationHeader* fragmentation,
+ VideoCodecInformation* codecInfo,
+ const RTPVideoTypeHeader* rtpTypeHdr) {
+ if (payloadSize == 0) {
+ return -1;
+ }
+
+ if (frameType == kVideoFrameKey) {
+ producer_fec_.SetFecParameters(&key_fec_params_, _numberFirstPartition);
+ } else {
+ producer_fec_.SetFecParameters(&delta_fec_params_, _numberFirstPartition);
+ }
+
+ // Default setting for number of first partition packets:
+ // Will be extracted in SendVP8 for VP8 codec; other codecs use 0
+ _numberFirstPartition = 0;
+
+ return Send(videoType,
+ frameType,
+ payloadType,
+ captureTimeStamp,
+ capture_time_ms,
+ payloadData,
+ payloadSize,
+ fragmentation,
+ rtpTypeHdr)
+ ? 0
+ : -1;
+}
+
+VideoCodecInformation* RTPSenderVideo::CodecInformationVideo() {
+ return _videoCodecInformation;
+}
+
+void RTPSenderVideo::SetMaxConfiguredBitrateVideo(const uint32_t maxBitrate) {
+ _maxBitrate = maxBitrate;
+}
+
+uint32_t RTPSenderVideo::MaxConfiguredBitrateVideo() const {
+ return _maxBitrate;
+}
+
+bool RTPSenderVideo::Send(const RtpVideoCodecTypes videoType,
const FrameType frameType,
const int8_t payloadType,
const uint32_t captureTimeStamp,
@@ -282,204 +322,52 @@
const uint8_t* payloadData,
const uint32_t payloadSize,
const RTPFragmentationHeader* fragmentation,
- VideoCodecInformation* codecInfo,
- const RTPVideoTypeHeader* rtpTypeHdr)
-{
- if( payloadSize == 0)
- {
- return -1;
- }
-
- if (frameType == kVideoFrameKey) {
- producer_fec_.SetFecParameters(&key_fec_params_,
- _numberFirstPartition);
- } else {
- producer_fec_.SetFecParameters(&delta_fec_params_,
- _numberFirstPartition);
- }
-
- // Default setting for number of first partition packets:
- // Will be extracted in SendVP8 for VP8 codec; other codecs use 0
- _numberFirstPartition = 0;
-
- int32_t retVal = -1;
- switch(videoType)
- {
- case kRtpVideoGeneric:
- retVal = SendGeneric(frameType, payloadType, captureTimeStamp,
- capture_time_ms, payloadData, payloadSize);
- break;
- case kRtpVideoVp8:
- retVal = SendVP8(frameType,
- payloadType,
- captureTimeStamp,
- capture_time_ms,
- payloadData,
- payloadSize,
- fragmentation,
- rtpTypeHdr);
- break;
- default:
- assert(false);
- break;
- }
- if(retVal <= 0)
- {
- return retVal;
- }
- return 0;
-}
-
-int32_t RTPSenderVideo::SendGeneric(const FrameType frame_type,
- const int8_t payload_type,
- const uint32_t capture_timestamp,
- int64_t capture_time_ms,
- const uint8_t* payload,
- uint32_t size) {
- assert(frame_type == kVideoFrameKey || frame_type == kVideoFrameDelta);
+ const RTPVideoTypeHeader* rtpTypeHdr) {
uint16_t rtp_header_length = _rtpSender.RTPHeaderLength();
- uint16_t max_length = _rtpSender.MaxPayloadLength() - FECPacketOverhead() -
- rtp_header_length - (1 /* generic header length */);
+ int32_t payload_bytes_to_send = payloadSize;
+ const uint8_t* data = payloadData;
+ size_t max_payload_length = _rtpSender.MaxDataPayloadLength();
- // Fragment packets more evenly by splitting the payload up evenly.
- uint32_t num_packets = (size + max_length - 1) / max_length;
- uint32_t payload_length = (size + num_packets - 1) / num_packets;
- assert(payload_length <= max_length);
+ scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
+ videoType, max_payload_length, rtpTypeHdr, frameType));
- // Fragment packet into packets of max MaxPayloadLength bytes payload.
- uint8_t buffer[IP_PACKET_SIZE];
+ // TODO(changbin): we currently don't support to configure the codec to
+ // output multiple partitions for VP8. Should remove below check after the
+ // issue is fixed.
+ const RTPFragmentationHeader* frag =
+ (videoType == kRtpVideoVp8) ? NULL : fragmentation;
- uint8_t generic_header = RtpFormatVideoGeneric::kFirstPacketBit;
- if (frame_type == kVideoFrameKey) {
- generic_header |= RtpFormatVideoGeneric::kKeyFrameBit;
- }
+ packetizer->SetPayloadData(data, payload_bytes_to_send, frag);
- while (size > 0) {
- if (size < payload_length) {
- payload_length = size;
- }
- size -= payload_length;
-
- // MarkerBit is 1 on final packet (bytes_to_send == 0)
- if (_rtpSender.BuildRTPheader(buffer, payload_type, size == 0,
- capture_timestamp,
- capture_time_ms) != rtp_header_length) {
- return -1;
+ bool last = false;
+ while (!last) {
+ uint8_t dataBuffer[IP_PACKET_SIZE] = {0};
+ size_t payload_bytes_in_packet = 0;
+ if (!packetizer->NextPacket(
+ &dataBuffer[rtp_header_length], &payload_bytes_in_packet, &last)) {
+ return false;
}
- uint8_t* out_ptr = &buffer[rtp_header_length];
-
- // Put generic header in packet
- *out_ptr++ = generic_header;
- // Remove first-packet bit, following packets are intermediate
- generic_header &= ~RtpFormatVideoGeneric::kFirstPacketBit;
-
- // Put payload in packet
- memcpy(out_ptr, payload, payload_length);
- payload += payload_length;
-
- if (SendVideoPacket(buffer, payload_length + 1, rtp_header_length,
- capture_timestamp, capture_time_ms,
- kAllowRetransmission, true)) {
- return -1;
+ // Write RTP header.
+ // Set marker bit true if this is the last packet in frame.
+ _rtpSender.BuildRTPheader(
+ dataBuffer, payloadType, last, captureTimeStamp, capture_time_ms);
+ if (SendVideoPacket(dataBuffer,
+ payload_bytes_in_packet,
+ rtp_header_length,
+ captureTimeStamp,
+ capture_time_ms,
+ packetizer->GetStorageType(_retransmissionSettings),
+ packetizer->GetProtectionType() == kProtectedPacket)) {
+ LOG(LS_WARNING) << packetizer->ToString()
+ << " failed to send packet number "
+ << _rtpSender.SequenceNumber();
}
}
- return 0;
-}
-VideoCodecInformation*
-RTPSenderVideo::CodecInformationVideo()
-{
- return _videoCodecInformation;
-}
-
-void
-RTPSenderVideo::SetMaxConfiguredBitrateVideo(const uint32_t maxBitrate)
-{
- _maxBitrate = maxBitrate;
-}
-
-uint32_t
-RTPSenderVideo::MaxConfiguredBitrateVideo() const
-{
- return _maxBitrate;
-}
-
-int32_t
-RTPSenderVideo::SendVP8(const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- int64_t capture_time_ms,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- const RTPFragmentationHeader* fragmentation,
- const RTPVideoTypeHeader* rtpTypeHdr)
-{
- const uint16_t rtpHeaderLength = _rtpSender.RTPHeaderLength();
-
- int32_t payloadBytesToSend = payloadSize;
- const uint8_t* data = payloadData;
-
- uint16_t maxPayloadLengthVP8 = _rtpSender.MaxDataPayloadLength();
-
- assert(rtpTypeHdr);
- // Initialize disregarding partition boundaries: this will use kEqualSize
- // packetization mode, which produces ~equal size packets for each frame.
- RtpFormatVp8 packetizer(data, payloadBytesToSend, rtpTypeHdr->VP8,
- maxPayloadLengthVP8);
-
- StorageType storage = kAllowRetransmission;
- if (rtpTypeHdr->VP8.temporalIdx == 0 &&
- !(_retransmissionSettings & kRetransmitBaseLayer)) {
- storage = kDontRetransmit;
- }
- if (rtpTypeHdr->VP8.temporalIdx > 0 &&
- !(_retransmissionSettings & kRetransmitHigherLayers)) {
- storage = kDontRetransmit;
- }
-
- bool last = false;
- _numberFirstPartition = 0;
- // |rtpTypeHdr->VP8.temporalIdx| is zero for base layers, or -1 if the field
- // isn't used. We currently only protect base layers.
- bool protect = (rtpTypeHdr->VP8.temporalIdx < 1);
- while (!last)
- {
- // Write VP8 Payload Descriptor and VP8 payload.
- uint8_t dataBuffer[IP_PACKET_SIZE] = {0};
- int payloadBytesInPacket = 0;
- int packetStartPartition =
- packetizer.NextPacket(&dataBuffer[rtpHeaderLength],
- &payloadBytesInPacket, &last);
- // TODO(holmer): Temporarily disable first partition packet counting
- // to avoid a bug in ProducerFec which doesn't properly handle
- // important packets.
- // if (packetStartPartition == 0)
- // {
- // ++_numberFirstPartition;
- // }
- // else
- if (packetStartPartition < 0)
- {
- return -1;
- }
-
- // Write RTP header.
- // Set marker bit true if this is the last packet in frame.
- _rtpSender.BuildRTPheader(dataBuffer, payloadType, last,
- captureTimeStamp, capture_time_ms);
- if (-1 == SendVideoPacket(dataBuffer, payloadBytesInPacket,
- rtpHeaderLength, captureTimeStamp,
- capture_time_ms, storage, protect))
- {
- LOG(LS_WARNING)
- << "RTPSenderVideo::SendVP8 failed to send packet number "
- << _rtpSender.SequenceNumber();
- }
- }
- TRACE_EVENT_ASYNC_END1("webrtc", "Video", capture_time_ms,
- "timestamp", _rtpSender.Timestamp());
- return 0;
+ TRACE_EVENT_ASYNC_END1(
+ "webrtc", "Video", capture_time_ms, "timestamp", _rtpSender.Timestamp());
+ return true;
}
void RTPSenderVideo::ProcessBitrate() {
diff --git a/modules/rtp_rtcp/source/rtp_sender_video.h b/modules/rtp_rtcp/source/rtp_sender_video.h
index daa730e..250e36b 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video.h
+++ b/modules/rtp_rtcp/source/rtp_sender_video.h
@@ -28,114 +28,106 @@
class CriticalSectionWrapper;
struct RtpPacket;
-class RTPSenderVideo
-{
-public:
- RTPSenderVideo(Clock* clock,
- RTPSenderInterface* rtpSender);
- virtual ~RTPSenderVideo();
+class RTPSenderVideo {
+ public:
+ RTPSenderVideo(Clock* clock, RTPSenderInterface* rtpSender);
+ virtual ~RTPSenderVideo();
- virtual RtpVideoCodecTypes VideoCodecType() const;
+ virtual RtpVideoCodecTypes VideoCodecType() const;
- uint16_t FECPacketOverhead() const;
+ uint16_t FECPacketOverhead() const;
- int32_t RegisterVideoPayload(
- const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- const int8_t payloadType,
- const uint32_t maxBitRate,
- ModuleRTPUtility::Payload*& payload);
+ int32_t RegisterVideoPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE],
+ const int8_t payloadType,
+ const uint32_t maxBitRate,
+ RtpUtility::Payload*& payload);
- int32_t SendVideo(const RtpVideoCodecTypes videoType,
- const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
- int64_t capture_time_ms,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- const RTPFragmentationHeader* fragmentation,
- VideoCodecInformation* codecInfo,
- const RTPVideoTypeHeader* rtpTypeHdr);
-
- int32_t SendRTPIntraRequest();
-
- void SetVideoCodecType(RtpVideoCodecTypes type);
-
- VideoCodecInformation* CodecInformationVideo();
-
- void SetMaxConfiguredBitrateVideo(const uint32_t maxBitrate);
-
- uint32_t MaxConfiguredBitrateVideo() const;
-
- // FEC
- int32_t SetGenericFECStatus(const bool enable,
- const uint8_t payloadTypeRED,
- const uint8_t payloadTypeFEC);
-
- int32_t GenericFECStatus(bool& enable,
- uint8_t& payloadTypeRED,
- uint8_t& payloadTypeFEC) const;
-
- int32_t SetFecParameters(const FecProtectionParams* delta_params,
- const FecProtectionParams* key_params);
-
- void ProcessBitrate();
-
- uint32_t VideoBitrateSent() const;
- uint32_t FecOverheadRate() const;
-
- int SelectiveRetransmissions() const;
- int SetSelectiveRetransmissions(uint8_t settings);
-
-protected:
- virtual int32_t SendVideoPacket(uint8_t* dataBuffer,
- const uint16_t payloadLength,
- const uint16_t rtpHeaderLength,
- const uint32_t capture_timestamp,
- int64_t capture_time_ms,
- StorageType storage,
- bool protect);
-
-private:
- int32_t SendGeneric(const FrameType frame_type,
- const int8_t payload_type,
- const uint32_t capture_timestamp,
- int64_t capture_time_ms,
- const uint8_t* payload, const uint32_t size);
-
- int32_t SendVP8(const FrameType frameType,
+ int32_t SendVideo(const RtpVideoCodecTypes videoType,
+ const FrameType frameType,
const int8_t payloadType,
const uint32_t captureTimeStamp,
int64_t capture_time_ms,
const uint8_t* payloadData,
const uint32_t payloadSize,
const RTPFragmentationHeader* fragmentation,
+ VideoCodecInformation* codecInfo,
const RTPVideoTypeHeader* rtpTypeHdr);
-private:
- RTPSenderInterface& _rtpSender;
+ int32_t SendRTPIntraRequest();
- CriticalSectionWrapper* _sendVideoCritsect;
- RtpVideoCodecTypes _videoType;
- VideoCodecInformation* _videoCodecInformation;
- uint32_t _maxBitrate;
- int32_t _retransmissionSettings;
+ void SetVideoCodecType(RtpVideoCodecTypes type);
- // FEC
- ForwardErrorCorrection _fec;
- bool _fecEnabled;
- int8_t _payloadTypeRED;
- int8_t _payloadTypeFEC;
- unsigned int _numberFirstPartition;
- FecProtectionParams delta_fec_params_;
- FecProtectionParams key_fec_params_;
- ProducerFec producer_fec_;
+ VideoCodecInformation* CodecInformationVideo();
- // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets
- // and any padding overhead.
- Bitrate _fecOverheadRate;
- // Bitrate used for video payload and RTP headers
- Bitrate _videoBitrate;
+ void SetMaxConfiguredBitrateVideo(const uint32_t maxBitrate);
+
+ uint32_t MaxConfiguredBitrateVideo() const;
+
+ // FEC
+ int32_t SetGenericFECStatus(const bool enable,
+ const uint8_t payloadTypeRED,
+ const uint8_t payloadTypeFEC);
+
+ int32_t GenericFECStatus(bool& enable,
+ uint8_t& payloadTypeRED,
+ uint8_t& payloadTypeFEC) const;
+
+ int32_t SetFecParameters(const FecProtectionParams* delta_params,
+ const FecProtectionParams* key_params);
+
+ void ProcessBitrate();
+
+ uint32_t VideoBitrateSent() const;
+ uint32_t FecOverheadRate() const;
+
+ int SelectiveRetransmissions() const;
+ int SetSelectiveRetransmissions(uint8_t settings);
+
+ protected:
+ virtual int32_t SendVideoPacket(uint8_t* dataBuffer,
+ const uint16_t payloadLength,
+ const uint16_t rtpHeaderLength,
+ const uint32_t capture_timestamp,
+ int64_t capture_time_ms,
+ StorageType storage,
+ bool protect);
+
+ private:
+ bool Send(const RtpVideoCodecTypes videoType,
+ const FrameType frameType,
+ const int8_t payloadType,
+ const uint32_t captureTimeStamp,
+ int64_t capture_time_ms,
+ const uint8_t* payloadData,
+ const uint32_t payloadSize,
+ const RTPFragmentationHeader* fragmentation,
+ const RTPVideoTypeHeader* rtpTypeHdr);
+
+ private:
+ RTPSenderInterface& _rtpSender;
+
+ CriticalSectionWrapper* _sendVideoCritsect;
+ RtpVideoCodecTypes _videoType;
+ VideoCodecInformation* _videoCodecInformation;
+ uint32_t _maxBitrate;
+ int32_t _retransmissionSettings;
+
+ // FEC
+ ForwardErrorCorrection _fec;
+ bool _fecEnabled;
+ int8_t _payloadTypeRED;
+ int8_t _payloadTypeFEC;
+ unsigned int _numberFirstPartition;
+ FecProtectionParams delta_fec_params_;
+ FecProtectionParams key_fec_params_;
+ ProducerFec producer_fec_;
+
+ // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets
+ // and any padding overhead.
+ Bitrate _fecOverheadRate;
+ // Bitrate used for video payload and RTP headers
+ Bitrate _videoBitrate;
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
+#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
diff --git a/modules/rtp_rtcp/source/rtp_utility.cc b/modules/rtp_rtcp/source/rtp_utility.cc
index c1f3c64..441a9c5 100644
--- a/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/modules/rtp_rtcp/source/rtp_utility.cc
@@ -66,7 +66,7 @@
return &null_receive_statistics;
}
-namespace ModuleRTPUtility {
+namespace RtpUtility {
enum {
kRtcpExpectedVersion = 2,
@@ -188,43 +188,16 @@
return 1 << exp;
}
-void RTPPayload::SetType(RtpVideoCodecTypes videoType) {
- type = videoType;
-
- switch (type) {
- case kRtpVideoGeneric:
- break;
- case kRtpVideoVp8: {
- info.VP8.nonReferenceFrame = false;
- info.VP8.beginningOfPartition = false;
- info.VP8.partitionID = 0;
- info.VP8.hasPictureID = false;
- info.VP8.hasTl0PicIdx = false;
- info.VP8.hasTID = false;
- info.VP8.hasKeyIdx = false;
- info.VP8.pictureID = -1;
- info.VP8.tl0PicIdx = -1;
- info.VP8.tID = -1;
- info.VP8.layerSync = false;
- info.VP8.frameWidth = 0;
- info.VP8.frameHeight = 0;
- break;
- }
- default:
- break;
- }
+RtpHeaderParser::RtpHeaderParser(const uint8_t* rtpData,
+ const size_t rtpDataLength)
+ : _ptrRTPDataBegin(rtpData),
+ _ptrRTPDataEnd(rtpData ? (rtpData + rtpDataLength) : NULL) {
}
-RTPHeaderParser::RTPHeaderParser(const uint8_t* rtpData,
- const uint32_t rtpDataLength)
- : _ptrRTPDataBegin(rtpData),
- _ptrRTPDataEnd(rtpData ? (rtpData + rtpDataLength) : NULL) {
+RtpHeaderParser::~RtpHeaderParser() {
}
-RTPHeaderParser::~RTPHeaderParser() {
-}
-
-bool RTPHeaderParser::RTCP() const {
+bool RtpHeaderParser::RTCP() const {
// 72 to 76 is reserved for RTP
// 77 to 79 is not reserver but they are not assigned we will block them
// for RTCP 200 SR == marker bit + 72
@@ -299,7 +272,7 @@
return RTCP;
}
-bool RTPHeaderParser::ParseRtcp(RTPHeader* header) const {
+bool RtpHeaderParser::ParseRtcp(RTPHeader* header) const {
assert(header != NULL);
const ptrdiff_t length = _ptrRTPDataEnd - _ptrRTPDataBegin;
@@ -328,7 +301,7 @@
return true;
}
-bool RTPHeaderParser::Parse(RTPHeader& header,
+bool RtpHeaderParser::Parse(RTPHeader& header,
RtpHeaderExtensionMap* ptrExtensionMap) const {
const ptrdiff_t length = _ptrRTPDataEnd - _ptrRTPDataBegin;
if (length < kRtpMinParseLength) {
@@ -441,7 +414,7 @@
return true;
}
-void RTPHeaderParser::ParseOneByteExtensionHeader(
+void RtpHeaderParser::ParseOneByteExtensionHeader(
RTPHeader& header,
const RtpHeaderExtensionMap* ptrExtensionMap,
const uint8_t* ptrRTPDataExtensionEnd,
@@ -552,10 +525,9 @@
}
}
-uint8_t RTPHeaderParser::ParsePaddingBytes(
- const uint8_t* ptrRTPDataExtensionEnd,
- const uint8_t* ptr) const {
-
+uint8_t RtpHeaderParser::ParsePaddingBytes(
+ const uint8_t* ptrRTPDataExtensionEnd,
+ const uint8_t* ptr) const {
uint8_t num_zero_bytes = 0;
while (ptrRTPDataExtensionEnd - ptr > 0) {
if (*ptr != 0) {
@@ -566,208 +538,6 @@
}
return num_zero_bytes;
}
-
-RTPPayloadParser::RTPPayloadParser(const RtpVideoCodecTypes videoType,
- const uint8_t* payloadData,
- uint16_t payloadDataLength)
- : _dataPtr(payloadData),
- _dataLength(payloadDataLength),
- _videoType(videoType) {}
-
-RTPPayloadParser::~RTPPayloadParser() {
-}
-
-bool RTPPayloadParser::Parse(RTPPayload& parsedPacket) const {
- parsedPacket.SetType(_videoType);
-
- switch (_videoType) {
- case kRtpVideoGeneric:
- return ParseGeneric(parsedPacket);
- case kRtpVideoVp8:
- return ParseVP8(parsedPacket);
- default:
- return false;
- }
-}
-
-bool RTPPayloadParser::ParseGeneric(RTPPayload& /*parsedPacket*/) const {
- return false;
-}
-
-//
-// VP8 format:
-//
-// Payload descriptor
-// 0 1 2 3 4 5 6 7
-// +-+-+-+-+-+-+-+-+
-// |X|R|N|S|PartID | (REQUIRED)
-// +-+-+-+-+-+-+-+-+
-// X: |I|L|T|K| RSV | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-// I: | PictureID | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-// L: | TL0PICIDX | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-// T/K: |TID:Y| KEYIDX | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-//
-// Payload header (considered part of the actual payload, sent to decoder)
-// 0 1 2 3 4 5 6 7
-// +-+-+-+-+-+-+-+-+
-// |Size0|H| VER |P|
-// +-+-+-+-+-+-+-+-+
-// | ... |
-// + +
-
-bool RTPPayloadParser::ParseVP8(RTPPayload& parsedPacket) const {
- RTPPayloadVP8* vp8 = &parsedPacket.info.VP8;
- const uint8_t* dataPtr = _dataPtr;
- int dataLength = _dataLength;
-
- // Parse mandatory first byte of payload descriptor
- bool extension = (*dataPtr & 0x80) ? true : false; // X bit
- vp8->nonReferenceFrame = (*dataPtr & 0x20) ? true : false; // N bit
- vp8->beginningOfPartition = (*dataPtr & 0x10) ? true : false; // S bit
- vp8->partitionID = (*dataPtr & 0x0F); // PartID field
-
- if (vp8->partitionID > 8) {
- // Weak check for corrupt data: PartID MUST NOT be larger than 8.
- return false;
- }
-
- // Advance dataPtr and decrease remaining payload size
- dataPtr++;
- dataLength--;
-
- if (extension) {
- const int parsedBytes = ParseVP8Extension(vp8, dataPtr, dataLength);
- if (parsedBytes < 0) return false;
- dataPtr += parsedBytes;
- dataLength -= parsedBytes;
- }
-
- if (dataLength <= 0) {
- LOG(LS_ERROR) << "Error parsing VP8 payload descriptor!";
- return false;
- }
-
- // Read P bit from payload header (only at beginning of first partition)
- if (dataLength > 0 && vp8->beginningOfPartition && vp8->partitionID == 0) {
- parsedPacket.frameType = (*dataPtr & 0x01) ? kPFrame : kIFrame;
- } else {
- parsedPacket.frameType = kPFrame;
- }
- if (0 != ParseVP8FrameSize(parsedPacket, dataPtr, dataLength)) {
- return false;
- }
- parsedPacket.info.VP8.data = dataPtr;
- parsedPacket.info.VP8.dataLength = dataLength;
- return true;
-}
-
-int RTPPayloadParser::ParseVP8FrameSize(RTPPayload& parsedPacket,
- const uint8_t* dataPtr,
- int dataLength) const {
- if (parsedPacket.frameType != kIFrame) {
- // Included in payload header for I-frames.
- return 0;
- }
- if (dataLength < 10) {
- // For an I-frame we should always have the uncompressed VP8 header
- // in the beginning of the partition.
- return -1;
- }
- RTPPayloadVP8* vp8 = &parsedPacket.info.VP8;
- vp8->frameWidth = ((dataPtr[7] << 8) + dataPtr[6]) & 0x3FFF;
- vp8->frameHeight = ((dataPtr[9] << 8) + dataPtr[8]) & 0x3FFF;
- return 0;
-}
-
-int RTPPayloadParser::ParseVP8Extension(RTPPayloadVP8* vp8,
- const uint8_t* dataPtr,
- int dataLength) const {
- int parsedBytes = 0;
- if (dataLength <= 0) return -1;
- // Optional X field is present
- vp8->hasPictureID = (*dataPtr & 0x80) ? true : false; // I bit
- vp8->hasTl0PicIdx = (*dataPtr & 0x40) ? true : false; // L bit
- vp8->hasTID = (*dataPtr & 0x20) ? true : false; // T bit
- vp8->hasKeyIdx = (*dataPtr & 0x10) ? true : false; // K bit
-
- // Advance dataPtr and decrease remaining payload size
- dataPtr++;
- parsedBytes++;
- dataLength--;
-
- if (vp8->hasPictureID) {
- if (ParseVP8PictureID(vp8, &dataPtr, &dataLength, &parsedBytes) != 0) {
- return -1;
- }
- }
-
- if (vp8->hasTl0PicIdx) {
- if (ParseVP8Tl0PicIdx(vp8, &dataPtr, &dataLength, &parsedBytes) != 0) {
- return -1;
- }
- }
-
- if (vp8->hasTID || vp8->hasKeyIdx) {
- if (ParseVP8TIDAndKeyIdx(vp8, &dataPtr, &dataLength, &parsedBytes) != 0) {
- return -1;
- }
- }
- return parsedBytes;
-}
-
-int RTPPayloadParser::ParseVP8PictureID(RTPPayloadVP8* vp8,
- const uint8_t** dataPtr,
- int* dataLength,
- int* parsedBytes) const {
- if (*dataLength <= 0) return -1;
- vp8->pictureID = (**dataPtr & 0x7F);
- if (**dataPtr & 0x80) {
- (*dataPtr)++;
- (*parsedBytes)++;
- if (--(*dataLength) <= 0) return -1;
- // PictureID is 15 bits
- vp8->pictureID = (vp8->pictureID << 8) +** dataPtr;
- }
- (*dataPtr)++;
- (*parsedBytes)++;
- (*dataLength)--;
- return 0;
-}
-
-int RTPPayloadParser::ParseVP8Tl0PicIdx(RTPPayloadVP8* vp8,
- const uint8_t** dataPtr,
- int* dataLength,
- int* parsedBytes) const {
- if (*dataLength <= 0) return -1;
- vp8->tl0PicIdx = **dataPtr;
- (*dataPtr)++;
- (*parsedBytes)++;
- (*dataLength)--;
- return 0;
-}
-
-int RTPPayloadParser::ParseVP8TIDAndKeyIdx(RTPPayloadVP8* vp8,
- const uint8_t** dataPtr,
- int* dataLength,
- int* parsedBytes) const {
- if (*dataLength <= 0) return -1;
- if (vp8->hasTID) {
- vp8->tID = ((**dataPtr >> 6) & 0x03);
- vp8->layerSync = (**dataPtr & 0x20) ? true : false; // Y bit
- }
- if (vp8->hasKeyIdx) {
- vp8->keyIdx = (**dataPtr & 0x1F);
- }
- (*dataPtr)++;
- (*parsedBytes)++;
- (*dataLength)--;
- return 0;
-}
-
-} // namespace ModuleRTPUtility
+} // namespace RtpUtility
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_utility.h b/modules/rtp_rtcp/source/rtp_utility.h
index 732301f..3a3ad5e 100644
--- a/modules/rtp_rtcp/source/rtp_utility.h
+++ b/modules/rtp_rtcp/source/rtp_utility.h
@@ -28,8 +28,7 @@
RtpAudioFeedback* NullObjectRtpAudioFeedback();
ReceiveStatistics* NullObjectReceiveStatistics();
-namespace ModuleRTPUtility
-{
+namespace RtpUtility {
// January 1970, in NTP seconds.
const uint32_t NTP_JAN_1970 = 2208988800UL;
@@ -92,12 +91,10 @@
*/
uint32_t BufferToUWord32(const uint8_t* dataBuffer);
- class RTPHeaderParser
- {
+ class RtpHeaderParser {
public:
- RTPHeaderParser(const uint8_t* rtpData,
- const uint32_t rtpDataLength);
- ~RTPHeaderParser();
+ RtpHeaderParser(const uint8_t* rtpData, size_t rtpDataLength);
+ ~RtpHeaderParser();
bool RTCP() const;
bool ParseRtcp(RTPHeader* header) const;
@@ -118,97 +115,7 @@
const uint8_t* const _ptrRTPDataBegin;
const uint8_t* const _ptrRTPDataEnd;
};
-
- enum FrameTypes
- {
- kIFrame, // key frame
- kPFrame // Delta frame
- };
-
- struct RTPPayloadVP8
- {
- bool nonReferenceFrame;
- bool beginningOfPartition;
- int partitionID;
- bool hasPictureID;
- bool hasTl0PicIdx;
- bool hasTID;
- bool hasKeyIdx;
- int pictureID;
- int tl0PicIdx;
- int tID;
- bool layerSync;
- int keyIdx;
- int frameWidth;
- int frameHeight;
-
- const uint8_t* data;
- uint16_t dataLength;
- };
-
- union RTPPayloadUnion
- {
- RTPPayloadVP8 VP8;
- };
-
- struct RTPPayload
- {
- void SetType(RtpVideoCodecTypes videoType);
-
- RtpVideoCodecTypes type;
- FrameTypes frameType;
- RTPPayloadUnion info;
- };
-
- // RTP payload parser
- class RTPPayloadParser
- {
- public:
- RTPPayloadParser(const RtpVideoCodecTypes payloadType,
- const uint8_t* payloadData,
- // Length w/o padding.
- const uint16_t payloadDataLength);
-
- ~RTPPayloadParser();
-
- bool Parse(RTPPayload& parsedPacket) const;
-
- private:
- bool ParseGeneric(RTPPayload& parsedPacket) const;
-
- bool ParseVP8(RTPPayload& parsedPacket) const;
-
- int ParseVP8Extension(RTPPayloadVP8 *vp8,
- const uint8_t *dataPtr,
- int dataLength) const;
-
- int ParseVP8PictureID(RTPPayloadVP8 *vp8,
- const uint8_t **dataPtr,
- int *dataLength,
- int *parsedBytes) const;
-
- int ParseVP8Tl0PicIdx(RTPPayloadVP8 *vp8,
- const uint8_t **dataPtr,
- int *dataLength,
- int *parsedBytes) const;
-
- int ParseVP8TIDAndKeyIdx(RTPPayloadVP8 *vp8,
- const uint8_t **dataPtr,
- int *dataLength,
- int *parsedBytes) const;
-
- int ParseVP8FrameSize(RTPPayload& parsedPacket,
- const uint8_t *dataPtr,
- int dataLength) const;
-
- private:
- const uint8_t* _dataPtr;
- const uint16_t _dataLength;
- const RtpVideoCodecTypes _videoType;
- };
-
-} // namespace ModuleRTPUtility
-
+} // namespace RtpUtility
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_
diff --git a/modules/rtp_rtcp/source/rtp_utility_unittest.cc b/modules/rtp_rtcp/source/rtp_utility_unittest.cc
deleted file mode 100644
index d33eaf4..0000000
--- a/modules/rtp_rtcp/source/rtp_utility_unittest.cc
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-
-/*
- * This file conatins unit tests for the ModuleRTPUtility.
- */
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
-#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/typedefs.h"
-
-namespace webrtc {
-
-using ModuleRTPUtility::RTPPayloadParser;
-using ModuleRTPUtility::RTPPayload;
-using ModuleRTPUtility::RTPPayloadVP8;
-
-// Payload descriptor
-// 0 1 2 3 4 5 6 7
-// +-+-+-+-+-+-+-+-+
-// |X|R|N|S|PartID | (REQUIRED)
-// +-+-+-+-+-+-+-+-+
-// X: |I|L|T|K| RSV | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-// I: | PictureID | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-// L: | TL0PICIDX | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-// T/K: |TID:Y| KEYIDX | (OPTIONAL)
-// +-+-+-+-+-+-+-+-+
-//
-// Payload header
-// 0 1 2 3 4 5 6 7
-// +-+-+-+-+-+-+-+-+
-// |Size0|H| VER |P|
-// +-+-+-+-+-+-+-+-+
-// | Size1 |
-// +-+-+-+-+-+-+-+-+
-// | Size2 |
-// +-+-+-+-+-+-+-+-+
-// | Bytes 4..N of |
-// | VP8 payload |
-// : :
-// +-+-+-+-+-+-+-+-+
-// | OPTIONAL RTP |
-// | padding |
-// : :
-// +-+-+-+-+-+-+-+-+
-
-void VerifyBasicHeader(const RTPPayloadVP8 &header,
- bool N, bool S, int PartID) {
- EXPECT_EQ(N, header.nonReferenceFrame);
- EXPECT_EQ(S, header.beginningOfPartition);
- EXPECT_EQ(PartID, header.partitionID);
-}
-
-void VerifyExtensions(const RTPPayloadVP8 &header,
- bool I, bool L, bool T, bool K) {
- EXPECT_EQ(I, header.hasPictureID);
- EXPECT_EQ(L, header.hasTl0PicIdx);
- EXPECT_EQ(T, header.hasTID);
- EXPECT_EQ(K, header.hasKeyIdx);
-}
-
-TEST(ParseVP8Test, BasicHeader) {
- uint8_t payload[4] = {0};
- payload[0] = 0x14; // Binary 0001 0100; S = 1, PartID = 4.
- payload[1] = 0x01; // P frame.
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 4);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kPFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8, 0 /*N*/, 1 /*S*/, 4 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 0 /*I*/, 0 /*L*/, 0 /*T*/, 0 /*K*/);
-
- EXPECT_EQ(payload + 1, parsedPacket.info.VP8.data);
- EXPECT_EQ(4 - 1, parsedPacket.info.VP8.dataLength);
-}
-
-TEST(ParseVP8Test, PictureID) {
- uint8_t payload[10] = {0};
- payload[0] = 0xA0;
- payload[1] = 0x80;
- payload[2] = 17;
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 10);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kPFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8, 1 /*N*/, 0 /*S*/, 0 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 1 /*I*/, 0 /*L*/, 0 /*T*/, 0 /*K*/);
-
- EXPECT_EQ(17, parsedPacket.info.VP8.pictureID);
-
- EXPECT_EQ(payload + 3, parsedPacket.info.VP8.data);
- EXPECT_EQ(10 - 3, parsedPacket.info.VP8.dataLength);
-
-
- // Re-use payload, but change to long PictureID.
- payload[2] = 0x80 | 17;
- payload[3] = 17;
- RTPPayloadParser rtpPayloadParser2(kRtpVideoVp8, payload, 10);
-
- ASSERT_TRUE(rtpPayloadParser2.Parse(parsedPacket));
-
- VerifyBasicHeader(parsedPacket.info.VP8, 1 /*N*/, 0 /*S*/, 0 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 1 /*I*/, 0 /*L*/, 0 /*T*/, 0 /*K*/);
-
- EXPECT_EQ((17<<8) + 17, parsedPacket.info.VP8.pictureID);
-
- EXPECT_EQ(payload + 4, parsedPacket.info.VP8.data);
- EXPECT_EQ(10 - 4, parsedPacket.info.VP8.dataLength);
-}
-
-TEST(ParseVP8Test, Tl0PicIdx) {
- uint8_t payload[13] = {0};
- payload[0] = 0x90;
- payload[1] = 0x40;
- payload[2] = 17;
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 13);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kIFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8, 0 /*N*/, 1 /*S*/, 0 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 0 /*I*/, 1 /*L*/, 0 /*T*/, 0 /*K*/);
-
- EXPECT_EQ(17, parsedPacket.info.VP8.tl0PicIdx);
-
- EXPECT_EQ(payload + 3, parsedPacket.info.VP8.data);
- EXPECT_EQ(13 - 3, parsedPacket.info.VP8.dataLength);
-}
-
-TEST(ParseVP8Test, TIDAndLayerSync) {
- uint8_t payload[10] = {0};
- payload[0] = 0x88;
- payload[1] = 0x20;
- payload[2] = 0x80; // TID(2) + LayerSync(false)
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 10);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kPFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8, 0 /*N*/, 0 /*S*/, 8 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 0 /*I*/, 0 /*L*/, 1 /*T*/, 0 /*K*/);
-
- EXPECT_EQ(2, parsedPacket.info.VP8.tID);
- EXPECT_FALSE(parsedPacket.info.VP8.layerSync);
-
- EXPECT_EQ(payload + 3, parsedPacket.info.VP8.data);
- EXPECT_EQ(10 - 3, parsedPacket.info.VP8.dataLength);
-}
-
-TEST(ParseVP8Test, KeyIdx) {
- uint8_t payload[10] = {0};
- payload[0] = 0x88;
- payload[1] = 0x10; // K = 1.
- payload[2] = 0x11; // KEYIDX = 17 decimal.
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 10);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kPFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8, 0 /*N*/, 0 /*S*/, 8 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 0 /*I*/, 0 /*L*/, 0 /*T*/, 1 /*K*/);
-
- EXPECT_EQ(17, parsedPacket.info.VP8.keyIdx);
-
- EXPECT_EQ(payload + 3, parsedPacket.info.VP8.data);
- EXPECT_EQ(10 - 3, parsedPacket.info.VP8.dataLength);
-}
-
-TEST(ParseVP8Test, MultipleExtensions) {
- uint8_t payload[10] = {0};
- payload[0] = 0x88;
- payload[1] = 0x80 | 0x40 | 0x20 | 0x10;
- payload[2] = 0x80 | 17; // PictureID, high 7 bits.
- payload[3] = 17; // PictureID, low 8 bits.
- payload[4] = 42; // Tl0PicIdx.
- payload[5] = 0x40 | 0x20 | 0x11; // TID(1) + LayerSync(true) + KEYIDX(17).
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 10);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kPFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8, 0 /*N*/, 0 /*S*/, 8 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8, 1 /*I*/, 1 /*L*/, 1 /*T*/, 1 /*K*/);
-
- EXPECT_EQ((17<<8) + 17, parsedPacket.info.VP8.pictureID);
- EXPECT_EQ(42, parsedPacket.info.VP8.tl0PicIdx);
- EXPECT_EQ(1, parsedPacket.info.VP8.tID);
- EXPECT_EQ(17, parsedPacket.info.VP8.keyIdx);
-
- EXPECT_EQ(payload + 6, parsedPacket.info.VP8.data);
- EXPECT_EQ(10 - 6, parsedPacket.info.VP8.dataLength);
-}
-
-TEST(ParseVP8Test, TooShortHeader) {
- uint8_t payload[4] = {0};
- payload[0] = 0x88;
- payload[1] = 0x80 | 0x40 | 0x20 | 0x10; // All extensions are enabled...
- payload[2] = 0x80 | 17; // ... but only 2 bytes PictureID is provided.
- payload[3] = 17; // PictureID, low 8 bits.
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, payload, 4);
-
- RTPPayload parsedPacket;
- EXPECT_FALSE(rtpPayloadParser.Parse(parsedPacket));
-}
-
-TEST(ParseVP8Test, TestWithPacketizer) {
- uint8_t payload[10] = {0};
- uint8_t packet[20] = {0};
- RTPVideoHeaderVP8 inputHeader;
- inputHeader.nonReference = true;
- inputHeader.pictureId = 300;
- inputHeader.temporalIdx = 1;
- inputHeader.layerSync = false;
- inputHeader.tl0PicIdx = kNoTl0PicIdx; // Disable.
- inputHeader.keyIdx = 31;
- RtpFormatVp8 packetizer(payload, 10, inputHeader, 20);
- bool last;
- int send_bytes;
- ASSERT_EQ(0, packetizer.NextPacket(packet, &send_bytes, &last));
- ASSERT_TRUE(last);
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, packet, send_bytes);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(ModuleRTPUtility::kIFrame, parsedPacket.frameType);
- EXPECT_EQ(kRtpVideoVp8, parsedPacket.type);
-
- VerifyBasicHeader(parsedPacket.info.VP8,
- inputHeader.nonReference /*N*/,
- 1 /*S*/,
- 0 /*PartID*/);
- VerifyExtensions(parsedPacket.info.VP8,
- 1 /*I*/,
- 0 /*L*/,
- 1 /*T*/,
- 1 /*K*/);
-
- EXPECT_EQ(inputHeader.pictureId, parsedPacket.info.VP8.pictureID);
- EXPECT_EQ(inputHeader.temporalIdx, parsedPacket.info.VP8.tID);
- EXPECT_EQ(inputHeader.layerSync, parsedPacket.info.VP8.layerSync);
- EXPECT_EQ(inputHeader.keyIdx, parsedPacket.info.VP8.keyIdx);
-
- EXPECT_EQ(packet + 5, parsedPacket.info.VP8.data);
- EXPECT_EQ(send_bytes - 5, parsedPacket.info.VP8.dataLength);
-}
-
-} // namespace
diff --git a/modules/rtp_rtcp/source/ssrc_database.cc b/modules/rtp_rtcp/source/ssrc_database.cc
index df09b01..4e23083 100644
--- a/modules/rtp_rtcp/source/ssrc_database.cc
+++ b/modules/rtp_rtcp/source/ssrc_database.cc
@@ -57,45 +57,12 @@
uint32_t ssrc = GenerateRandom();
-#ifndef WEBRTC_NO_STL
-
while(_ssrcMap.find(ssrc) != _ssrcMap.end())
{
ssrc = GenerateRandom();
}
_ssrcMap[ssrc] = 0;
-#else
- if(_sizeOfSSRC <= _numberOfSSRC)
- {
- // allocate more space
- const int newSize = _sizeOfSSRC + 10;
- uint32_t* tempSSRCVector = new uint32_t[newSize];
- memcpy(tempSSRCVector, _ssrcVector, _sizeOfSSRC*sizeof(uint32_t));
- delete [] _ssrcVector;
-
- _ssrcVector = tempSSRCVector;
- _sizeOfSSRC = newSize;
- }
-
- // check if in DB
- if(_ssrcVector)
- {
- for (int i=0; i<_numberOfSSRC; i++)
- {
- if (_ssrcVector[i] == ssrc)
- {
- // we have a match
- i = 0; // start over with a new ssrc
- ssrc = GenerateRandom();
- }
-
- }
- // add to database
- _ssrcVector[_numberOfSSRC] = ssrc;
- _numberOfSSRC++;
- }
-#endif
return ssrc;
}
@@ -103,39 +70,7 @@
SSRCDatabase::RegisterSSRC(const uint32_t ssrc)
{
CriticalSectionScoped lock(_critSect);
-
-#ifndef WEBRTC_NO_STL
-
_ssrcMap[ssrc] = 0;
-
-#else
- if(_sizeOfSSRC <= _numberOfSSRC)
- {
- // allocate more space
- const int newSize = _sizeOfSSRC + 10;
- uint32_t* tempSSRCVector = new uint32_t[newSize];
- memcpy(tempSSRCVector, _ssrcVector, _sizeOfSSRC*sizeof(uint32_t));
- delete [] _ssrcVector;
-
- _ssrcVector = tempSSRCVector;
- _sizeOfSSRC = newSize;
- }
- // check if in DB
- if(_ssrcVector)
- {
- for (int i=0; i<_numberOfSSRC; i++)
- {
- if (_ssrcVector[i] == ssrc)
- {
- // we have a match
- return -1;
- }
- }
- // add to database
- _ssrcVector[_numberOfSSRC] = ssrc;
- _numberOfSSRC++;
- }
-#endif
return 0;
}
@@ -143,26 +78,7 @@
SSRCDatabase::ReturnSSRC(const uint32_t ssrc)
{
CriticalSectionScoped lock(_critSect);
-
-#ifndef WEBRTC_NO_STL
_ssrcMap.erase(ssrc);
-
-#else
- if(_ssrcVector)
- {
- for (int i=0; i<_numberOfSSRC; i++)
- {
- if (_ssrcVector[i] == ssrc)
- {
- // we have a match
- // remove from database
- _ssrcVector[i] = _ssrcVector[_numberOfSSRC-1];
- _numberOfSSRC--;
- break;
- }
- }
- }
-#endif
return 0;
}
@@ -178,21 +94,12 @@
srand(tv.tv_usec);
#endif
-#ifdef WEBRTC_NO_STL
- _sizeOfSSRC = 10;
- _numberOfSSRC = 0;
- _ssrcVector = new uint32_t[10];
-#endif
_critSect = CriticalSectionWrapper::CreateCriticalSection();
}
SSRCDatabase::~SSRCDatabase()
{
-#ifdef WEBRTC_NO_STL
- delete [] _ssrcVector;
-#else
_ssrcMap.clear();
-#endif
delete _critSect;
}
diff --git a/modules/rtp_rtcp/source/ssrc_database.h b/modules/rtp_rtcp/source/ssrc_database.h
index e1f90e7..2d4932a 100644
--- a/modules/rtp_rtcp/source/ssrc_database.h
+++ b/modules/rtp_rtcp/source/ssrc_database.h
@@ -11,9 +11,7 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_SSRC_DATABASE_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_SSRC_DATABASE_H_
-#ifndef WEBRTC_NO_STL
#include <map>
-#endif
#include "webrtc/system_wrappers/interface/static_instance.h"
#include "webrtc/typedefs.h"
@@ -46,14 +44,7 @@
uint32_t GenerateRandom();
-#ifdef WEBRTC_NO_STL
- int _numberOfSSRC;
- int _sizeOfSSRC;
-
- uint32_t* _ssrcVector;
-#else
std::map<uint32_t, uint32_t> _ssrcMap;
-#endif
CriticalSectionWrapper* _critSect;
};
diff --git a/modules/rtp_rtcp/source/tmmbr_help.cc b/modules/rtp_rtcp/source/tmmbr_help.cc
index ecdf6b8..fb1ed62 100644
--- a/modules/rtp_rtcp/source/tmmbr_help.cc
+++ b/modules/rtp_rtcp/source/tmmbr_help.cc
@@ -266,180 +266,177 @@
numBoundingSet++;
}
}
- if (numBoundingSet != 1)
- {
- numBoundingSet = -1;
- }
- } else
- {
- // 1. Sort by increasing packetOH
- for (int i = candidateSet.sizeOfSet() - 1; i >= 0; i--)
- {
- for (int j = 1; j <= i; j++)
- {
- if (candidateSet.PacketOH(j-1) > candidateSet.PacketOH(j))
- {
- candidateSet.SwapEntries(j-1, j);
- }
- }
- }
- // 2. For tuples with same OH, keep the one w/ the lowest bitrate
- for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
- {
- if (candidateSet.Tmmbr(i) > 0)
- {
- // get min bitrate for packets w/ same OH
- uint32_t currentPacketOH = candidateSet.PacketOH(i);
- uint32_t currentMinTMMBR = candidateSet.Tmmbr(i);
- uint32_t currentMinIndexTMMBR = i;
- for (uint32_t j = i+1; j < candidateSet.sizeOfSet(); j++)
- {
- if(candidateSet.PacketOH(j) == currentPacketOH)
- {
- if(candidateSet.Tmmbr(j) < currentMinTMMBR)
- {
- currentMinTMMBR = candidateSet.Tmmbr(j);
- currentMinIndexTMMBR = j;
- }
- }
- }
- // keep lowest bitrate
- for (uint32_t j = 0; j < candidateSet.sizeOfSet(); j++)
- {
- if(candidateSet.PacketOH(j) == currentPacketOH
- && j != currentMinIndexTMMBR)
- {
- candidateSet.ClearEntry(j);
- }
- }
- }
- }
- // 3. Select and remove tuple w/ lowest tmmbr.
- // (If more than 1, choose the one w/ highest OH).
- uint32_t minTMMBR = 0;
- uint32_t minIndexTMMBR = 0;
- for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
- {
- if (candidateSet.Tmmbr(i) > 0)
- {
- minTMMBR = candidateSet.Tmmbr(i);
- minIndexTMMBR = i;
- break;
- }
- }
-
- for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
- {
- if (candidateSet.Tmmbr(i) > 0 && candidateSet.Tmmbr(i) <= minTMMBR)
- {
- // get min bitrate
- minTMMBR = candidateSet.Tmmbr(i);
- minIndexTMMBR = i;
- }
- }
- // first member of selected list
- _boundingSet.SetEntry(numBoundingSet,
- candidateSet.Tmmbr(minIndexTMMBR),
- candidateSet.PacketOH(minIndexTMMBR),
- candidateSet.Ssrc(minIndexTMMBR));
-
- // set intersection value
- _ptrIntersectionBoundingSet[numBoundingSet] = 0;
- // calculate its maximum packet rate (where its line crosses x-axis)
- _ptrMaxPRBoundingSet[numBoundingSet]
- = _boundingSet.Tmmbr(numBoundingSet) * 1000
- / float(8 * _boundingSet.PacketOH(numBoundingSet));
- numBoundingSet++;
- // remove from candidate list
- candidateSet.ClearEntry(minIndexTMMBR);
- numCandidates--;
-
- // 4. Discard from candidate list all tuple w/ lower OH
- // (next tuple must be steeper)
- for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
- {
- if(candidateSet.Tmmbr(i) > 0
- && candidateSet.PacketOH(i) < _boundingSet.PacketOH(0))
- {
- candidateSet.ClearEntry(i);
- numCandidates--;
- }
- }
-
- if (numCandidates == 0)
- {
- // Should be true already:_boundingSet.lengthOfSet = numBoundingSet;
- assert(_boundingSet.lengthOfSet() == numBoundingSet);
- return numBoundingSet;
- }
-
- bool getNewCandidate = true;
- int curCandidateTMMBR = 0;
- int curCandidateIndex = 0;
- int curCandidatePacketOH = 0;
- int curCandidateSSRC = 0;
- do
- {
- if (getNewCandidate)
- {
- // 5. Remove first remaining tuple from candidate list
- for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
- {
- if (candidateSet.Tmmbr(i) > 0)
- {
- curCandidateTMMBR = candidateSet.Tmmbr(i);
- curCandidatePacketOH = candidateSet.PacketOH(i);
- curCandidateSSRC = candidateSet.Ssrc(i);
- curCandidateIndex = i;
- candidateSet.ClearEntry(curCandidateIndex);
- break;
- }
- }
- }
-
- // 6. Calculate packet rate and intersection of the current
- // line with line of last tuple in selected list
- float packetRate
- = float(curCandidateTMMBR
- - _boundingSet.Tmmbr(numBoundingSet-1))*1000
- / (8*(curCandidatePacketOH
- - _boundingSet.PacketOH(numBoundingSet-1)));
-
- // 7. If the packet rate is equal or lower than intersection of
- // last tuple in selected list,
- // remove last tuple in selected list & go back to step 6
- if(packetRate <= _ptrIntersectionBoundingSet[numBoundingSet-1])
- {
- // remove last tuple and goto step 6
- numBoundingSet--;
- _boundingSet.ClearEntry(numBoundingSet);
- _ptrIntersectionBoundingSet[numBoundingSet] = 0;
- _ptrMaxPRBoundingSet[numBoundingSet] = 0;
- getNewCandidate = false;
- } else
- {
- // 8. If packet rate is lower than maximum packet rate of
- // last tuple in selected list, add current tuple to selected
- // list
- if (packetRate < _ptrMaxPRBoundingSet[numBoundingSet-1])
- {
- _boundingSet.SetEntry(numBoundingSet,
- curCandidateTMMBR,
- curCandidatePacketOH,
- curCandidateSSRC);
- _ptrIntersectionBoundingSet[numBoundingSet] = packetRate;
- _ptrMaxPRBoundingSet[numBoundingSet]
- = _boundingSet.Tmmbr(numBoundingSet)*1000
- / float(8*_boundingSet.PacketOH(numBoundingSet));
- numBoundingSet++;
- }
- numCandidates--;
- getNewCandidate = true;
- }
-
- // 9. Go back to step 5 if any tuple remains in candidate list
- } while (numCandidates > 0);
+ return (numBoundingSet == 1) ? 1 : -1;
}
+
+ // 1. Sort by increasing packetOH
+ for (int i = candidateSet.sizeOfSet() - 1; i >= 0; i--)
+ {
+ for (int j = 1; j <= i; j++)
+ {
+ if (candidateSet.PacketOH(j-1) > candidateSet.PacketOH(j))
+ {
+ candidateSet.SwapEntries(j-1, j);
+ }
+ }
+ }
+ // 2. For tuples with same OH, keep the one w/ the lowest bitrate
+ for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
+ {
+ if (candidateSet.Tmmbr(i) > 0)
+ {
+ // get min bitrate for packets w/ same OH
+ uint32_t currentPacketOH = candidateSet.PacketOH(i);
+ uint32_t currentMinTMMBR = candidateSet.Tmmbr(i);
+ uint32_t currentMinIndexTMMBR = i;
+ for (uint32_t j = i+1; j < candidateSet.sizeOfSet(); j++)
+ {
+ if(candidateSet.PacketOH(j) == currentPacketOH)
+ {
+ if(candidateSet.Tmmbr(j) < currentMinTMMBR)
+ {
+ currentMinTMMBR = candidateSet.Tmmbr(j);
+ currentMinIndexTMMBR = j;
+ }
+ }
+ }
+ // keep lowest bitrate
+ for (uint32_t j = 0; j < candidateSet.sizeOfSet(); j++)
+ {
+ if(candidateSet.PacketOH(j) == currentPacketOH
+ && j != currentMinIndexTMMBR)
+ {
+ candidateSet.ClearEntry(j);
+ }
+ }
+ }
+ }
+ // 3. Select and remove tuple w/ lowest tmmbr.
+ // (If more than 1, choose the one w/ highest OH).
+ uint32_t minTMMBR = 0;
+ uint32_t minIndexTMMBR = 0;
+ for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
+ {
+ if (candidateSet.Tmmbr(i) > 0)
+ {
+ minTMMBR = candidateSet.Tmmbr(i);
+ minIndexTMMBR = i;
+ break;
+ }
+ }
+
+ for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
+ {
+ if (candidateSet.Tmmbr(i) > 0 && candidateSet.Tmmbr(i) <= minTMMBR)
+ {
+ // get min bitrate
+ minTMMBR = candidateSet.Tmmbr(i);
+ minIndexTMMBR = i;
+ }
+ }
+ // first member of selected list
+ _boundingSet.SetEntry(numBoundingSet,
+ candidateSet.Tmmbr(minIndexTMMBR),
+ candidateSet.PacketOH(minIndexTMMBR),
+ candidateSet.Ssrc(minIndexTMMBR));
+
+ // set intersection value
+ _ptrIntersectionBoundingSet[numBoundingSet] = 0;
+ // calculate its maximum packet rate (where its line crosses x-axis)
+ _ptrMaxPRBoundingSet[numBoundingSet]
+ = _boundingSet.Tmmbr(numBoundingSet) * 1000
+ / float(8 * _boundingSet.PacketOH(numBoundingSet));
+ numBoundingSet++;
+ // remove from candidate list
+ candidateSet.ClearEntry(minIndexTMMBR);
+ numCandidates--;
+
+ // 4. Discard from candidate list all tuple w/ lower OH
+ // (next tuple must be steeper)
+ for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
+ {
+ if(candidateSet.Tmmbr(i) > 0
+ && candidateSet.PacketOH(i) < _boundingSet.PacketOH(0))
+ {
+ candidateSet.ClearEntry(i);
+ numCandidates--;
+ }
+ }
+
+ if (numCandidates == 0)
+ {
+ // Should be true already:_boundingSet.lengthOfSet = numBoundingSet;
+ assert(_boundingSet.lengthOfSet() == numBoundingSet);
+ return numBoundingSet;
+ }
+
+ bool getNewCandidate = true;
+ int curCandidateTMMBR = 0;
+ int curCandidateIndex = 0;
+ int curCandidatePacketOH = 0;
+ int curCandidateSSRC = 0;
+ do
+ {
+ if (getNewCandidate)
+ {
+ // 5. Remove first remaining tuple from candidate list
+ for (uint32_t i = 0; i < candidateSet.sizeOfSet(); i++)
+ {
+ if (candidateSet.Tmmbr(i) > 0)
+ {
+ curCandidateTMMBR = candidateSet.Tmmbr(i);
+ curCandidatePacketOH = candidateSet.PacketOH(i);
+ curCandidateSSRC = candidateSet.Ssrc(i);
+ curCandidateIndex = i;
+ candidateSet.ClearEntry(curCandidateIndex);
+ break;
+ }
+ }
+ }
+
+ // 6. Calculate packet rate and intersection of the current
+ // line with line of last tuple in selected list
+ float packetRate
+ = float(curCandidateTMMBR
+ - _boundingSet.Tmmbr(numBoundingSet-1))*1000
+ / (8*(curCandidatePacketOH
+ - _boundingSet.PacketOH(numBoundingSet-1)));
+
+ // 7. If the packet rate is equal or lower than intersection of
+ // last tuple in selected list,
+ // remove last tuple in selected list & go back to step 6
+ if(packetRate <= _ptrIntersectionBoundingSet[numBoundingSet-1])
+ {
+ // remove last tuple and goto step 6
+ numBoundingSet--;
+ _boundingSet.ClearEntry(numBoundingSet);
+ _ptrIntersectionBoundingSet[numBoundingSet] = 0;
+ _ptrMaxPRBoundingSet[numBoundingSet] = 0;
+ getNewCandidate = false;
+ } else
+ {
+ // 8. If packet rate is lower than maximum packet rate of
+ // last tuple in selected list, add current tuple to selected
+ // list
+ if (packetRate < _ptrMaxPRBoundingSet[numBoundingSet-1])
+ {
+ _boundingSet.SetEntry(numBoundingSet,
+ curCandidateTMMBR,
+ curCandidatePacketOH,
+ curCandidateSSRC);
+ _ptrIntersectionBoundingSet[numBoundingSet] = packetRate;
+ _ptrMaxPRBoundingSet[numBoundingSet]
+ = _boundingSet.Tmmbr(numBoundingSet)*1000
+ / float(8*_boundingSet.PacketOH(numBoundingSet));
+ numBoundingSet++;
+ }
+ numCandidates--;
+ getNewCandidate = true;
+ }
+
+ // 9. Go back to step 5 if any tuple remains in candidate list
+ } while (numCandidates > 0);
+
return numBoundingSet;
}
diff --git a/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc b/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc
index 7180975..9e706e7 100644
--- a/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc
+++ b/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc
@@ -33,14 +33,14 @@
protected:
// Inherited from UdpTransportData
virtual void IncomingRTPPacket(const int8_t* incomingRtpPacket,
- const int32_t rtpPacketLength,
- const int8_t* fromIP,
- const uint16_t fromPort);
+ const int32_t rtpPacketLength,
+ const int8_t* fromIP,
+ const uint16_t fromPort) OVERRIDE;
virtual void IncomingRTCPPacket(const int8_t* incomingRtcpPacket,
- const int32_t rtcpPacketLength,
- const int8_t* fromIP,
- const uint16_t fromPort);
+ const int32_t rtcpPacketLength,
+ const int8_t* fromIP,
+ const uint16_t fromPort) OVERRIDE;
private:
RtpRtcp *_rtpMod;
diff --git a/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h b/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h
index 6edb380..ade827e 100644
--- a/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h
+++ b/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h
@@ -71,12 +71,15 @@
bool timeOutTriggered () { return (_timeOut); };
// Inherited from RtpFeedback
- virtual int32_t OnInitializeDecoder(const int32_t id,
- const int8_t payloadType,
- const int8_t payloadName[RTP_PAYLOAD_NAME_SIZE],
- const uint32_t frequency,
- const uint8_t channels,
- const uint32_t rate) { return(0);};
+ virtual int32_t OnInitializeDecoder(
+ const int32_t id,
+ const int8_t payloadType,
+ const int8_t payloadName[RTP_PAYLOAD_NAME_SIZE],
+ const uint32_t frequency,
+ const uint8_t channels,
+ const uint32_t rate) OVERRIDE {
+ return 0;
+ }
virtual void OnPacketTimeout(const int32_t id);
@@ -86,31 +89,31 @@
virtual void OnPeriodicDeadOrAlive(const int32_t id,
const RTPAliveType alive) {};
- virtual void OnIncomingSSRCChanged( const int32_t id,
- const uint32_t SSRC) {};
+ virtual void OnIncomingSSRCChanged(const int32_t id,
+ const uint32_t SSRC) OVERRIDE {}
- virtual void OnIncomingCSRCChanged( const int32_t id,
- const uint32_t CSRC,
- const bool added) {};
+ virtual void OnIncomingCSRCChanged(const int32_t id,
+ const uint32_t CSRC,
+ const bool added) OVERRIDE {}
// Inherited from RtpData
-
- virtual int32_t OnReceivedPayloadData(const uint8_t* payloadData,
- const uint16_t payloadSize,
- const webrtc::WebRtcRTPHeader* rtpHeader);
+ virtual int32_t OnReceivedPayloadData(
+ const uint8_t* payloadData,
+ const uint16_t payloadSize,
+ const webrtc::WebRtcRTPHeader* rtpHeader) OVERRIDE;
// Inherited from UdpTransportData
virtual void IncomingRTPPacket(const int8_t* incomingRtpPacket,
- const int32_t rtpPacketLength,
- const int8_t* fromIP,
- const uint16_t fromPort);
+ const int32_t rtpPacketLength,
+ const int8_t* fromIP,
+ const uint16_t fromPort) OVERRIDE;
virtual void IncomingRTCPPacket(const int8_t* incomingRtcpPacket,
- const int32_t rtcpPacketLength,
- const int8_t* fromIP,
- const uint16_t fromPort);
+ const int32_t rtcpPacketLength,
+ const int8_t* fromIP,
+ const uint16_t fromPort) OVERRIDE;
diff --git a/modules/rtp_rtcp/test/testAPI/test_api.cc b/modules/rtp_rtcp/test/testAPI/test_api.cc
index ac2c5ca..3885eb0 100644
--- a/modules/rtp_rtcp/test/testAPI/test_api.cc
+++ b/modules/rtp_rtcp/test/testAPI/test_api.cc
@@ -99,10 +99,6 @@
EXPECT_EQ(0, module->SetCNAME("john.doe@test.test"));
- char cName[RTCP_CNAME_SIZE];
- EXPECT_EQ(0, module->CNAME(cName));
- EXPECT_STRCASEEQ(cName, "john.doe@test.test");
-
EXPECT_FALSE(module->TMMBR());
EXPECT_EQ(0, module->SetTMMBRStatus(true));
EXPECT_TRUE(module->TMMBR());
diff --git a/modules/rtp_rtcp/test/testAPI/test_api.h b/modules/rtp_rtcp/test/testAPI/test_api.h
index 8061ce0..1c6b883 100644
--- a/modules/rtp_rtcp/test/testAPI/test_api.h
+++ b/modules/rtp_rtcp/test/testAPI/test_api.h
@@ -52,7 +52,9 @@
}
RTPHeader header;
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
- if (!parser->Parse(static_cast<const uint8_t*>(data), len, &header)) {
+ if (!parser->Parse(static_cast<const uint8_t*>(data),
+ static_cast<size_t>(len),
+ &header)) {
return -1;
}
PayloadUnion payload_specific;
diff --git a/modules/rtp_rtcp/test/testAPI/test_api_video.cc b/modules/rtp_rtcp/test/testAPI/test_api_video.cc
index 94d1e52..4c4944d 100644
--- a/modules/rtp_rtcp/test/testAPI/test_api_video.cc
+++ b/modules/rtp_rtcp/test/testAPI/test_api_video.cc
@@ -83,11 +83,9 @@
uint32_t sequence_number) {
dataBuffer[0] = static_cast<uint8_t>(0x80); // version 2
dataBuffer[1] = static_cast<uint8_t>(kPayloadType);
- ModuleRTPUtility::AssignUWord16ToBuffer(dataBuffer + 2,
- sequence_number);
- ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer + 4, timestamp);
- ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer + 8,
- 0x1234); // SSRC.
+ RtpUtility::AssignUWord16ToBuffer(dataBuffer + 2, sequence_number);
+ RtpUtility::AssignUWord32ToBuffer(dataBuffer + 4, timestamp);
+ RtpUtility::AssignUWord32ToBuffer(dataBuffer + 8, 0x1234); // SSRC.
int32_t rtpHeaderLength = 12;
return rtpHeaderLength;
}
diff --git a/modules/rtp_rtcp/test/testFec/test_fec.cc b/modules/rtp_rtcp/test/testFec/test_fec.cc
index fc11fbe..bdb53af 100644
--- a/modules/rtp_rtcp/test/testFec/test_fec.cc
+++ b/modules/rtp_rtcp/test/testFec/test_fec.cc
@@ -134,7 +134,7 @@
fclose(randomSeedFile);
randomSeedFile = NULL;
- uint16_t seqNum = static_cast<uint16_t>(rand());
+ uint16_t seqNum = 0;
uint32_t timeStamp = static_cast<uint32_t>(rand());
const uint32_t ssrc = static_cast<uint32_t>(rand());
@@ -224,6 +224,11 @@
}
// Construct media packets.
+ // Reset the sequence number here for each FEC code/mask tested
+ // below, to avoid sequence number wrap-around. In actual decoding,
+ // old FEC packets in list are dropped if sequence number wrap
+ // around is detected. This case is currently not handled below.
+ seqNum = 0;
for (uint32_t i = 0; i < numMediaPackets; ++i) {
mediaPacket = new ForwardErrorCorrection::Packet;
mediaPacketList.push_back(mediaPacket);
@@ -254,12 +259,10 @@
// Only push one (fake) frame to the FEC.
mediaPacket->data[1] &= 0x7f;
- ModuleRTPUtility::AssignUWord16ToBuffer(&mediaPacket->data[2],
- seqNum);
- ModuleRTPUtility::AssignUWord32ToBuffer(&mediaPacket->data[4],
- timeStamp);
- ModuleRTPUtility::AssignUWord32ToBuffer(&mediaPacket->data[8],
- ssrc);
+ RtpUtility::AssignUWord16ToBuffer(&mediaPacket->data[2], seqNum);
+ RtpUtility::AssignUWord32ToBuffer(&mediaPacket->data[4],
+ timeStamp);
+ RtpUtility::AssignUWord32ToBuffer(&mediaPacket->data[8], ssrc);
// Generate random values for payload
for (int32_t j = 12; j < mediaPacket->length; ++j) {
mediaPacket->data[j] = static_cast<uint8_t>(rand() % 256);
@@ -298,7 +301,7 @@
memcpy(receivedPacket->pkt->data, mediaPacket->data,
mediaPacket->length);
receivedPacket->seq_num =
- ModuleRTPUtility::BufferToUWord16(&mediaPacket->data[2]);
+ RtpUtility::BufferToUWord16(&mediaPacket->data[2]);
receivedPacket->is_fec = false;
}
mediaPacketIdx++;
diff --git a/modules/utility/BUILD.gn b/modules/utility/BUILD.gn
new file mode 100644
index 0000000..ff32112
--- /dev/null
+++ b/modules/utility/BUILD.gn
@@ -0,0 +1,54 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+source_set("utility") {
+ sources = [
+ "interface/audio_frame_operations.h",
+ "interface/file_player.h",
+ "interface/file_recorder.h",
+ "interface/helpers_android.h",
+ "interface/process_thread.h",
+ "interface/rtp_dump.h",
+ "source/audio_frame_operations.cc",
+ "source/coder.cc",
+ "source/coder.h",
+ "source/file_player_impl.cc",
+ "source/file_player_impl.h",
+ "source/file_recorder_impl.cc",
+ "source/file_recorder_impl.h",
+ "source/helpers_android.cc",
+ "source/process_thread_impl.cc",
+ "source/process_thread_impl.h",
+ "source/rtp_dump_impl.cc",
+ "source/rtp_dump_impl.h",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ "../../common_audio",
+ "../../system_wrappers",
+ "../audio_coding",
+ "../media_file",
+ ]
+ if (rtc_enable_video) {
+ sources += [
+ "source/frame_scaler.cc",
+ "source/video_coder.cc",
+ "source/video_frames_queue.cc",
+ ]
+
+ deps += [ "../video_coding" ]
+ }
+}
diff --git a/modules/utility/OWNERS b/modules/utility/OWNERS
index 674c738..b373fb1 100644
--- a/modules/utility/OWNERS
+++ b/modules/utility/OWNERS
@@ -1,4 +1,5 @@
henrike@webrtc.org
-pwestin@webrtc.org
asapersson@webrtc.org
-perkj@webrtc.org
\ No newline at end of file
+perkj@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/utility/source/Android.mk b/modules/utility/source/Android.mk
deleted file mode 100644
index 929bd7c..0000000
--- a/modules/utility/source/Android.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_utility
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := coder.cc \
- file_player_impl.cc \
- file_recorder_impl.cc \
- process_thread_impl.cc \
- rtp_dump_impl.cc \
- frame_scaler.cc \
- video_coder.cc \
- video_frames_queue.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_MODULE_UTILITY_VIDEO'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../audio_coding/main/interface \
- $(LOCAL_PATH)/../../media_file/interface \
- $(LOCAL_PATH)/../../video_coding/main/interface \
- $(LOCAL_PATH)/../../video_coding/codecs/interface \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../common_audio/resampler/include \
- $(LOCAL_PATH)/../../../system_wrappers/interface \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-
diff --git a/modules/utility/source/coder.h b/modules/utility/source/coder.h
index ead1e22..e04372d 100644
--- a/modules/utility/source/coder.h
+++ b/modules/utility/source/coder.h
@@ -27,11 +27,11 @@
int32_t SetEncodeCodec(
const CodecInst& codecInst,
- ACMAMRPackingFormat amrFormat = AMRBandwidthEfficient);
+ ACMAMRPackingFormat amrFormat = AMRBandwidthEfficient);
int32_t SetDecodeCodec(
const CodecInst& codecInst,
- ACMAMRPackingFormat amrFormat = AMRBandwidthEfficient);
+ ACMAMRPackingFormat amrFormat = AMRBandwidthEfficient);
int32_t Decode(AudioFrame& decodedAudio, uint32_t sampFreqHz,
const int8_t* incomingPayload, int32_t payloadLength);
@@ -42,12 +42,13 @@
uint32_t& encodedLengthInBytes);
protected:
- virtual int32_t SendData(FrameType frameType,
- uint8_t payloadType,
- uint32_t timeStamp,
- const uint8_t* payloadData,
- uint16_t payloadSize,
- const RTPFragmentationHeader* fragmentation);
+ virtual int32_t SendData(
+ FrameType frameType,
+ uint8_t payloadType,
+ uint32_t timeStamp,
+ const uint8_t* payloadData,
+ uint16_t payloadSize,
+ const RTPFragmentationHeader* fragmentation) OVERRIDE;
private:
scoped_ptr<AudioCodingModule> _acm;
diff --git a/modules/utility/source/rtp_dump_impl.h b/modules/utility/source/rtp_dump_impl.h
index 04ae7df..0b72132 100644
--- a/modules/utility/source/rtp_dump_impl.h
+++ b/modules/utility/source/rtp_dump_impl.h
@@ -22,10 +22,11 @@
RtpDumpImpl();
virtual ~RtpDumpImpl();
- virtual int32_t Start(const char* fileNameUTF8);
- virtual int32_t Stop();
- virtual bool IsActive() const;
- virtual int32_t DumpPacket(const uint8_t* packet, uint16_t packetLength);
+ virtual int32_t Start(const char* fileNameUTF8) OVERRIDE;
+ virtual int32_t Stop() OVERRIDE;
+ virtual bool IsActive() const OVERRIDE;
+ virtual int32_t DumpPacket(const uint8_t* packet,
+ uint16_t packetLength) OVERRIDE;
private:
// Return the system time in ms.
inline uint32_t GetTimeInMS() const;
@@ -35,7 +36,7 @@
inline uint16_t RtpDumpHtons(uint16_t x) const;
// Return true if the packet starts with a valid RTCP header.
- // Note: See ModuleRTPUtility::RTPHeaderParser::RTCP() for details on how
+ // Note: See RtpUtility::RtpHeaderParser::RTCP() for details on how
// to determine if the packet is an RTCP packet.
bool RTCP(const uint8_t* packet) const;
diff --git a/modules/utility/source/video_coder.h b/modules/utility/source/video_coder.h
index 8e4344b..03aa511 100644
--- a/modules/utility/source/video_coder.h
+++ b/modules/utility/source/video_coder.h
@@ -43,11 +43,11 @@
private:
// VCMReceiveCallback function.
// Note: called by VideoCodingModule when decoding finished.
- int32_t FrameToRender(I420VideoFrame& videoFrame);
+ virtual int32_t FrameToRender(I420VideoFrame& videoFrame) OVERRIDE;
// VCMPacketizationCallback function.
// Note: called by VideoCodingModule when encoding finished.
- int32_t SendData(
+ virtual int32_t SendData(
FrameType /*frameType*/,
uint8_t /*payloadType*/,
uint32_t /*timeStamp*/,
@@ -55,7 +55,7 @@
const uint8_t* payloadData,
uint32_t payloadSize,
const RTPFragmentationHeader& /* fragmentationHeader*/,
- const RTPVideoHeader* rtpTypeHdr);
+ const RTPVideoHeader* rtpTypeHdr) OVERRIDE;
VideoCodingModule* _vcm;
I420VideoFrame* _decodedVideo;
diff --git a/modules/video_capture/Android.mk b/modules/video_capture/Android.mk
deleted file mode 100644
index 971f282..0000000
--- a/modules/video_capture/Android.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_video_capture
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- video_capture_impl.cc \
- device_info_impl.cc \
- video_capture_factory.cc \
- android/video_capture_android.cc \
- android/device_info_android.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/android \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../source \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../utility/interface \
- $(LOCAL_PATH)/../../../audio_coding/main/interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn
new file mode 100644
index 0000000..b9f3d2f
--- /dev/null
+++ b/modules/video_capture/BUILD.gn
@@ -0,0 +1,168 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+# Note this target is missing an implementation for the video capture.
+# Targets must link with either 'video_capture_impl' or
+# 'video_capture_internal_impl' depending on whether they want to
+# use the internal capturer.
+source_set("video_capture") {
+ sources = [
+ "device_info_impl.cc",
+ "device_info_impl.h",
+ "include/video_capture.h",
+ "include/video_capture_defines.h",
+ "include/video_capture_factory.h",
+ "video_capture_config.h",
+ "video_capture_delay.h",
+ "video_capture_factory.cc",
+ "video_capture_impl.cc",
+ "video_capture_impl.h",
+ ]
+
+ deps = [
+ "../../common_video",
+ "../../system_wrappers",
+ "../utility",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
+
+source_set("video_capture_impl") {
+ sources = [
+ "external/device_info_external.cc",
+ "external/video_capture_external.cc",
+ ]
+
+ deps = [
+ ":video_capture",
+ "../../system_wrappers",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
+
+config("video_capture_internal_impl_config") {
+ if (is_ios) {
+ libs = [
+ "AVFoundation.framework",
+ "CoreMedia.framework",
+ "CoreVideo.framework",
+ ]
+ }
+}
+
+source_set("video_capture_internal_impl") {
+ deps = [
+ ":video_capture",
+ "../../system_wrappers",
+ ]
+
+ if (is_linux) {
+ sources = [
+ "linux/device_info_linux.cc",
+ "linux/device_info_linux.h",
+ "linux/video_capture_linux.cc",
+ "linux/video_capture_linux.h",
+ ]
+ }
+ if (is_mac) {
+ sources = [
+ "mac/qtkit/video_capture_qtkit.h",
+ "mac/qtkit/video_capture_qtkit.mm",
+ "mac/qtkit/video_capture_qtkit_info.h",
+ "mac/qtkit/video_capture_qtkit_info.mm",
+ "mac/qtkit/video_capture_qtkit_info_objc.h",
+ "mac/qtkit/video_capture_qtkit_info_objc.mm",
+ "mac/qtkit/video_capture_qtkit_objc.h",
+ "mac/qtkit/video_capture_qtkit_objc.mm",
+ "mac/qtkit/video_capture_qtkit_utility.h",
+ "mac/video_capture_mac.mm",
+ ]
+
+ libs = [
+ "CoreVideo.framework",
+ "QTKit.framework",
+ ]
+ }
+ # winsdk_samples isn't pulled into Chromium, so it is disabled for Chromium
+ # builds. This is not a problem since the internal video capture
+ # implementation should not be used in chrome - issue 3831.
+ if (is_win && !build_with_chromium) {
+ sources = [
+ "windows/device_info_ds.cc",
+ "windows/device_info_ds.h",
+ "windows/device_info_mf.cc",
+ "windows/device_info_mf.h",
+ "windows/help_functions_ds.cc",
+ "windows/help_functions_ds.h",
+ "windows/sink_filter_ds.cc",
+ "windows/sink_filter_ds.h",
+ "windows/video_capture_ds.cc",
+ "windows/video_capture_ds.h",
+ "windows/video_capture_factory_windows.cc",
+ "windows/video_capture_mf.cc",
+ "windows/video_capture_mf.h",
+ ]
+
+ libs = [ "Strmiids.lib" ]
+
+ deps += [ "//third_party/winsdk_samples"]
+ }
+ if (is_android) {
+ sources = [
+ "android/device_info_android.cc",
+ "android/device_info_android.h",
+ "android/video_capture_android.cc",
+ "android/video_capture_android.h",
+ ]
+
+ deps += [
+ "//third_party/icu:icuuc",
+ "//third_party/jsoncpp",
+ ]
+ }
+ if (is_ios) {
+ sources = [
+ "ios/device_info_ios.h",
+ "ios/device_info_ios.mm",
+ "ios/device_info_ios_objc.h",
+ "ios/device_info_ios_objc.mm",
+ "ios/rtc_video_capture_ios_objc.h",
+ "ios/rtc_video_capture_ios_objc.mm",
+ "ios/video_capture_ios.h",
+ "ios/video_capture_ios.mm",
+ ]
+
+ cflags = [
+ "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES.
+ # To avoid warnings for deprecated videoMinFrameDuration and
+ # videoMaxFrameDuration properties in iOS 7.0.
+ # See webrtc:3705 for more details.
+ "-Wno-deprecated-declarations",
+ ]
+ }
+
+ all_dependent_configs = [ ":video_capture_internal_impl_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
diff --git a/modules/video_capture/OWNERS b/modules/video_capture/OWNERS
index fdc2a3f..ceac142 100644
--- a/modules/video_capture/OWNERS
+++ b/modules/video_capture/OWNERS
@@ -1,9 +1,8 @@
-fischman@webrtc.org
glaznev@webrtc.org
mallinath@webrtc.org
mflodman@webrtc.org
perkj@webrtc.org
-wu@webrtc.org
+tkchin@webrtc.org
per-file *.isolate=kjellander@webrtc.org
@@ -11,3 +10,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/video_capture/android/OWNERS b/modules/video_capture/android/OWNERS
deleted file mode 100644
index 6ba5af0..0000000
--- a/modules/video_capture/android/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-leozwang@webrtc.org
diff --git a/modules/video_capture/android/device_info_android.cc b/modules/video_capture/android/device_info_android.cc
index 4a80fe2..82a3a95 100644
--- a/modules/video_capture/android/device_info_android.cc
+++ b/modules/video_capture/android/device_info_android.cc
@@ -234,14 +234,20 @@
const AndroidCameraInfo* info = FindCameraInfoByName(deviceUniqueIdUTF8);
if (info == NULL)
return;
- // Rely on CameraParameters.getSupportedPreviewFpsRange() to sort its return
- // value (per its documentation) and return the first (most flexible) range
- // whose high end is at least as high as that requested.
+ int desired_mfps = max_fps_to_match * 1000;
+ int best_diff_mfps = 0;
+ LOG(LS_INFO) << "Search for best target mfps " << desired_mfps;
+ // Search for best fps range with preference shifted to constant fps modes.
for (size_t i = 0; i < info->mfpsRanges.size(); ++i) {
- if (info->mfpsRanges[i].second / 1000 >= max_fps_to_match) {
+ int diff_mfps = abs(info->mfpsRanges[i].first - desired_mfps) +
+ abs(info->mfpsRanges[i].second - desired_mfps) +
+ (info->mfpsRanges[i].second - info->mfpsRanges[i].first) / 2;
+ LOG(LS_INFO) << "Fps range " << info->mfpsRanges[i].first << ":" <<
+ info->mfpsRanges[i].second << ". Distance: " << diff_mfps;
+ if (i == 0 || diff_mfps < best_diff_mfps) {
+ best_diff_mfps = diff_mfps;
*min_mfps = info->mfpsRanges[i].first;
*max_mfps = info->mfpsRanges[i].second;
- return;
}
}
}
diff --git a/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java b/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java
index c8abdbe..c1db65a 100644
--- a/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java
+++ b/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java
@@ -11,20 +11,18 @@
package org.webrtc.videoengine;
import java.io.IOException;
-import java.util.Locale;
import java.util.concurrent.Exchanger;
-import java.util.concurrent.locks.ReentrantLock;
import android.content.Context;
import android.graphics.ImageFormat;
-import android.graphics.PixelFormat;
-import android.graphics.Rect;
import android.graphics.SurfaceTexture;
-import android.graphics.YuvImage;
import android.hardware.Camera.PreviewCallback;
import android.hardware.Camera;
+import android.opengl.GLES11Ext;
+import android.opengl.GLES20;
import android.os.Handler;
import android.os.Looper;
+import android.os.SystemClock;
import android.util.Log;
import android.view.OrientationEventListener;
import android.view.SurfaceHolder.Callback;
@@ -49,12 +47,17 @@
private final int id;
private final Camera.CameraInfo info;
private final OrientationEventListener orientationListener;
+ private boolean orientationListenerEnabled;
private final long native_capturer; // |VideoCaptureAndroid*| in C++.
- private SurfaceTexture dummySurfaceTexture;
+ private SurfaceTexture cameraSurfaceTexture;
+ private int[] cameraGlTextures = null;
// Arbitrary queue depth. Higher number means more memory allocated & held,
// lower number means more sensitivity to processing time in the client (and
// potentially stalling the capturer if it runs out of buffers to write to).
private final int numCaptureBuffers = 3;
+ private double averageDurationMs;
+ private long lastCaptureTimeMs;
+ private int frameCount;
// Requests future capturers to send their frames to |localPreview| directly.
public static void setLocalPreview(SurfaceHolder localPreview) {
@@ -74,6 +77,9 @@
final VideoCaptureAndroid self = this;
orientationListener = new OrientationEventListener(GetContext()) {
@Override public void onOrientationChanged(int degrees) {
+ if (!self.orientationListenerEnabled) {
+ return;
+ }
if (degrees == OrientationEventListener.ORIENTATION_UNKNOWN) {
return;
}
@@ -114,6 +120,8 @@
private synchronized boolean startCapture(
final int width, final int height,
final int min_mfps, final int max_mfps) {
+ Log.d(TAG, "startCapture: " + width + "x" + height + "@" +
+ min_mfps + ":" + max_mfps);
if (cameraThread != null || cameraThreadHandler != null) {
throw new RuntimeException("Camera thread already started!");
}
@@ -121,7 +129,6 @@
cameraThread = new CameraThread(handlerExchanger);
cameraThread.start();
cameraThreadHandler = exchange(handlerExchanger, null);
- orientationListener.enable();
final Exchanger<Boolean> result = new Exchanger<Boolean>();
cameraThreadHandler.post(new Runnable() {
@@ -129,14 +136,15 @@
startCaptureOnCameraThread(width, height, min_mfps, max_mfps, result);
}
});
- return exchange(result, false); // |false| is a dummy value here.
+ boolean startResult = exchange(result, false); // |false| is a dummy value.
+ orientationListenerEnabled = true;
+ orientationListener.enable();
+ return startResult;
}
private void startCaptureOnCameraThread(
int width, int height, int min_mfps, int max_mfps,
Exchanger<Boolean> result) {
- Log.d(TAG, "startCapture: " + width + "x" + height + "@" +
- min_mfps + ":" + max_mfps);
Throwable error = null;
try {
camera = Camera.open(id);
@@ -150,13 +158,27 @@
} else {
// No local renderer (we only care about onPreviewFrame() buffers, not a
// directly-displayed UI element). Camera won't capture without
- // setPreview{Texture,Display}, so we create a dummy SurfaceTexture and
- // hand it over to Camera, but never listen for frame-ready callbacks,
+ // setPreview{Texture,Display}, so we create a SurfaceTexture and hand
+ // it over to Camera, but never listen for frame-ready callbacks,
// and never call updateTexImage on it.
try {
- // "42" because http://goo.gl/KaEn8
- dummySurfaceTexture = new SurfaceTexture(42);
- camera.setPreviewTexture(dummySurfaceTexture);
+ cameraGlTextures = new int[1];
+ // Generate one texture pointer and bind it as an external texture.
+ GLES20.glGenTextures(1, cameraGlTextures, 0);
+ GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
+ cameraGlTextures[0]);
+ GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
+ GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
+ GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
+ GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
+ GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
+ GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
+ GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
+ GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
+
+ cameraSurfaceTexture = new SurfaceTexture(cameraGlTextures[0]);
+ cameraSurfaceTexture.setOnFrameAvailableListener(null);
+ camera.setPreviewTexture(cameraSurfaceTexture);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -178,6 +200,8 @@
camera.addCallbackBuffer(new byte[bufSize]);
}
camera.setPreviewCallbackWithBuffer(this);
+ frameCount = 0;
+ averageDurationMs = 1000 / max_mfps;
camera.startPreview();
exchange(result, true);
return;
@@ -198,6 +222,9 @@
// Called by native code. Returns true when camera is known to be stopped.
private synchronized boolean stopCapture() {
+ Log.d(TAG, "stopCapture");
+ orientationListener.disable();
+ orientationListenerEnabled = false;
final Exchanger<Boolean> result = new Exchanger<Boolean>();
cameraThreadHandler.post(new Runnable() {
@Override public void run() {
@@ -212,14 +239,12 @@
}
cameraThreadHandler = null;
cameraThread = null;
- orientationListener.disable();
+ Log.d(TAG, "stopCapture done");
return status;
}
private void stopCaptureOnCameraThread(
Exchanger<Boolean> result) {
- Log.d(TAG, "stopCapture");
- Looper.myLooper().quit();
if (camera == null) {
throw new RuntimeException("Camera is already stopped!");
}
@@ -232,10 +257,16 @@
camera.setPreviewDisplay(null);
} else {
camera.setPreviewTexture(null);
+ cameraSurfaceTexture = null;
+ if (cameraGlTextures != null) {
+ GLES20.glDeleteTextures(1, cameraGlTextures, 0);
+ cameraGlTextures = null;
+ }
}
camera.release();
camera = null;
exchange(result, true);
+ Looper.myLooper().quit();
return;
} catch (IOException e) {
error = e;
@@ -244,11 +275,12 @@
}
Log.e(TAG, "Failed to stop camera", error);
exchange(result, false);
+ Looper.myLooper().quit();
return;
}
private native void ProvideCameraFrame(
- byte[] data, int length, long captureObject);
+ byte[] data, int length, long timeStamp, long captureObject);
// Called on cameraThread so must not "synchronized".
@Override
@@ -262,7 +294,19 @@
if (camera != callbackCamera) {
throw new RuntimeException("Unexpected camera in callback!");
}
- ProvideCameraFrame(data, data.length, native_capturer);
+ frameCount++;
+ long captureTimeMs = SystemClock.elapsedRealtime();
+ if (frameCount > 1) {
+ double durationMs = captureTimeMs - lastCaptureTimeMs;
+ averageDurationMs = 0.9 * averageDurationMs + 0.1 * durationMs;
+ if ((frameCount % 30) == 0) {
+ Log.d(TAG, "Camera TS " + captureTimeMs +
+ ". Duration: " + (int)durationMs + " ms. FPS: " +
+ (int) (1000 / averageDurationMs + 0.5));
+ }
+ }
+ lastCaptureTimeMs = captureTimeMs;
+ ProvideCameraFrame(data, data.length, captureTimeMs, native_capturer);
camera.addCallbackBuffer(data);
}
diff --git a/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java b/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java
index 1d681c0..fe207ca 100644
--- a/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java
+++ b/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java
@@ -10,14 +10,8 @@
package org.webrtc.videoengine;
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
import java.util.List;
-import java.util.Locale;
-import android.content.Context;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.Parameters;
import android.hardware.Camera.Size;
@@ -99,6 +93,7 @@
.put("mfpsRanges", mfpsRanges);
}
String ret = devices.toString(2);
+ Log.d(TAG, ret);
return ret;
} catch (JSONException e) {
throw new RuntimeException(e);
diff --git a/modules/video_capture/android/video_capture_android.cc b/modules/video_capture/android/video_capture_android.cc
index c9aa52c..4bc14e5 100644
--- a/modules/video_capture/android/video_capture_android.cc
+++ b/modules/video_capture/android/video_capture_android.cc
@@ -15,6 +15,7 @@
#include "webrtc/modules/video_capture/android/device_info_android.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logcat_trace_context.h"
+#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/system_wrappers/interface/ref_count.h"
#include "webrtc/system_wrappers/interface/trace.h"
@@ -36,6 +37,7 @@
jobject,
jbyteArray javaCameraFrame,
jint length,
+ jlong timeStamp,
jlong context) {
webrtc::videocapturemodule::VideoCaptureAndroid* captureModule =
reinterpret_cast<webrtc::videocapturemodule::VideoCaptureAndroid*>(
@@ -90,7 +92,7 @@
"(JI)V",
reinterpret_cast<void*>(&OnOrientationChanged)},
{"ProvideCameraFrame",
- "([BIJ)V",
+ "([BIJJ)V",
reinterpret_cast<void*>(&ProvideCameraFrame)}};
if (ats.env()->RegisterNatives(g_java_capturer_class,
native_methods, 3) != 0)
@@ -128,6 +130,8 @@
int32_t VideoCaptureAndroid::OnIncomingFrame(uint8_t* videoFrame,
int32_t videoFrameLength,
int64_t captureTime) {
+ if (!_captureStarted)
+ return 0;
return IncomingFrame(
videoFrame, videoFrameLength, _captureCapability, captureTime);
}
@@ -146,18 +150,18 @@
return -1;
// Store the device name
+ LOG(LS_INFO) << "VideoCaptureAndroid::Init: " << deviceUniqueIdUTF8;
+ size_t camera_id = 0;
+ if (!_deviceInfo.FindCameraIndex(deviceUniqueIdUTF8, &camera_id))
+ return -1;
_deviceUniqueId = new char[nameLength + 1];
memcpy(_deviceUniqueId, deviceUniqueIdUTF8, nameLength + 1);
AttachThreadScoped ats(g_jvm);
JNIEnv* env = ats.env();
-
jmethodID ctor = env->GetMethodID(g_java_capturer_class, "<init>", "(IJ)V");
assert(ctor);
jlong j_this = reinterpret_cast<intptr_t>(this);
- size_t camera_id = 0;
- if (!_deviceInfo.FindCameraIndex(deviceUniqueIdUTF8, &camera_id))
- return -1;
_jCapturer = env->NewGlobalRef(
env->NewObject(g_java_capturer_class, ctor, camera_id, j_this));
assert(_jCapturer);
@@ -207,13 +211,16 @@
}
int32_t VideoCaptureAndroid::StopCapture() {
- CriticalSectionScoped cs(&_apiCs);
+ _apiCs.Enter();
AttachThreadScoped ats(g_jvm);
JNIEnv* env = ats.env();
memset(&_requestedCapability, 0, sizeof(_requestedCapability));
memset(&_captureCapability, 0, sizeof(_captureCapability));
_captureStarted = false;
+ // Exit critical section to avoid blocking camera thread inside
+ // onIncomingFrame() call.
+ _apiCs.Leave();
jmethodID j_stop =
env->GetMethodID(g_java_capturer_class, "stopCapture", "()Z");
@@ -234,7 +241,6 @@
int32_t VideoCaptureAndroid::SetCaptureRotation(
VideoCaptureRotation rotation) {
- CriticalSectionScoped cs(&_apiCs);
int32_t status = VideoCaptureImpl::SetCaptureRotation(rotation);
if (status != 0)
return status;
diff --git a/modules/video_capture/ensure_initialized.cc b/modules/video_capture/ensure_initialized.cc
index 65c9a8d..9d43d9f 100644
--- a/modules/video_capture/ensure_initialized.cc
+++ b/modules/video_capture/ensure_initialized.cc
@@ -10,7 +10,7 @@
// Platform-specific initialization bits, if any, go here.
-#if !defined(ANDROID) || !defined(WEBRTC_CHROMIUM_BUILD)
+#ifndef ANDROID
namespace webrtc {
namespace videocapturemodule {
@@ -18,26 +18,15 @@
} // namespace videocapturemodule
} // namespace webrtc
-#else // !defined(ANDROID) || !defined(WEBRTC_CHROMIUM_BUILD)
+#else
-#include <assert.h>
#include <pthread.h>
#include "base/android/jni_android.h"
-
-// Handy alternative to assert() which suppresses unused-variable warnings when
-// assert() is a no-op (i.e. in Release builds).
-#ifdef NDEBUG
-#define ASSERT(x) if (false && (x)); else
-#else
-#define ASSERT(x) assert(x)
-#endif
+#include "webrtc/base/checks.h"
+#include "webrtc/modules/video_capture/video_capture_internal.h"
namespace webrtc {
-
-// Declared in webrtc/modules/video_capture/include/video_capture.h.
-int32_t SetCaptureAndroidVM(JavaVM* javaVM, jobject g_context);
-
namespace videocapturemodule {
static pthread_once_t g_initialize_once = PTHREAD_ONCE_INIT;
@@ -46,18 +35,15 @@
JNIEnv* jni = ::base::android::AttachCurrentThread();
jobject context = ::base::android::GetApplicationContext();
JavaVM* jvm = NULL;
- int status = jni->GetJavaVM(&jvm);
- ASSERT(status == 0);
- status = webrtc::SetCaptureAndroidVM(jvm, context) == 0;
- ASSERT(status);
+ CHECK_EQ(0, jni->GetJavaVM(&jvm));
+ CHECK_EQ(0, webrtc::SetCaptureAndroidVM(jvm, context));
}
void EnsureInitialized() {
- int ret = pthread_once(&g_initialize_once, &EnsureInitializedOnce);
- ASSERT(ret == 0);
+ CHECK_EQ(0, pthread_once(&g_initialize_once, &EnsureInitializedOnce));
}
} // namespace videocapturemodule
} // namespace webrtc
-#endif // ANDROID & WEBRTC_CHROMIUM_BUILD
+#endif // !ANDROID
diff --git a/modules/video_capture/include/video_capture.h b/modules/video_capture/include/video_capture.h
index 7398af6..6e728d1 100644
--- a/modules/video_capture/include/video_capture.h
+++ b/modules/video_capture/include/video_capture.h
@@ -14,16 +14,8 @@
#include "webrtc/modules/interface/module.h"
#include "webrtc/modules/video_capture/include/video_capture_defines.h"
-#ifdef ANDROID
-#include <jni.h>
-#endif
-
namespace webrtc {
-#if defined(ANDROID)
-int32_t SetCaptureAndroidVM(JavaVM* javaVM, jobject context);
-#endif
-
class VideoCaptureModule: public RefCountedModule {
public:
// Interface for receiving information about available camera devices.
diff --git a/modules/video_capture/include/video_capture_factory.h b/modules/video_capture/include/video_capture_factory.h
index ec92d31..f78437d 100644
--- a/modules/video_capture/include/video_capture_factory.h
+++ b/modules/video_capture/include/video_capture_factory.h
@@ -36,10 +36,6 @@
static VideoCaptureModule::DeviceInfo* CreateDeviceInfo(
const int32_t id);
-#ifdef WEBRTC_ANDROID
- static int32_t SetAndroidObjects(void* javaVM, void* javaContext);
-#endif
-
private:
~VideoCaptureFactory();
};
diff --git a/modules/video_capture/ios/rtc_video_capture_ios_objc.mm b/modules/video_capture/ios/rtc_video_capture_ios_objc.mm
index 641ca24..b5c53b1 100644
--- a/modules/video_capture/ios/rtc_video_capture_ios_objc.mm
+++ b/modules/video_capture/ios/rtc_video_capture_ios_objc.mm
@@ -43,6 +43,12 @@
_owner = owner;
_captureId = captureId;
_captureSession = [[AVCaptureSession alloc] init];
+#if defined(__IPHONE_7_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0
+ NSString* version = [[UIDevice currentDevice] systemVersion];
+ if ([version integerValue] >= 7) {
+ _captureSession.usesApplicationAudioSession = NO;
+ }
+#endif
_captureChanging = NO;
_captureChangingCondition = [[NSCondition alloc] init];
@@ -198,12 +204,31 @@
[_captureSession setSessionPreset:captureQuality];
// take care of capture framerate now
+ NSArray* sessionInputs = _captureSession.inputs;
+ AVCaptureDeviceInput* deviceInput = [sessionInputs count] > 0 ?
+ sessionInputs[0] : nil;
+ AVCaptureDevice* inputDevice = deviceInput.device;
+ if (inputDevice) {
+ AVCaptureDeviceFormat* activeFormat = inputDevice.activeFormat;
+ NSArray* supportedRanges = activeFormat.videoSupportedFrameRateRanges;
+ AVFrameRateRange* targetRange = [supportedRanges count] > 0 ?
+ supportedRanges[0] : nil;
+ // Find the largest supported framerate less than capability maxFPS.
+ for (AVFrameRateRange* range in supportedRanges) {
+ if (range.maxFrameRate <= _capability.maxFPS &&
+ targetRange.maxFrameRate <= range.maxFrameRate) {
+ targetRange = range;
+ }
+ }
+ if (targetRange && [inputDevice lockForConfiguration:NULL]) {
+ inputDevice.activeVideoMinFrameDuration = targetRange.minFrameDuration;
+ inputDevice.activeVideoMaxFrameDuration = targetRange.minFrameDuration;
+ [inputDevice unlockForConfiguration];
+ }
+ }
+
_connection = [currentOutput connectionWithMediaType:AVMediaTypeVideo];
[self setRelativeVideoOrientation];
- CMTime cm_time = {1, _capability.maxFPS, kCMTimeFlags_Valid, 0};
-
- [_connection setVideoMinFrameDuration:cm_time];
- [_connection setVideoMaxFrameDuration:cm_time];
// finished configuring, commit settings to AVCaptureSession.
[_captureSession commitConfiguration];
@@ -217,6 +242,9 @@
return;
switch ([UIApplication sharedApplication].statusBarOrientation) {
case UIInterfaceOrientationPortrait:
+#if defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0
+ case UIInterfaceOrientationUnknown:
+#endif
_connection.videoOrientation = AVCaptureVideoOrientationPortrait;
break;
case UIInterfaceOrientationPortraitUpsideDown:
diff --git a/modules/video_capture/video_capture.gypi b/modules/video_capture/video_capture.gypi
index dced22c..888d772 100644
--- a/modules/video_capture/video_capture.gypi
+++ b/modules/video_capture/video_capture.gypi
@@ -9,6 +9,10 @@
{
'targets': [
{
+ # Note this library is missing an implementation for the video capture.
+ # Targets must link with either 'video_capture_module_impl' or
+ # 'video_capture_module_internal_impl' depending on whether they want to
+ # use the internal capturer.
'target_name': 'video_capture_module',
'type': 'static_library',
'dependencies': [
@@ -28,121 +32,128 @@
'video_capture_impl.cc',
'video_capture_impl.h',
],
- 'conditions': [
- ['include_internal_video_capture==0', {
- 'sources': [
- 'external/device_info_external.cc',
- 'external/video_capture_external.cc',
- ],
- }, { # include_internal_video_capture == 1
- 'conditions': [
- ['OS=="linux"', {
- 'sources': [
- 'linux/device_info_linux.cc',
- 'linux/device_info_linux.h',
- 'linux/video_capture_linux.cc',
- 'linux/video_capture_linux.h',
- ],
- }], # linux
- ['OS=="mac"', {
- 'sources': [
- 'mac/qtkit/video_capture_qtkit.h',
- 'mac/qtkit/video_capture_qtkit.mm',
- 'mac/qtkit/video_capture_qtkit_info.h',
- 'mac/qtkit/video_capture_qtkit_info.mm',
- 'mac/qtkit/video_capture_qtkit_info_objc.h',
- 'mac/qtkit/video_capture_qtkit_info_objc.mm',
- 'mac/qtkit/video_capture_qtkit_objc.h',
- 'mac/qtkit/video_capture_qtkit_objc.mm',
- 'mac/qtkit/video_capture_qtkit_utility.h',
- 'mac/video_capture_mac.mm',
- ],
- 'link_settings': {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-framework CoreVideo',
- '-framework QTKit',
- ],
- },
- },
- }], # mac
- ['OS=="win"', {
- 'dependencies': [
- '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
- ],
- 'sources': [
- 'windows/device_info_ds.cc',
- 'windows/device_info_ds.h',
- 'windows/device_info_mf.cc',
- 'windows/device_info_mf.h',
- 'windows/help_functions_ds.cc',
- 'windows/help_functions_ds.h',
- 'windows/sink_filter_ds.cc',
- 'windows/sink_filter_ds.h',
- 'windows/video_capture_ds.cc',
- 'windows/video_capture_ds.h',
- 'windows/video_capture_factory_windows.cc',
- 'windows/video_capture_mf.cc',
- 'windows/video_capture_mf.h',
- ],
- 'link_settings': {
- 'libraries': [
- '-lStrmiids.lib',
- ],
- },
- }], # win
- ['OS=="android"', {
- 'dependencies': [
- '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
- '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
- ],
- 'sources': [
- 'android/device_info_android.cc',
- 'android/device_info_android.h',
- 'android/video_capture_android.cc',
- 'android/video_capture_android.h',
- ],
- }], # android
- ['OS=="ios"', {
- 'sources': [
- 'ios/device_info_ios.h',
- 'ios/device_info_ios.mm',
- 'ios/device_info_ios_objc.h',
- 'ios/device_info_ios_objc.mm',
- 'ios/rtc_video_capture_ios_objc.h',
- 'ios/rtc_video_capture_ios_objc.mm',
- 'ios/video_capture_ios.h',
- 'ios/video_capture_ios.mm',
- ],
- 'xcode_settings': {
- 'CLANG_ENABLE_OBJC_ARC': 'YES',
- },
- 'all_dependent_settings': {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-framework AVFoundation',
- '-framework CoreMedia',
- '-framework CoreVideo',
- '-framework UIKit',
- ],
- },
- },
- }], # ios
- ], # conditions
- }], # include_internal_video_capture
- ], # conditions
},
+ {
+ # Default video capture module implementation that only supports external
+ # capture.
+ 'target_name': 'video_capture_module_impl',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'video_capture_module',
+ ],
+ 'sources': [
+ 'external/device_info_external.cc',
+ 'external/video_capture_external.cc',
+ ],
+ },
+ {
+ 'target_name': 'video_capture_module_internal_impl',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'video_capture_module',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'sources': [
+ 'linux/device_info_linux.cc',
+ 'linux/device_info_linux.h',
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
+ ],
+ }], # linux
+ ['OS=="mac"', {
+ 'sources': [
+ 'mac/qtkit/video_capture_qtkit.h',
+ 'mac/qtkit/video_capture_qtkit.mm',
+ 'mac/qtkit/video_capture_qtkit_info.h',
+ 'mac/qtkit/video_capture_qtkit_info.mm',
+ 'mac/qtkit/video_capture_qtkit_info_objc.h',
+ 'mac/qtkit/video_capture_qtkit_info_objc.mm',
+ 'mac/qtkit/video_capture_qtkit_objc.h',
+ 'mac/qtkit/video_capture_qtkit_objc.mm',
+ 'mac/qtkit/video_capture_qtkit_utility.h',
+ 'mac/video_capture_mac.mm',
+ ],
+ 'link_settings': {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-framework Cocoa',
+ '-framework CoreVideo',
+ '-framework QTKit',
+ ],
+ },
+ },
+ }], # mac
+ # Note that since winsdk_samples isn't pulled into chromium gyp will
+ # fail to parse this rule and try to resolve the dependencies. This
+ # is not a problem since the internal video capture implementation
+ # should not be used in chrome - issue 3831.
+ ['OS=="win" and build_with_chromium==0', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
+ ],
+ 'sources': [
+ 'windows/device_info_ds.cc',
+ 'windows/device_info_ds.h',
+ 'windows/device_info_mf.cc',
+ 'windows/device_info_mf.h',
+ 'windows/help_functions_ds.cc',
+ 'windows/help_functions_ds.h',
+ 'windows/sink_filter_ds.cc',
+ 'windows/sink_filter_ds.h',
+ 'windows/video_capture_ds.cc',
+ 'windows/video_capture_ds.h',
+ 'windows/video_capture_factory_windows.cc',
+ 'windows/video_capture_mf.cc',
+ 'windows/video_capture_mf.h',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-lStrmiids.lib',
+ ],
+ },
+ }], # win
+ ['OS=="android"', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
+ '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
+ ],
+ 'sources': [
+ 'android/device_info_android.cc',
+ 'android/device_info_android.h',
+ 'android/video_capture_android.cc',
+ 'android/video_capture_android.h',
+ ],
+ }], # android
+ ['OS=="ios"', {
+ 'sources': [
+ 'ios/device_info_ios.h',
+ 'ios/device_info_ios.mm',
+ 'ios/device_info_ios_objc.h',
+ 'ios/device_info_ios_objc.mm',
+ 'ios/rtc_video_capture_ios_objc.h',
+ 'ios/rtc_video_capture_ios_objc.mm',
+ 'ios/video_capture_ios.h',
+ 'ios/video_capture_ios.mm',
+ ],
+ 'xcode_settings': {
+ 'CLANG_ENABLE_OBJC_ARC': 'YES',
+ },
+ 'all_dependent_settings': {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-framework AVFoundation',
+ '-framework CoreMedia',
+ '-framework CoreVideo',
+ '-framework UIKit',
+ ],
+ },
+ },
+ }], # ios
+ ], # conditions
+ }
],
'conditions': [
- ['include_tests==1 and build_with_chromium==1 and OS=="android"', {
- # Use WebRTC capture code for Android APK tests that are built from a
- # Chromium checkout. Normally when built as a part of Chromium the
- # Chromium video capture code is used. This overrides the default in
- # webrtc/build/common.gypi.
- 'variables': {
- 'include_internal_video_capture': 1,
- },
- }],
['include_tests==1', {
'targets': [
{
@@ -150,6 +161,7 @@
'type': '<(gtest_target_type)',
'dependencies': [
'video_capture_module',
+ 'video_capture_module_internal_impl',
'webrtc_utility',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(DEPTH)/testing/gtest.gyp:gtest',
@@ -176,12 +188,17 @@
'-lX11',
],
}],
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
+ # Need to disable error due to the line in
+ # base/android/jni_android.h triggering it:
+ # const BASE_EXPORT jobject GetApplicationContext()
+ # error: type qualifiers ignored on function return type
+ 'cflags': [
+ '-Wno-ignored-qualifiers',
+ ],
}],
['OS=="mac"', {
'dependencies': [
@@ -205,6 +222,17 @@
},
], # targets
'conditions': [
+ ['OS=="android"', {
+ 'targets': [
+ {
+ 'target_name': 'video_capture_tests_apk_target',
+ 'type': 'none',
+ 'dependencies': [
+ '<(apk_tests_path):video_capture_tests_apk',
+ ],
+ },
+ ],
+ }],
['test_isolation_mode != "noop"', {
'targets': [
{
diff --git a/modules/video_capture/video_capture_internal.h b/modules/video_capture/video_capture_internal.h
new file mode 100644
index 0000000..1a90af1
--- /dev/null
+++ b/modules/video_capture/video_capture_internal.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_INTERNAL_H_
+#define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_INTERNAL_H_
+
+#ifdef ANDROID
+#include <jni.h>
+
+namespace webrtc {
+
+// In order to be able to use the internal webrtc video capture
+// for android, the jvm objects must be set via this method.
+int32_t SetCaptureAndroidVM(JavaVM* javaVM, jobject context);
+
+} // namespace webrtc
+
+#endif // ANDROID
+
+#endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_INTERNAL_H_
diff --git a/modules/video_capture_module.target.darwin-arm.mk b/modules/video_capture_module.target.darwin-arm.mk
index 8a95b89..9331bf7 100644
--- a/modules/video_capture_module.target.darwin-arm.mk
+++ b/modules/video_capture_module.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,9 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
@@ -36,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -75,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -82,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -99,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -145,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -207,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -224,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -271,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.darwin-arm64.mk b/modules/video_capture_module.target.darwin-arm64.mk
index 7aa3f47..7914cac 100644
--- a/modules/video_capture_module.target.darwin-arm64.mk
+++ b/modules/video_capture_module.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,16 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -181,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -198,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -242,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.darwin-mips.mk b/modules/video_capture_module.target.darwin-mips.mk
index 409b281..b3e6934 100644
--- a/modules/video_capture_module.target.darwin-mips.mk
+++ b/modules/video_capture_module.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,9 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
@@ -36,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,18 +41,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -140,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -165,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -198,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -215,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -261,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.darwin-mips64.mk b/modules/video_capture_module.target.darwin-mips64.mk
new file mode 100644
index 0000000..b3e6934
--- /dev/null
+++ b/modules/video_capture_module.target.darwin-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/device_info_impl.cc \
+ third_party/webrtc/modules/video_capture/video_capture_factory.cc \
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module
+video_capture_module: third_party_webrtc_modules_video_capture_module_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module.target.darwin-x86.mk b/modules/video_capture_module.target.darwin-x86.mk
index f52b6ac..5b4c284 100644
--- a/modules/video_capture_module.target.darwin-x86.mk
+++ b/modules/video_capture_module.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,16 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -137,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -210,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -254,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.darwin-x86_64.mk b/modules/video_capture_module.target.darwin-x86_64.mk
index aee06d5..17c62a4 100644
--- a/modules/video_capture_module.target.darwin-x86_64.mk
+++ b/modules/video_capture_module.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,9 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
@@ -36,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.linux-arm.mk b/modules/video_capture_module.target.linux-arm.mk
index 8a95b89..9331bf7 100644
--- a/modules/video_capture_module.target.linux-arm.mk
+++ b/modules/video_capture_module.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,9 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
@@ -36,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -75,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -82,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -99,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -145,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -207,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -224,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -271,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.linux-arm64.mk b/modules/video_capture_module.target.linux-arm64.mk
index 7aa3f47..7914cac 100644
--- a/modules/video_capture_module.target.linux-arm64.mk
+++ b/modules/video_capture_module.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,16 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -181,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -198,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -242,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.linux-mips.mk b/modules/video_capture_module.target.linux-mips.mk
index 409b281..b3e6934 100644
--- a/modules/video_capture_module.target.linux-mips.mk
+++ b/modules/video_capture_module.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,9 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
@@ -36,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,18 +41,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -140,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -165,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -198,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -215,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -261,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.linux-mips64.mk b/modules/video_capture_module.target.linux-mips64.mk
new file mode 100644
index 0000000..b3e6934
--- /dev/null
+++ b/modules/video_capture_module.target.linux-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/device_info_impl.cc \
+ third_party/webrtc/modules/video_capture/video_capture_factory.cc \
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module
+video_capture_module: third_party_webrtc_modules_video_capture_module_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module.target.linux-x86.mk b/modules/video_capture_module.target.linux-x86.mk
index f52b6ac..5b4c284 100644
--- a/modules/video_capture_module.target.linux-x86.mk
+++ b/modules/video_capture_module.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,16 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -137,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -210,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -254,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module.target.linux-x86_64.mk b/modules/video_capture_module.target.linux-x86_64.mk
index aee06d5..17c62a4 100644
--- a/modules/video_capture_module.target.linux-x86_64.mk
+++ b/modules/video_capture_module.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,9 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_capture/device_info_impl.cc \
third_party/webrtc/modules/video_capture/video_capture_factory.cc \
- third_party/webrtc/modules/video_capture/video_capture_impl.cc \
- third_party/webrtc/modules/video_capture/external/device_info_external.cc \
- third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+ third_party/webrtc/modules/video_capture/video_capture_impl.cc
# Flags passed to both C and C++ files.
@@ -36,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_capture_module_impl.target.darwin-arm.mk b/modules/video_capture_module_impl.target.darwin-arm.mk
new file mode 100644
index 0000000..3324f8e
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-arm.mk
@@ -0,0 +1,300 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.darwin-arm64.mk b/modules/video_capture_module_impl.target.darwin-arm64.mk
new file mode 100644
index 0000000..06d2685
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-arm64.mk
@@ -0,0 +1,270 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.darwin-mips.mk b/modules/video_capture_module_impl.target.darwin-mips.mk
new file mode 100644
index 0000000..fff27cd
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-mips.mk
@@ -0,0 +1,278 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.darwin-mips64.mk b/modules/video_capture_module_impl.target.darwin-mips64.mk
new file mode 100644
index 0000000..fff27cd
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-mips64.mk
@@ -0,0 +1,278 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.darwin-x86.mk b/modules/video_capture_module_impl.target.darwin-x86.mk
new file mode 100644
index 0000000..31a9a10
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-x86.mk
@@ -0,0 +1,282 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.darwin-x86_64.mk b/modules/video_capture_module_impl.target.darwin-x86_64.mk
new file mode 100644
index 0000000..e3a8333
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-x86_64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.linux-arm.mk b/modules/video_capture_module_impl.target.linux-arm.mk
new file mode 100644
index 0000000..3324f8e
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-arm.mk
@@ -0,0 +1,300 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.linux-arm64.mk b/modules/video_capture_module_impl.target.linux-arm64.mk
new file mode 100644
index 0000000..06d2685
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-arm64.mk
@@ -0,0 +1,270 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.linux-mips.mk b/modules/video_capture_module_impl.target.linux-mips.mk
new file mode 100644
index 0000000..fff27cd
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-mips.mk
@@ -0,0 +1,278 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.linux-mips64.mk b/modules/video_capture_module_impl.target.linux-mips64.mk
new file mode 100644
index 0000000..fff27cd
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-mips64.mk
@@ -0,0 +1,278 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.linux-x86.mk b/modules/video_capture_module_impl.target.linux-x86.mk
new file mode 100644
index 0000000..31a9a10
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-x86.mk
@@ -0,0 +1,282 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_capture_module_impl.target.linux-x86_64.mk b/modules/video_capture_module_impl.target.linux-x86_64.mk
new file mode 100644
index 0000000..e3a8333
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-x86_64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_capture_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_capture/external/device_info_external.cc \
+ third_party/webrtc/modules/video_capture/external/video_capture_external.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_capture_module_impl
+video_capture_module_impl: third_party_webrtc_modules_video_capture_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
new file mode 100644
index 0000000..42d5d5c
--- /dev/null
+++ b/modules/video_coding/BUILD.gn
@@ -0,0 +1,145 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+source_set("video_coding") {
+ sources = [
+ "main/interface/video_coding.h",
+ "main/interface/video_coding_defines.h",
+ "main/source/codec_database.cc",
+ "main/source/codec_database.h",
+ "main/source/codec_timer.cc",
+ "main/source/codec_timer.h",
+ "main/source/content_metrics_processing.cc",
+ "main/source/content_metrics_processing.h",
+ "main/source/decoding_state.cc",
+ "main/source/decoding_state.h",
+ "main/source/encoded_frame.cc",
+ "main/source/encoded_frame.h",
+ "main/source/er_tables_xor.h",
+ "main/source/fec_tables_xor.h",
+ "main/source/frame_buffer.cc",
+ "main/source/frame_buffer.h",
+ "main/source/generic_decoder.cc",
+ "main/source/generic_decoder.h",
+ "main/source/generic_encoder.cc",
+ "main/source/generic_encoder.h",
+ "main/source/inter_frame_delay.cc",
+ "main/source/inter_frame_delay.h",
+ "main/source/internal_defines.h",
+ "main/source/jitter_buffer.cc",
+ "main/source/jitter_buffer.h",
+ "main/source/jitter_buffer_common.h",
+ "main/source/jitter_estimator.cc",
+ "main/source/jitter_estimator.h",
+ "main/source/media_opt_util.cc",
+ "main/source/media_opt_util.h",
+ "main/source/media_optimization.cc",
+ "main/source/media_optimization.h",
+ "main/source/nack_fec_tables.h",
+ "main/source/packet.cc",
+ "main/source/packet.h",
+ "main/source/qm_select_data.h",
+ "main/source/qm_select.cc",
+ "main/source/qm_select.h",
+ "main/source/receiver.cc",
+ "main/source/receiver.h",
+ "main/source/rtt_filter.cc",
+ "main/source/rtt_filter.h",
+ "main/source/session_info.cc",
+ "main/source/session_info.h",
+ "main/source/timestamp_map.cc",
+ "main/source/timestamp_map.h",
+ "main/source/timing.cc",
+ "main/source/timing.h",
+ "main/source/video_coding_impl.cc",
+ "main/source/video_coding_impl.h",
+ "main/source/video_receiver.cc",
+ "main/source/video_sender.cc",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":video_coding_utility",
+ ":webrtc_i420",
+ ":webrtc_vp8",
+ "../../common_video",
+ "../../system_wrappers",
+ ]
+}
+
+source_set("video_coding_utility") {
+ sources = [
+ "utility/include/frame_dropper.h",
+ "utility/frame_dropper.cc",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [ "../../system_wrappers" ]
+}
+
+source_set("webrtc_i420") {
+ sources = [
+ "codecs/i420/main/source/i420.cc",
+ "codecs/i420/main/interface/i420.h",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [ "../../system_wrappers" ]
+}
+
+# TODO(holmer): Some files below has been commented out since libvpx is still
+# missing a BUILD.gn file.
+source_set("webrtc_vp8") {
+ sources = [
+# "codecs/vp8/default_temporal_layers.cc",
+# "codecs/vp8/default_temporal_layers.h",
+# "codecs/vp8/realtime_temporal_layers.cc",
+# "codecs/vp8/reference_picture_selection.cc",
+# "codecs/vp8/reference_picture_selection.h",
+ "codecs/vp8/include/vp8.h",
+ "codecs/vp8/include/vp8_common_types.h",
+ "codecs/vp8/temporal_layers.h",
+ "codecs/vp8/vp8_factory.cc",
+# "codecs/vp8/vp8_impl.cc",
+# "codecs/vp8/vp8_impl.h",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":video_coding_utility",
+ "../../common_video",
+ "../../system_wrappers",
+ ]
+# if (rtc_build_libvpx) {
+# deps += [
+# "//third_party/libvpx",
+# ]
+# }
+}
diff --git a/modules/video_coding/OWNERS b/modules/video_coding/OWNERS
index 7183cf2..897a0b2 100644
--- a/modules/video_coding/OWNERS
+++ b/modules/video_coding/OWNERS
@@ -1,4 +1,5 @@
stefan@webrtc.org
-mikhal@webrtc.org
marpan@webrtc.org
henrik.lundin@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/video_coding/codecs/OWNERS b/modules/video_coding/codecs/OWNERS
index 7183cf2..3f904dd 100644
--- a/modules/video_coding/codecs/OWNERS
+++ b/modules/video_coding/codecs/OWNERS
@@ -1,4 +1,3 @@
stefan@webrtc.org
-mikhal@webrtc.org
marpan@webrtc.org
henrik.lundin@webrtc.org
diff --git a/modules/video_coding/codecs/i420/main/source/Android.mk b/modules/video_coding/codecs/i420/main/source/Android.mk
deleted file mode 100644
index d73e77d..0000000
--- a/modules/video_coding/codecs/i420/main/source/Android.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_i420
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := i420.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../../../../../../common_video/interface \
- $(LOCAL_PATH)/../../../../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/codecs/interface/video_codec_interface.h b/modules/video_coding/codecs/interface/video_codec_interface.h
index 9776479..82bcd26 100644
--- a/modules/video_coding/codecs/interface/video_codec_interface.h
+++ b/modules/video_coding/codecs/interface/video_codec_interface.h
@@ -15,11 +15,10 @@
#include "webrtc/common_types.h"
#include "webrtc/common_video/interface/i420_video_frame.h"
-#include "webrtc/common_video/interface/video_image.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/modules/video_coding/codecs/interface/video_error_codes.h"
-
#include "webrtc/typedefs.h"
+#include "webrtc/video_encoder.h"
namespace webrtc
{
@@ -28,29 +27,30 @@
// Note: if any pointers are added to this struct, it must be fitted
// with a copy-constructor. See below.
-struct CodecSpecificInfoVP8
-{
- bool hasReceivedSLI;
- uint8_t pictureIdSLI;
- bool hasReceivedRPSI;
- uint64_t pictureIdRPSI;
- int16_t pictureId; // negative value to skip pictureId
- bool nonReference;
- uint8_t simulcastIdx;
- uint8_t temporalIdx;
- bool layerSync;
- int tl0PicIdx; // Negative value to skip tl0PicIdx
- int8_t keyIdx; // negative value to skip keyIdx
+struct CodecSpecificInfoVP8 {
+ bool hasReceivedSLI;
+ uint8_t pictureIdSLI;
+ bool hasReceivedRPSI;
+ uint64_t pictureIdRPSI;
+ int16_t pictureId; // Negative value to skip pictureId.
+ bool nonReference;
+ uint8_t simulcastIdx;
+ uint8_t temporalIdx;
+ bool layerSync;
+ int tl0PicIdx; // Negative value to skip tl0PicIdx.
+ int8_t keyIdx; // Negative value to skip keyIdx.
};
struct CodecSpecificInfoGeneric {
uint8_t simulcast_idx;
};
-union CodecSpecificInfoUnion
-{
- CodecSpecificInfoGeneric generic;
- CodecSpecificInfoVP8 VP8;
+struct CodecSpecificInfoH264 {};
+
+union CodecSpecificInfoUnion {
+ CodecSpecificInfoGeneric generic;
+ CodecSpecificInfoVP8 VP8;
+ CodecSpecificInfoH264 H264;
};
// Note: if any pointers are added to this struct or its sub-structs, it
@@ -62,106 +62,6 @@
CodecSpecificInfoUnion codecSpecific;
};
-class EncodedImageCallback
-{
-public:
- virtual ~EncodedImageCallback() {};
-
- // Callback function which is called when an image has been encoded.
- //
- // Input:
- // - encodedImage : The encoded image
- //
- // Return value : > 0, signals to the caller that one or more future frames
- // should be dropped to keep bit rate or frame rate.
- // = 0, if OK.
- // < 0, on error.
- virtual int32_t
- Encoded(EncodedImage& encodedImage,
- const CodecSpecificInfo* codecSpecificInfo = NULL,
- const RTPFragmentationHeader* fragmentation = NULL) = 0;
-};
-
-class VideoEncoder
-{
-public:
- virtual ~VideoEncoder() {};
-
- // Initialize the encoder with the information from the VideoCodec.
- //
- // Input:
- // - codecSettings : Codec settings
- // - numberOfCores : Number of cores available for the encoder
- // - maxPayloadSize : The maximum size each payload is allowed
- // to have. Usually MTU - overhead.
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t InitEncode(const VideoCodec* codecSettings, int32_t numberOfCores, uint32_t maxPayloadSize) = 0;
-
- // Encode an I420 image (as a part of a video stream). The encoded image
- // will be returned to the user through the encode complete callback.
- //
- // Input:
- // - inputImage : Image to be encoded
- // - codecSpecificInfo : Pointer to codec specific data
- // - frame_types : The frame type to encode
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0
- // otherwise.
- virtual int32_t Encode(
- const I420VideoFrame& inputImage,
- const CodecSpecificInfo* codecSpecificInfo,
- const std::vector<VideoFrameType>* frame_types) = 0;
-
- // Register an encode complete callback object.
- //
- // Input:
- // - callback : Callback object which handles encoded images.
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t RegisterEncodeCompleteCallback(EncodedImageCallback* callback) = 0;
-
- // Free encoder memory.
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t Release() = 0;
-
- // Inform the encoder about the packet loss and round trip time on the
- // network used to decide the best pattern and signaling.
- //
- // - packetLoss : Fraction lost (loss rate in percent =
- // 100 * packetLoss / 255)
- // - rtt : Round-trip time in milliseconds
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t SetChannelParameters(uint32_t packetLoss, int rtt) = 0;
-
- // Inform the encoder about the new target bit rate.
- //
- // - newBitRate : New target bit rate
- // - frameRate : The target frame rate
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) = 0;
-
- // Use this function to enable or disable periodic key frames. Can be useful for codecs
- // which have other ways of stopping error propagation.
- //
- // - enable : Enable or disable periodic key frames
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t SetPeriodicKeyFrames(bool enable) { return WEBRTC_VIDEO_CODEC_ERROR; }
-
- // Codec configuration data to send out-of-band, i.e. in SIP call setup
- //
- // - buffer : Buffer pointer to where the configuration data
- // should be stored
- // - size : The size of the buffer in bytes
- //
- // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t CodecConfigParameters(uint8_t* /*buffer*/, int32_t /*size*/) { return WEBRTC_VIDEO_CODEC_ERROR; }
-};
-
class DecodedImageCallback
{
public:
diff --git a/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h b/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h
index 75fe63f..1e2c9b8 100644
--- a/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h
+++ b/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h
@@ -16,8 +16,8 @@
#include <string>
#include "testing/gmock/include/gmock/gmock.h"
-#include "webrtc/common_video/interface/video_image.h"
#include "webrtc/typedefs.h"
+#include "webrtc/video_frame.h"
namespace webrtc {
namespace test {
diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
index e7b934d..bd4a563 100644
--- a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
@@ -703,34 +703,26 @@
rc_metrics);
}
-// Run with no packet loss, at low bitrate, then increase rate somewhat.
-// Key frame is thrown in every 120 frames. Can expect some frame drops after
-// key frame, even at high rate. The internal spatial resizer is on, so expect
-// spatial resize down at first key frame, and back up at second key frame.
-// Error_concealment is off in this test since there is a memory leak with
-// resizing and error concealment.
+// Run with no packet loss, at low bitrate. During this time we should've
+// resized once.
TEST_F(VideoProcessorIntegrationTest,
DISABLED_ON_ANDROID(ProcessNoLossSpatialResizeFrameDrop)) {
config_.networking_config.packet_loss_probability = 0;
// Bitrate and frame rate profile.
RateProfile rate_profile;
- SetRateProfilePars(&rate_profile, 0, 100, 30, 0);
- SetRateProfilePars(&rate_profile, 1, 200, 30, 120);
- SetRateProfilePars(&rate_profile, 2, 200, 30, 240);
- rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1;
+ SetRateProfilePars(&rate_profile, 0, 50, 30, 0);
+ rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1;
rate_profile.num_frames = kNbrFramesLong;
// Codec/network settings.
CodecConfigPars process_settings;
- SetCodecParameters(&process_settings, 0.0f, 120, 1, false, true, true, true);
- // Metrics for expected quality.: lower quality on average from up-sampling
- // the down-sampled portion of the run, in case resizer is on.
+ SetCodecParameters(
+ &process_settings, 0.0f, kNbrFramesLong, 1, false, true, true, true);
+ // Metrics for expected quality.
QualityMetrics quality_metrics;
- SetQualityMetrics(&quality_metrics, 29.0, 20.0, 0.75, 0.60);
+ SetQualityMetrics(&quality_metrics, 25.0, 15.0, 0.70, 0.40);
// Metrics for rate control.
- RateControlMetrics rc_metrics[3];
- SetRateControlMetrics(rc_metrics, 0, 45, 30, 75, 20, 70, 0);
- SetRateControlMetrics(rc_metrics, 1, 20, 35, 30, 20, 15, 1);
- SetRateControlMetrics(rc_metrics, 2, 0, 30, 30, 15, 25, 1);
+ RateControlMetrics rc_metrics[1];
+ SetRateControlMetrics(rc_metrics, 0, 160, 60, 120, 20, 70, 1);
ProcessFramesAndVerify(quality_metrics,
rate_profile,
process_settings,
diff --git a/modules/video_coding/codecs/test_framework/unit_test.cc b/modules/video_coding/codecs/test_framework/unit_test.cc
index ec12a51..ab8d4d2 100644
--- a/modules/video_coding/codecs/test_framework/unit_test.cc
+++ b/modules/video_coding/codecs/test_framework/unit_test.cc
@@ -393,7 +393,7 @@
_inst.maxFramerate = 30;
// Bad bitrate.
- _inst.startBitrate = -1;
+ _inst.startBitrate = static_cast<unsigned int>(-1);
EXPECT_TRUE(_encoder->InitEncode(&_inst, 1, 1440) ==
WEBRTC_VIDEO_CODEC_ERR_PARAMETER);
_inst.maxBitrate = _inst.startBitrate - 1;
diff --git a/modules/video_coding/codecs/vp8/Android.mk b/modules/video_coding/codecs/vp8/Android.mk
deleted file mode 100644
index 7db37ec..0000000
--- a/modules/video_coding/codecs/vp8/Android.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_vp8
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- reference_picture_selection.cc \
- vp8_impl.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-# TODO(leozwang) Enable WEBRTC_LIBVPX_VERSION after libvpx is updateed
-# to a new version and also add temporal_layers.cc
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../../../../../../common_video/interface \
- $(LOCAL_PATH)/../../../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../../../modules/interface \
- $(LOCAL_PATH)/../../../../../../system_wrappers/interface \
- external/libvpx
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/codecs/vp8/vp8_impl.cc b/modules/video_coding/codecs/vp8/vp8_impl.cc
index 4901edf..2a2a9d0 100644
--- a/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -105,6 +105,7 @@
temporal_layers_->ConfigureBitrates(new_bitrate_kbit, codec_.maxBitrate,
new_framerate, config_);
codec_.maxFramerate = new_framerate;
+ quality_scaler_.ReportFramerate(new_framerate);
// update encoder context
if (vpx_codec_enc_config_set(encoder_, config_)) {
@@ -174,7 +175,7 @@
// Creating a wrapper to the image - setting image data to NULL. Actual
// pointer will be set in encode. Setting align to 1, as it is meaningless
// (actual memory is not allocated).
- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height,
+ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height,
1, NULL);
// populate encoder configuration with default values
if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) {
@@ -230,8 +231,8 @@
30 : 0;
config_->rc_end_usage = VPX_CBR;
config_->g_pass = VPX_RC_ONE_PASS;
- config_->rc_resize_allowed = inst->codecSpecific.VP8.automaticResizeOn ?
- 1 : 0;
+ // Handle resizing outside of libvpx.
+ config_->rc_resize_allowed = 0;
config_->rc_min_quantizer = 2;
config_->rc_max_quantizer = inst->qpMax;
config_->rc_undershoot_pct = 100;
@@ -272,6 +273,8 @@
cpu_speed_ = -12;
#endif
rps_->Init();
+ quality_scaler_.Init(codec_.qpMax);
+ quality_scaler_.ReportFramerate(codec_.maxFramerate);
return InitAndSetControlSettings(inst);
}
@@ -296,6 +299,7 @@
vpx_codec_control(encoder_, VP8E_SET_MAX_INTRA_BITRATE_PCT,
rc_max_intra_target_);
inited_ = true;
+
return WEBRTC_VIDEO_CODEC_OK;
}
@@ -315,15 +319,15 @@
return (targetPct < minIntraTh) ? minIntraTh: targetPct;
}
-int VP8EncoderImpl::Encode(const I420VideoFrame& input_image,
+int VP8EncoderImpl::Encode(const I420VideoFrame& input_frame,
const CodecSpecificInfo* codec_specific_info,
const std::vector<VideoFrameType>* frame_types) {
- TRACE_EVENT1("webrtc", "VP8::Encode", "timestamp", input_image.timestamp());
+ TRACE_EVENT1("webrtc", "VP8::Encode", "timestamp", input_frame.timestamp());
if (!inited_) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
- if (input_image.IsZeroSize()) {
+ if (input_frame.IsZeroSize()) {
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
}
if (encoded_complete_callback_ == NULL) {
@@ -336,25 +340,31 @@
frame_type = (*frame_types)[0];
}
+ const I420VideoFrame& frame =
+ config_->rc_dropframe_thresh > 0 &&
+ codec_.codecSpecific.VP8.automaticResizeOn
+ ? quality_scaler_.GetScaledFrame(input_frame)
+ : input_frame;
+
// Check for change in frame size.
- if (input_image.width() != codec_.width ||
- input_image.height() != codec_.height) {
- int ret = UpdateCodecFrameSize(input_image);
+ if (frame.width() != codec_.width ||
+ frame.height() != codec_.height) {
+ int ret = UpdateCodecFrameSize(frame);
if (ret < 0) {
return ret;
}
}
// Image in vpx_image_t format.
- // Input image is const. VP8's raw image is not defined as const.
- raw_->planes[PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane));
- raw_->planes[PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane));
- raw_->planes[PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane));
+ // Input frame is const. VP8's raw frame is not defined as const.
+ raw_->planes[VPX_PLANE_Y] = const_cast<uint8_t*>(frame.buffer(kYPlane));
+ raw_->planes[VPX_PLANE_U] = const_cast<uint8_t*>(frame.buffer(kUPlane));
+ raw_->planes[VPX_PLANE_V] = const_cast<uint8_t*>(frame.buffer(kVPlane));
// TODO(mikhal): Stride should be set in initialization.
- raw_->stride[VPX_PLANE_Y] = input_image.stride(kYPlane);
- raw_->stride[VPX_PLANE_U] = input_image.stride(kUPlane);
- raw_->stride[VPX_PLANE_V] = input_image.stride(kVPlane);
+ raw_->stride[VPX_PLANE_Y] = frame.stride(kYPlane);
+ raw_->stride[VPX_PLANE_U] = frame.stride(kUPlane);
+ raw_->stride[VPX_PLANE_V] = frame.stride(kVPlane);
- int flags = temporal_layers_->EncodeFlags(input_image.timestamp());
+ int flags = temporal_layers_->EncodeFlags(frame.timestamp());
bool send_keyframe = (frame_type == kKeyFrame);
if (send_keyframe) {
@@ -370,11 +380,11 @@
codec_specific_info->codecSpecific.VP8.pictureIdRPSI);
}
if (codec_specific_info->codecSpecific.VP8.hasReceivedSLI) {
- sendRefresh = rps_->ReceivedSLI(input_image.timestamp());
+ sendRefresh = rps_->ReceivedSLI(frame.timestamp());
}
}
flags = rps_->EncodeFlags(picture_id_, sendRefresh,
- input_image.timestamp());
+ frame.timestamp());
}
// TODO(holmer): Ideally the duration should be the timestamp diff of this
@@ -390,7 +400,7 @@
}
timestamp_ += duration;
- return GetEncodedPartitions(input_image);
+ return GetEncodedPartitions(frame);
}
int VP8EncoderImpl::UpdateCodecFrameSize(const I420VideoFrame& input_image) {
@@ -480,6 +490,11 @@
encoded_image_._encodedWidth = codec_.width;
encoded_complete_callback_->Encoded(encoded_image_, &codec_specific,
&frag_info);
+ int qp;
+ vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER_64, &qp);
+ quality_scaler_.ReportEncodedFrame(qp);
+ } else {
+ quality_scaler_.ReportDroppedFrame();
}
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/modules/video_coding/codecs/vp8/vp8_impl.h b/modules/video_coding/codecs/vp8/vp8_impl.h
index 56f7219..08ce3c9 100644
--- a/modules/video_coding/codecs/vp8/vp8_impl.h
+++ b/modules/video_coding/codecs/vp8/vp8_impl.h
@@ -14,6 +14,7 @@
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_IMPL_H_
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
+#include "webrtc/modules/video_coding/utility/quality_scaler.h"
// VPX forward declaration
typedef struct vpx_codec_ctx vpx_codec_ctx_t;
@@ -139,6 +140,7 @@
vpx_codec_ctx_t* encoder_;
vpx_codec_enc_cfg_t* config_;
vpx_image_t* raw_;
+ QualityScaler quality_scaler_;
}; // end of VP8Encoder class
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm.mk
index af4ca34..042da45 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -142,23 +143,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -172,13 +174,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -200,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -217,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,68 +269,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm64.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm64.mk
index bda30e9..b6427aa 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm64.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,7 +176,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -191,12 +192,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,59 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips.mk
index 92af875..48cea41 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -136,23 +132,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -161,13 +158,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -189,7 +183,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,17 +199,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +247,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips64.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips64.mk
new file mode 100644
index 0000000..48cea41
--- /dev/null
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips64.mk
@@ -0,0 +1,281 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/vp8_factory.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/realtime_temporal_layers.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libvpx/source/libvpx \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libvpx/source/libvpx \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_vp8
+webrtc_vp8: third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86.mk
index 3c8994a..f151b35 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,21 +135,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -248,63 +252,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86_64.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86_64.mk
index a73f4e4..cbbbef8 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86_64.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -133,22 +134,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,7 +186,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -201,12 +202,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm.mk
index af4ca34..042da45 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -142,23 +143,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -172,13 +174,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -200,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -217,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,68 +269,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm64.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm64.mk
index bda30e9..b6427aa 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm64.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,7 +176,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -191,12 +192,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,59 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips.mk
index 92af875..48cea41 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -136,23 +132,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -161,13 +158,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -189,7 +183,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,17 +199,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +247,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips64.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips64.mk
new file mode 100644
index 0000000..48cea41
--- /dev/null
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips64.mk
@@ -0,0 +1,281 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/vp8_factory.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc \
+ third_party/webrtc/modules/video_coding/codecs/vp8/realtime_temporal_layers.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libvpx/source/libvpx \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(LOCAL_PATH)/third_party/libvpx/source/libvpx \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_vp8
+webrtc_vp8: third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86.mk
index 3c8994a..f151b35 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -35,7 +34,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,21 +135,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -248,63 +252,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86_64.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86_64.mk
index a73f4e4..cbbbef8 100644
--- a/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86_64.mk
+++ b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_codecs_vp8_webrtc_vp8_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -36,7 +35,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -133,22 +134,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,7 +186,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -201,12 +202,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/main/interface/video_coding.h b/modules/video_coding/main/interface/video_coding.h
index cad0e5a..ef9209a 100644
--- a/modules/video_coding/main/interface/video_coding.h
+++ b/modules/video_coding/main/interface/video_coding.h
@@ -238,7 +238,7 @@
// frame rate/dimensions need to be updated for video quality optimization
//
// Input:
- // - videoQMSettings : The callback object to register.
+ // - videoQMSettings : The callback object to register.
//
// Return value : VCM_OK, on success.
// < 0, on error
diff --git a/modules/video_coding/main/interface/video_coding_defines.h b/modules/video_coding/main/interface/video_coding_defines.h
index fab91af..c5f93cb 100644
--- a/modules/video_coding/main/interface/video_coding_defines.h
+++ b/modules/video_coding/main/interface/video_coding_defines.h
@@ -40,6 +40,7 @@
#define VCM_ULPFEC_PAYLOAD_TYPE 97
#define VCM_VP8_PAYLOAD_TYPE 100
#define VCM_I420_PAYLOAD_TYPE 124
+#define VCM_H264_PAYLOAD_TYPE 127
enum VCMVideoProtection {
kProtectionNack, // Both send-side and receive-side
diff --git a/modules/video_coding/main/source/Android.mk b/modules/video_coding/main/source/Android.mk
deleted file mode 100644
index a8cf2d0..0000000
--- a/modules/video_coding/main/source/Android.mk
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_video_coding
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- codec_database.cc \
- codec_timer.cc \
- content_metrics_processing.cc \
- decoding_state.cc \
- encoded_frame.cc \
- frame_buffer.cc \
- generic_decoder.cc \
- generic_encoder.cc \
- inter_frame_delay.cc \
- jitter_buffer.cc \
- jitter_buffer_common.cc \
- jitter_estimator.cc \
- media_opt_util.cc \
- media_optimization.cc \
- packet.cc \
- qm_select.cc \
- receiver.cc \
- rtt_filter.cc \
- session_info.cc \
- timestamp_map.cc \
- timing.cc \
- video_coding_impl.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../codecs/interface \
- $(LOCAL_PATH)/../../codecs/i420/main/interface \
- $(LOCAL_PATH)/../../codecs/vp8/main/interface \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../common_video/interface \
- $(LOCAL_PATH)/../../utility/include \
- $(LOCAL_PATH)/../../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/main/source/codec_database.cc b/modules/video_coding/main/source/codec_database.cc
index e7a9d91..cd8f9d3 100644
--- a/modules/video_coding/main/source/codec_database.cc
+++ b/modules/video_coding/main/source/codec_database.cc
@@ -24,6 +24,36 @@
namespace webrtc {
+VideoCodecVP8 VideoEncoder::GetDefaultVp8Settings() {
+ VideoCodecVP8 vp8_settings;
+ memset(&vp8_settings, 0, sizeof(vp8_settings));
+
+ vp8_settings.resilience = kResilientStream;
+ vp8_settings.numberOfTemporalLayers = 1;
+ vp8_settings.denoisingOn = true;
+ vp8_settings.errorConcealmentOn = false;
+ vp8_settings.automaticResizeOn = false;
+ vp8_settings.frameDroppingOn = true;
+ vp8_settings.keyFrameInterval = 3000;
+
+ return vp8_settings;
+}
+
+VideoCodecH264 VideoEncoder::GetDefaultH264Settings() {
+ VideoCodecH264 h264_settings;
+ memset(&h264_settings, 0, sizeof(h264_settings));
+
+ h264_settings.profile = kProfileBase;
+ h264_settings.frameDroppingOn = true;
+ h264_settings.keyFrameInterval = 3000;
+ h264_settings.spsData = NULL;
+ h264_settings.spsLen = 0;
+ h264_settings.ppsData = NULL;
+ h264_settings.ppsLen = 0;
+
+ return h264_settings;
+}
+
VCMDecoderMapItem::VCMDecoderMapItem(VideoCodec* settings,
int number_of_cores,
bool require_key_frame)
@@ -92,13 +122,25 @@
settings->height = VCM_DEFAULT_CODEC_HEIGHT;
settings->numberOfSimulcastStreams = 0;
settings->qpMax = 56;
- settings->codecSpecific.VP8.resilience = kResilientStream;
- settings->codecSpecific.VP8.numberOfTemporalLayers = 1;
- settings->codecSpecific.VP8.denoisingOn = true;
- settings->codecSpecific.VP8.errorConcealmentOn = false;
- settings->codecSpecific.VP8.automaticResizeOn = false;
- settings->codecSpecific.VP8.frameDroppingOn = true;
- settings->codecSpecific.VP8.keyFrameInterval = 3000;
+ settings->codecSpecific.VP8 = VideoEncoder::GetDefaultVp8Settings();
+ return true;
+ }
+#endif
+#ifdef VIDEOCODEC_H264
+ case VCM_H264_IDX: {
+ strncpy(settings->plName, "H264", 5);
+ settings->codecType = kVideoCodecH264;
+ // 96 to 127 dynamic payload types for video codecs.
+ settings->plType = VCM_H264_PAYLOAD_TYPE;
+ settings->startBitrate = 100;
+ settings->minBitrate = VCM_MIN_BITRATE;
+ settings->maxBitrate = 0;
+ settings->maxFramerate = VCM_DEFAULT_FRAME_RATE;
+ settings->width = VCM_DEFAULT_CODEC_WIDTH;
+ settings->height = VCM_DEFAULT_CODEC_HEIGHT;
+ settings->numberOfSimulcastStreams = 0;
+ settings->qpMax = 56;
+ settings->codecSpecific.H264 = VideoEncoder::GetDefaultH264Settings();
return true;
}
#endif
@@ -316,8 +358,14 @@
case kVideoCodecVP8:
if (memcmp(&new_send_codec.codecSpecific.VP8,
&send_codec_.codecSpecific.VP8,
- sizeof(new_send_codec.codecSpecific.VP8)) !=
- 0) {
+ sizeof(new_send_codec.codecSpecific.VP8)) != 0) {
+ return true;
+ }
+ break;
+ case kVideoCodecH264:
+ if (memcmp(&new_send_codec.codecSpecific.H264,
+ &send_codec_.codecSpecific.H264,
+ sizeof(new_send_codec.codecSpecific.H264)) != 0) {
return true;
}
break;
@@ -619,6 +667,7 @@
return new VCMGenericDecoder(*(new I420Decoder));
#endif
default:
+ LOG(LS_WARNING) << "No internal decoder of this type exists.";
return NULL;
}
}
diff --git a/modules/video_coding/main/source/encoded_frame.cc b/modules/video_coding/main/source/encoded_frame.cc
index 3ccf0b0..0d07955 100644
--- a/modules/video_coding/main/source/encoded_frame.cc
+++ b/modules/video_coding/main/source/encoded_frame.cc
@@ -100,49 +100,45 @@
void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
{
- if (header)
- {
- switch (header->codec)
- {
- case kRtpVideoVp8:
- {
- if (_codecSpecificInfo.codecType != kVideoCodecVP8)
- {
- // This is the first packet for this frame.
- _codecSpecificInfo.codecSpecific.VP8.pictureId = -1;
- _codecSpecificInfo.codecSpecific.VP8.temporalIdx = 0;
- _codecSpecificInfo.codecSpecific.VP8.layerSync = false;
- _codecSpecificInfo.codecSpecific.VP8.keyIdx = -1;
- _codecSpecificInfo.codecType = kVideoCodecVP8;
- }
- _codecSpecificInfo.codecSpecific.VP8.nonReference =
- header->codecHeader.VP8.nonReference;
- if (header->codecHeader.VP8.pictureId != kNoPictureId)
- {
- _codecSpecificInfo.codecSpecific.VP8.pictureId =
- header->codecHeader.VP8.pictureId;
- }
- if (header->codecHeader.VP8.temporalIdx != kNoTemporalIdx)
- {
- _codecSpecificInfo.codecSpecific.VP8.temporalIdx =
- header->codecHeader.VP8.temporalIdx;
- _codecSpecificInfo.codecSpecific.VP8.layerSync =
- header->codecHeader.VP8.layerSync;
- }
- if (header->codecHeader.VP8.keyIdx != kNoKeyIdx)
- {
- _codecSpecificInfo.codecSpecific.VP8.keyIdx =
- header->codecHeader.VP8.keyIdx;
- }
- break;
- }
- default:
- {
- _codecSpecificInfo.codecType = kVideoCodecUnknown;
- break;
- }
+ if (header) {
+ switch (header->codec) {
+ case kRtpVideoVp8: {
+ if (_codecSpecificInfo.codecType != kVideoCodecVP8) {
+ // This is the first packet for this frame.
+ _codecSpecificInfo.codecSpecific.VP8.pictureId = -1;
+ _codecSpecificInfo.codecSpecific.VP8.temporalIdx = 0;
+ _codecSpecificInfo.codecSpecific.VP8.layerSync = false;
+ _codecSpecificInfo.codecSpecific.VP8.keyIdx = -1;
+ _codecSpecificInfo.codecType = kVideoCodecVP8;
}
+ _codecSpecificInfo.codecSpecific.VP8.nonReference =
+ header->codecHeader.VP8.nonReference;
+ if (header->codecHeader.VP8.pictureId != kNoPictureId) {
+ _codecSpecificInfo.codecSpecific.VP8.pictureId =
+ header->codecHeader.VP8.pictureId;
+ }
+ if (header->codecHeader.VP8.temporalIdx != kNoTemporalIdx) {
+ _codecSpecificInfo.codecSpecific.VP8.temporalIdx =
+ header->codecHeader.VP8.temporalIdx;
+ _codecSpecificInfo.codecSpecific.VP8.layerSync =
+ header->codecHeader.VP8.layerSync;
+ }
+ if (header->codecHeader.VP8.keyIdx != kNoKeyIdx) {
+ _codecSpecificInfo.codecSpecific.VP8.keyIdx =
+ header->codecHeader.VP8.keyIdx;
+ }
+ break;
+ }
+ case kRtpVideoH264: {
+ _codecSpecificInfo.codecType = kVideoCodecH264;
+ break;
+ }
+ default: {
+ _codecSpecificInfo.codecType = kVideoCodecUnknown;
+ break;
+ }
}
+ }
}
const RTPFragmentationHeader* VCMEncodedFrame::FragmentationHeader() const {
diff --git a/modules/video_coding/main/source/generic_encoder.cc b/modules/video_coding/main/source/generic_encoder.cc
index 6fb2c9f..655f7ac 100644
--- a/modules/video_coding/main/source/generic_encoder.cc
+++ b/modules/video_coding/main/source/generic_encoder.cc
@@ -38,6 +38,9 @@
(*rtp)->simulcastIdx = info->codecSpecific.VP8.simulcastIdx;
return;
}
+ case kVideoCodecH264:
+ (*rtp)->codec = kRtpVideoH264;
+ return;
case kVideoCodecGeneric:
(*rtp)->codec = kRtpVideoGeneric;
(*rtp)->simulcastIdx = info->codecSpecific.generic.simulcast_idx;
diff --git a/modules/video_coding/main/source/internal_defines.h b/modules/video_coding/main/source/internal_defines.h
index efc6d8d..ef42c62 100644
--- a/modules/video_coding/main/source/internal_defines.h
+++ b/modules/video_coding/main/source/internal_defines.h
@@ -35,16 +35,21 @@
// Helper macros for creating the static codec list
#define VCM_NO_CODEC_IDX -1
#ifdef VIDEOCODEC_VP8
- #define VCM_VP8_IDX VCM_NO_CODEC_IDX + 1
+ #define VCM_VP8_IDX (VCM_NO_CODEC_IDX + 1)
#else
#define VCM_VP8_IDX VCM_NO_CODEC_IDX
#endif
-#ifdef VIDEOCODEC_I420
- #define VCM_I420_IDX VCM_VP8_IDX + 1
+#ifdef VIDEOCODEC_H264
+ #define VCM_H264_IDX (VCM_VP8_IDX + 1)
#else
- #define VCM_I420_IDX VCM_VP8_IDX
+ #define VCM_H264_IDX VCM_VP8_IDX
#endif
-#define VCM_NUM_VIDEO_CODECS_AVAILABLE VCM_I420_IDX + 1
+#ifdef VIDEOCODEC_I420
+ #define VCM_I420_IDX (VCM_H264_IDX + 1)
+#else
+ #define VCM_I420_IDX VCM_H264_IDX
+#endif
+#define VCM_NUM_VIDEO_CODECS_AVAILABLE (VCM_I420_IDX + 1)
#define VCM_NO_RECEIVER_ID 0
diff --git a/modules/video_coding/main/source/jitter_buffer.cc b/modules/video_coding/main/source/jitter_buffer.cc
index d8792f2..d09fccd 100644
--- a/modules/video_coding/main/source/jitter_buffer.cc
+++ b/modules/video_coding/main/source/jitter_buffer.cc
@@ -122,8 +122,7 @@
}
}
-VCMJitterBuffer::VCMJitterBuffer(Clock* clock,
- EventFactory* event_factory)
+VCMJitterBuffer::VCMJitterBuffer(Clock* clock, EventFactory* event_factory)
: clock_(clock),
running_(false),
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
@@ -145,7 +144,7 @@
num_consecutive_old_frames_(0),
num_consecutive_old_packets_(0),
num_discarded_packets_(0),
- jitter_estimate_(),
+ jitter_estimate_(clock),
inter_frame_delay_(clock_->TimeInMilliseconds()),
rtt_ms_(kDefaultRtt),
nack_mode_(kNoNack),
@@ -482,7 +481,6 @@
VCMEncodedFrame* VCMJitterBuffer::ExtractAndSetDecode(uint32_t timestamp) {
CriticalSectionScoped cs(crit_sect_);
-
if (!running_) {
return NULL;
}
@@ -611,7 +609,6 @@
if (error != kNoError && frame == NULL) {
return error;
}
-
int64_t now_ms = clock_->TimeInMilliseconds();
// We are keeping track of the first and latest seq numbers, and
// the number of wraps to be able to calculate how many packets we expect.
diff --git a/modules/video_coding/main/source/jitter_estimator.cc b/modules/video_coding/main/source/jitter_estimator.cc
index 71c54a0..b36775a 100644
--- a/modules/video_coding/main/source/jitter_estimator.cc
+++ b/modules/video_coding/main/source/jitter_estimator.cc
@@ -11,6 +11,8 @@
#include "webrtc/modules/video_coding/main/source/internal_defines.h"
#include "webrtc/modules/video_coding/main/source/jitter_estimator.h"
#include "webrtc/modules/video_coding/main/source/rtt_filter.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/field_trial.h"
#include <assert.h>
#include <math.h>
@@ -19,7 +21,13 @@
namespace webrtc {
-VCMJitterEstimator::VCMJitterEstimator(int32_t vcmId, int32_t receiverId)
+enum { kStartupDelaySamples = 30 };
+enum { kFsAccuStartupSamples = 5 };
+enum { kMaxFramerateEstimate = 200 };
+
+VCMJitterEstimator::VCMJitterEstimator(const Clock* clock,
+ int32_t vcmId,
+ int32_t receiverId)
: _vcmId(vcmId),
_receiverId(receiverId),
_phi(0.97),
@@ -32,8 +40,15 @@
_noiseStdDevs(2.33), // ~Less than 1% chance
// (look up in normal distribution table)...
_noiseStdDevOffset(30.0), // ...of getting 30 ms freezes
- _rttFilter() {
- Reset();
+ _rttFilter(),
+ fps_counter_(30), // TODO(sprang): Use an estimator with limit based on
+ // time, rather than number of samples.
+ low_rate_experiment_(kInit),
+ clock_(clock) {
+ Reset();
+}
+
+VCMJitterEstimator::~VCMJitterEstimator() {
}
VCMJitterEstimator&
@@ -94,6 +109,7 @@
_fsCount = 0;
_startupCount = 0;
_rttFilter.Reset();
+ fps_counter_.Reset();
}
void
@@ -297,35 +313,54 @@
// Estimates the random jitter by calculating the variance of the
// sample distance from the line given by theta.
-void
-VCMJitterEstimator::EstimateRandomJitter(double d_dT, bool incompleteFrame)
-{
- double alpha;
- if (_alphaCount == 0)
- {
- assert(_alphaCount > 0);
- return;
+void VCMJitterEstimator::EstimateRandomJitter(double d_dT,
+ bool incompleteFrame) {
+ uint64_t now = clock_->TimeInMicroseconds();
+ if (_lastUpdateT != -1) {
+ fps_counter_.AddSample(now - _lastUpdateT);
+ }
+ _lastUpdateT = now;
+
+ if (_alphaCount == 0) {
+ assert(false);
+ return;
+ }
+ double alpha =
+ static_cast<double>(_alphaCount - 1) / static_cast<double>(_alphaCount);
+ _alphaCount++;
+ if (_alphaCount > _alphaCountMax)
+ _alphaCount = _alphaCountMax;
+
+ if (LowRateExperimentEnabled()) {
+ // In order to avoid a low frame rate stream to react slower to changes,
+ // scale the alpha weight relative a 30 fps stream.
+ double fps = GetFrameRate();
+ if (fps > 0.0) {
+ double rate_scale = 30.0 / fps;
+ // At startup, there can be a lot of noise in the fps estimate.
+ // Interpolate rate_scale linearly, from 1.0 at sample #1, to 30.0 / fps
+ // at sample #kStartupDelaySamples.
+ if (_alphaCount < kStartupDelaySamples) {
+ rate_scale =
+ (_alphaCount * rate_scale + (kStartupDelaySamples - _alphaCount)) /
+ kStartupDelaySamples;
+ }
+ alpha = pow(alpha, rate_scale);
}
- alpha = static_cast<double>(_alphaCount - 1) / static_cast<double>(_alphaCount);
- _alphaCount++;
- if (_alphaCount > _alphaCountMax)
- {
- _alphaCount = _alphaCountMax;
- }
- double avgNoise = alpha * _avgNoise + (1 - alpha) * d_dT;
- double varNoise = alpha * _varNoise +
- (1 - alpha) * (d_dT - _avgNoise) * (d_dT - _avgNoise);
- if (!incompleteFrame || varNoise > _varNoise)
- {
- _avgNoise = avgNoise;
- _varNoise = varNoise;
- }
- if (_varNoise < 1.0)
- {
- // The variance should never be zero, since we might get
- // stuck and consider all samples as outliers.
- _varNoise = 1.0;
- }
+ }
+
+ double avgNoise = alpha * _avgNoise + (1 - alpha) * d_dT;
+ double varNoise =
+ alpha * _varNoise + (1 - alpha) * (d_dT - _avgNoise) * (d_dT - _avgNoise);
+ if (!incompleteFrame || varNoise > _varNoise) {
+ _avgNoise = avgNoise;
+ _varNoise = varNoise;
+ }
+ if (_varNoise < 1.0) {
+ // The variance should never be zero, since we might get
+ // stuck and consider all samples as outliers.
+ _varNoise = 1.0;
+ }
}
double
@@ -387,19 +422,61 @@
// Returns the current filtered estimate if available,
// otherwise tries to calculate an estimate.
-int
-VCMJitterEstimator::GetJitterEstimate(double rttMultiplier)
-{
- double jitterMS = CalculateEstimate() + OPERATING_SYSTEM_JITTER;
- if (_filterJitterEstimate > jitterMS)
- {
- jitterMS = _filterJitterEstimate;
+int VCMJitterEstimator::GetJitterEstimate(double rttMultiplier) {
+ double jitterMS = CalculateEstimate() + OPERATING_SYSTEM_JITTER;
+ if (_filterJitterEstimate > jitterMS)
+ jitterMS = _filterJitterEstimate;
+ if (_nackCount >= _nackLimit)
+ jitterMS += _rttFilter.RttMs() * rttMultiplier;
+
+ if (LowRateExperimentEnabled()) {
+ static const double kJitterScaleLowThreshold = 5.0;
+ static const double kJitterScaleHighThreshold = 10.0;
+ double fps = GetFrameRate();
+ // Ignore jitter for very low fps streams.
+ if (fps < kJitterScaleLowThreshold) {
+ if (fps == 0.0) {
+ return jitterMS;
+ }
+ return 0;
}
- if (_nackCount >= _nackLimit)
- {
- jitterMS += _rttFilter.RttMs() * rttMultiplier;
+
+ // Semi-low frame rate; scale by factor linearly interpolated from 0.0 at
+ // kJitterScaleLowThreshold to 1.0 at kJitterScaleHighThreshold.
+ if (fps < kJitterScaleHighThreshold) {
+ jitterMS =
+ (1.0 / (kJitterScaleHighThreshold - kJitterScaleLowThreshold)) *
+ (fps - kJitterScaleLowThreshold) * jitterMS;
}
- return static_cast<uint32_t>(jitterMS + 0.5);
+ }
+
+ return static_cast<uint32_t>(jitterMS + 0.5);
+}
+
+bool VCMJitterEstimator::LowRateExperimentEnabled() {
+ if (low_rate_experiment_ == kInit) {
+ std::string group =
+ webrtc::field_trial::FindFullName("WebRTC-ReducedJitterDelay");
+ if (group == "Disabled") {
+ low_rate_experiment_ = kDisabled;
+ } else {
+ low_rate_experiment_ = kEnabled;
+ }
+ }
+ return low_rate_experiment_ == kEnabled ? true : false;
+}
+
+double VCMJitterEstimator::GetFrameRate() const {
+ if (fps_counter_.count() == 0)
+ return 0;
+
+ double fps = 1000000.0 / fps_counter_.ComputeMean();
+ // Sanity check.
+ assert(fps >= 0.0);
+ if (fps > kMaxFramerateEstimate) {
+ fps = kMaxFramerateEstimate;
+ }
+ return fps;
}
}
diff --git a/modules/video_coding/main/source/jitter_estimator.h b/modules/video_coding/main/source/jitter_estimator.h
index dda8f8d..ec7e35c 100644
--- a/modules/video_coding/main/source/jitter_estimator.h
+++ b/modules/video_coding/main/source/jitter_estimator.h
@@ -11,17 +11,22 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_JITTER_ESTIMATOR_H_
#define WEBRTC_MODULES_VIDEO_CODING_JITTER_ESTIMATOR_H_
+#include "webrtc/base/rollingaccumulator.h"
#include "webrtc/modules/video_coding/main/source/rtt_filter.h"
#include "webrtc/typedefs.h"
namespace webrtc
{
+class Clock;
+
class VCMJitterEstimator
{
public:
- VCMJitterEstimator(int32_t vcmId = 0, int32_t receiverId = 0);
-
+ VCMJitterEstimator(const Clock* clock,
+ int32_t vcmId = 0,
+ int32_t receiverId = 0);
+ virtual ~VCMJitterEstimator();
VCMJitterEstimator& operator=(const VCMJitterEstimator& rhs);
// Resets the estimate to the initial state
@@ -68,6 +73,8 @@
double _theta[2]; // Estimated line parameters (slope, offset)
double _varNoise; // Variance of the time-deviation from the line
+ virtual bool LowRateExperimentEnabled();
+
private:
// Updates the Kalman filter for the line describing
// the frame size dependent jitter.
@@ -109,6 +116,8 @@
double DeviationFromExpectedDelay(int64_t frameDelayMS,
int32_t deltaFSBytes) const;
+ double GetFrameRate() const;
+
// Constants, filter parameters
int32_t _vcmId;
int32_t _receiverId;
@@ -145,8 +154,10 @@
// but never goes above _nackLimit
VCMRttFilter _rttFilter;
- enum { kStartupDelaySamples = 30 };
- enum { kFsAccuStartupSamples = 5 };
+ rtc::RollingAccumulator<uint64_t> fps_counter_;
+ enum ExperimentFlag { kInit, kEnabled, kDisabled };
+ ExperimentFlag low_rate_experiment_;
+ const Clock* clock_;
};
} // namespace webrtc
diff --git a/modules/video_coding/main/source/jitter_estimator_tests.cc b/modules/video_coding/main/source/jitter_estimator_tests.cc
new file mode 100644
index 0000000..5f34750
--- /dev/null
+++ b/modules/video_coding/main/source/jitter_estimator_tests.cc
@@ -0,0 +1,160 @@
+/* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/video_coding/main/source/jitter_estimator.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+
+namespace webrtc {
+
+class TestEstimator : public VCMJitterEstimator {
+ public:
+ explicit TestEstimator(bool exp_enabled)
+ : VCMJitterEstimator(&fake_clock_, 0, 0),
+ fake_clock_(0),
+ exp_enabled_(exp_enabled) {}
+
+ virtual bool LowRateExperimentEnabled() { return exp_enabled_; }
+
+ void AdvanceClock(int64_t microseconds) {
+ fake_clock_.AdvanceTimeMicroseconds(microseconds);
+ }
+
+ private:
+ SimulatedClock fake_clock_;
+ const bool exp_enabled_;
+};
+
+class TestVCMJitterEstimator : public ::testing::Test {
+ protected:
+ TestVCMJitterEstimator()
+ : regular_estimator_(false), low_rate_estimator_(true) {}
+
+ virtual void SetUp() { regular_estimator_.Reset(); }
+
+ TestEstimator regular_estimator_;
+ TestEstimator low_rate_estimator_;
+};
+
+// Generates some simple test data in the form of a sawtooth wave.
+class ValueGenerator {
+ public:
+ ValueGenerator(int32_t amplitude) : amplitude_(amplitude), counter_(0) {}
+ virtual ~ValueGenerator() {}
+
+ int64_t Delay() { return ((counter_ % 11) - 5) * amplitude_; }
+
+ uint32_t FrameSize() { return 1000 + Delay(); }
+
+ void Advance() { ++counter_; }
+
+ private:
+ const int32_t amplitude_;
+ int64_t counter_;
+};
+
+// 5 fps, disable jitter delay altogether.
+TEST_F(TestVCMJitterEstimator, TestLowRate) {
+ ValueGenerator gen(10);
+ uint64_t time_delta = 1000000 / 5;
+ for (int i = 0; i < 60; ++i) {
+ regular_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ regular_estimator_.AdvanceClock(time_delta);
+ low_rate_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ low_rate_estimator_.AdvanceClock(time_delta);
+ EXPECT_GT(regular_estimator_.GetJitterEstimate(0), 0);
+ if (i > 2)
+ EXPECT_EQ(low_rate_estimator_.GetJitterEstimate(0), 0);
+ gen.Advance();
+ }
+}
+
+// 8 fps, steady state estimate should be in interpolated interval between 0
+// and value of previous method.
+TEST_F(TestVCMJitterEstimator, TestMidRate) {
+ ValueGenerator gen(10);
+ uint64_t time_delta = 1000000 / 8;
+ for (int i = 0; i < 60; ++i) {
+ regular_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ regular_estimator_.AdvanceClock(time_delta);
+ low_rate_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ low_rate_estimator_.AdvanceClock(time_delta);
+ EXPECT_GT(regular_estimator_.GetJitterEstimate(0), 0);
+ EXPECT_GT(low_rate_estimator_.GetJitterEstimate(0), 0);
+ EXPECT_GE(regular_estimator_.GetJitterEstimate(0),
+ low_rate_estimator_.GetJitterEstimate(0));
+ gen.Advance();
+ }
+}
+
+// 30 fps, steady state estimate should be same as previous method.
+TEST_F(TestVCMJitterEstimator, TestHighRate) {
+ ValueGenerator gen(10);
+ uint64_t time_delta = 1000000 / 30;
+ for (int i = 0; i < 60; ++i) {
+ regular_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ regular_estimator_.AdvanceClock(time_delta);
+ low_rate_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ low_rate_estimator_.AdvanceClock(time_delta);
+ EXPECT_EQ(regular_estimator_.GetJitterEstimate(0),
+ low_rate_estimator_.GetJitterEstimate(0));
+ gen.Advance();
+ }
+}
+
+// 10 fps, high jitter then low jitter. Low rate estimator should converge
+// faster to low noise estimate.
+TEST_F(TestVCMJitterEstimator, TestConvergence) {
+ // Reach a steady state with high noise.
+ ValueGenerator gen(50);
+ uint64_t time_delta = 1000000 / 10;
+ for (int i = 0; i < 100; ++i) {
+ regular_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ regular_estimator_.AdvanceClock(time_delta * 2);
+ low_rate_estimator_.UpdateEstimate(gen.Delay(), gen.FrameSize());
+ low_rate_estimator_.AdvanceClock(time_delta * 2);
+ gen.Advance();
+ }
+
+ int threshold = regular_estimator_.GetJitterEstimate(0) / 2;
+
+ // New generator with zero noise.
+ ValueGenerator low_gen(0);
+ int regular_iterations = 0;
+ int low_rate_iterations = 0;
+ for (int i = 0; i < 500; ++i) {
+ if (regular_iterations == 0) {
+ regular_estimator_.UpdateEstimate(low_gen.Delay(), low_gen.FrameSize());
+ regular_estimator_.AdvanceClock(time_delta);
+ if (regular_estimator_.GetJitterEstimate(0) < threshold) {
+ regular_iterations = i;
+ }
+ }
+
+ if (low_rate_iterations == 0) {
+ low_rate_estimator_.UpdateEstimate(low_gen.Delay(), low_gen.FrameSize());
+ low_rate_estimator_.AdvanceClock(time_delta);
+ if (low_rate_estimator_.GetJitterEstimate(0) < threshold) {
+ low_rate_iterations = i;
+ }
+ }
+
+ if (regular_iterations != 0 && low_rate_iterations != 0) {
+ break;
+ }
+
+ gen.Advance();
+ }
+
+ EXPECT_NE(regular_iterations, 0);
+ EXPECT_NE(low_rate_iterations, 0);
+ EXPECT_LE(low_rate_iterations, regular_iterations);
+}
+}
diff --git a/modules/video_coding/main/source/media_opt_util.cc b/modules/video_coding/main/source/media_opt_util.cc
index ba86575..b506a5b 100644
--- a/modules/video_coding/main/source/media_opt_util.cc
+++ b/modules/video_coding/main/source/media_opt_util.cc
@@ -837,7 +837,7 @@
case kNoFilter:
break;
case kAvgFilter:
- filtered_loss = static_cast<uint8_t> (_lossPr255.Value() + 0.5);
+ filtered_loss = static_cast<uint8_t>(_lossPr255.filtered() + 0.5);
break;
case kMaxFilter:
filtered_loss = MaxFilteredLossPr(nowMs);
@@ -907,8 +907,8 @@
_currentParameters.keyFrameSize = _keyFrameSize;
_currentParameters.fecRateDelta = _fecRateDelta;
_currentParameters.fecRateKey = _fecRateKey;
- _currentParameters.packetsPerFrame = _packetsPerFrame.Value();
- _currentParameters.packetsPerFrameKey = _packetsPerFrameKey.Value();
+ _currentParameters.packetsPerFrame = _packetsPerFrame.filtered();
+ _currentParameters.packetsPerFrameKey = _packetsPerFrameKey.filtered();
_currentParameters.residualPacketLossFec = _residualPacketLossFec;
_currentParameters.codecWidth = _codecWidth;
_currentParameters.codecHeight = _codecHeight;
diff --git a/modules/video_coding/main/source/media_opt_util.h b/modules/video_coding/main/source/media_opt_util.h
index f39a578..d421d9e 100644
--- a/modules/video_coding/main/source/media_opt_util.h
+++ b/modules/video_coding/main/source/media_opt_util.h
@@ -14,9 +14,9 @@
#include <math.h>
#include <stdlib.h>
+#include "webrtc/base/exp_filter.h"
#include "webrtc/modules/video_coding/main/source/internal_defines.h"
#include "webrtc/modules/video_coding/main/source/qm_select.h"
-#include "webrtc/modules/video_coding/utility/include/exp_filter.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/typedefs.h"
@@ -367,27 +367,27 @@
// Sets the available loss protection methods.
void UpdateMaxLossHistory(uint8_t lossPr255, int64_t now);
uint8_t MaxFilteredLossPr(int64_t nowMs) const;
- VCMProtectionMethod* _selectedMethod;
- VCMProtectionParameters _currentParameters;
- uint32_t _rtt;
- float _lossPr;
- float _bitRate;
- float _frameRate;
- float _keyFrameSize;
- uint8_t _fecRateKey;
- uint8_t _fecRateDelta;
- int64_t _lastPrUpdateT;
- int64_t _lastPacketPerFrameUpdateT;
- int64_t _lastPacketPerFrameUpdateTKey;
- VCMExpFilter _lossPr255;
- VCMLossProbabilitySample _lossPrHistory[kLossPrHistorySize];
- uint8_t _shortMaxLossPr255;
- VCMExpFilter _packetsPerFrame;
- VCMExpFilter _packetsPerFrameKey;
- float _residualPacketLossFec;
- uint16_t _codecWidth;
- uint16_t _codecHeight;
- int _numLayers;
+ VCMProtectionMethod* _selectedMethod;
+ VCMProtectionParameters _currentParameters;
+ uint32_t _rtt;
+ float _lossPr;
+ float _bitRate;
+ float _frameRate;
+ float _keyFrameSize;
+ uint8_t _fecRateKey;
+ uint8_t _fecRateDelta;
+ int64_t _lastPrUpdateT;
+ int64_t _lastPacketPerFrameUpdateT;
+ int64_t _lastPacketPerFrameUpdateTKey;
+ rtc::ExpFilter _lossPr255;
+ VCMLossProbabilitySample _lossPrHistory[kLossPrHistorySize];
+ uint8_t _shortMaxLossPr255;
+ rtc::ExpFilter _packetsPerFrame;
+ rtc::ExpFilter _packetsPerFrameKey;
+ float _residualPacketLossFec;
+ uint16_t _codecWidth;
+ uint16_t _codecHeight;
+ int _numLayers;
};
} // namespace media_optimization
diff --git a/modules/video_coding/main/source/media_optimization.cc b/modules/video_coding/main/source/media_optimization.cc
index 4dc7225..0d9a4bd 100644
--- a/modules/video_coding/main/source/media_optimization.cc
+++ b/modules/video_coding/main/source/media_optimization.cc
@@ -75,7 +75,8 @@
};
MediaOptimization::MediaOptimization(Clock* clock)
- : clock_(clock),
+ : crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
+ clock_(clock),
max_bit_rate_(0),
send_codec_type_(kVideoCodecUnknown),
codec_width_(0),
@@ -113,7 +114,9 @@
}
void MediaOptimization::Reset() {
- SetEncodingData(kVideoCodecUnknown, 0, 0, 0, 0, 0, 0, max_payload_size_);
+ CriticalSectionScoped lock(crit_sect_.get());
+ SetEncodingDataInternal(
+ kVideoCodecUnknown, 0, 0, 0, 0, 0, 0, max_payload_size_);
memset(incoming_frame_times_, -1, sizeof(incoming_frame_times_));
incoming_frame_rate_ = 0.0;
frame_dropper_->Reset();
@@ -145,6 +148,25 @@
uint16_t height,
int num_layers,
int32_t mtu) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ SetEncodingDataInternal(send_codec_type,
+ max_bit_rate,
+ frame_rate,
+ target_bitrate,
+ width,
+ height,
+ num_layers,
+ mtu);
+}
+
+void MediaOptimization::SetEncodingDataInternal(VideoCodecType send_codec_type,
+ int32_t max_bit_rate,
+ uint32_t frame_rate,
+ uint32_t target_bitrate,
+ uint16_t width,
+ uint16_t height,
+ int num_layers,
+ int32_t mtu) {
// Everything codec specific should be reset here since this means the codec
// has changed. If native dimension values have changed, then either user
// initiated change, or QM initiated change. Will be able to determine only
@@ -181,6 +203,7 @@
uint32_t round_trip_time_ms,
VCMProtectionCallback* protection_callback,
VCMQMSettingsCallback* qmsettings_callback) {
+ CriticalSectionScoped lock(crit_sect_.get());
// TODO(holmer): Consider putting this threshold only on the video bitrate,
// and not on protection.
if (max_bit_rate_ > 0 &&
@@ -194,7 +217,7 @@
loss_prot_logic_->UpdateResidualPacketLoss(static_cast<float>(fraction_lost));
// Get frame rate for encoder: this is the actual/sent frame rate.
- float actual_frame_rate = SentFrameRate();
+ float actual_frame_rate = SentFrameRateInternal();
// Sanity check.
if (actual_frame_rate < 1.0) {
@@ -297,6 +320,7 @@
void MediaOptimization::EnableProtectionMethod(bool enable,
VCMProtectionMethodEnum method) {
+ CriticalSectionScoped lock(crit_sect_.get());
bool updated = false;
if (enable) {
updated = loss_prot_logic_->SetMethod(method);
@@ -309,17 +333,28 @@
}
uint32_t MediaOptimization::InputFrameRate() {
+ CriticalSectionScoped lock(crit_sect_.get());
+ return InputFrameRateInternal();
+}
+
+uint32_t MediaOptimization::InputFrameRateInternal() {
ProcessIncomingFrameRate(clock_->TimeInMilliseconds());
return uint32_t(incoming_frame_rate_ + 0.5f);
}
uint32_t MediaOptimization::SentFrameRate() {
+ CriticalSectionScoped lock(crit_sect_.get());
+ return SentFrameRateInternal();
+}
+
+uint32_t MediaOptimization::SentFrameRateInternal() {
PurgeOldFrameSamples(clock_->TimeInMilliseconds());
UpdateSentFramerate();
return avg_sent_framerate_;
}
uint32_t MediaOptimization::SentBitRate() {
+ CriticalSectionScoped lock(crit_sect_.get());
const int64_t now_ms = clock_->TimeInMilliseconds();
PurgeOldFrameSamples(now_ms);
UpdateSentBitrate(now_ms);
@@ -327,6 +362,7 @@
}
VCMFrameCount MediaOptimization::SentFrameCount() {
+ CriticalSectionScoped lock(crit_sect_.get());
VCMFrameCount count;
count.numDeltaFrames = delta_frame_cnt_;
count.numKeyFrames = key_frame_cnt_;
@@ -336,6 +372,7 @@
int32_t MediaOptimization::UpdateWithEncodedData(int encoded_length,
uint32_t timestamp,
FrameType encoded_frame_type) {
+ CriticalSectionScoped lock(crit_sect_.get());
const int64_t now_ms = clock_->TimeInMilliseconds();
PurgeOldFrameSamples(now_ms);
if (encoded_frame_samples_.size() > 0 &&
@@ -386,22 +423,55 @@
return VCM_OK;
}
-void MediaOptimization::EnableQM(bool enable) { enable_qm_ = enable; }
+void MediaOptimization::EnableQM(bool enable) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ enable_qm_ = enable;
+}
void MediaOptimization::EnableFrameDropper(bool enable) {
+ CriticalSectionScoped lock(crit_sect_.get());
frame_dropper_->Enable(enable);
}
+void MediaOptimization::SuspendBelowMinBitrate(int threshold_bps,
+ int window_bps) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ assert(threshold_bps > 0 && window_bps >= 0);
+ suspension_threshold_bps_ = threshold_bps;
+ suspension_window_bps_ = window_bps;
+ suspension_enabled_ = true;
+ video_suspended_ = false;
+}
+
+bool MediaOptimization::IsVideoSuspended() const {
+ CriticalSectionScoped lock(crit_sect_.get());
+ return video_suspended_;
+}
+
bool MediaOptimization::DropFrame() {
+ CriticalSectionScoped lock(crit_sect_.get());
UpdateIncomingFrameRate();
// Leak appropriate number of bytes.
- frame_dropper_->Leak((uint32_t)(InputFrameRate() + 0.5f));
+ frame_dropper_->Leak((uint32_t)(InputFrameRateInternal() + 0.5f));
if (video_suspended_) {
return true; // Drop all frames when muted.
}
return frame_dropper_->DropFrame();
}
+void MediaOptimization::UpdateContentData(
+ const VideoContentMetrics* content_metrics) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ // Updating content metrics.
+ if (content_metrics == NULL) {
+ // Disable QM if metrics are NULL.
+ enable_qm_ = false;
+ qm_resolution_->Reset();
+ } else {
+ content_->UpdateContentData(content_metrics);
+ }
+}
+
void MediaOptimization::UpdateIncomingFrameRate() {
int64_t now = clock_->TimeInMilliseconds();
if (incoming_frame_times_[0] == 0) {
@@ -416,18 +486,6 @@
ProcessIncomingFrameRate(now);
}
-void MediaOptimization::UpdateContentData(
- const VideoContentMetrics* content_metrics) {
- // Updating content metrics.
- if (content_metrics == NULL) {
- // Disable QM if metrics are NULL.
- enable_qm_ = false;
- qm_resolution_->Reset();
- } else {
- content_->UpdateContentData(content_metrics);
- }
-}
-
int32_t MediaOptimization::SelectQuality(
VCMQMSettingsCallback* video_qmsettings_callback) {
// Reset quantities for QM select.
@@ -458,17 +516,6 @@
return VCM_OK;
}
-void MediaOptimization::SuspendBelowMinBitrate(int threshold_bps,
- int window_bps) {
- assert(threshold_bps > 0 && window_bps >= 0);
- suspension_threshold_bps_ = threshold_bps;
- suspension_window_bps_ = window_bps;
- suspension_enabled_ = true;
- video_suspended_ = false;
-}
-
-bool MediaOptimization::IsVideoSuspended() const { return video_suspended_; }
-
void MediaOptimization::PurgeOldFrameSamples(int64_t now_ms) {
while (!encoded_frame_samples_.empty()) {
if (now_ms - encoded_frame_samples_.front().time_complete_ms >
diff --git a/modules/video_coding/main/source/media_optimization.h b/modules/video_coding/main/source/media_optimization.h
index 35a4971..df3fbb6 100644
--- a/modules/video_coding/main/source/media_optimization.h
+++ b/modules/video_coding/main/source/media_optimization.h
@@ -17,6 +17,7 @@
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
#include "webrtc/modules/video_coding/main/source/media_opt_util.h"
#include "webrtc/modules/video_coding/main/source/qm_select.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@@ -28,7 +29,6 @@
namespace media_optimization {
-// TODO(andresp): Make thread safe.
class MediaOptimization {
public:
explicit MediaOptimization(Clock* clock);
@@ -100,59 +100,80 @@
struct EncodedFrameSample;
typedef std::list<EncodedFrameSample> FrameSampleList;
- void UpdateIncomingFrameRate();
- void PurgeOldFrameSamples(int64_t now_ms);
- void UpdateSentBitrate(int64_t now_ms);
- void UpdateSentFramerate();
+ void UpdateIncomingFrameRate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ void PurgeOldFrameSamples(int64_t now_ms)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ void UpdateSentBitrate(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ void UpdateSentFramerate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
// Computes new Quality Mode.
- int32_t SelectQuality(VCMQMSettingsCallback* qmsettings_callback);
+ int32_t SelectQuality(VCMQMSettingsCallback* qmsettings_callback)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
// Verifies if QM settings differ from default, i.e. if an update is required.
// Computes actual values, as will be sent to the encoder.
bool QMUpdate(VCMResolutionScale* qm,
- VCMQMSettingsCallback* qmsettings_callback);
+ VCMQMSettingsCallback* qmsettings_callback)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
// Checks if we should make a QM change. Return true if yes, false otherwise.
- bool CheckStatusForQMchange();
+ bool CheckStatusForQMchange() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
- void ProcessIncomingFrameRate(int64_t now);
+ void ProcessIncomingFrameRate(int64_t now)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
// Checks conditions for suspending the video. The method compares
// |target_bit_rate_| with the threshold values for suspension, and changes
// the state of |video_suspended_| accordingly.
- void CheckSuspendConditions();
+ void CheckSuspendConditions() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
- Clock* clock_;
- int32_t max_bit_rate_;
- VideoCodecType send_codec_type_;
- uint16_t codec_width_;
- uint16_t codec_height_;
- float user_frame_rate_;
- scoped_ptr<FrameDropper> frame_dropper_;
- scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_;
- uint8_t fraction_lost_;
- uint32_t send_statistics_[4];
- uint32_t send_statistics_zero_encode_;
- int32_t max_payload_size_;
- int target_bit_rate_;
- float incoming_frame_rate_;
- int64_t incoming_frame_times_[kFrameCountHistorySize];
- bool enable_qm_;
- std::list<EncodedFrameSample> encoded_frame_samples_;
- uint32_t avg_sent_bit_rate_bps_;
- uint32_t avg_sent_framerate_;
- uint32_t key_frame_cnt_;
- uint32_t delta_frame_cnt_;
- scoped_ptr<VCMContentMetricsProcessing> content_;
- scoped_ptr<VCMQmResolution> qm_resolution_;
- int64_t last_qm_update_time_;
- int64_t last_change_time_; // Content/user triggered.
- int num_layers_;
- bool suspension_enabled_;
- bool video_suspended_;
- int suspension_threshold_bps_;
- int suspension_window_bps_;
+ void SetEncodingDataInternal(VideoCodecType send_codec_type,
+ int32_t max_bit_rate,
+ uint32_t frame_rate,
+ uint32_t bit_rate,
+ uint16_t width,
+ uint16_t height,
+ int num_temporal_layers,
+ int32_t mtu)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+
+ uint32_t InputFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+
+ uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+
+ // Protect all members.
+ scoped_ptr<CriticalSectionWrapper> crit_sect_;
+
+ Clock* clock_ GUARDED_BY(crit_sect_);
+ int32_t max_bit_rate_ GUARDED_BY(crit_sect_);
+ VideoCodecType send_codec_type_ GUARDED_BY(crit_sect_);
+ uint16_t codec_width_ GUARDED_BY(crit_sect_);
+ uint16_t codec_height_ GUARDED_BY(crit_sect_);
+ float user_frame_rate_ GUARDED_BY(crit_sect_);
+ scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
+ scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_ GUARDED_BY(crit_sect_);
+ uint8_t fraction_lost_ GUARDED_BY(crit_sect_);
+ uint32_t send_statistics_[4] GUARDED_BY(crit_sect_);
+ uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_);
+ int32_t max_payload_size_ GUARDED_BY(crit_sect_);
+ int target_bit_rate_ GUARDED_BY(crit_sect_);
+ float incoming_frame_rate_ GUARDED_BY(crit_sect_);
+ int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_);
+ bool enable_qm_ GUARDED_BY(crit_sect_);
+ std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_);
+ uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_);
+ uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_);
+ uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_);
+ uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_);
+ scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_);
+ scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_);
+ int64_t last_qm_update_time_ GUARDED_BY(crit_sect_);
+ int64_t last_change_time_ GUARDED_BY(crit_sect_); // Content/user triggered.
+ int num_layers_ GUARDED_BY(crit_sect_);
+ bool suspension_enabled_ GUARDED_BY(crit_sect_);
+ bool video_suspended_ GUARDED_BY(crit_sect_);
+ int suspension_threshold_bps_ GUARDED_BY(crit_sect_);
+ int suspension_window_bps_ GUARDED_BY(crit_sect_);
};
} // namespace media_optimization
} // namespace webrtc
diff --git a/modules/video_coding/main/source/packet.cc b/modules/video_coding/main/source/packet.cc
index c1f1a04..63dcd63 100644
--- a/modules/video_coding/main/source/packet.cc
+++ b/modules/video_coding/main/source/packet.cc
@@ -94,33 +94,44 @@
memset(&codecSpecificHeader, 0, sizeof(RTPVideoHeader));
}
-void VCMPacket::CopyCodecSpecifics(const RTPVideoHeader& videoHeader)
-{
- switch(videoHeader.codec)
- {
- case kRtpVideoVp8:
- {
- // Handle all packets within a frame as depending on the previous packet
- // TODO(holmer): This should be changed to make fragments independent
- // when the VP8 RTP receiver supports fragments.
- if (isFirstPacket && markerBit)
- completeNALU = kNaluComplete;
- else if (isFirstPacket)
- completeNALU = kNaluStart;
- else if (markerBit)
- completeNALU = kNaluEnd;
- else
- completeNALU = kNaluIncomplete;
+void VCMPacket::CopyCodecSpecifics(const RTPVideoHeader& videoHeader) {
+ switch (videoHeader.codec) {
+ case kRtpVideoVp8:
+ // Handle all packets within a frame as depending on the previous packet
+ // TODO(holmer): This should be changed to make fragments independent
+ // when the VP8 RTP receiver supports fragments.
+ if (isFirstPacket && markerBit)
+ completeNALU = kNaluComplete;
+ else if (isFirstPacket)
+ completeNALU = kNaluStart;
+ else if (markerBit)
+ completeNALU = kNaluEnd;
+ else
+ completeNALU = kNaluIncomplete;
- codec = kVideoCodecVP8;
- break;
- }
- default:
- {
- codec = kVideoCodecUnknown;
- break;
- }
- }
+ codec = kVideoCodecVP8;
+ return;
+ case kRtpVideoH264:
+ isFirstPacket = videoHeader.isFirstPacket;
+ if (isFirstPacket)
+ insertStartCode = true;
+
+ if (videoHeader.codecHeader.H264.single_nalu) {
+ completeNALU = kNaluComplete;
+ } else if (isFirstPacket) {
+ completeNALU = kNaluStart;
+ } else if (markerBit) {
+ completeNALU = kNaluEnd;
+ } else {
+ completeNALU = kNaluIncomplete;
+ }
+ codec = kVideoCodecH264;
+ return;
+ case kRtpVideoGeneric:
+ case kRtpVideoNone:
+ codec = kVideoCodecUnknown;
+ return;
+ }
}
-}
+} // namespace webrtc
diff --git a/modules/video_coding/main/source/session_info.cc b/modules/video_coding/main/source/session_info.cc
index dab3da1..d7d576d 100644
--- a/modules/video_coding/main/source/session_info.cc
+++ b/modules/video_coding/main/source/session_info.cc
@@ -14,7 +14,7 @@
#include "webrtc/system_wrappers/interface/logging.h"
namespace webrtc {
-
+namespace {
// Used in determining whether a frame is decodable.
enum {kRttThreshold = 100}; // Not decodable if Rtt is lower than this.
@@ -23,6 +23,11 @@
static const float kLowPacketPercentageThreshold = 0.2f;
static const float kHighPacketPercentageThreshold = 0.8f;
+uint16_t BufferToUWord16(const uint8_t* dataBuffer) {
+ return (dataBuffer[0] << 8) | dataBuffer[1];
+}
+} // namespace
+
VCMSessionInfo::VCMSessionInfo()
: session_nack_(false),
complete_(false),
@@ -121,9 +126,6 @@
VCMPacket& packet = *packet_it;
PacketIterator it;
- int packet_size = packet.sizeBytes;
- packet_size += (packet.insertStartCode ? kH264StartCodeLengthBytes : 0);
-
// Calculate the offset into the frame buffer for this packet.
int offset = 0;
for (it = packets_.begin(); it != packet_it; ++it)
@@ -131,23 +133,64 @@
// Set the data pointer to pointing to the start of this packet in the
// frame buffer.
- const uint8_t* data = packet.dataPtr;
+ const uint8_t* packet_buffer = packet.dataPtr;
packet.dataPtr = frame_buffer + offset;
- packet.sizeBytes = packet_size;
- ShiftSubsequentPackets(packet_it, packet_size);
-
- const unsigned char startCode[] = {0, 0, 0, 1};
- if (packet.insertStartCode) {
- memcpy(const_cast<uint8_t*>(packet.dataPtr), startCode,
- kH264StartCodeLengthBytes);
+ // We handle H.264 STAP-A packets in a special way as we need to remove the
+ // two length bytes between each NAL unit, and potentially add start codes.
+ const size_t kH264NALHeaderLengthInBytes = 1;
+ const size_t kLengthFieldLength = 2;
+ if (packet.codecSpecificHeader.codec == kRtpVideoH264 &&
+ packet.codecSpecificHeader.codecHeader.H264.stap_a) {
+ size_t required_length = 0;
+ const uint8_t* nalu_ptr = packet_buffer + kH264NALHeaderLengthInBytes;
+ while (nalu_ptr < packet_buffer + packet.sizeBytes) {
+ uint32_t length = BufferToUWord16(nalu_ptr);
+ required_length +=
+ length + (packet.insertStartCode ? kH264StartCodeLengthBytes : 0);
+ nalu_ptr += kLengthFieldLength + length;
+ }
+ ShiftSubsequentPackets(packet_it, required_length);
+ nalu_ptr = packet_buffer + kH264NALHeaderLengthInBytes;
+ uint8_t* frame_buffer_ptr = frame_buffer + offset;
+ while (nalu_ptr < packet_buffer + packet.sizeBytes) {
+ uint32_t length = BufferToUWord16(nalu_ptr);
+ nalu_ptr += kLengthFieldLength;
+ frame_buffer_ptr += Insert(nalu_ptr,
+ length,
+ packet.insertStartCode,
+ const_cast<uint8_t*>(frame_buffer_ptr));
+ nalu_ptr += length;
+ }
+ packet.sizeBytes = required_length;
+ return packet.sizeBytes;
}
- memcpy(const_cast<uint8_t*>(packet.dataPtr
- + (packet.insertStartCode ? kH264StartCodeLengthBytes : 0)),
- data,
- packet.sizeBytes);
+ ShiftSubsequentPackets(
+ packet_it,
+ packet.sizeBytes +
+ (packet.insertStartCode ? kH264StartCodeLengthBytes : 0));
- return packet_size;
+ packet.sizeBytes = Insert(packet_buffer,
+ packet.sizeBytes,
+ packet.insertStartCode,
+ const_cast<uint8_t*>(packet.dataPtr));
+ return packet.sizeBytes;
+}
+
+size_t VCMSessionInfo::Insert(const uint8_t* buffer,
+ size_t length,
+ bool insert_start_code,
+ uint8_t* frame_buffer) {
+ if (insert_start_code) {
+ const unsigned char startCode[] = {0, 0, 0, 1};
+ memcpy(frame_buffer, startCode, kH264StartCodeLengthBytes);
+ }
+ memcpy(frame_buffer + (insert_start_code ? kH264StartCodeLengthBytes : 0),
+ buffer,
+ length);
+ length += (insert_start_code ? kH264StartCodeLengthBytes : 0);
+
+ return length;
}
void VCMSessionInfo::ShiftSubsequentPackets(PacketIterator it,
@@ -420,34 +463,49 @@
(*rit).seqNum == packet.seqNum && (*rit).sizeBytes > 0)
return -2;
- // Only insert media packets between first and last packets (when available).
- // Placing check here, as to properly account for duplicate packets.
- // Check if this is first packet (only valid for some codecs)
- // Should only be set for one packet per session.
- if (packet.isFirstPacket && first_packet_seq_num_ == -1) {
- // The first packet in a frame signals the frame type.
+ if (packet.codec == kVideoCodecH264) {
frame_type_ = packet.frameType;
- // Store the sequence number for the first packet.
- first_packet_seq_num_ = static_cast<int>(packet.seqNum);
- } else if (first_packet_seq_num_ != -1 &&
- !IsNewerSequenceNumber(packet.seqNum, first_packet_seq_num_)) {
- LOG(LS_WARNING) << "Received packet with a sequence number which is out of"
- "frame boundaries";
- return -3;
- } else if (frame_type_ == kFrameEmpty && packet.frameType != kFrameEmpty) {
- // Update the frame type with the type of the first media packet.
- // TODO(mikhal): Can this trigger?
- frame_type_ = packet.frameType;
- }
+ if (packet.isFirstPacket &&
+ (first_packet_seq_num_ == -1 ||
+ IsNewerSequenceNumber(first_packet_seq_num_, packet.seqNum))) {
+ first_packet_seq_num_ = packet.seqNum;
+ }
+ if (packet.markerBit &&
+ (last_packet_seq_num_ == -1 ||
+ IsNewerSequenceNumber(packet.seqNum, last_packet_seq_num_))) {
+ last_packet_seq_num_ = packet.seqNum;
+ }
+ } else {
+ // Only insert media packets between first and last packets (when
+ // available).
+ // Placing check here, as to properly account for duplicate packets.
+ // Check if this is first packet (only valid for some codecs)
+ // Should only be set for one packet per session.
+ if (packet.isFirstPacket && first_packet_seq_num_ == -1) {
+ // The first packet in a frame signals the frame type.
+ frame_type_ = packet.frameType;
+ // Store the sequence number for the first packet.
+ first_packet_seq_num_ = static_cast<int>(packet.seqNum);
+ } else if (first_packet_seq_num_ != -1 &&
+ !IsNewerSequenceNumber(packet.seqNum, first_packet_seq_num_)) {
+ LOG(LS_WARNING) << "Received packet with a sequence number which is out "
+ "of frame boundaries";
+ return -3;
+ } else if (frame_type_ == kFrameEmpty && packet.frameType != kFrameEmpty) {
+ // Update the frame type with the type of the first media packet.
+ // TODO(mikhal): Can this trigger?
+ frame_type_ = packet.frameType;
+ }
- // Track the marker bit, should only be set for one packet per session.
- if (packet.markerBit && last_packet_seq_num_ == -1) {
- last_packet_seq_num_ = static_cast<int>(packet.seqNum);
- } else if (last_packet_seq_num_ != -1 &&
- IsNewerSequenceNumber(packet.seqNum, last_packet_seq_num_)) {
- LOG(LS_WARNING) << "Received packet with a sequence number which is out of"
- "frame boundaries";
- return -3;
+ // Track the marker bit, should only be set for one packet per session.
+ if (packet.markerBit && last_packet_seq_num_ == -1) {
+ last_packet_seq_num_ = static_cast<int>(packet.seqNum);
+ } else if (last_packet_seq_num_ != -1 &&
+ IsNewerSequenceNumber(packet.seqNum, last_packet_seq_num_)) {
+ LOG(LS_WARNING) << "Received packet with a sequence number which is out "
+ "of frame boundaries";
+ return -3;
+ }
}
// The insert operation invalidates the iterator |rit|.
diff --git a/modules/video_coding/main/source/session_info.h b/modules/video_coding/main/source/session_info.h
index cae3ee1..25216c7 100644
--- a/modules/video_coding/main/source/session_info.h
+++ b/modules/video_coding/main/source/session_info.h
@@ -116,6 +116,10 @@
const PacketIterator& prev_it);
int InsertBuffer(uint8_t* frame_buffer,
PacketIterator packetIterator);
+ size_t Insert(const uint8_t* buffer,
+ size_t length,
+ bool insert_start_code,
+ uint8_t* frame_buffer);
void ShiftSubsequentPackets(PacketIterator it, int steps_to_shift);
PacketIterator FindNaluEnd(PacketIterator packet_iter) const;
// Deletes the data of all packets between |start| and |end|, inclusively.
diff --git a/modules/video_coding/main/source/timing.cc b/modules/video_coding/main/source/timing.cc
index af0e35c..2ec149c 100644
--- a/modules/video_coding/main/source/timing.cc
+++ b/modules/video_coding/main/source/timing.cc
@@ -58,6 +58,7 @@
}
void VCMTiming::ResetDecodeTime() {
+ CriticalSectionScoped lock(crit_sect_);
codec_timer_.Reset();
}
diff --git a/modules/video_coding/main/source/timing.h b/modules/video_coding/main/source/timing.h
index 1dca5e6..bb44a93 100644
--- a/modules/video_coding/main/source/timing.h
+++ b/modules/video_coding/main/source/timing.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TIMING_H_
#define WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TIMING_H_
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/video_coding/main/source/codec_timer.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/typedefs.h"
@@ -93,22 +94,24 @@
enum { kDelayMaxChangeMsPerS = 100 };
protected:
- int32_t MaxDecodeTimeMs(FrameType frame_type = kVideoFrameDelta) const;
- int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const;
- uint32_t TargetDelayInternal() const;
+ int32_t MaxDecodeTimeMs(FrameType frame_type = kVideoFrameDelta) const
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ uint32_t TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
private:
CriticalSectionWrapper* crit_sect_;
- Clock* clock_;
- bool master_;
- TimestampExtrapolator* ts_extrapolator_;
- VCMCodecTimer codec_timer_;
- uint32_t render_delay_ms_;
- uint32_t min_playout_delay_ms_;
- uint32_t jitter_delay_ms_;
- uint32_t current_delay_ms_;
- int last_decode_ms_;
- uint32_t prev_frame_timestamp_;
+ Clock* const clock_;
+ bool master_ GUARDED_BY(crit_sect_);
+ TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_);
+ VCMCodecTimer codec_timer_ GUARDED_BY(crit_sect_);
+ uint32_t render_delay_ms_ GUARDED_BY(crit_sect_);
+ uint32_t min_playout_delay_ms_ GUARDED_BY(crit_sect_);
+ uint32_t jitter_delay_ms_ GUARDED_BY(crit_sect_);
+ uint32_t current_delay_ms_ GUARDED_BY(crit_sect_);
+ int last_decode_ms_ GUARDED_BY(crit_sect_);
+ uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_);
};
} // namespace webrtc
diff --git a/modules/video_coding/main/source/video_coding_impl.cc b/modules/video_coding/main/source/video_coding_impl.cc
index 5b93a65..d566731 100644
--- a/modules/video_coding/main/source/video_coding_impl.cc
+++ b/modules/video_coding/main/source/video_coding_impl.cc
@@ -131,8 +131,8 @@
externalEncoder, payloadType, internalSource);
}
- virtual int32_t CodecConfigParameters(uint8_t* buffer, int32_t size)
- OVERRIDE {
+ virtual int32_t CodecConfigParameters(uint8_t* buffer,
+ int32_t size) OVERRIDE {
return sender_->CodecConfigParameters(buffer, size);
}
@@ -150,8 +150,8 @@
return sender_->SetChannelParameters(target_bitrate, lossRate, rtt);
}
- virtual int32_t RegisterTransportCallback(VCMPacketizationCallback* transport)
- OVERRIDE {
+ virtual int32_t RegisterTransportCallback(
+ VCMPacketizationCallback* transport) OVERRIDE {
return sender_->RegisterTransportCallback(transport);
}
@@ -165,8 +165,8 @@
return sender_->RegisterVideoQMCallback(videoQMSettings);
}
- virtual int32_t RegisterProtectionCallback(VCMProtectionCallback* protection)
- OVERRIDE {
+ virtual int32_t RegisterProtectionCallback(
+ VCMProtectionCallback* protection) OVERRIDE {
return sender_->RegisterProtectionCallback(protection);
}
@@ -181,10 +181,10 @@
return sender_return;
}
- virtual int32_t AddVideoFrame(const I420VideoFrame& videoFrame,
- const VideoContentMetrics* contentMetrics,
- const CodecSpecificInfo* codecSpecificInfo)
- OVERRIDE {
+ virtual int32_t AddVideoFrame(
+ const I420VideoFrame& videoFrame,
+ const VideoContentMetrics* contentMetrics,
+ const CodecSpecificInfo* codecSpecificInfo) OVERRIDE {
return sender_->AddVideoFrame(
videoFrame, contentMetrics, codecSpecificInfo);
}
@@ -226,11 +226,11 @@
return VCM_OK;
}
- virtual void SuspendBelowMinBitrate() {
+ virtual void SuspendBelowMinBitrate() OVERRIDE {
return sender_->SuspendBelowMinBitrate();
}
- virtual bool VideoSuspended() const {
+ virtual bool VideoSuspended() const OVERRIDE {
return sender_->VideoSuspended();
}
@@ -252,8 +252,8 @@
externalDecoder, payloadType, internalRenderTiming);
}
- virtual int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback)
- OVERRIDE {
+ virtual int32_t RegisterReceiveCallback(
+ VCMReceiveCallback* receiveCallback) OVERRIDE {
return receiver_->RegisterReceiveCallback(receiveCallback);
}
@@ -292,7 +292,7 @@
virtual int32_t ResetDecoder() OVERRIDE { return receiver_->ResetDecoder(); }
- virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const {
+ virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const OVERRIDE {
return receiver_->ReceiveCodec(currentReceiveCodec);
}
diff --git a/modules/video_coding/main/source/video_coding_impl.h b/modules/video_coding/main/source/video_coding_impl.h
index bf0bc79..5b3fe2e 100644
--- a/modules/video_coding/main/source/video_coding_impl.h
+++ b/modules/video_coding/main/source/video_coding_impl.h
@@ -15,6 +15,7 @@
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/video_coding/main/source/codec_database.h"
#include "webrtc/modules/video_coding/main/source/frame_buffer.h"
#include "webrtc/modules/video_coding/main/source/generic_decoder.h"
@@ -199,21 +200,25 @@
// in any frame
};
- Clock* clock_;
+ Clock* const clock_;
scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
CriticalSectionWrapper* _receiveCritSect;
- bool _receiverInited;
+ bool _receiverInited GUARDED_BY(_receiveCritSect);
VCMTiming _timing;
VCMTiming _dualTiming;
VCMReceiver _receiver;
VCMReceiver _dualReceiver;
VCMDecodedFrameCallback _decodedFrameCallback;
VCMDecodedFrameCallback _dualDecodedFrameCallback;
- VCMFrameTypeCallback* _frameTypeCallback;
- VCMReceiveStatisticsCallback* _receiveStatsCallback;
- VCMDecoderTimingCallback* _decoderTimingCallback;
- VCMPacketRequestCallback* _packetRequestCallback;
- VCMRenderBufferSizeCallback* render_buffer_callback_;
+ VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_sect_);
+ VCMReceiveStatisticsCallback* _receiveStatsCallback
+ GUARDED_BY(process_crit_sect_);
+ VCMDecoderTimingCallback* _decoderTimingCallback
+ GUARDED_BY(process_crit_sect_);
+ VCMPacketRequestCallback* _packetRequestCallback
+ GUARDED_BY(process_crit_sect_);
+ VCMRenderBufferSizeCallback* render_buffer_callback_
+ GUARDED_BY(process_crit_sect_);
VCMGenericDecoder* _decoder;
VCMGenericDecoder* _dualDecoder;
#ifdef DEBUG_DECODER_BIT_STREAM
@@ -221,9 +226,9 @@
#endif
VCMFrameBuffer _frameFromFile;
VCMKeyRequestMode _keyRequestMode;
- bool _scheduleKeyRequest;
- size_t max_nack_list_size_;
- EncodedImageCallback* pre_decode_image_callback_;
+ bool _scheduleKeyRequest GUARDED_BY(process_crit_sect_);
+ size_t max_nack_list_size_ GUARDED_BY(process_crit_sect_);
+ EncodedImageCallback* pre_decode_image_callback_ GUARDED_BY(_receiveCritSect);
VCMCodecDataBase _codecDataBase;
VCMProcessTimer _receiveStatsTimer;
diff --git a/modules/video_coding/main/source/video_coding_test.gypi b/modules/video_coding/main/source/video_coding_test.gypi
index b0fe510..64cb602 100644
--- a/modules/video_coding/main/source/video_coding_test.gypi
+++ b/modules/video_coding/main/source/video_coding_test.gypi
@@ -21,6 +21,7 @@
'<(webrtc_root)/test/metrics.gyp:metrics',
'<(webrtc_root)/common_video/common_video.gyp:common_video',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
+ '<(webrtc_root)/test/webrtc_test_common.gyp:webrtc_test_common',
],
'sources': [
# headers
@@ -30,11 +31,9 @@
'../test/media_opt_test.h',
'../test/mt_test_common.h',
'../test/normal_test.h',
- '../test/pcap_file_reader.h',
'../test/quality_modes_test.h',
'../test/receiver_tests.h',
'../test/release_test.h',
- '../test/rtp_file_reader.h',
'../test/rtp_player.h',
'../test/test_callbacks.h',
'../test/test_util.h',
@@ -45,19 +44,17 @@
'../test/codec_database_test.cc',
'../test/generic_codec_test.cc',
'../test/media_opt_test.cc',
- '../test/mt_test_common.cc',
'../test/mt_rx_tx_test.cc',
+ '../test/mt_test_common.cc',
'../test/normal_test.cc',
- '../test/pcap_file_reader.cc',
'../test/quality_modes_test.cc',
- '../test/rtp_file_reader.cc',
'../test/rtp_player.cc',
'../test/test_callbacks.cc',
'../test/test_util.cc',
'../test/tester_main.cc',
'../test/vcm_payload_sink_factory.cc',
- '../test/video_rtp_play_mt.cc',
'../test/video_rtp_play.cc',
+ '../test/video_rtp_play_mt.cc',
'../test/video_source.cc',
], # sources
},
diff --git a/modules/video_coding/main/source/video_receiver.cc b/modules/video_coding/main/source/video_receiver.cc
index 5bc1c90..0b56124 100644
--- a/modules/video_coding/main/source/video_receiver.cc
+++ b/modules/video_coding/main/source/video_receiver.cc
@@ -271,8 +271,6 @@
// Initialize receiver, resets codec database etc
int32_t VideoReceiver::InitializeReceiver() {
- CriticalSectionScoped receive_cs(_receiveCritSect);
- CriticalSectionScoped process_cs(process_crit_sect_.get());
int32_t ret = _receiver.Initialize();
if (ret < 0) {
return ret;
@@ -285,15 +283,22 @@
_codecDataBase.ResetReceiver();
_timing.Reset();
- _decoder = NULL;
- _decodedFrameCallback.SetUserReceiveCallback(NULL);
- _receiverInited = true;
- _frameTypeCallback = NULL;
- _receiveStatsCallback = NULL;
- _decoderTimingCallback = NULL;
- _packetRequestCallback = NULL;
- _keyRequestMode = kKeyOnError;
- _scheduleKeyRequest = false;
+ {
+ CriticalSectionScoped receive_cs(_receiveCritSect);
+ _receiverInited = true;
+ }
+
+ {
+ CriticalSectionScoped process_cs(process_crit_sect_.get());
+ _decoder = NULL;
+ _decodedFrameCallback.SetUserReceiveCallback(NULL);
+ _frameTypeCallback = NULL;
+ _receiveStatsCallback = NULL;
+ _decoderTimingCallback = NULL;
+ _packetRequestCallback = NULL;
+ _keyRequestMode = kKeyOnError;
+ _scheduleKeyRequest = false;
+ }
return VCM_OK;
}
@@ -781,7 +786,6 @@
int max_packet_age_to_nack,
int max_incomplete_time_ms) {
if (max_nack_list_size != 0) {
- CriticalSectionScoped receive_cs(_receiveCritSect);
CriticalSectionScoped process_cs(process_crit_sect_.get());
max_nack_list_size_ = max_nack_list_size;
}
diff --git a/modules/video_coding/main/source/video_sender_unittest.cc b/modules/video_coding/main/source/video_sender_unittest.cc
index 67b3e7a..6bc8b80 100644
--- a/modules/video_coding/main/source/video_sender_unittest.cc
+++ b/modules/video_coding/main/source/video_sender_unittest.cc
@@ -70,7 +70,10 @@
class EmptyFrameGenerator : public FrameGenerator {
public:
- I420VideoFrame* NextFrame() OVERRIDE { frame_.ResetSize(); return &frame_; }
+ virtual I420VideoFrame* NextFrame() OVERRIDE {
+ frame_.ResetSize();
+ return &frame_;
+ }
private:
I420VideoFrame frame_;
@@ -90,7 +93,7 @@
const uint8_t* payload_data,
uint32_t payload_size,
const RTPFragmentationHeader& fragmentation_header,
- const RTPVideoHeader* rtp_video_header) {
+ const RTPVideoHeader* rtp_video_header) OVERRIDE {
assert(rtp_video_header);
frame_data_.push_back(FrameData(payload_size, *rtp_video_header));
return 0;
@@ -141,10 +144,10 @@
int frames = 0;
for (size_t i = 0; i < frame_data_.size(); ++i) {
EXPECT_EQ(kRtpVideoVp8, frame_data_[i].rtp_video_header.codec);
- if (frame_data_[i].rtp_video_header.codecHeader.VP8.temporalIdx <=
- temporal_layer) {
+ const uint8_t temporal_idx =
+ frame_data_[i].rtp_video_header.codecHeader.VP8.temporalIdx;
+ if (temporal_idx <= temporal_layer || temporal_idx == kNoTemporalIdx)
frames++;
- }
}
return frames;
}
@@ -153,10 +156,10 @@
int payload_size = 0;
for (size_t i = 0; i < frame_data_.size(); ++i) {
EXPECT_EQ(kRtpVideoVp8, frame_data_[i].rtp_video_header.codec);
- if (frame_data_[i].rtp_video_header.codecHeader.VP8.temporalIdx <=
- temporal_layer) {
+ const uint8_t temporal_idx =
+ frame_data_[i].rtp_video_header.codecHeader.VP8.temporalIdx;
+ if (temporal_idx <= temporal_layer || temporal_idx == kNoTemporalIdx)
payload_size += frame_data_[i].payload_size;
- }
}
return payload_size;
}
@@ -172,7 +175,7 @@
// a special case (e.g. frame rate in media optimization).
TestVideoSender() : clock_(1000), packetization_callback_(&clock_) {}
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
sender_.reset(new VideoSender(&clock_, &post_encode_callback_));
EXPECT_EQ(0, sender_->InitializeSender());
EXPECT_EQ(0, sender_->RegisterTransportCallback(&packetization_callback_));
@@ -198,7 +201,7 @@
static const int kNumberOfLayers = 3;
static const int kUnusedPayloadType = 10;
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
TestVideoSender::SetUp();
generator_.reset(new EmptyFrameGenerator());
EXPECT_EQ(
@@ -221,7 +224,7 @@
EXPECT_EQ(0, sender_->RegisterSendCodec(&settings_, 1, 1200));
}
- virtual void TearDown() { sender_.reset(); }
+ virtual void TearDown() OVERRIDE { sender_.reset(); }
void ExpectIntraRequest(int stream) {
if (stream == -1) {
@@ -314,7 +317,7 @@
TestVideoSenderWithVp8()
: codec_bitrate_kbps_(300), available_bitrate_kbps_(1000) {}
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
TestVideoSender::SetUp();
const char* input_video = "foreman_cif";
diff --git a/modules/video_coding/main/test/codec_database_test.cc b/modules/video_coding/main/test/codec_database_test.cc
index 3695cc1..ca269b3 100644
--- a/modules/video_coding/main/test/codec_database_test.cc
+++ b/modules/video_coding/main/test/codec_database_test.cc
@@ -129,8 +129,7 @@
sourceFrame.set_timestamp(_timeStamp);
// Encoder registration
TEST (VideoCodingModule::NumberOfCodecs() > 0);
- TEST(VideoCodingModule::Codec(-1, &sendCodec) < 0);
- TEST(VideoCodingModule::Codec(VideoCodingModule::NumberOfCodecs() + 1,
+ TEST(VideoCodingModule::Codec(VideoCodingModule::NumberOfCodecs() + 1u,
&sendCodec) < 0);
VideoCodingModule::Codec(1, &sendCodec);
sendCodec.plType = 0; // random value
diff --git a/modules/video_coding/main/test/generic_codec_test.cc b/modules/video_coding/main/test/generic_codec_test.cc
index 27dbb7e..7179c80 100644
--- a/modules/video_coding/main/test/generic_codec_test.cc
+++ b/modules/video_coding/main/test/generic_codec_test.cc
@@ -126,7 +126,6 @@
I420VideoFrame sourceFrame;
_vcm->InitializeSender();
TEST(_vcm->Codec(kVideoCodecVP8, &sendCodec) == 0);
- TEST(_vcm->RegisterSendCodec(&sendCodec, -1, 1440) < 0); // bad number of cores
sendCodec.maxBitrate = 8000;
_vcm->RegisterSendCodec(&sendCodec, 1, 1440);
_vcm->InitializeSender();
@@ -134,8 +133,6 @@
sendCodec.height = 0;
TEST(_vcm->RegisterSendCodec(&sendCodec, 1, 1440) < 0); // bad height
_vcm->Codec(kVideoCodecVP8, &sendCodec);
- sendCodec.startBitrate = -2;
- TEST(_vcm->RegisterSendCodec(&sendCodec, 1, 1440) < 0); // bad bit rate
_vcm->Codec(kVideoCodecVP8, &sendCodec);
_vcm->InitializeSender();
// Setting rate when encoder uninitialized.
@@ -282,7 +279,7 @@
const float nBitrates = sizeof(bitRate)/sizeof(*bitRate);
float _bitRate = 0;
int _frameCnt = 0;
- float totalBytesOneSec;//, totalBytesTenSec;
+ float totalBytesOneSec = 0;//, totalBytesTenSec;
float totalBytes, actualBitrate;
VCMFrameCount frameCount; // testing frame type counters
// start test
diff --git a/modules/video_coding/main/test/normal_test.h b/modules/video_coding/main/test/normal_test.h
index 28a37c4..63e66b3 100644
--- a/modules/video_coding/main/test/normal_test.h
+++ b/modules/video_coding/main/test/normal_test.h
@@ -32,15 +32,15 @@
void RegisterTransportCallback(webrtc::VCMPacketizationCallback* transport);
// process encoded data received from the encoder,
// pass stream to the VCMReceiver module
- int32_t
- SendData(const webrtc::FrameType frameType,
- const uint8_t payloadType,
- const uint32_t timeStamp,
- int64_t capture_time_ms,
- const uint8_t* payloadData,
- const uint32_t payloadSize,
- const webrtc::RTPFragmentationHeader& fragmentationHeader,
- const webrtc::RTPVideoHeader* videoHdr);
+ virtual int32_t SendData(
+ const webrtc::FrameType frameType,
+ const uint8_t payloadType,
+ const uint32_t timeStamp,
+ int64_t capture_time_ms,
+ const uint8_t* payloadData,
+ const uint32_t payloadSize,
+ const webrtc::RTPFragmentationHeader& fragmentationHeader,
+ const webrtc::RTPVideoHeader* videoHdr) OVERRIDE;
// Register exisitng VCM.
// Currently - encode and decode with the same vcm module.
@@ -73,8 +73,10 @@
_currentHeight(0) {}
virtual ~VCMNTDecodeCompleCallback();
void SetUserReceiveCallback(webrtc::VCMReceiveCallback* receiveCallback);
+
// will write decoded frame into file
- int32_t FrameToRender(webrtc::I420VideoFrame& videoFrame);
+ virtual int32_t FrameToRender(webrtc::I420VideoFrame& videoFrame) OVERRIDE;
+
int32_t DecodedBytes();
private:
FILE* _decodedFile;
diff --git a/modules/video_coding/main/test/pcap_file_reader.h b/modules/video_coding/main/test/pcap_file_reader.h
deleted file mode 100644
index 6450e2d..0000000
--- a/modules/video_coding/main/test/pcap_file_reader.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_PCAP_FILE_READER_H_
-#define WEBRTC_MODULES_VIDEO_CODING_TEST_PCAP_FILE_READER_H_
-
-#include <string>
-
-namespace webrtc {
-namespace rtpplayer {
-
-class RtpPacketSourceInterface;
-
-RtpPacketSourceInterface* CreatePcapFileReader(const std::string& filename);
-
-} // namespace rtpplayer
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_VIDEO_CODING_TEST_PCAP_FILE_READER_H_
diff --git a/modules/video_coding/main/test/receiver_tests.h b/modules/video_coding/main/test/receiver_tests.h
index ca276e9..91b7f8e 100644
--- a/modules/video_coding/main/test/receiver_tests.h
+++ b/modules/video_coding/main/test/receiver_tests.h
@@ -30,7 +30,7 @@
virtual int32_t OnReceivedPayloadData(
const uint8_t* payload_data,
const uint16_t payload_size,
- const webrtc::WebRtcRTPHeader* rtp_header) {
+ const webrtc::WebRtcRTPHeader* rtp_header) OVERRIDE {
return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
}
diff --git a/modules/video_coding/main/test/rtp_file_reader.cc b/modules/video_coding/main/test/rtp_file_reader.cc
deleted file mode 100644
index 447eb9b..0000000
--- a/modules/video_coding/main/test/rtp_file_reader.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h"
-
-#ifdef WIN32
-#include <windows.h>
-#include <Winsock2.h>
-#else
-#include <arpa/inet.h>
-#endif
-#include <assert.h>
-#include <stdio.h>
-
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-
-namespace webrtc {
-namespace rtpplayer {
-
-enum {
- kResultFail = -1,
- kResultSuccess = 0,
-
- kFirstLineLength = 40, // More than needed to read the ID line.
- kPacketHeaderSize = 8 // Rtpplay packet header size in bytes.
-};
-
-#if 1
-# define DEBUG_LOG(text)
-# define DEBUG_LOG1(text, arg)
-#else
-# define DEBUG_LOG(text) (printf(text "\n"))
-# define DEBUG_LOG1(text, arg) (printf(text "\n", arg))
-#endif
-
-#define TRY(expr) \
- do { \
- if ((expr) < 0) { \
- DEBUG_LOG1("FAIL at " __FILE__ ":%d", __LINE__); \
- return kResultFail; \
- } \
- } while (0)
-
-// Read RTP packets from file in rtpdump format, as documented at:
-// http://www.cs.columbia.edu/irt/software/rtptools/
-class RtpFileReaderImpl : public RtpPacketSourceInterface {
- public:
- RtpFileReaderImpl() : file_(NULL) {}
- virtual ~RtpFileReaderImpl() {
- if (file_ != NULL) {
- fclose(file_);
- file_ = NULL;
- }
- }
-
- int Initialize(const std::string& filename) {
- file_ = fopen(filename.c_str(), "rb");
- if (file_ == NULL) {
- printf("ERROR: Can't open file: %s\n", filename.c_str());
- return kResultFail;
- }
-
- char firstline[kFirstLineLength + 1] = {0};
- if (fgets(firstline, kFirstLineLength, file_) == NULL) {
- DEBUG_LOG("ERROR: Can't read from file\n");
- return kResultFail;
- }
- if (strncmp(firstline, "#!rtpplay", 9) == 0) {
- if (strncmp(firstline, "#!rtpplay1.0", 12) != 0) {
- DEBUG_LOG("ERROR: wrong rtpplay version, must be 1.0\n");
- return kResultFail;
- }
- } else if (strncmp(firstline, "#!RTPencode", 11) == 0) {
- if (strncmp(firstline, "#!RTPencode1.0", 14) != 0) {
- DEBUG_LOG("ERROR: wrong RTPencode version, must be 1.0\n");
- return kResultFail;
- }
- } else {
- DEBUG_LOG("ERROR: wrong file format of input file\n");
- return kResultFail;
- }
-
- uint32_t start_sec;
- uint32_t start_usec;
- uint32_t source;
- uint16_t port;
- uint16_t padding;
- TRY(Read(&start_sec));
- TRY(Read(&start_usec));
- TRY(Read(&source));
- TRY(Read(&port));
- TRY(Read(&padding));
-
- return kResultSuccess;
- }
-
- virtual int NextPacket(uint8_t* rtp_data, uint32_t* length,
- uint32_t* time_ms) {
- assert(rtp_data);
- assert(length);
- assert(time_ms);
-
- uint16_t len;
- uint16_t plen;
- uint32_t offset;
- TRY(Read(&len));
- TRY(Read(&plen));
- TRY(Read(&offset));
-
- // Use 'len' here because a 'plen' of 0 specifies rtcp.
- len -= kPacketHeaderSize;
- if (*length < len) {
- return kResultFail;
- }
- if (fread(rtp_data, 1, len, file_) != len) {
- return kResultFail;
- }
-
- *length = len;
- *time_ms = offset;
- return kResultSuccess;
- }
-
- private:
- int Read(uint32_t* out) {
- assert(out);
- uint32_t tmp = 0;
- if (fread(&tmp, 1, sizeof(uint32_t), file_) != sizeof(uint32_t)) {
- return kResultFail;
- }
- *out = ntohl(tmp);
- return kResultSuccess;
- }
-
- int Read(uint16_t* out) {
- assert(out);
- uint16_t tmp = 0;
- if (fread(&tmp, 1, sizeof(uint16_t), file_) != sizeof(uint16_t)) {
- return kResultFail;
- }
- *out = ntohs(tmp);
- return kResultSuccess;
- }
-
- FILE* file_;
-
- DISALLOW_COPY_AND_ASSIGN(RtpFileReaderImpl);
-};
-
-RtpPacketSourceInterface* CreateRtpFileReader(const std::string& filename) {
- scoped_ptr<RtpFileReaderImpl> impl(new RtpFileReaderImpl());
- if (impl->Initialize(filename) != 0) {
- return NULL;
- }
- return impl.release();
-}
-} // namespace rtpplayer
-} // namespace webrtc
diff --git a/modules/video_coding/main/test/rtp_file_reader.h b/modules/video_coding/main/test/rtp_file_reader.h
deleted file mode 100644
index b763ee7..0000000
--- a/modules/video_coding/main/test/rtp_file_reader.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_VIDEO_CODING_MAIN_TEST_RTP_FILE_READER_H_
-#define WEBRTC_MODULES_VIDEO_CODING_MAIN_TEST_RTP_FILE_READER_H_
-
-#include <string>
-
-namespace webrtc {
-namespace rtpplayer {
-
-class RtpPacketSourceInterface;
-
-RtpPacketSourceInterface* CreateRtpFileReader(const std::string& filename);
-
-} // namespace rtpplayer
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_TEST_RTP_FILE_READER_H_
diff --git a/modules/video_coding/main/test/rtp_file_reader_unittest.cc b/modules/video_coding/main/test/rtp_file_reader_unittest.cc
deleted file mode 100644
index 7e0e607..0000000
--- a/modules/video_coding/main/test/rtp_file_reader_unittest.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h"
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/test/testsupport/fileutils.h"
-
-namespace webrtc {
-namespace rtpplayer {
-
-class TestRtpFileReader : public ::testing::Test {
- public:
- void Init(const std::string& filename) {
- std::string filepath =
- test::ResourcePath("video_coding/" + filename, "rtp");
- rtp_packet_source_.reset(CreateRtpFileReader(filepath));
- ASSERT_TRUE(rtp_packet_source_.get() != NULL);
- }
-
- int CountRtpPackets() {
- const uint32_t kBufferSize = 4096;
- uint8_t data[kBufferSize];
- uint32_t length = kBufferSize;
- uint32_t dummy_time_ms = 0;
- int c = 0;
- while (rtp_packet_source_->NextPacket(data, &length, &dummy_time_ms) == 0) {
- EXPECT_GE(kBufferSize, length);
- length = kBufferSize;
- c++;
- }
- return c;
- }
-
- private:
- scoped_ptr<RtpPacketSourceInterface> rtp_packet_source_;
-};
-
-TEST_F(TestRtpFileReader, Test60Packets) {
- Init("pltype103");
- EXPECT_EQ(60, CountRtpPackets());
-}
-
-} // namespace rtpplayer
-} // namespace webrtc
diff --git a/modules/video_coding/main/test/rtp_player.cc b/modules/video_coding/main/test/rtp_player.cc
index f02aebb..1aea7e0 100644
--- a/modules/video_coding/main/test/rtp_player.cc
+++ b/modules/video_coding/main/test/rtp_player.cc
@@ -19,12 +19,11 @@
#include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
#include "webrtc/modules/video_coding/main/source/internal_defines.h"
-#include "webrtc/modules/video_coding/main/test/pcap_file_reader.h"
-#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h"
#include "webrtc/modules/video_coding/main/test/test_util.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/test/rtp_file_reader.h"
#if 1
# define DEBUG_LOG1(text, arg)
@@ -323,7 +322,7 @@
public:
RtpPlayerImpl(PayloadSinkFactoryInterface* payload_sink_factory,
const PayloadTypes& payload_types, Clock* clock,
- scoped_ptr<RtpPacketSourceInterface>* packet_source,
+ scoped_ptr<test::RtpFileReader>* packet_source,
float loss_rate, uint32_t rtt_ms, bool reordering)
: ssrc_handlers_(payload_sink_factory, payload_types),
clock_(clock),
@@ -337,9 +336,7 @@
no_loss_startup_(100),
end_of_file_(false),
reordering_(false),
- reorder_buffer_(),
- next_packet_(),
- next_packet_length_(0) {
+ reorder_buffer_() {
assert(clock);
assert(packet_source);
assert(packet_source->get());
@@ -351,8 +348,9 @@
virtual int NextPacket(int64_t time_now) {
// Send any packets ready to be resent.
- RawRtpPacket* packet;
- while ((packet = lost_packets_.NextPacketToResend(time_now))) {
+ for (RawRtpPacket* packet = lost_packets_.NextPacketToResend(time_now);
+ packet != NULL;
+ packet = lost_packets_.NextPacketToResend(time_now)) {
int ret = SendPacket(packet->data(), packet->length());
if (ret > 0) {
printf("Resend: %08x:%u\n", packet->ssrc(), packet->seq_num());
@@ -368,22 +366,23 @@
// Send any packets from packet source.
if (!end_of_file_ && (TimeUntilNextPacket() == 0 || first_packet_)) {
if (first_packet_) {
- next_packet_length_ = sizeof(next_packet_);
- if (packet_source_->NextPacket(next_packet_, &next_packet_length_,
- &next_rtp_time_) != 0) {
+ if (!packet_source_->NextPacket(&next_packet_))
return 0;
- }
- first_packet_rtp_time_ = next_rtp_time_;
+ first_packet_rtp_time_ = next_packet_.time_ms;
first_packet_time_ms_ = clock_->TimeInMilliseconds();
first_packet_ = false;
}
if (reordering_ && reorder_buffer_.get() == NULL) {
- reorder_buffer_.reset(new RawRtpPacket(next_packet_,
- next_packet_length_, 0, 0));
+ reorder_buffer_.reset(
+ new RawRtpPacket(next_packet_.data,
+ static_cast<uint32_t>(next_packet_.length),
+ 0,
+ 0));
return 0;
}
- int ret = SendPacket(next_packet_, next_packet_length_);
+ int ret = SendPacket(next_packet_.data,
+ static_cast<uint32_t>(next_packet_.length));
if (reorder_buffer_.get()) {
SendPacket(reorder_buffer_->data(), reorder_buffer_->length());
reorder_buffer_.reset(NULL);
@@ -392,13 +391,11 @@
return ret;
}
- next_packet_length_ = sizeof(next_packet_);
- if (packet_source_->NextPacket(next_packet_, &next_packet_length_,
- &next_rtp_time_) != 0) {
+ if (!packet_source_->NextPacket(&next_packet_)) {
end_of_file_ = true;
return 0;
}
- else if (next_packet_length_ == 0) {
+ else if (next_packet_.length == 0) {
return 0;
}
}
@@ -456,7 +453,8 @@
SsrcHandlers ssrc_handlers_;
Clock* clock_;
- scoped_ptr<RtpPacketSourceInterface> packet_source_;
+ scoped_ptr<test::RtpFileReader> packet_source_;
+ test::RtpFileReader::Packet next_packet_;
uint32_t next_rtp_time_;
bool first_packet_;
int64_t first_packet_rtp_time_;
@@ -468,8 +466,6 @@
bool end_of_file_;
bool reordering_;
scoped_ptr<RawRtpPacket> reorder_buffer_;
- uint8_t next_packet_[kMaxPacketBufferSize];
- uint32_t next_packet_length_;
DISALLOW_IMPLICIT_CONSTRUCTORS(RtpPlayerImpl);
};
@@ -478,10 +474,11 @@
PayloadSinkFactoryInterface* payload_sink_factory, Clock* clock,
const PayloadTypes& payload_types, float loss_rate, uint32_t rtt_ms,
bool reordering) {
- scoped_ptr<RtpPacketSourceInterface> packet_source(
- CreateRtpFileReader(input_filename));
+ scoped_ptr<test::RtpFileReader> packet_source(test::RtpFileReader::Create(
+ test::RtpFileReader::kRtpDump, input_filename));
if (packet_source.get() == NULL) {
- packet_source.reset(CreatePcapFileReader(input_filename));
+ packet_source.reset(test::RtpFileReader::Create(test::RtpFileReader::kPcap,
+ input_filename));
if (packet_source.get() == NULL) {
return NULL;
}
diff --git a/modules/video_coding/main/test/rtp_player.h b/modules/video_coding/main/test/rtp_player.h
index 24e62b6..1703618 100644
--- a/modules/video_coding/main/test/rtp_player.h
+++ b/modules/video_coding/main/test/rtp_player.h
@@ -44,20 +44,6 @@
typedef std::vector<PayloadCodecTuple> PayloadTypes;
typedef std::vector<PayloadCodecTuple>::const_iterator PayloadTypesIterator;
-// Implemented by something that can provide RTP packets, for instance a file
-// format parser such as the rtp_file_reader or the pcap_file_reader.
-class RtpPacketSourceInterface {
- public:
- virtual ~RtpPacketSourceInterface() {}
-
- // Read next RTP packet into buffer pointed to by rtp_data. On call, 'length'
- // field must be filled in with the size of the buffer. The actual size of
- // the packet is available in 'length' upon returning. Time in milliseconds
- // from start of stream is returned in 'time_ms'.
- virtual int NextPacket(uint8_t* rtp_data, uint32_t* length,
- uint32_t* time_ms) = 0;
-};
-
// Implemented by RtpPlayer and given to client as a means to retrieve
// information about a specific RTP stream.
class RtpStreamInterface {
diff --git a/modules/video_coding/main/test/vcm_payload_sink_factory.cc b/modules/video_coding/main/test/vcm_payload_sink_factory.cc
index ebd6f05..aa636a0 100644
--- a/modules/video_coding/main/test/vcm_payload_sink_factory.cc
+++ b/modules/video_coding/main/test/vcm_payload_sink_factory.cc
@@ -54,19 +54,19 @@
virtual int32_t OnReceivedPayloadData(
const uint8_t* payload_data,
const uint16_t payload_size,
- const WebRtcRTPHeader* rtp_header) {
+ const WebRtcRTPHeader* rtp_header) OVERRIDE {
return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
}
virtual bool OnRecoveredPacket(const uint8_t* packet,
- int packet_length) {
+ int packet_length) OVERRIDE {
// We currently don't handle FEC.
return true;
}
// VCMPacketRequestCallback
virtual int32_t ResendPackets(const uint16_t* sequence_numbers,
- uint16_t length) {
+ uint16_t length) OVERRIDE {
stream_->ResendPackets(sequence_numbers, length);
return 0;
}
diff --git a/modules/video_coding/utility/Android.mk b/modules/video_coding/utility/Android.mk
deleted file mode 100644
index 4af007c..0000000
--- a/modules/video_coding/utility/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libvideo_coding_utility
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- exp_filter.cc \
- frame_dropper.cc \
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/utility/exp_filter.cc b/modules/video_coding/utility/exp_filter.cc
deleted file mode 100644
index 44f280b..0000000
--- a/modules/video_coding/utility/exp_filter.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/modules/video_coding/utility/include/exp_filter.h"
-
-#include <math.h>
-
-namespace webrtc {
-
-void
-VCMExpFilter::Reset(float alpha)
-{
- _alpha = alpha;
- _filtered = -1.0;
-}
-
-float
-VCMExpFilter::Apply(float exp, float sample)
-{
- if (_filtered == -1.0)
- {
- // Initialize filtered bit rates
- _filtered = sample;
- }
- else if (exp == 1.0)
- {
- _filtered = _alpha * _filtered + (1 - _alpha) * sample;
- }
- else
- {
- float alpha = pow(_alpha, exp);
- _filtered = alpha * _filtered + (1 - alpha) * sample;
- }
- if (_max != -1 && _filtered > _max)
- {
- _filtered = _max;
- }
- return _filtered;
-}
-
-void
-VCMExpFilter::UpdateBase(float alpha)
-{
- _alpha = alpha;
-}
-
-float
-VCMExpFilter::Value() const
-{
- return _filtered;
-}
-
-}
diff --git a/modules/video_coding/utility/frame_dropper.cc b/modules/video_coding/utility/frame_dropper.cc
index d3c25fb..54c8cb8 100644
--- a/modules/video_coding/utility/frame_dropper.cc
+++ b/modules/video_coding/utility/frame_dropper.cc
@@ -86,25 +86,27 @@
{
_keyFrameSizeAvgKbits.Apply(1, frameSizeKbits);
_keyFrameRatio.Apply(1.0, 1.0);
- if (frameSizeKbits > _keyFrameSizeAvgKbits.Value())
+ if (frameSizeKbits > _keyFrameSizeAvgKbits.filtered())
{
// Remove the average key frame size since we
// compensate for key frames when adding delta
// frames.
- frameSizeKbits -= _keyFrameSizeAvgKbits.Value();
+ frameSizeKbits -= _keyFrameSizeAvgKbits.filtered();
}
else
{
// Shouldn't be negative, so zero is the lower bound.
frameSizeKbits = 0;
}
- if (_keyFrameRatio.Value() > 1e-5 && 1 / _keyFrameRatio.Value() < _keyFrameSpreadFrames)
+ if (_keyFrameRatio.filtered() > 1e-5 &&
+ 1 / _keyFrameRatio.filtered() < _keyFrameSpreadFrames)
{
// We are sending key frames more often than our upper bound for
// how much we allow the key frame compensation to be spread
// out in time. Therefor we must use the key frame ratio rather
// than keyFrameSpreadFrames.
- _keyFrameCount = static_cast<int32_t>(1 / _keyFrameRatio.Value() + 0.5);
+ _keyFrameCount =
+ static_cast<int32_t>(1 / _keyFrameRatio.filtered() + 0.5);
}
else
{
@@ -145,13 +147,14 @@
if (_keyFrameCount > 0)
{
// Perform the key frame compensation
- if (_keyFrameRatio.Value() > 0 && 1 / _keyFrameRatio.Value() < _keyFrameSpreadFrames)
+ if (_keyFrameRatio.filtered() > 0 &&
+ 1 / _keyFrameRatio.filtered() < _keyFrameSpreadFrames)
{
- T -= _keyFrameSizeAvgKbits.Value() * _keyFrameRatio.Value();
+ T -= _keyFrameSizeAvgKbits.filtered() * _keyFrameRatio.filtered();
}
else
{
- T -= _keyFrameSizeAvgKbits.Value() / _keyFrameSpreadFrames;
+ T -= _keyFrameSizeAvgKbits.filtered() / _keyFrameSpreadFrames;
}
_keyFrameCount--;
}
@@ -232,11 +235,11 @@
_dropCount = 0;
}
- if (_dropRatio.Value() >= 0.5f) // Drops per keep
+ if (_dropRatio.filtered() >= 0.5f) // Drops per keep
{
// limit is the number of frames we should drop between each kept frame
// to keep our drop ratio. limit is positive in this case.
- float denom = 1.0f - _dropRatio.Value();
+ float denom = 1.0f - _dropRatio.filtered();
if (denom < 1e-5)
{
denom = (float)1e-5;
@@ -252,7 +255,7 @@
if (_dropCount < 0)
{
// Reset the _dropCount since it was negative and should be positive.
- if (_dropRatio.Value() > 0.4f)
+ if (_dropRatio.filtered() > 0.4f)
{
_dropCount = -_dropCount;
}
@@ -274,12 +277,13 @@
return false;
}
}
- else if (_dropRatio.Value() > 0.0f && _dropRatio.Value() < 0.5f) // Keeps per drop
+ else if (_dropRatio.filtered() > 0.0f &&
+ _dropRatio.filtered() < 0.5f) // Keeps per drop
{
// limit is the number of frames we should keep between each drop
// in order to keep the drop ratio. limit is negative in this case,
// and the _dropCount is also negative.
- float denom = _dropRatio.Value();
+ float denom = _dropRatio.filtered();
if (denom < 1e-5)
{
denom = (float)1e-5;
@@ -289,7 +293,7 @@
{
// Reset the _dropCount since we have a positive
// _dropCount, and it should be negative.
- if (_dropRatio.Value() < 0.6f)
+ if (_dropRatio.filtered() < 0.6f)
{
_dropCount = -_dropCount;
}
@@ -350,7 +354,7 @@
{
return static_cast<float>(inputFrameRate);
}
- return inputFrameRate * (1.0f - _dropRatio.Value());
+ return inputFrameRate * (1.0f - _dropRatio.filtered());
}
// Put a cap on the accumulator, i.e., don't let it grow beyond some level.
diff --git a/modules/video_coding/utility/include/exp_filter.h b/modules/video_coding/utility/include/exp_filter.h
deleted file mode 100644
index d8c37a3..0000000
--- a/modules/video_coding/utility/include/exp_filter.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_EXP_FILTER_H_
-#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_EXP_FILTER_H_
-
-namespace webrtc
-{
-
-/**********************/
-/* ExpFilter class */
-/**********************/
-
-class VCMExpFilter
-{
-public:
- VCMExpFilter(float alpha, float max = -1.0) : _alpha(alpha), _filtered(-1.0), _max(max) {}
-
- // Resets the filter to its initial state, and resets alpha to the given value
- //
- // Input:
- // - alpha : the new value of the filter factor base.
- void Reset(float alpha);
-
- // Applies the filter with the given exponent on the provided sample
- //
- // Input:
- // - exp : Exponent T in y(k) = alpha^T * y(k-1) + (1 - alpha^T) * x(k)
- // - sample : x(k) in the above filter equation
- float Apply(float exp, float sample);
-
- // Return current filtered value: y(k)
- //
- // Return value : The current filter output
- float Value() const;
-
- // Change the filter factor base
- //
- // Input:
- // - alpha : The new filter factor base.
- void UpdateBase(float alpha);
-
-private:
- float _alpha; // Filter factor base
- float _filtered; // Current filter output
- const float _max;
-}; // end of ExpFilter class
-
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_EXP_FILTER_H_
diff --git a/modules/video_coding/utility/include/frame_dropper.h b/modules/video_coding/utility/include/frame_dropper.h
index 4c1c168..8eebd78 100644
--- a/modules/video_coding/utility/include/frame_dropper.h
+++ b/modules/video_coding/utility/include/frame_dropper.h
@@ -11,7 +11,7 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_FRAME_DROPPER_H_
#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_FRAME_DROPPER_H_
-#include "webrtc/modules/video_coding/utility/include/exp_filter.h"
+#include "webrtc/base/exp_filter.h"
#include "webrtc/typedefs.h"
namespace webrtc
@@ -72,23 +72,23 @@
void UpdateRatio();
void CapAccumulator();
- VCMExpFilter _keyFrameSizeAvgKbits;
- VCMExpFilter _keyFrameRatio;
- float _keyFrameSpreadFrames;
- int32_t _keyFrameCount;
- float _accumulator;
- float _accumulatorMax;
- float _targetBitRate;
- bool _dropNext;
- VCMExpFilter _dropRatio;
- int32_t _dropCount;
- float _windowSize;
- float _incoming_frame_rate;
- bool _wasBelowMax;
- bool _enabled;
- bool _fastMode;
- float _cap_buffer_size;
- float _max_time_drops;
+ rtc::ExpFilter _keyFrameSizeAvgKbits;
+ rtc::ExpFilter _keyFrameRatio;
+ float _keyFrameSpreadFrames;
+ int32_t _keyFrameCount;
+ float _accumulator;
+ float _accumulatorMax;
+ float _targetBitRate;
+ bool _dropNext;
+ rtc::ExpFilter _dropRatio;
+ int32_t _dropCount;
+ float _windowSize;
+ float _incoming_frame_rate;
+ bool _wasBelowMax;
+ bool _enabled;
+ bool _fastMode;
+ float _cap_buffer_size;
+ float _max_time_drops;
}; // end of VCMFrameDropper class
} // namespace webrtc
diff --git a/modules/video_coding/utility/quality_scaler.cc b/modules/video_coding/utility/quality_scaler.cc
new file mode 100644
index 0000000..327748d
--- /dev/null
+++ b/modules/video_coding/utility/quality_scaler.cc
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/video_coding/utility/quality_scaler.h"
+
+namespace webrtc {
+
+static const int kMinFps = 10;
+static const int kMeasureSeconds = 5;
+static const int kFramedropPercentThreshold = 60;
+static const int kLowQpThresholdDenominator = 3;
+
+QualityScaler::QualityScaler()
+ : num_samples_(0), low_qp_threshold_(-1), downscale_shift_(0) {
+}
+
+void QualityScaler::Init(int max_qp) {
+ ClearSamples();
+ downscale_shift_ = 0;
+ low_qp_threshold_ = max_qp / kLowQpThresholdDenominator ;
+}
+
+void QualityScaler::ReportFramerate(int framerate) {
+ num_samples_ = static_cast<size_t>(
+ kMeasureSeconds * (framerate < kMinFps ? kMinFps : framerate));
+}
+
+void QualityScaler::ReportEncodedFrame(int qp) {
+ average_qp_.AddSample(qp);
+ framedrop_percent_.AddSample(0);
+}
+
+void QualityScaler::ReportDroppedFrame() {
+ framedrop_percent_.AddSample(100);
+}
+
+QualityScaler::Resolution QualityScaler::GetScaledResolution(
+ const I420VideoFrame& frame) {
+ // Both of these should be set through InitEncode -> Should be set by now.
+ assert(low_qp_threshold_ >= 0);
+ assert(num_samples_ > 0);
+ // Update scale factor.
+ int avg;
+ if (framedrop_percent_.GetAverage(num_samples_, &avg) &&
+ avg >= kFramedropPercentThreshold) {
+ AdjustScale(false);
+ } else if (average_qp_.GetAverage(num_samples_, &avg) &&
+ avg <= low_qp_threshold_) {
+ AdjustScale(true);
+ }
+
+ Resolution res;
+ res.width = frame.width();
+ res.height = frame.height();
+
+ assert(downscale_shift_ >= 0);
+ for (int shift = downscale_shift_;
+ shift > 0 && res.width > 1 && res.height > 1;
+ --shift) {
+ res.width >>= 1;
+ res.height >>= 1;
+ }
+
+ return res;
+}
+
+const I420VideoFrame& QualityScaler::GetScaledFrame(
+ const I420VideoFrame& frame) {
+ Resolution res = GetScaledResolution(frame);
+ if (res.width == frame.width())
+ return frame;
+
+ scaler_.Set(frame.width(),
+ frame.height(),
+ res.width,
+ res.height,
+ kI420,
+ kI420,
+ kScaleBox);
+ if (scaler_.Scale(frame, &scaled_frame_) != 0)
+ return frame;
+
+ scaled_frame_.set_ntp_time_ms(frame.ntp_time_ms());
+ scaled_frame_.set_timestamp(frame.timestamp());
+ scaled_frame_.set_render_time_ms(frame.render_time_ms());
+
+ return scaled_frame_;
+}
+
+QualityScaler::MovingAverage::MovingAverage() : sum_(0) {
+}
+
+void QualityScaler::MovingAverage::AddSample(int sample) {
+ samples_.push_back(sample);
+ sum_ += sample;
+}
+
+bool QualityScaler::MovingAverage::GetAverage(size_t num_samples, int* avg) {
+ assert(num_samples > 0);
+ if (num_samples > samples_.size())
+ return false;
+
+ // Remove old samples.
+ while (num_samples < samples_.size()) {
+ sum_ -= samples_.front();
+ samples_.pop_front();
+ }
+
+ *avg = sum_ / static_cast<int>(num_samples);
+ return true;
+}
+
+void QualityScaler::MovingAverage::Reset() {
+ sum_ = 0;
+ samples_.clear();
+}
+
+void QualityScaler::ClearSamples() {
+ average_qp_.Reset();
+ framedrop_percent_.Reset();
+}
+
+void QualityScaler::AdjustScale(bool up) {
+ downscale_shift_ += up ? -1 : 1;
+ if (downscale_shift_ < 0)
+ downscale_shift_ = 0;
+ ClearSamples();
+}
+
+} // namespace webrtc
diff --git a/modules/video_coding/utility/quality_scaler.h b/modules/video_coding/utility/quality_scaler.h
new file mode 100644
index 0000000..47d6cb1
--- /dev/null
+++ b/modules/video_coding/utility/quality_scaler.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
+#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
+
+#include <list>
+
+#include "webrtc/common_video/libyuv/include/scaler.h"
+
+namespace webrtc {
+class QualityScaler {
+ public:
+ struct Resolution {
+ int width;
+ int height;
+ };
+
+ QualityScaler();
+ void Init(int max_qp);
+
+ void ReportFramerate(int framerate);
+ void ReportEncodedFrame(int qp);
+ void ReportDroppedFrame();
+
+ Resolution GetScaledResolution(const I420VideoFrame& frame);
+ const I420VideoFrame& GetScaledFrame(const I420VideoFrame& frame);
+
+ private:
+ class MovingAverage {
+ public:
+ MovingAverage();
+ void AddSample(int sample);
+ bool GetAverage(size_t num_samples, int* average);
+ void Reset();
+
+ private:
+ int sum_;
+ std::list<int> samples_;
+ };
+
+ void AdjustScale(bool up);
+ void ClearSamples();
+
+ Scaler scaler_;
+ I420VideoFrame scaled_frame_;
+
+ size_t num_samples_;
+ int low_qp_threshold_;
+ MovingAverage average_qp_;
+ MovingAverage framedrop_percent_;
+
+ int downscale_shift_;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
diff --git a/modules/video_coding/utility/quality_scaler_unittest.cc b/modules/video_coding/utility/quality_scaler_unittest.cc
new file mode 100644
index 0000000..381b959
--- /dev/null
+++ b/modules/video_coding/utility/quality_scaler_unittest.cc
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/video_coding/utility/quality_scaler.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace webrtc {
+namespace {
+static const int kNumSeconds = 10;
+static const int kWidth = 1920;
+static const int kHalfWidth = kWidth / 2;
+static const int kHeight = 1080;
+static const int kFramerate = 30;
+static const int kLowQp = 15;
+static const int kNormalQp = 30;
+static const int kMaxQp = 56;
+} // namespace
+
+class QualityScalerTest : public ::testing::Test {
+ protected:
+ enum ScaleDirection { kScaleDown, kScaleUp };
+
+ QualityScalerTest() {
+ input_frame_.CreateEmptyFrame(
+ kWidth, kHeight, kWidth, kHalfWidth, kHalfWidth);
+ qs_.Init(kMaxQp);
+ qs_.ReportFramerate(kFramerate);
+ }
+
+ void TriggerScale(ScaleDirection scale_direction) {
+ int initial_width = qs_.GetScaledResolution(input_frame_).width;
+ for (int i = 0; i < kFramerate * kNumSeconds; ++i) {
+ switch (scale_direction) {
+ case kScaleUp:
+ qs_.ReportEncodedFrame(kLowQp);
+ break;
+ case kScaleDown:
+ qs_.ReportDroppedFrame();
+ break;
+ }
+
+ if (qs_.GetScaledResolution(input_frame_).width != initial_width)
+ return;
+ }
+
+ FAIL() << "No downscale within " << kNumSeconds << " seconds.";
+ }
+
+ void ExpectOriginalFrame() {
+ EXPECT_EQ(&input_frame_, &qs_.GetScaledFrame(input_frame_))
+ << "Using scaled frame instead of original input.";
+ }
+
+ void ExpectScaleUsingReportedResolution() {
+ QualityScaler::Resolution res = qs_.GetScaledResolution(input_frame_);
+ const I420VideoFrame& scaled_frame = qs_.GetScaledFrame(input_frame_);
+ EXPECT_EQ(res.width, scaled_frame.width());
+ EXPECT_EQ(res.height, scaled_frame.height());
+ }
+
+ void ContinuouslyDownscalesByHalfDimensionsAndBackUp();
+
+ void DoesNotDownscaleFrameDimensions(int width, int height);
+
+ QualityScaler qs_;
+ I420VideoFrame input_frame_;
+};
+
+TEST_F(QualityScalerTest, UsesOriginalFrameInitially) {
+ ExpectOriginalFrame();
+}
+
+TEST_F(QualityScalerTest, ReportsOriginalResolutionInitially) {
+ QualityScaler::Resolution res = qs_.GetScaledResolution(input_frame_);
+ EXPECT_EQ(input_frame_.width(), res.width);
+ EXPECT_EQ(input_frame_.height(), res.height);
+}
+
+TEST_F(QualityScalerTest, DownscalesAfterContinuousFramedrop) {
+ TriggerScale(kScaleDown);
+ QualityScaler::Resolution res = qs_.GetScaledResolution(input_frame_);
+ EXPECT_LT(res.width, input_frame_.width());
+ EXPECT_LT(res.height, input_frame_.height());
+}
+
+TEST_F(QualityScalerTest, DownscalesAfterTwoThirdsFramedrop) {
+ for (int i = 0; i < kFramerate * kNumSeconds / 3; ++i) {
+ qs_.ReportEncodedFrame(kNormalQp);
+ qs_.ReportDroppedFrame();
+ qs_.ReportDroppedFrame();
+ if (qs_.GetScaledResolution(input_frame_).width < input_frame_.width())
+ return;
+ }
+
+ FAIL() << "No downscale within " << kNumSeconds << " seconds.";
+}
+
+TEST_F(QualityScalerTest, DoesNotDownscaleOnNormalQp) {
+ for (int i = 0; i < kFramerate * kNumSeconds; ++i) {
+ qs_.ReportEncodedFrame(kNormalQp);
+ ASSERT_EQ(input_frame_.width(), qs_.GetScaledResolution(input_frame_).width)
+ << "Unexpected scale on half framedrop.";
+ }
+}
+
+TEST_F(QualityScalerTest, DoesNotDownscaleAfterHalfFramedrop) {
+ for (int i = 0; i < kFramerate * kNumSeconds / 2; ++i) {
+ qs_.ReportEncodedFrame(kNormalQp);
+ ASSERT_EQ(input_frame_.width(), qs_.GetScaledResolution(input_frame_).width)
+ << "Unexpected scale on half framedrop.";
+
+ qs_.ReportDroppedFrame();
+ ASSERT_EQ(input_frame_.width(), qs_.GetScaledResolution(input_frame_).width)
+ << "Unexpected scale on half framedrop.";
+ }
+}
+
+void QualityScalerTest::ContinuouslyDownscalesByHalfDimensionsAndBackUp() {
+ const int initial_min_dimension = input_frame_.width() < input_frame_.height()
+ ? input_frame_.width()
+ : input_frame_.height();
+ int min_dimension = initial_min_dimension;
+ int current_shift = 0;
+ // Drop all frames to force-trigger downscaling.
+ while (min_dimension > 16) {
+ TriggerScale(kScaleDown);
+ QualityScaler::Resolution res = qs_.GetScaledResolution(input_frame_);
+ min_dimension = res.width < res.height ? res.width : res.height;
+ ++current_shift;
+ ASSERT_EQ(input_frame_.width() >> current_shift, res.width);
+ ASSERT_EQ(input_frame_.height() >> current_shift, res.height);
+ ExpectScaleUsingReportedResolution();
+ }
+
+ // Make sure we can scale back with good-quality frames.
+ while (min_dimension < initial_min_dimension) {
+ TriggerScale(kScaleUp);
+ QualityScaler::Resolution res = qs_.GetScaledResolution(input_frame_);
+ min_dimension = res.width < res.height ? res.width : res.height;
+ --current_shift;
+ ASSERT_EQ(input_frame_.width() >> current_shift, res.width);
+ ASSERT_EQ(input_frame_.height() >> current_shift, res.height);
+ ExpectScaleUsingReportedResolution();
+ }
+
+ // Verify we don't start upscaling after further low use.
+ for (int i = 0; i < kFramerate * kNumSeconds; ++i) {
+ qs_.ReportEncodedFrame(kLowQp);
+ ExpectOriginalFrame();
+ }
+}
+
+TEST_F(QualityScalerTest, ContinuouslyDownscalesByHalfDimensionsAndBackUp) {
+ ContinuouslyDownscalesByHalfDimensionsAndBackUp();
+}
+
+TEST_F(QualityScalerTest,
+ ContinuouslyDownscalesOddResolutionsByHalfDimensionsAndBackUp) {
+ const int kOddWidth = 517;
+ const int kHalfOddWidth = (kOddWidth + 1) / 2;
+ const int kOddHeight = 1239;
+ input_frame_.CreateEmptyFrame(
+ kOddWidth, kOddHeight, kOddWidth, kHalfOddWidth, kHalfOddWidth);
+ ContinuouslyDownscalesByHalfDimensionsAndBackUp();
+}
+
+void QualityScalerTest::DoesNotDownscaleFrameDimensions(int width, int height) {
+ input_frame_.CreateEmptyFrame(
+ width, height, width, (width + 1) / 2, (width + 1) / 2);
+
+ for (int i = 0; i < kFramerate * kNumSeconds; ++i) {
+ qs_.ReportDroppedFrame();
+ ASSERT_EQ(input_frame_.width(), qs_.GetScaledResolution(input_frame_).width)
+ << "Unexpected scale of minimal-size frame.";
+ }
+}
+
+TEST_F(QualityScalerTest, DoesNotDownscaleFrom1PxWidth) {
+ DoesNotDownscaleFrameDimensions(1, kHeight);
+}
+
+TEST_F(QualityScalerTest, DoesNotDownscaleFrom1PxHeight) {
+ DoesNotDownscaleFrameDimensions(kWidth, 1);
+}
+
+TEST_F(QualityScalerTest, DoesNotDownscaleFrom1Px) {
+ DoesNotDownscaleFrameDimensions(1, 1);
+}
+
+} // namespace webrtc
diff --git a/modules/video_coding/utility/video_coding_utility.gyp b/modules/video_coding/utility/video_coding_utility.gyp
index 24f8880..dc2b33f 100644
--- a/modules/video_coding/utility/video_coding_utility.gyp
+++ b/modules/video_coding/utility/video_coding_utility.gyp
@@ -18,10 +18,10 @@
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
],
'sources': [
- 'include/exp_filter.h',
- 'include/frame_dropper.h',
- 'exp_filter.cc',
'frame_dropper.cc',
+ 'include/frame_dropper.h',
+ 'quality_scaler.cc',
+ 'quality_scaler.h',
],
},
], # targets
diff --git a/modules/video_coding/utility/video_coding_utility.target.darwin-arm.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-arm.mk
index 28df413..1cb2cfb 100644
--- a/modules/video_coding/utility/video_coding_utility.target.darwin-arm.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,8 +23,8 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -47,13 +45,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +66,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,23 +137,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,13 +168,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -194,7 +196,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -211,12 +212,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -256,68 +260,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.darwin-arm64.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-arm64.mk
index ab5249a..c73d7f3 100644
--- a/modules/video_coding/utility/video_coding_utility.target.darwin-arm64.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,15 +23,14 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -58,13 +56,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -81,12 +79,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -122,21 +123,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -168,7 +170,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -185,12 +186,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -227,59 +231,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.darwin-mips.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-mips.mk
index f890246..f6ff924 100644
--- a/modules/video_coding/utility/video_coding_utility.target.darwin-mips.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,8 +23,8 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -42,13 +40,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -63,6 +58,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +66,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,17 +82,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -130,23 +126,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -155,13 +152,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -183,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -200,17 +193,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -244,64 +238,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.darwin-mips64.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-mips64.mk
new file mode 100644
index 0000000..f6ff924
--- /dev/null
+++ b/modules/video_coding/utility/video_coding_utility.target.darwin-mips64.mk
@@ -0,0 +1,272 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
+
+# Alias gyp target name.
+.PHONY: video_coding_utility
+video_coding_utility: third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/utility/video_coding_utility.target.darwin-x86.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-x86.mk
index 851119a..ab9cdf1 100644
--- a/modules/video_coding/utility/video_coding_utility.target.darwin-x86.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,15 +23,14 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +182,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +198,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -239,63 +243,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.darwin-x86_64.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-x86_64.mk
index 7f0b1b2..cec9a47 100644
--- a/modules/video_coding/utility/video_coding_utility.target.darwin-x86_64.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,8 +23,8 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -69,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,22 +128,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,7 +180,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -195,12 +196,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -237,63 +241,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.linux-arm.mk b/modules/video_coding/utility/video_coding_utility.target.linux-arm.mk
index 28df413..1cb2cfb 100644
--- a/modules/video_coding/utility/video_coding_utility.target.linux-arm.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,8 +23,8 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -47,13 +45,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +66,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,23 +137,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,13 +168,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -194,7 +196,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -211,12 +212,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -256,68 +260,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.linux-arm64.mk b/modules/video_coding/utility/video_coding_utility.target.linux-arm64.mk
index ab5249a..c73d7f3 100644
--- a/modules/video_coding/utility/video_coding_utility.target.linux-arm64.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,15 +23,14 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -58,13 +56,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -81,12 +79,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -122,21 +123,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -168,7 +170,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -185,12 +186,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -227,59 +231,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.linux-mips.mk b/modules/video_coding/utility/video_coding_utility.target.linux-mips.mk
index f890246..f6ff924 100644
--- a/modules/video_coding/utility/video_coding_utility.target.linux-mips.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,8 +23,8 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -42,13 +40,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -63,6 +58,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +66,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,17 +82,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -130,23 +126,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -155,13 +152,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -183,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -200,17 +193,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -244,64 +238,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.linux-mips64.mk b/modules/video_coding/utility/video_coding_utility.target.linux-mips64.mk
new file mode 100644
index 0000000..f6ff924
--- /dev/null
+++ b/modules/video_coding/utility/video_coding_utility.target.linux-mips64.mk
@@ -0,0 +1,272 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
+
+# Alias gyp target name.
+.PHONY: video_coding_utility
+video_coding_utility: third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_coding/utility/video_coding_utility.target.linux-x86.mk b/modules/video_coding/utility/video_coding_utility.target.linux-x86.mk
index 851119a..ab9cdf1 100644
--- a/modules/video_coding/utility/video_coding_utility.target.linux-x86.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,15 +23,14 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -70,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +85,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,21 +129,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +182,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +198,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -239,63 +243,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_coding/utility/video_coding_utility.target.linux-x86_64.mk b/modules/video_coding/utility/video_coding_utility.target.linux-x86_64.mk
index 7f0b1b2..cec9a47 100644
--- a/modules/video_coding/utility/video_coding_utility.target.linux-x86_64.mk
+++ b/modules/video_coding/utility/video_coding_utility.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_coding_utility_video_coding_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -24,8 +23,8 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- third_party/webrtc/modules/video_coding/utility/exp_filter.cc \
- third_party/webrtc/modules/video_coding/utility/frame_dropper.cc
+ third_party/webrtc/modules/video_coding/utility/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -33,7 +32,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -69,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -127,22 +128,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,7 +180,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -195,12 +196,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -237,63 +241,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.darwin-arm.mk b/modules/video_processing.target.darwin-arm.mk
index c8d5010..2263f3a 100644
--- a/modules/video_processing.target.darwin-arm.mk
+++ b/modules/video_processing.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -41,7 +39,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +56,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -80,6 +77,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,7 +85,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -104,12 +101,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -153,23 +153,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,13 +188,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -215,7 +216,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -232,12 +232,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -282,68 +285,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.darwin-arm64.mk b/modules/video_processing.target.darwin-arm64.mk
index e6419db..6839bff 100644
--- a/modules/video_processing.target.darwin-arm64.mk
+++ b/modules/video_processing.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -40,7 +38,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +67,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,21 +139,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,59 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.darwin-mips.mk b/modules/video_processing.target.darwin-mips.mk
index 56e8642..8b2a4b3 100644
--- a/modules/video_processing.target.darwin-mips.mk
+++ b/modules/video_processing.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -41,7 +39,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,18 +47,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -76,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -83,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -100,17 +93,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -148,23 +142,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,18 +168,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -206,7 +197,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -223,17 +213,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -272,64 +263,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.darwin-mips64.mk b/modules/video_processing.target.darwin-mips64.mk
new file mode 100644
index 0000000..8b2a4b3
--- /dev/null
+++ b/modules/video_processing.target.darwin-mips64.mk
@@ -0,0 +1,297 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_processing/main/source/brighten.cc \
+ third_party/webrtc/modules/video_processing/main/source/brightness_detection.cc \
+ third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
+ third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
+ third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
+ third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
+ third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
+ third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
+ third_party/webrtc/modules/video_processing/main/source/video_processing_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_processing_gyp
+
+# Alias gyp target name.
+.PHONY: video_processing
+video_processing: third_party_webrtc_modules_video_processing_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_processing.target.darwin-x86.mk b/modules/video_processing.target.darwin-x86.mk
index 673332e..98d3848 100644
--- a/modules/video_processing.target.darwin-x86.mk
+++ b/modules/video_processing.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -40,7 +38,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,6 +72,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -82,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -99,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -145,21 +145,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,63 +268,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.darwin-x86_64.mk b/modules/video_processing.target.darwin-x86_64.mk
index fc48988..8368b86 100644
--- a/modules/video_processing.target.darwin-x86_64.mk
+++ b/modules/video_processing.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -41,7 +39,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,22 +144,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -216,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,63 +266,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.linux-arm.mk b/modules/video_processing.target.linux-arm.mk
index c8d5010..2263f3a 100644
--- a/modules/video_processing.target.linux-arm.mk
+++ b/modules/video_processing.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -41,7 +39,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +56,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -80,6 +77,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,7 +85,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -104,12 +101,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -153,23 +153,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,13 +188,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -215,7 +216,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -232,12 +232,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -282,68 +285,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.linux-arm64.mk b/modules/video_processing.target.linux-arm64.mk
index e6419db..6839bff 100644
--- a/modules/video_processing.target.linux-arm64.mk
+++ b/modules/video_processing.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -40,7 +38,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +67,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,21 +139,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -206,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,59 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.linux-mips.mk b/modules/video_processing.target.linux-mips.mk
index 56e8642..8b2a4b3 100644
--- a/modules/video_processing.target.linux-mips.mk
+++ b/modules/video_processing.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -41,7 +39,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,18 +47,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -76,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -83,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -100,17 +93,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -148,23 +142,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,18 +168,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -206,7 +197,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -223,17 +213,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -272,64 +263,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.linux-mips64.mk b/modules/video_processing.target.linux-mips64.mk
new file mode 100644
index 0000000..8b2a4b3
--- /dev/null
+++ b/modules/video_processing.target.linux-mips64.mk
@@ -0,0 +1,297 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_processing/main/source/brighten.cc \
+ third_party/webrtc/modules/video_processing/main/source/brightness_detection.cc \
+ third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
+ third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
+ third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
+ third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
+ third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
+ third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
+ third_party/webrtc/modules/video_processing/main/source/video_processing_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_processing_gyp
+
+# Alias gyp target name.
+.PHONY: video_processing
+video_processing: third_party_webrtc_modules_video_processing_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_processing.target.linux-x86.mk b/modules/video_processing.target.linux-x86.mk
index 673332e..98d3848 100644
--- a/modules/video_processing.target.linux-x86.mk
+++ b/modules/video_processing.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -40,7 +38,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,6 +72,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -82,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -99,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -145,21 +145,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,63 +268,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing.target.linux-x86_64.mk b/modules/video_processing.target.linux-x86_64.mk
index fc48988..8368b86 100644
--- a/modules/video_processing.target.linux-x86_64.mk
+++ b/modules/video_processing.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -29,7 +28,6 @@
third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc \
third_party/webrtc/modules/video_processing/main/source/content_analysis.cc \
third_party/webrtc/modules/video_processing/main/source/deflickering.cc \
- third_party/webrtc/modules/video_processing/main/source/denoising.cc \
third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc \
third_party/webrtc/modules/video_processing/main/source/spatial_resampler.cc \
third_party/webrtc/modules/video_processing/main/source/video_decimator.cc \
@@ -41,7 +39,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,22 +144,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -216,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,63 +266,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing/BUILD.gn b/modules/video_processing/BUILD.gn
new file mode 100644
index 0000000..42ef94b
--- /dev/null
+++ b/modules/video_processing/BUILD.gn
@@ -0,0 +1,71 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+build_video_processing_sse2 = cpu_arch == "x86" || cpu_arch == "x64"
+
+source_set("video_processing") {
+ sources = [
+ "main/interface/video_processing.h",
+ "main/interface/video_processing_defines.h",
+ "main/source/brighten.cc",
+ "main/source/brighten.h",
+ "main/source/brightness_detection.cc",
+ "main/source/brightness_detection.h",
+ "main/source/color_enhancement.cc",
+ "main/source/color_enhancement.h",
+ "main/source/color_enhancement_private.h",
+ "main/source/content_analysis.cc",
+ "main/source/content_analysis.h",
+ "main/source/deflickering.cc",
+ "main/source/deflickering.h",
+ "main/source/frame_preprocessor.cc",
+ "main/source/frame_preprocessor.h",
+ "main/source/spatial_resampler.cc",
+ "main/source/spatial_resampler.h",
+ "main/source/video_decimator.cc",
+ "main/source/video_decimator.h",
+ "main/source/video_processing_impl.cc",
+ "main/source/video_processing_impl.h",
+ ]
+
+ deps = [
+ "../../common_audio",
+ "../../common_video",
+ "../../modules/utility",
+ "../../system_wrappers",
+ ]
+ if (build_video_processing_sse2) {
+ deps += [ ":video_processing_sse2" ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
+
+if (build_video_processing_sse2) {
+ source_set("video_processing_sse2") {
+ sources = [ "main/source/content_analysis_sse2.cc" ]
+
+ configs += [ "../..:common_inherited_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ if (is_posix) {
+ cflags = [ "-msse2" ]
+ }
+ }
+}
diff --git a/modules/video_processing/OWNERS b/modules/video_processing/OWNERS
new file mode 100644
index 0000000..897a0b2
--- /dev/null
+++ b/modules/video_processing/OWNERS
@@ -0,0 +1,5 @@
+stefan@webrtc.org
+marpan@webrtc.org
+henrik.lundin@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/video_processing/main/OWNERS b/modules/video_processing/main/OWNERS
deleted file mode 100644
index 7183cf2..0000000
--- a/modules/video_processing/main/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-stefan@webrtc.org
-mikhal@webrtc.org
-marpan@webrtc.org
-henrik.lundin@webrtc.org
diff --git a/modules/video_processing/main/interface/video_processing.h b/modules/video_processing/main/interface/video_processing.h
index 817d43d..df8a361 100644
--- a/modules/video_processing/main/interface/video_processing.h
+++ b/modules/video_processing/main/interface/video_processing.h
@@ -89,12 +89,12 @@
/**
Not supported.
*/
- virtual int32_t TimeUntilNextProcess() { return -1; }
+ virtual int32_t TimeUntilNextProcess() OVERRIDE { return -1; }
/**
Not supported.
*/
- virtual int32_t Process() { return -1; }
+ virtual int32_t Process() OVERRIDE { return -1; }
/**
Resets all processing components to their initial states. This should be
@@ -177,17 +177,6 @@
virtual int32_t Deflickering(I420VideoFrame* frame, FrameStats* stats) = 0;
/**
- Denoises a video frame. Every frame from the stream should be passed in.
- Has a fixed-point implementation.
-
- \param[in,out] frame
- Pointer to the video frame.
-
- \return The number of modified pixels on success, -1 on failure.
- */
- virtual int32_t Denoising(I420VideoFrame* frame) = 0;
-
- /**
Detects if a video frame is excessively bright or dark. Returns a
warning if this is the case. Multiple frames should be passed in before
expecting a warning. Has a floating-point implementation.
diff --git a/modules/video_processing/main/source/Android.mk b/modules/video_processing/main/source/Android.mk
deleted file mode 100644
index 829fa96..0000000
--- a/modules/video_processing/main/source/Android.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_video_processing
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- brighten.cc \
- brightness_detection.cc \
- color_enhancement.cc \
- content_analysis.cc \
- deflickering.cc \
- denoising.cc \
- frame_preprocessor.cc \
- spatial_resampler.cc \
- video_decimator.cc \
- video_processing_impl.cc
-
-ifeq ($(TARGET_ARCH),x86)
-LOCAL_SRC_FILES += \
- content_analysis_sse2.cc
-endif
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../audio_coding/main/interface \
- $(LOCAL_PATH)/../../../utility/interface \
- $(LOCAL_PATH)/../../../../common_audio/signal_processing/include \
- $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_processing/main/source/deflickering.cc b/modules/video_processing/main/source/deflickering.cc
index cdc6174..95755c2 100644
--- a/modules/video_processing/main/source/deflickering.cc
+++ b/modules/video_processing/main/source/deflickering.cc
@@ -75,8 +75,9 @@
quant_hist_uw8_[0][0] = 0;
quant_hist_uw8_[0][kNumQuants - 1] = 255;
for (int32_t i = 0; i < kNumProbs; i++) {
- quant_hist_uw8_[0][i + 1] = static_cast<uint8_t>((WEBRTC_SPL_UMUL_16_16(
- prob_uw16_[i], 255) + (1 << 10)) >> 11); // Unsigned round. <Q0>
+ // Unsigned round. <Q0>
+ quant_hist_uw8_[0][i + 1] = static_cast<uint8_t>(
+ (prob_uw16_[i] * 255 + (1 << 10)) >> 11);
}
for (int32_t i = 1; i < kFrameHistory_size; i++) {
@@ -191,9 +192,12 @@
// Get target quantiles.
for (int32_t i = 0; i < kNumQuants - kMaxOnlyLength; i++) {
- target_quant_uw16[i] = static_cast<uint16_t>((WEBRTC_SPL_UMUL_16_16(
- weight_uw16_[i], maxquant_uw8[i]) + WEBRTC_SPL_UMUL_16_16((1 << 15) -
- weight_uw16_[i], minquant_uw8[i])) >> 8); // <Q7>
+ // target = w * maxquant_uw8 + (1 - w) * minquant_uw8
+ // Weights w = |weight_uw16_| are in Q15, hence the final output has to be
+ // right shifted by 8 to end up in Q7.
+ target_quant_uw16[i] = static_cast<uint16_t>((
+ weight_uw16_[i] * maxquant_uw8[i] +
+ ((1 << 15) - weight_uw16_[i]) * minquant_uw8[i]) >> 8); // <Q7>
}
for (int32_t i = kNumQuants - kMaxOnlyLength; i < kNumQuants; i++) {
diff --git a/modules/video_processing/main/source/denoising.cc b/modules/video_processing/main/source/denoising.cc
deleted file mode 100644
index 4c8dcb4..0000000
--- a/modules/video_processing/main/source/denoising.cc
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/modules/video_processing/main/source/denoising.h"
-
-#include <string.h>
-
-namespace webrtc {
-// Down-sampling in time (unit: number of frames)
-enum { kSubsamplingTime = 0 };
-// Sub-sampling in width (unit: power of 2.
-enum { kSubsamplingWidth = 0 };
-// Sub-sampling in height (unit: power of 2)
-enum { kSubsamplingHeight = 0 };
-// (Q8) De-noising filter parameter
-enum { kDenoiseFiltParam = 179 };
-// (Q8) 1 - filter parameter
-enum { kDenoiseFiltParamRec = 77 };
-// (Q8) De-noising threshold level
-enum { kDenoiseThreshold = 19200 };
-
-VPMDenoising::VPMDenoising()
- : id_(0),
- moment1_(NULL),
- moment2_(NULL) {
- Reset();
-}
-
-VPMDenoising::~VPMDenoising() {
- if (moment1_) {
- delete [] moment1_;
- moment1_ = NULL;
-}
-
- if (moment2_) {
- delete [] moment2_;
- moment2_ = NULL;
- }
-}
-
-int32_t VPMDenoising::ChangeUniqueId(const int32_t id) {
- id_ = id;
- return VPM_OK;
-}
-
-void VPMDenoising::Reset() {
- frame_size_ = 0;
- denoise_frame_cnt_ = 0;
-
- if (moment1_) {
- delete [] moment1_;
- moment1_ = NULL;
- }
-
- if (moment2_) {
- delete [] moment2_;
- moment2_ = NULL;
- }
-}
-
-int32_t VPMDenoising::ProcessFrame(I420VideoFrame* frame) {
- assert(frame);
- int32_t thevar;
- int k;
- int jsub, ksub;
- int32_t diff0;
- uint32_t tmp_moment1;
- uint32_t tmp_moment2;
- uint32_t tmp;
- int32_t num_pixels_changed = 0;
-
- if (frame->IsZeroSize()) {
- return VPM_GENERAL_ERROR;
- }
-
- int width = frame->width();
- int height = frame->height();
-
- /* Size of luminance component */
- const uint32_t y_size = height * width;
-
- /* Initialization */
- if (y_size != frame_size_) {
- delete [] moment1_;
- moment1_ = NULL;
-
- delete [] moment2_;
- moment2_ = NULL;
- }
- frame_size_ = y_size;
-
- if (!moment1_) {
- moment1_ = new uint32_t[y_size];
- memset(moment1_, 0, sizeof(uint32_t)*y_size);
- }
-
- if (!moment2_) {
- moment2_ = new uint32_t[y_size];
- memset(moment2_, 0, sizeof(uint32_t)*y_size);
- }
-
- /* Apply de-noising on each pixel, but update variance sub-sampled */
- uint8_t* buffer = frame->buffer(kYPlane);
- for (int i = 0; i < height; i++) { // Collect over height
- k = i * width;
- ksub = ((i >> kSubsamplingHeight) << kSubsamplingHeight) * width;
- for (int j = 0; j < width; j++) { // Collect over width
- jsub = ((j >> kSubsamplingWidth) << kSubsamplingWidth);
- /* Update mean value for every pixel and every frame */
- tmp_moment1 = moment1_[k + j];
- tmp_moment1 *= kDenoiseFiltParam; // Q16
- tmp_moment1 += ((kDenoiseFiltParamRec * ((uint32_t)buffer[k + j])) << 8);
- tmp_moment1 >>= 8; // Q8
- moment1_[k + j] = tmp_moment1;
-
- tmp_moment2 = moment2_[ksub + jsub];
- if ((ksub == k) && (jsub == j) && (denoise_frame_cnt_ == 0)) {
- tmp = ((uint32_t)buffer[k + j] *
- (uint32_t)buffer[k + j]);
- tmp_moment2 *= kDenoiseFiltParam; // Q16
- tmp_moment2 += ((kDenoiseFiltParamRec * tmp) << 8);
- tmp_moment2 >>= 8; // Q8
- }
- moment2_[k + j] = tmp_moment2;
- /* Current event = deviation from mean value */
- diff0 = ((int32_t)buffer[k + j] << 8) - moment1_[k + j];
- /* Recent events = variance (variations over time) */
- thevar = moment2_[k + j];
- thevar -= ((moment1_[k + j] * moment1_[k + j]) >> 8);
- // De-noising criteria, i.e., when should we replace a pixel by its mean.
- // 1) recent events are minor.
- // 2) current events are minor.
- if ((thevar < kDenoiseThreshold)
- && ((diff0 * diff0 >> 8) < kDenoiseThreshold)) {
- // Replace with mean.
- buffer[k + j] = (uint8_t)(moment1_[k + j] >> 8);
- num_pixels_changed++;
- }
- }
- }
-
- denoise_frame_cnt_++;
- if (denoise_frame_cnt_ > kSubsamplingTime)
- denoise_frame_cnt_ = 0;
-
- return num_pixels_changed;
-}
-
-} // namespace
diff --git a/modules/video_processing/main/source/denoising.h b/modules/video_processing/main/source/denoising.h
deleted file mode 100644
index 60645fb..0000000
--- a/modules/video_processing/main/source/denoising.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_MAIN_SOURCE_DENOISING_H_
-#define WEBRTC_MODULES_VIDEO_PROCESSING_MAIN_SOURCE_DENOISING_H_
-
-#include "webrtc/modules/video_processing/main/interface/video_processing.h"
-#include "webrtc/typedefs.h"
-
-namespace webrtc {
-
-class VPMDenoising {
- public:
- VPMDenoising();
- ~VPMDenoising();
-
- int32_t ChangeUniqueId(int32_t id);
-
- void Reset();
-
- int32_t ProcessFrame(I420VideoFrame* frame);
-
- private:
- int32_t id_;
-
- uint32_t* moment1_; // (Q8) First order moment (mean).
- uint32_t* moment2_; // (Q8) Second order moment.
- uint32_t frame_size_; // Size (# of pixels) of frame.
- int denoise_frame_cnt_; // Counter for subsampling in time.
-};
-
-} // namespace webrtc
-
-#endif // WEBRTC_MODULES_VIDEO_PROCESSING_MAIN_SOURCE_DENOISING_H_
-
diff --git a/modules/video_processing/main/source/video_processing.gypi b/modules/video_processing/main/source/video_processing.gypi
index 7a0279e..f62aa18 100644
--- a/modules/video_processing/main/source/video_processing.gypi
+++ b/modules/video_processing/main/source/video_processing.gypi
@@ -31,8 +31,6 @@
'content_analysis.h',
'deflickering.cc',
'deflickering.h',
- 'denoising.cc',
- 'denoising.h',
'frame_preprocessor.cc',
'frame_preprocessor.h',
'spatial_resampler.cc',
diff --git a/modules/video_processing/main/source/video_processing_impl.cc b/modules/video_processing/main/source/video_processing_impl.cc
index 3560030..8bc5bf0 100644
--- a/modules/video_processing/main/source/video_processing_impl.cc
+++ b/modules/video_processing/main/source/video_processing_impl.cc
@@ -51,7 +51,6 @@
id_ = id;
brightness_detection_.ChangeUniqueId(id);
deflickering_.ChangeUniqueId(id);
- denoising_.ChangeUniqueId(id);
frame_pre_processor_.ChangeUniqueId(id);
return VPM_OK;
}
@@ -66,7 +65,6 @@
mutex_(*CriticalSectionWrapper::CreateCriticalSection()) {
brightness_detection_.ChangeUniqueId(id);
deflickering_.ChangeUniqueId(id);
- denoising_.ChangeUniqueId(id);
frame_pre_processor_.ChangeUniqueId(id);
}
@@ -77,7 +75,6 @@
void VideoProcessingModuleImpl::Reset() {
CriticalSectionScoped mutex(&mutex_);
deflickering_.Reset();
- denoising_.Reset();
brightness_detection_.Reset();
frame_pre_processor_.Reset();
}
@@ -146,11 +143,6 @@
return deflickering_.ProcessFrame(frame, stats);
}
-int32_t VideoProcessingModuleImpl::Denoising(I420VideoFrame* frame) {
- CriticalSectionScoped mutex(&mutex_);
- return denoising_.ProcessFrame(frame);
-}
-
int32_t VideoProcessingModuleImpl::BrightnessDetection(
const I420VideoFrame& frame,
const FrameStats& stats) {
diff --git a/modules/video_processing/main/source/video_processing_impl.h b/modules/video_processing/main/source/video_processing_impl.h
index deae6ff..95e41bd 100644
--- a/modules/video_processing/main/source/video_processing_impl.h
+++ b/modules/video_processing/main/source/video_processing_impl.h
@@ -16,7 +16,6 @@
#include "webrtc/modules/video_processing/main/source/brightness_detection.h"
#include "webrtc/modules/video_processing/main/source/color_enhancement.h"
#include "webrtc/modules/video_processing/main/source/deflickering.h"
-#include "webrtc/modules/video_processing/main/source/denoising.h"
#include "webrtc/modules/video_processing/main/source/frame_preprocessor.h"
namespace webrtc {
@@ -30,51 +29,50 @@
int32_t Id() const;
- virtual int32_t ChangeUniqueId(const int32_t id);
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
- virtual void Reset();
+ virtual void Reset() OVERRIDE;
- virtual int32_t Deflickering(I420VideoFrame* frame, FrameStats* stats);
-
- virtual int32_t Denoising(I420VideoFrame* frame);
+ virtual int32_t Deflickering(I420VideoFrame* frame,
+ FrameStats* stats) OVERRIDE;
virtual int32_t BrightnessDetection(const I420VideoFrame& frame,
- const FrameStats& stats);
+ const FrameStats& stats) OVERRIDE;
// Frame pre-processor functions
// Enable temporal decimation
- virtual void EnableTemporalDecimation(bool enable);
+ virtual void EnableTemporalDecimation(bool enable) OVERRIDE;
- virtual void SetInputFrameResampleMode(VideoFrameResampling resampling_mode);
+ virtual void SetInputFrameResampleMode(
+ VideoFrameResampling resampling_mode) OVERRIDE;
// Enable content analysis
- virtual void EnableContentAnalysis(bool enable);
+ virtual void EnableContentAnalysis(bool enable) OVERRIDE;
// Set Target Resolution: frame rate and dimension
virtual int32_t SetTargetResolution(uint32_t width,
uint32_t height,
- uint32_t frame_rate);
+ uint32_t frame_rate) OVERRIDE;
// Get decimated values: frame rate/dimension
- virtual uint32_t Decimatedframe_rate();
- virtual uint32_t DecimatedWidth() const;
- virtual uint32_t DecimatedHeight() const;
+ virtual uint32_t Decimatedframe_rate() OVERRIDE;
+ virtual uint32_t DecimatedWidth() const OVERRIDE;
+ virtual uint32_t DecimatedHeight() const OVERRIDE;
// Preprocess:
// Pre-process incoming frame: Sample when needed and compute content
// metrics when enabled.
// If no resampling takes place - processed_frame is set to NULL.
virtual int32_t PreprocessFrame(const I420VideoFrame& frame,
- I420VideoFrame** processed_frame);
- virtual VideoContentMetrics* ContentMetrics() const;
+ I420VideoFrame** processed_frame) OVERRIDE;
+ virtual VideoContentMetrics* ContentMetrics() const OVERRIDE;
private:
int32_t id_;
CriticalSectionWrapper& mutex_;
VPMDeflickering deflickering_;
- VPMDenoising denoising_;
VPMBrightnessDetection brightness_detection_;
VPMFramePreprocessor frame_pre_processor_;
};
diff --git a/modules/video_processing/main/test/unit_test/denoising_test.cc b/modules/video_processing/main/test/unit_test/denoising_test.cc
deleted file mode 100644
index c00db6a..0000000
--- a/modules/video_processing/main/test/unit_test/denoising_test.cc
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
-#include "webrtc/modules/video_processing/main/interface/video_processing.h"
-#include "webrtc/modules/video_processing/main/test/unit_test/video_processing_unittest.h"
-#include "webrtc/system_wrappers/interface/tick_util.h"
-#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/test/testsupport/gtest_disable.h"
-
-namespace webrtc {
-
-TEST_F(VideoProcessingModuleTest, DISABLED_ON_ANDROID(Denoising))
-{
- enum { NumRuns = 10 };
- uint32_t frameNum = 0;
-
- int64_t min_runtime = 0;
- int64_t avg_runtime = 0;
-
- const std::string denoise_filename =
- webrtc::test::OutputPath() + "denoise_testfile.yuv";
- FILE* denoiseFile = fopen(denoise_filename.c_str(), "wb");
- ASSERT_TRUE(denoiseFile != NULL) <<
- "Could not open output file: " << denoise_filename << "\n";
-
- const std::string noise_filename =
- webrtc::test::OutputPath() + "noise_testfile.yuv";
- FILE* noiseFile = fopen(noise_filename.c_str(), "wb");
- ASSERT_TRUE(noiseFile != NULL) <<
- "Could not open noisy file: " << noise_filename << "\n";
-
- printf("\nRun time [us / frame]:\n");
- for (uint32_t run_idx = 0; run_idx < NumRuns; run_idx++)
- {
- TickTime t0;
- TickTime t1;
- TickInterval acc_ticks;
- int32_t modifiedPixels = 0;
-
- frameNum = 0;
- scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
- while (fread(video_buffer.get(), 1, frame_length_, source_file_) ==
- frame_length_)
- {
- EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0,
- width_, height_,
- 0, kRotateNone, &video_frame_));
- frameNum++;
- uint8_t* sourceBuffer = video_frame_.buffer(kYPlane);
-
- // Add noise to a part in video stream
- // Random noise
- // TODO: investigate the effectiveness of this test.
-
- for (int ir = 0; ir < height_; ir++)
- {
- uint32_t ik = ir * width_;
- for (int ic = 0; ic < width_; ic++)
- {
- uint8_t r = rand() % 16;
- r -= 8;
- if (ir < height_ / 4)
- r = 0;
- if (ir >= 3 * height_ / 4)
- r = 0;
- if (ic < width_ / 4)
- r = 0;
- if (ic >= 3 * width_ / 4)
- r = 0;
-
- /*uint8_t pixelValue = 0;
- if (ir >= height_ / 2)
- { // Region 3 or 4
- pixelValue = 170;
- }
- if (ic >= width_ / 2)
- { // Region 2 or 4
- pixelValue += 85;
- }
- pixelValue += r;
- sourceBuffer[ik + ic] = pixelValue;
- */
- sourceBuffer[ik + ic] += r;
- }
- }
-
- if (run_idx == 0)
- {
- if (PrintI420VideoFrame(video_frame_, noiseFile) < 0) {
- return;
- }
- }
-
- t0 = TickTime::Now();
- ASSERT_GE(modifiedPixels = vpm_->Denoising(&video_frame_), 0);
- t1 = TickTime::Now();
- acc_ticks += (t1 - t0);
-
- if (run_idx == 0)
- {
- if (PrintI420VideoFrame(video_frame_, noiseFile) < 0) {
- return;
- }
- }
- }
- ASSERT_NE(0, feof(source_file_)) << "Error reading source file";
-
- printf("%u\n", static_cast<int>(acc_ticks.Microseconds() / frameNum));
- if (acc_ticks.Microseconds() < min_runtime || run_idx == 0)
- {
- min_runtime = acc_ticks.Microseconds();
- }
- avg_runtime += acc_ticks.Microseconds();
-
- rewind(source_file_);
- }
- ASSERT_EQ(0, fclose(denoiseFile));
- ASSERT_EQ(0, fclose(noiseFile));
- printf("\nAverage run time = %d us / frame\n",
- static_cast<int>(avg_runtime / frameNum / NumRuns));
- printf("Min run time = %d us / frame\n\n",
- static_cast<int>(min_runtime / frameNum));
-}
-
-} // namespace webrtc
diff --git a/modules/video_processing/main/test/unit_test/video_processing_unittest.cc b/modules/video_processing/main/test/unit_test/video_processing_unittest.cc
index 973552c..b124503 100644
--- a/modules/video_processing/main/test/unit_test/video_processing_unittest.cc
+++ b/modules/video_processing/main/test/unit_test/video_processing_unittest.cc
@@ -82,8 +82,6 @@
EXPECT_EQ(-1, vpm_->Deflickering(&videoFrame, &stats));
- EXPECT_EQ(-1, vpm_->Denoising(&videoFrame));
-
EXPECT_EQ(-3, vpm_->BrightnessDetection(videoFrame, stats));
}
@@ -113,8 +111,6 @@
EXPECT_EQ(-1, vpm_->Deflickering(&video_frame_, &stats));
- EXPECT_EQ(-1, vpm_->Denoising(&video_frame_));
-
EXPECT_EQ(-3, vpm_->BrightnessDetection(video_frame_, stats));
EXPECT_EQ(VPM_PARAMETER_ERROR, vpm_->SetTargetResolution(0,0,0));
@@ -145,19 +141,6 @@
ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_,
source_file_));
- // Using ConvertToI420 to add stride to the image.
- EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0,
- width_, height_,
- 0, kRotateNone, &video_frame_));
- video_frame2.CopyFrame(video_frame_);
- EXPECT_TRUE(CompareFrames(video_frame_, video_frame2));
- ASSERT_GE(vpm_->Denoising(&video_frame_), 0);
- vpm_->Reset();
- ASSERT_GE(vpm_->Denoising(&video_frame2), 0);
- EXPECT_TRUE(CompareFrames(video_frame_, video_frame2));
-
- ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_,
- source_file_));
EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0,
width_, height_,
0, kRotateNone, &video_frame_));
diff --git a/modules/video_processing_sse2.target.darwin-x86.mk b/modules/video_processing_sse2.target.darwin-x86.mk
index f0c1fd7..ef5499c 100644
--- a/modules/video_processing_sse2.target.darwin-x86.mk
+++ b/modules/video_processing_sse2.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing_sse2.target.darwin-x86_64.mk b/modules/video_processing_sse2.target.darwin-x86_64.mk
index 227e679..32d8498 100644
--- a/modules/video_processing_sse2.target.darwin-x86_64.mk
+++ b/modules/video_processing_sse2.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing_sse2.target.linux-x86.mk b/modules/video_processing_sse2.target.linux-x86.mk
index f0c1fd7..ef5499c 100644
--- a/modules/video_processing_sse2.target.linux-x86.mk
+++ b/modules/video_processing_sse2.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,7 +190,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -205,12 +206,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_processing_sse2.target.linux-x86_64.mk b/modules/video_processing_sse2.target.linux-x86_64.mk
index 227e679..32d8498 100644
--- a/modules/video_processing_sse2.target.linux-x86_64.mk
+++ b/modules/video_processing_sse2.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_processing_sse2_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -203,12 +204,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render/Android.mk b/modules/video_render/Android.mk
deleted file mode 100644
index c11a89c..0000000
--- a/modules/video_render/Android.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_MODULE := libwebrtc_video_render
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- incoming_video_stream.cc \
- video_render_frames.cc \
- video_render_impl.cc \
- external/video_render_external_impl.cc \
- android/video_render_android_impl.cc \
- android/video_render_android_native_opengl2.cc \
- android/video_render_android_surface_view.cc \
- android/video_render_opengles20.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/android \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../audio_coding/main/interface \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../utility/interface \
- $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render/BUILD.gn b/modules/video_render/BUILD.gn
new file mode 100644
index 0000000..84b73c5
--- /dev/null
+++ b/modules/video_render/BUILD.gn
@@ -0,0 +1,165 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../build/webrtc.gni")
+
+source_set("video_render") {
+ sources = [
+ "external/video_render_external_impl.cc",
+ "external/video_render_external_impl.h",
+ "i_video_render.h",
+ "include/video_render.h",
+ "include/video_render_defines.h",
+ "incoming_video_stream.cc",
+ "incoming_video_stream.h",
+ "video_render_frames.cc",
+ "video_render_frames.h",
+ "video_render_impl.h",
+ ]
+
+ deps = [
+ "../../common_video",
+ "../../system_wrappers",
+ "../utility",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
+
+source_set("video_render_impl") {
+ sources = [
+ "video_render_impl.cc",
+ ]
+ deps = [
+ ":video_render",
+ "../../system_wrappers",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
+
+config("video_render_internal_impl_config") {
+ if (is_ios) {
+ libs = [
+ "OpenGLES.framework",
+ "QuartzCore.framework",
+ ]
+ }
+}
+
+source_set("video_render_internal_impl") {
+ libs = []
+ sources = [
+ "video_render_internal_impl.cc",
+ ]
+ deps = [
+ ":video_render",
+ "../../system_wrappers",
+ ]
+
+ if (is_linux) {
+ sources += [
+ "linux/video_render_linux_impl.cc",
+ "linux/video_render_linux_impl.h",
+ "linux/video_x11_channel.cc",
+ "linux/video_x11_channel.h",
+ "linux/video_x11_render.cc",
+ "linux/video_x11_render.h",
+ ]
+
+ libs += [ "Xext" ]
+ }
+ if (is_mac) {
+ sources += [
+ "mac/cocoa_full_screen_window.h",
+ "mac/cocoa_full_screen_window.mm",
+ "mac/cocoa_render_view.h",
+ "mac/cocoa_render_view.mm",
+ "mac/video_render_agl.cc",
+ "mac/video_render_agl.h",
+ "mac/video_render_mac_carbon_impl.cc",
+ "mac/video_render_mac_carbon_impl.h",
+ "mac/video_render_mac_cocoa_impl.h",
+ "mac/video_render_mac_cocoa_impl.mm",
+ "mac/video_render_nsopengl.h",
+ "mac/video_render_nsopengl.mm",
+ ]
+
+ libs += [
+ "CoreVideo.framework",
+ "QTKit.framework",
+ ]
+ }
+ if (is_win) {
+ sources += [
+ "windows/i_video_render_win.h",
+ "windows/video_render_direct3d9.cc",
+ "windows/video_render_direct3d9.h",
+ "windows/video_render_windows_impl.cc",
+ "windows/video_render_windows_impl.h",
+ ]
+
+ directxsdk_exists =
+ (exec_script("//build/dir_exists.py",
+ [ rebase_path("//third_party/directxsdk/files",
+ root_build_dir) ],
+ "trim string") == "True")
+ if (directxsdk_exists) {
+ directxsdk_path = "//third_party/directxsdk/files"
+ } else {
+ directxsdk_path = getenv("DXSDK_DIR")
+ }
+ include_dirs = [ directxsdk_path + "/Include" ]
+ }
+ if (is_android) {
+ sources += [
+ "android/video_render_android_impl.cc",
+ "android/video_render_android_impl.h",
+ "android/video_render_android_native_opengl2.cc",
+ "android/video_render_android_native_opengl2.h",
+ "android/video_render_android_surface_view.cc",
+ "android/video_render_android_surface_view.h",
+ "android/video_render_opengles20.cc",
+ "android/video_render_opengles20.h",
+ ]
+
+ libs += [ "GLESv2" ]
+ }
+ if (is_ios) {
+ sources += [
+ "ios/open_gles20.h",
+ "ios/open_gles20.mm",
+ "ios/video_render_ios_channel.h",
+ "ios/video_render_ios_channel.mm",
+ "ios/video_render_ios_gles20.h",
+ "ios/video_render_ios_gles20.mm",
+ "ios/video_render_ios_impl.h",
+ "ios/video_render_ios_impl.mm",
+ "ios/video_render_ios_view.h",
+ "ios/video_render_ios_view.mm",
+ ]
+
+ cflags += [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES.
+ }
+
+ all_dependent_configs = [ ":video_render_internal_impl_config"]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+}
diff --git a/modules/video_render/OWNERS b/modules/video_render/OWNERS
index 7dd4a36..608a701 100644
--- a/modules/video_render/OWNERS
+++ b/modules/video_render/OWNERS
@@ -1,8 +1,7 @@
-fischman@webrtc.org
+mallinath@webrtc.org
mflodman@webrtc.org
perkj@webrtc.org
-wu@webrtc.org
-mallinath@webrtc.org
+tkchin@webrtc.org
per-file *.isolate=kjellander@webrtc.org
@@ -10,3 +9,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/modules/video_render/android/OWNERS b/modules/video_render/android/OWNERS
deleted file mode 100644
index 6ba5af0..0000000
--- a/modules/video_render/android/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-leozwang@webrtc.org
diff --git a/modules/video_render/android/video_render_android_impl.cc b/modules/video_render/android/video_render_android_impl.cc
index 27a264a..20694b6 100644
--- a/modules/video_render/android/video_render_android_impl.cc
+++ b/modules/video_render/android/video_render_android_impl.cc
@@ -10,6 +10,7 @@
#include "webrtc/modules/video_render/android/video_render_android_impl.h"
+#include "webrtc/modules/video_render/video_render_internal.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/event_wrapper.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
@@ -29,13 +30,11 @@
JavaVM* VideoRenderAndroid::g_jvm = NULL;
-#if defined(WEBRTC_ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
-int32_t SetRenderAndroidVM(void* javaVM) {
+int32_t SetRenderAndroidVM(JavaVM* javaVM) {
WEBRTC_TRACE(kTraceDebug, kTraceVideoRenderer, -1, "%s", __FUNCTION__);
- VideoRenderAndroid::g_jvm = (JavaVM*)javaVM;
+ VideoRenderAndroid::g_jvm = javaVM;
return 0;
}
-#endif
VideoRenderAndroid::VideoRenderAndroid(
const int32_t id,
diff --git a/modules/video_render/include/video_render.h b/modules/video_render/include/video_render.h
index 881e0f9..53a4041 100644
--- a/modules/video_render/include/video_render.h
+++ b/modules/video_render/include/video_render.h
@@ -25,10 +25,6 @@
namespace webrtc {
-#if defined(WEBRTC_ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
-int32_t SetRenderAndroidVM(void* javaVM);
-#endif
-
// Class definitions
class VideoRender: public Module
{
@@ -61,10 +57,10 @@
*
* id - new unique identifier of this video render module object
*/
- virtual int32_t ChangeUniqueId(const int32_t id) = 0;
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0;
- virtual int32_t TimeUntilNextProcess() = 0;
- virtual int32_t Process() = 0;
+ virtual int32_t TimeUntilNextProcess() OVERRIDE = 0;
+ virtual int32_t Process() OVERRIDE = 0;
/**************************************************************************
*
diff --git a/modules/video_render/mac/cocoa_full_screen_window.mm b/modules/video_render/mac/cocoa_full_screen_window.mm
index e86bab1..31f6b64 100644
--- a/modules/video_render/mac/cocoa_full_screen_window.mm
+++ b/modules/video_render/mac/cocoa_full_screen_window.mm
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#import "cocoa_full_screen_window.h"
-#include "trace.h"
+#include "webrtc/modules/video_render/mac/cocoa_full_screen_window.h"
+#include "webrtc/system_wrappers/interface/trace.h"
using namespace webrtc;
diff --git a/modules/video_render/mac/cocoa_render_view.mm b/modules/video_render/mac/cocoa_render_view.mm
index 19dcdeb..86320be 100644
--- a/modules/video_render/mac/cocoa_render_view.mm
+++ b/modules/video_render/mac/cocoa_render_view.mm
@@ -10,8 +10,9 @@
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
-#import "cocoa_render_view.h"
-#include "trace.h"
+
+#include "webrtc/modules/video_render/mac/cocoa_render_view.h"
+#include "webrtc/system_wrappers/interface/trace.h"
using namespace webrtc;
diff --git a/modules/video_render/mac/video_render_mac_cocoa_impl.mm b/modules/video_render/mac/video_render_mac_cocoa_impl.mm
index 5c3d6fa..bdab72b 100644
--- a/modules/video_render/mac/video_render_mac_cocoa_impl.mm
+++ b/modules/video_render/mac/video_render_mac_cocoa_impl.mm
@@ -11,12 +11,11 @@
#include "webrtc/engine_configurations.h"
#if defined(COCOA_RENDERING)
-#import "cocoa_render_view.h"
-
-#include "video_render_mac_cocoa_impl.h"
-#include "critical_section_wrapper.h"
-#include "video_render_nsopengl.h"
-#include "trace.h"
+#include "webrtc/modules/video_render/mac/cocoa_render_view.h"
+#include "webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h"
+#include "webrtc/modules/video_render/mac/video_render_nsopengl.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
diff --git a/modules/video_render/mac/video_render_nsopengl.mm b/modules/video_render/mac/video_render_nsopengl.mm
index 2faca65..933ee3b 100644
--- a/modules/video_render/mac/video_render_nsopengl.mm
+++ b/modules/video_render/mac/video_render_nsopengl.mm
@@ -11,12 +11,12 @@
#include "webrtc/engine_configurations.h"
#if defined(COCOA_RENDERING)
-#include "video_render_nsopengl.h"
-#include "critical_section_wrapper.h"
-#include "event_wrapper.h"
-#include "trace.h"
-#include "thread_wrapper.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
+#include "webrtc/modules/video_render/mac/video_render_nsopengl.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/interface/event_wrapper.h"
+#include "webrtc/system_wrappers/interface/thread_wrapper.h"
+#include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
diff --git a/modules/video_render/test/testAPI/testAPI.cc b/modules/video_render/test/testAPI/testAPI.cc
index 4181718..3ec68dd 100644
--- a/modules/video_render/test/testAPI/testAPI.cc
+++ b/modules/video_render/test/testAPI/testAPI.cc
@@ -294,11 +294,6 @@
VideoRenderCallback* renderCallback0 = renderModule->AddIncomingRenderStream(streamId0, 0, 0.0f, 0.0f, 1.0f, 1.0f);
assert(renderCallback0 != NULL);
-#ifndef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
- MyRenderCallback externalRender;
- renderModule->AddExternalRenderCallback(streamId0, &externalRender);
-#endif
-
printf("Start render\n");
error = renderModule->StartRender(streamId0);
if (error != 0) {
@@ -577,10 +572,6 @@
}
void RunVideoRenderTests(void* window, VideoRenderType windowType) {
-#ifndef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
- windowType = kRenderExternal;
-#endif
-
int myId = 12345;
// Create the render module
diff --git a/modules/video_render/video_render.gypi b/modules/video_render/video_render.gypi
index 71d969b..5db851d 100644
--- a/modules/video_render/video_render.gypi
+++ b/modules/video_render/video_render.gypi
@@ -9,6 +9,10 @@
{
'targets': [
{
+ # Note this library is missing an implementation for the video render.
+ # For that targets must link with 'video_render_module_impl' or
+ # 'video_render_module_internal_impl' if they want to compile and use
+ # the internal render as the default renderer.
'target_name': 'video_render_module',
'type': 'static_library',
'dependencies': [
@@ -17,14 +21,6 @@
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
],
'sources': [
- 'android/video_render_android_impl.cc',
- 'android/video_render_android_impl.h',
- 'android/video_render_android_native_opengl2.cc',
- 'android/video_render_android_native_opengl2.h',
- 'android/video_render_android_surface_view.cc',
- 'android/video_render_android_surface_view.h',
- 'android/video_render_opengles20.cc',
- 'android/video_render_opengles20.h',
'external/video_render_external_impl.cc',
'external/video_render_external_impl.h',
'i_video_render.h',
@@ -32,52 +28,39 @@
'include/video_render_defines.h',
'incoming_video_stream.cc',
'incoming_video_stream.h',
- 'ios/open_gles20.h',
- 'ios/open_gles20.mm',
- 'ios/video_render_ios_channel.h',
- 'ios/video_render_ios_channel.mm',
- 'ios/video_render_ios_gles20.h',
- 'ios/video_render_ios_gles20.mm',
- 'ios/video_render_ios_impl.h',
- 'ios/video_render_ios_impl.mm',
- 'ios/video_render_ios_view.h',
- 'ios/video_render_ios_view.mm',
- 'linux/video_render_linux_impl.cc',
- 'linux/video_render_linux_impl.h',
- 'linux/video_x11_channel.cc',
- 'linux/video_x11_channel.h',
- 'linux/video_x11_render.cc',
- 'linux/video_x11_render.h',
- 'mac/cocoa_full_screen_window.mm',
- 'mac/cocoa_full_screen_window.h',
- 'mac/cocoa_render_view.mm',
- 'mac/cocoa_render_view.h',
- 'mac/video_render_agl.cc',
- 'mac/video_render_agl.h',
- 'mac/video_render_mac_carbon_impl.cc',
- 'mac/video_render_mac_carbon_impl.h',
- 'mac/video_render_mac_cocoa_impl.h',
- 'mac/video_render_mac_cocoa_impl.mm',
- 'mac/video_render_nsopengl.h',
- 'mac/video_render_nsopengl.mm',
'video_render_frames.cc',
'video_render_frames.h',
- 'video_render_impl.cc',
'video_render_impl.h',
- 'windows/i_video_render_win.h',
- 'windows/video_render_direct3d9.cc',
- 'windows/video_render_direct3d9.h',
- 'windows/video_render_windows_impl.cc',
- 'windows/video_render_windows_impl.h',
],
- # TODO(andrew): with the proper suffix, these files will be excluded
- # automatically.
+ },
+ {
+ # Default video_render_module implementation that only supports external
+ # renders.
+ 'target_name': 'video_render_module_impl',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'video_render_module',
+ ],
+ 'sources': [
+ 'video_render_impl.cc',
+ ],
+ },
+ {
+ # video_render_module implementation that supports the internal
+ # video_render implementation.
+ 'target_name': 'video_render_module_internal_impl',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'video_render_module',
+ ],
+ 'sources': [
+ 'video_render_internal_impl.cc',
+ ],
+ # TODO(andrew): with the proper suffix, these files will be excluded
+ # automatically.
'conditions': [
- ['include_internal_video_render==1', {
- 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',],
- }],
- ['OS!="android" or include_internal_video_render==0', {
- 'sources!': [
+ ['OS=="android"', {
+ 'sources': [
'android/video_render_android_impl.h',
'android/video_render_android_native_opengl2.h',
'android/video_render_android_surface_view.h',
@@ -87,15 +70,14 @@
'android/video_render_android_surface_view.cc',
'android/video_render_opengles20.cc',
],
- }, {
'link_settings': {
'libraries': [
'-lGLESv2',
],
},
}],
- ['OS!="ios" or include_internal_video_render==0', {
- 'sources!': [
+ ['OS=="ios"', {
+ 'sources': [
# iOS
'ios/open_gles20.h',
'ios/open_gles20.mm',
@@ -108,9 +90,21 @@
'ios/video_render_ios_view.h',
'ios/video_render_ios_view.mm',
],
+ 'xcode_settings': {
+ 'CLANG_ENABLE_OBJC_ARC': 'YES',
+ },
+ 'all_dependent_settings': {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-framework OpenGLES',
+ '-framework QuartzCore',
+ '-framework UIKit',
+ ],
+ },
+ },
}],
- ['OS!="linux" or include_internal_video_render==0', {
- 'sources!': [
+ ['OS=="linux"', {
+ 'sources': [
'linux/video_render_linux_impl.h',
'linux/video_x11_channel.h',
'linux/video_x11_render.h',
@@ -118,15 +112,14 @@
'linux/video_x11_channel.cc',
'linux/video_x11_render.cc',
],
- }, {
'link_settings': {
'libraries': [
'-lXext',
],
},
}],
- ['OS!="mac" or include_internal_video_render==0', {
- 'sources!': [
+ ['OS=="mac"', {
+ 'sources': [
'mac/cocoa_full_screen_window.h',
'mac/cocoa_render_view.h',
'mac/video_render_agl.h',
@@ -141,65 +134,30 @@
'mac/cocoa_full_screen_window.mm',
],
}],
- ['OS=="ios"', {
- 'xcode_settings': {
- 'CLANG_ENABLE_OBJC_ARC': 'YES',
- },
- 'all_dependent_settings': {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-framework OpenGLES',
- '-framework QuartzCore',
- '-framework UIKit',
- ],
- },
- },
- }],
- ['OS=="win" and include_internal_video_render==1', {
- 'variables': {
- # 'directx_sdk_path' will be overridden in the condition block
- # below, but it must not be declared as empty here since gyp
- # will check if the first character is '/' for some reason.
- # If it's empty, we'll get an out-of-bounds error.
- 'directx_sdk_path': 'will_be_overridden',
- 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
- 'conditions': [
- ['"<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
- 'directx_sdk_path': '<(DEPTH)/third_party/directxsdk/files',
- }, {
- 'directx_sdk_path': '$(DXSDK_DIR)',
- }],
- ],
- },
-
- 'include_dirs': [
- '<(directx_sdk_path)/Include',
- ],
- }],
- ['OS!="win" or include_internal_video_render==0', {
- 'sources!': [
+ ['OS=="win"', {
+ 'sources': [
'windows/i_video_render_win.h',
'windows/video_render_direct3d9.h',
'windows/video_render_windows_impl.h',
'windows/video_render_direct3d9.cc',
'windows/video_render_windows_impl.cc',
],
+ 'include_dirs': [
+ '<(directx_sdk_path)/Include',
+ ],
}],
] # conditions
- }, # video_render_module
+ },
], # targets
'conditions': [
- ['include_internal_video_render==1', {
- 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',],
- }],
['include_tests==1', {
'targets': [
{
'target_name': 'video_render_tests',
'type': 'executable',
'dependencies': [
- 'video_render_module',
+ 'video_render_module_internal_impl',
'webrtc_utility',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/common_video/common_video.gyp:common_video',
diff --git a/modules/video_render/video_render_impl.cc b/modules/video_render/video_render_impl.cc
index 763590f..db0dd5a 100644
--- a/modules/video_render/video_render_impl.cc
+++ b/modules/video_render/video_render_impl.cc
@@ -11,55 +11,14 @@
#include <assert.h>
#include "webrtc/engine_configurations.h"
-#include "webrtc/modules/video_render/i_video_render.h"
+#include "webrtc/modules/video_render/external/video_render_external_impl.h"
#include "webrtc/modules/video_render/include/video_render_defines.h"
#include "webrtc/modules/video_render/incoming_video_stream.h"
+#include "webrtc/modules/video_render/i_video_render.h"
#include "webrtc/modules/video_render/video_render_impl.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/trace.h"
-#ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
-
-#if defined (_WIN32)
-#include "webrtc/modules/video_render/windows/video_render_windows_impl.h"
-#define STANDARD_RENDERING kRenderWindows
-
-// WEBRTC_IOS should go before WEBRTC_MAC because WEBRTC_MAC
-// gets defined if WEBRTC_IOS is defined
-#elif defined(WEBRTC_IOS)
-#define STANDARD_RENDERING kRenderiOS
-#include "ios/video_render_ios_impl.h"
-#elif defined(WEBRTC_MAC)
-#if defined(COCOA_RENDERING)
-#define STANDARD_RENDERING kRenderCocoa
-#include "webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h"
-#elif defined(CARBON_RENDERING)
-#define STANDARD_RENDERING kRenderCarbon
-#include "webrtc/modules/video_render/mac/video_render_mac_carbon_impl.h"
-#endif
-
-#elif defined(WEBRTC_ANDROID)
-#include "webrtc/modules/video_render/android/video_render_android_impl.h"
-#include "webrtc/modules/video_render/android/video_render_android_native_opengl2.h"
-#include "webrtc/modules/video_render/android/video_render_android_surface_view.h"
-#define STANDARD_RENDERING kRenderAndroid
-
-#elif defined(WEBRTC_LINUX)
-#include "webrtc/modules/video_render/linux/video_render_linux_impl.h"
-#define STANDARD_RENDERING kRenderX11
-
-#else
-//Other platforms
-#endif
-
-#endif // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
-
-// For external rendering
-#include "webrtc/modules/video_render/external/video_render_external_impl.h"
-#ifndef STANDARD_RENDERING
-#define STANDARD_RENDERING kRenderExternal
-#endif // STANDARD_RENDERING
-
namespace webrtc {
VideoRender*
@@ -71,7 +30,7 @@
VideoRenderType resultVideoRenderType = videoRenderType;
if (videoRenderType == kRenderDefault)
{
- resultVideoRenderType = STANDARD_RENDERING;
+ resultVideoRenderType = kRenderExternal;
}
return new ModuleVideoRenderImpl(id, resultVideoRenderType, window,
fullscreen);
@@ -98,97 +57,6 @@
// Create platform specific renderer
switch (videoRenderType)
{
-#ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
-
-#if defined(_WIN32)
- case kRenderWindows:
- {
- VideoRenderWindowsImpl* ptrRenderer;
- ptrRenderer = new VideoRenderWindowsImpl(_id, videoRenderType, window, _fullScreen);
- if (ptrRenderer)
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
- }
- }
- break;
-
-#elif defined(WEBRTC_IOS)
- case kRenderiOS:
- {
- VideoRenderIosImpl* ptrRenderer = new VideoRenderIosImpl(_id, window, _fullScreen);
- if(ptrRenderer)
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
- }
- }
- break;
-
-#elif defined(WEBRTC_MAC)
-
-#if defined(COCOA_RENDERING)
- case kRenderCocoa:
- {
- VideoRenderMacCocoaImpl* ptrRenderer = new VideoRenderMacCocoaImpl(_id, videoRenderType, window, _fullScreen);
- if(ptrRenderer)
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
- }
- }
-
- break;
-#elif defined(CARBON_RENDERING)
- case kRenderCarbon:
- {
- VideoRenderMacCarbonImpl* ptrRenderer = new VideoRenderMacCarbonImpl(_id, videoRenderType, window, _fullScreen);
- if(ptrRenderer)
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
- }
- }
- break;
-#endif
-
-#elif defined(WEBRTC_ANDROID)
- case kRenderAndroid:
- {
- if(AndroidNativeOpenGl2Renderer::UseOpenGL2(window))
- {
- AndroidNativeOpenGl2Renderer* ptrRenderer = NULL;
- ptrRenderer = new AndroidNativeOpenGl2Renderer(_id, videoRenderType, window, _fullScreen);
- if (ptrRenderer)
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
- }
- }
- else
- {
- AndroidSurfaceViewRenderer* ptrRenderer = NULL;
- ptrRenderer = new AndroidSurfaceViewRenderer(_id, videoRenderType, window, _fullScreen);
- if (ptrRenderer)
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
- }
- }
-
- }
- break;
-#elif defined(WEBRTC_LINUX)
- case kRenderX11:
- {
- VideoRenderLinuxImpl* ptrRenderer = NULL;
- ptrRenderer = new VideoRenderLinuxImpl(_id, videoRenderType, window, _fullScreen);
- if ( ptrRenderer )
- {
- _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
- }
- }
- break;
-
-#else
- // Other platforms
-#endif
-
-#endif // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
case kRenderExternal:
{
VideoRenderExternalImpl* ptrRenderer(NULL);
@@ -238,66 +106,6 @@
delete ptrRenderer;
}
break;
-#ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
-
-#if defined(_WIN32)
- case kRenderWindows:
- {
- VideoRenderWindowsImpl* ptrRenderer = reinterpret_cast<VideoRenderWindowsImpl*>(_ptrRenderer);
- _ptrRenderer = NULL;
- delete ptrRenderer;
- }
- break;
-#elif defined(WEBRTC_IOS)
- case kRenderiOS:
- {
- VideoRenderIosImpl* ptrRenderer = reinterpret_cast<VideoRenderIosImpl*> (_ptrRenderer);
- _ptrRenderer = NULL;
- delete ptrRenderer;
- }
- break;
-#elif defined(WEBRTC_MAC)
-
-#if defined(COCOA_RENDERING)
- case kRenderCocoa:
- {
- VideoRenderMacCocoaImpl* ptrRenderer = reinterpret_cast<VideoRenderMacCocoaImpl*> (_ptrRenderer);
- _ptrRenderer = NULL;
- delete ptrRenderer;
- }
- break;
-#elif defined(CARBON_RENDERING)
- case kRenderCarbon:
- {
- VideoRenderMacCarbonImpl* ptrRenderer = reinterpret_cast<VideoRenderMacCarbonImpl*> (_ptrRenderer);
- _ptrRenderer = NULL;
- delete ptrRenderer;
- }
- break;
-#endif
-
-#elif defined(WEBRTC_ANDROID)
- case kRenderAndroid:
- {
- VideoRenderAndroid* ptrRenderer = reinterpret_cast<VideoRenderAndroid*> (_ptrRenderer);
- _ptrRenderer = NULL;
- delete ptrRenderer;
- }
- break;
-
-#elif defined(WEBRTC_LINUX)
- case kRenderX11:
- {
- VideoRenderLinuxImpl* ptrRenderer = reinterpret_cast<VideoRenderLinuxImpl*> (_ptrRenderer);
- _ptrRenderer = NULL;
- delete ptrRenderer;
- }
- break;
-#else
- //other platforms
-#endif
-
-#endif // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
default:
// Error...
@@ -341,56 +149,7 @@
int32_t ModuleVideoRenderImpl::ChangeWindow(void* window)
{
-
- CriticalSectionScoped cs(&_moduleCrit);
-
-#ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
-
-#if defined(WEBRTC_IOS) // WEBRTC_IOS must go before WEBRTC_MAC
- _ptrRenderer = NULL;
- delete _ptrRenderer;
-
- VideoRenderIosImpl* ptrRenderer;
- ptrRenderer = new VideoRenderIosImpl(_id, window, _fullScreen);
- if (!ptrRenderer)
- {
- return -1;
- }
- _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
- return _ptrRenderer->ChangeWindow(window);
-#elif defined(WEBRTC_MAC)
-
- _ptrRenderer = NULL;
- delete _ptrRenderer;
-
-#if defined(COCOA_RENDERING)
- VideoRenderMacCocoaImpl* ptrRenderer;
- ptrRenderer = new VideoRenderMacCocoaImpl(_id, kRenderCocoa, window, _fullScreen);
-#elif defined(CARBON_RENDERING)
- VideoRenderMacCarbonImpl* ptrRenderer;
- ptrRenderer = new VideoRenderMacCarbonImpl(_id, kRenderCarbon, window, _fullScreen);
-#endif
- if (!ptrRenderer)
- {
- return -1;
- }
- _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
- return _ptrRenderer->ChangeWindow(window);
-
-#else
- if (!_ptrRenderer)
- {
- WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
- "%s: No renderer", __FUNCTION__);
- return -1;
- }
- return _ptrRenderer->ChangeWindow(window);
-
-#endif
-
-#else // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
return -1;
-#endif
}
int32_t ModuleVideoRenderImpl::Id()
diff --git a/modules/video_render/video_render_internal.h b/modules/video_render/video_render_internal.h
new file mode 100644
index 0000000..0508c1a
--- /dev/null
+++ b/modules/video_render/video_render_internal.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_VIDEO_RENDER_VIDEO_RENDER_INTERNAL_H_
+#define WEBRTC_MODULES_VIDEO_RENDER_VIDEO_RENDER_INTERNAL_H_
+
+#ifdef ANDROID
+#include <jni.h>
+
+namespace webrtc {
+
+// In order to be able to use the internal webrtc video render
+// for android, the jvm objects must be set via this method.
+int32_t SetRenderAndroidVM(JavaVM* javaVM);
+
+} // namespace webrtc
+
+#endif // ANDROID
+
+#endif // WEBRTC_MODULES_VIDEO_RENDER_VIDEO_RENDER_INTERNAL_H_
diff --git a/modules/video_render/video_render_internal_impl.cc b/modules/video_render/video_render_internal_impl.cc
new file mode 100644
index 0000000..106a375
--- /dev/null
+++ b/modules/video_render/video_render_internal_impl.cc
@@ -0,0 +1,917 @@
+/*
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <assert.h>
+
+#include "webrtc/engine_configurations.h"
+#include "webrtc/modules/video_render/i_video_render.h"
+#include "webrtc/modules/video_render/include/video_render_defines.h"
+#include "webrtc/modules/video_render/incoming_video_stream.h"
+#include "webrtc/modules/video_render/video_render_impl.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/interface/trace.h"
+
+#if defined (_WIN32)
+#include "webrtc/modules/video_render/windows/video_render_windows_impl.h"
+#define STANDARD_RENDERING kRenderWindows
+
+// WEBRTC_IOS should go before WEBRTC_MAC because WEBRTC_MAC
+// gets defined if WEBRTC_IOS is defined
+#elif defined(WEBRTC_IOS)
+#define STANDARD_RENDERING kRenderiOS
+#include "webrtc/modules/video_render/ios/video_render_ios_impl.h"
+#elif defined(WEBRTC_MAC)
+#if defined(COCOA_RENDERING)
+#define STANDARD_RENDERING kRenderCocoa
+#include "webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h"
+#elif defined(CARBON_RENDERING)
+#define STANDARD_RENDERING kRenderCarbon
+#include "webrtc/modules/video_render/mac/video_render_mac_carbon_impl.h"
+#endif
+
+#elif defined(WEBRTC_ANDROID)
+#include "webrtc/modules/video_render/android/video_render_android_impl.h"
+#include "webrtc/modules/video_render/android/video_render_android_native_opengl2.h"
+#include "webrtc/modules/video_render/android/video_render_android_surface_view.h"
+#define STANDARD_RENDERING kRenderAndroid
+
+#elif defined(WEBRTC_LINUX)
+#include "webrtc/modules/video_render/linux/video_render_linux_impl.h"
+#define STANDARD_RENDERING kRenderX11
+
+#else
+//Other platforms
+#endif
+
+// For external rendering
+#include "webrtc/modules/video_render/external/video_render_external_impl.h"
+#ifndef STANDARD_RENDERING
+#define STANDARD_RENDERING kRenderExternal
+#endif // STANDARD_RENDERING
+
+namespace webrtc {
+
+VideoRender*
+VideoRender::CreateVideoRender(const int32_t id,
+ void* window,
+ const bool fullscreen,
+ const VideoRenderType videoRenderType/*=kRenderDefault*/)
+{
+ VideoRenderType resultVideoRenderType = videoRenderType;
+ if (videoRenderType == kRenderDefault)
+ {
+ resultVideoRenderType = STANDARD_RENDERING;
+ }
+ return new ModuleVideoRenderImpl(id, resultVideoRenderType, window,
+ fullscreen);
+}
+
+void VideoRender::DestroyVideoRender(
+ VideoRender* module)
+{
+ if (module)
+ {
+ delete module;
+ }
+}
+
+ModuleVideoRenderImpl::ModuleVideoRenderImpl(
+ const int32_t id,
+ const VideoRenderType videoRenderType,
+ void* window,
+ const bool fullscreen) :
+ _id(id), _moduleCrit(*CriticalSectionWrapper::CreateCriticalSection()),
+ _ptrWindow(window), _fullScreen(fullscreen), _ptrRenderer(NULL)
+{
+
+ // Create platform specific renderer
+ switch (videoRenderType)
+ {
+#if defined(_WIN32)
+ case kRenderWindows:
+ {
+ VideoRenderWindowsImpl* ptrRenderer;
+ ptrRenderer = new VideoRenderWindowsImpl(_id, videoRenderType, window, _fullScreen);
+ if (ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
+ }
+ }
+ break;
+
+#elif defined(WEBRTC_IOS)
+ case kRenderiOS:
+ {
+ VideoRenderIosImpl* ptrRenderer = new VideoRenderIosImpl(_id, window, _fullScreen);
+ if(ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
+ }
+ }
+ break;
+
+#elif defined(WEBRTC_MAC)
+
+#if defined(COCOA_RENDERING)
+ case kRenderCocoa:
+ {
+ VideoRenderMacCocoaImpl* ptrRenderer = new VideoRenderMacCocoaImpl(_id, videoRenderType, window, _fullScreen);
+ if(ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
+ }
+ }
+
+ break;
+#elif defined(CARBON_RENDERING)
+ case kRenderCarbon:
+ {
+ VideoRenderMacCarbonImpl* ptrRenderer = new VideoRenderMacCarbonImpl(_id, videoRenderType, window, _fullScreen);
+ if(ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
+ }
+ }
+ break;
+#endif
+
+#elif defined(WEBRTC_ANDROID)
+ case kRenderAndroid:
+ {
+ if(AndroidNativeOpenGl2Renderer::UseOpenGL2(window))
+ {
+ AndroidNativeOpenGl2Renderer* ptrRenderer = NULL;
+ ptrRenderer = new AndroidNativeOpenGl2Renderer(_id, videoRenderType, window, _fullScreen);
+ if (ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
+ }
+ }
+ else
+ {
+ AndroidSurfaceViewRenderer* ptrRenderer = NULL;
+ ptrRenderer = new AndroidSurfaceViewRenderer(_id, videoRenderType, window, _fullScreen);
+ if (ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
+ }
+ }
+
+ }
+ break;
+#elif defined(WEBRTC_LINUX)
+ case kRenderX11:
+ {
+ VideoRenderLinuxImpl* ptrRenderer = NULL;
+ ptrRenderer = new VideoRenderLinuxImpl(_id, videoRenderType, window, _fullScreen);
+ if ( ptrRenderer )
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
+ }
+ }
+ break;
+
+#else
+ // Other platforms
+#endif
+ case kRenderExternal:
+ {
+ VideoRenderExternalImpl* ptrRenderer(NULL);
+ ptrRenderer = new VideoRenderExternalImpl(_id, videoRenderType,
+ window, _fullScreen);
+ if (ptrRenderer)
+ {
+ _ptrRenderer = reinterpret_cast<IVideoRender*> (ptrRenderer);
+ }
+ }
+ break;
+ default:
+ // Error...
+ break;
+ }
+ if (_ptrRenderer)
+ {
+ if (_ptrRenderer->Init() == -1)
+ {
+ }
+ }
+}
+
+ModuleVideoRenderImpl::~ModuleVideoRenderImpl()
+{
+ delete &_moduleCrit;
+
+ for (IncomingVideoStreamMap::iterator it = _streamRenderMap.begin();
+ it != _streamRenderMap.end();
+ ++it) {
+ delete it->second;
+ }
+
+ // Delete platform specific renderer
+ if (_ptrRenderer)
+ {
+ VideoRenderType videoRenderType = _ptrRenderer->RenderType();
+
+ switch (videoRenderType)
+ {
+ case kRenderExternal:
+ {
+ VideoRenderExternalImpl
+ * ptrRenderer =
+ reinterpret_cast<VideoRenderExternalImpl*> (_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+#if defined(_WIN32)
+ case kRenderWindows:
+ {
+ VideoRenderWindowsImpl* ptrRenderer = reinterpret_cast<VideoRenderWindowsImpl*>(_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+#elif defined(WEBRTC_IOS)
+ case kRenderiOS:
+ {
+ VideoRenderIosImpl* ptrRenderer = reinterpret_cast<VideoRenderIosImpl*> (_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+#elif defined(WEBRTC_MAC)
+
+#if defined(COCOA_RENDERING)
+ case kRenderCocoa:
+ {
+ VideoRenderMacCocoaImpl* ptrRenderer = reinterpret_cast<VideoRenderMacCocoaImpl*> (_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+#elif defined(CARBON_RENDERING)
+ case kRenderCarbon:
+ {
+ VideoRenderMacCarbonImpl* ptrRenderer = reinterpret_cast<VideoRenderMacCarbonImpl*> (_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+#endif
+
+#elif defined(WEBRTC_ANDROID)
+ case kRenderAndroid:
+ {
+ VideoRenderAndroid* ptrRenderer = reinterpret_cast<VideoRenderAndroid*> (_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+
+#elif defined(WEBRTC_LINUX)
+ case kRenderX11:
+ {
+ VideoRenderLinuxImpl* ptrRenderer = reinterpret_cast<VideoRenderLinuxImpl*> (_ptrRenderer);
+ _ptrRenderer = NULL;
+ delete ptrRenderer;
+ }
+ break;
+#else
+ //other platforms
+#endif
+
+ default:
+ // Error...
+ break;
+ }
+ }
+}
+
+int32_t ModuleVideoRenderImpl::ChangeUniqueId(const int32_t id)
+{
+
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ _id = id;
+
+ if (_ptrRenderer)
+ {
+ _ptrRenderer->ChangeUniqueId(_id);
+ }
+
+ return 0;
+}
+
+int32_t ModuleVideoRenderImpl::TimeUntilNextProcess()
+{
+ // Not used
+ return 50;
+}
+int32_t ModuleVideoRenderImpl::Process()
+{
+ // Not used
+ return 0;
+}
+
+void*
+ModuleVideoRenderImpl::Window()
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+ return _ptrWindow;
+}
+
+int32_t ModuleVideoRenderImpl::ChangeWindow(void* window)
+{
+
+ CriticalSectionScoped cs(&_moduleCrit);
+
+#if defined(WEBRTC_IOS) // WEBRTC_IOS must go before WEBRTC_MAC
+ _ptrRenderer = NULL;
+ delete _ptrRenderer;
+
+ VideoRenderIosImpl* ptrRenderer;
+ ptrRenderer = new VideoRenderIosImpl(_id, window, _fullScreen);
+ if (!ptrRenderer)
+ {
+ return -1;
+ }
+ _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
+ return _ptrRenderer->ChangeWindow(window);
+#elif defined(WEBRTC_MAC)
+
+ _ptrRenderer = NULL;
+ delete _ptrRenderer;
+
+#if defined(COCOA_RENDERING)
+ VideoRenderMacCocoaImpl* ptrRenderer;
+ ptrRenderer = new VideoRenderMacCocoaImpl(_id, kRenderCocoa, window, _fullScreen);
+#elif defined(CARBON_RENDERING)
+ VideoRenderMacCarbonImpl* ptrRenderer;
+ ptrRenderer = new VideoRenderMacCarbonImpl(_id, kRenderCarbon, window, _fullScreen);
+#endif
+ if (!ptrRenderer)
+ {
+ return -1;
+ }
+ _ptrRenderer = reinterpret_cast<IVideoRender*>(ptrRenderer);
+ return _ptrRenderer->ChangeWindow(window);
+
+#else
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+ return _ptrRenderer->ChangeWindow(window);
+
+#endif
+}
+
+int32_t ModuleVideoRenderImpl::Id()
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+ return _id;
+}
+
+uint32_t ModuleVideoRenderImpl::GetIncomingFrameRate(const uint32_t streamId) {
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ IncomingVideoStreamMap::iterator it = _streamRenderMap.find(streamId);
+
+ if (it == _streamRenderMap.end()) {
+ // This stream doesn't exist
+ WEBRTC_TRACE(kTraceError,
+ kTraceVideoRenderer,
+ _id,
+ "%s: stream doesn't exist",
+ __FUNCTION__);
+ return 0;
+ }
+ assert(it->second != NULL);
+ return it->second->IncomingRate();
+}
+
+VideoRenderCallback*
+ModuleVideoRenderImpl::AddIncomingRenderStream(const uint32_t streamId,
+ const uint32_t zOrder,
+ const float left,
+ const float top,
+ const float right,
+ const float bottom)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return NULL;
+ }
+
+ if (_streamRenderMap.find(streamId) != _streamRenderMap.end()) {
+ // The stream already exists...
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream already exists", __FUNCTION__);
+ return NULL;
+ }
+
+ VideoRenderCallback* ptrRenderCallback =
+ _ptrRenderer->AddIncomingRenderStream(streamId, zOrder, left, top,
+ right, bottom);
+ if (ptrRenderCallback == NULL)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: Can't create incoming stream in renderer",
+ __FUNCTION__);
+ return NULL;
+ }
+
+ // Create platform independant code
+ IncomingVideoStream* ptrIncomingStream = new IncomingVideoStream(_id,
+ streamId);
+ if (ptrIncomingStream == NULL)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: Can't create incoming stream", __FUNCTION__);
+ return NULL;
+ }
+
+
+ if (ptrIncomingStream->SetRenderCallback(ptrRenderCallback) == -1)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: Can't set render callback", __FUNCTION__);
+ delete ptrIncomingStream;
+ _ptrRenderer->DeleteIncomingRenderStream(streamId);
+ return NULL;
+ }
+
+ VideoRenderCallback* moduleCallback =
+ ptrIncomingStream->ModuleCallback();
+
+ // Store the stream
+ _streamRenderMap[streamId] = ptrIncomingStream;
+
+ return moduleCallback;
+}
+
+int32_t ModuleVideoRenderImpl::DeleteIncomingRenderStream(
+ const uint32_t streamId)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ IncomingVideoStreamMap::iterator item = _streamRenderMap.find(streamId);
+ if (item == _streamRenderMap.end())
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream doesn't exist", __FUNCTION__);
+ return -1;
+ }
+
+ delete item->second;
+
+ _ptrRenderer->DeleteIncomingRenderStream(streamId);
+
+ _streamRenderMap.erase(item);
+
+ return 0;
+}
+
+int32_t ModuleVideoRenderImpl::AddExternalRenderCallback(
+ const uint32_t streamId,
+ VideoRenderCallback* renderObject) {
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ IncomingVideoStreamMap::iterator item = _streamRenderMap.find(streamId);
+
+ if (item == _streamRenderMap.end())
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream doesn't exist", __FUNCTION__);
+ return -1;
+ }
+
+ if (item->second == NULL) {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: could not get stream", __FUNCTION__);
+ return -1;
+ }
+ return item->second->SetExternalCallback(renderObject);
+}
+
+int32_t ModuleVideoRenderImpl::GetIncomingRenderStreamProperties(
+ const uint32_t streamId,
+ uint32_t& zOrder,
+ float& left,
+ float& top,
+ float& right,
+ float& bottom) const {
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ return _ptrRenderer->GetIncomingRenderStreamProperties(streamId, zOrder,
+ left, top, right,
+ bottom);
+}
+
+uint32_t ModuleVideoRenderImpl::GetNumIncomingRenderStreams() const
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ return static_cast<uint32_t>(_streamRenderMap.size());
+}
+
+bool ModuleVideoRenderImpl::HasIncomingRenderStream(
+ const uint32_t streamId) const {
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ return _streamRenderMap.find(streamId) != _streamRenderMap.end();
+}
+
+int32_t ModuleVideoRenderImpl::RegisterRawFrameCallback(
+ const uint32_t streamId,
+ VideoRenderCallback* callbackObj) {
+ return -1;
+}
+
+int32_t ModuleVideoRenderImpl::StartRender(const uint32_t streamId)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ // Start the stream
+ IncomingVideoStreamMap::iterator item = _streamRenderMap.find(streamId);
+
+ if (item == _streamRenderMap.end())
+ {
+ return -1;
+ }
+
+ if (item->second->Start() == -1)
+ {
+ return -1;
+ }
+
+ // Start the HW renderer
+ if (_ptrRenderer->StartRender() == -1)
+ {
+ return -1;
+ }
+ return 0;
+}
+
+int32_t ModuleVideoRenderImpl::StopRender(const uint32_t streamId)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s(%d): No renderer", __FUNCTION__, streamId);
+ return -1;
+ }
+
+ // Stop the incoming stream
+ IncomingVideoStreamMap::iterator item = _streamRenderMap.find(streamId);
+
+ if (item == _streamRenderMap.end())
+ {
+ return -1;
+ }
+
+ if (item->second->Stop() == -1)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+int32_t ModuleVideoRenderImpl::ResetRender()
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ int32_t ret = 0;
+ // Loop through all incoming streams and reset them
+ for (IncomingVideoStreamMap::iterator it = _streamRenderMap.begin();
+ it != _streamRenderMap.end();
+ ++it) {
+ if (it->second->Reset() == -1)
+ ret = -1;
+ }
+ return ret;
+}
+
+RawVideoType ModuleVideoRenderImpl::PreferredVideoType() const
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (_ptrRenderer == NULL)
+ {
+ return kVideoI420;
+ }
+
+ return _ptrRenderer->PerferedVideoType();
+}
+
+bool ModuleVideoRenderImpl::IsFullScreen()
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+ return _ptrRenderer->FullScreen();
+}
+
+int32_t ModuleVideoRenderImpl::GetScreenResolution(
+ uint32_t& screenWidth,
+ uint32_t& screenHeight) const
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+ return _ptrRenderer->GetScreenResolution(screenWidth, screenHeight);
+}
+
+uint32_t ModuleVideoRenderImpl::RenderFrameRate(
+ const uint32_t streamId)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+ return _ptrRenderer->RenderFrameRate(streamId);
+}
+
+int32_t ModuleVideoRenderImpl::SetStreamCropping(
+ const uint32_t streamId,
+ const float left,
+ const float top,
+ const float right,
+ const float bottom)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+ return _ptrRenderer->SetStreamCropping(streamId, left, top, right, bottom);
+}
+
+int32_t ModuleVideoRenderImpl::SetTransparentBackground(const bool enable)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+ return _ptrRenderer->SetTransparentBackground(enable);
+}
+
+int32_t ModuleVideoRenderImpl::FullScreenRender(void* window, const bool enable)
+{
+ return -1;
+}
+
+int32_t ModuleVideoRenderImpl::SetText(
+ const uint8_t textId,
+ const uint8_t* text,
+ const int32_t textLength,
+ const uint32_t textColorRef,
+ const uint32_t backgroundColorRef,
+ const float left, const float top,
+ const float right,
+ const float bottom)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+ return _ptrRenderer->SetText(textId, text, textLength, textColorRef,
+ backgroundColorRef, left, top, right, bottom);
+}
+
+int32_t ModuleVideoRenderImpl::SetBitmap(const void* bitMap,
+ const uint8_t pictureId,
+ const void* colorKey,
+ const float left,
+ const float top,
+ const float right,
+ const float bottom)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+ return _ptrRenderer->SetBitmap(bitMap, pictureId, colorKey, left, top,
+ right, bottom);
+}
+
+int32_t ModuleVideoRenderImpl::GetLastRenderedFrame(
+ const uint32_t streamId,
+ I420VideoFrame &frame) const
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ IncomingVideoStreamMap::const_iterator item =
+ _streamRenderMap.find(streamId);
+ if (item == _streamRenderMap.end())
+ {
+ // This stream doesn't exist
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream doesn't exist", __FUNCTION__);
+ return 0;
+ }
+
+ assert(item->second != NULL);
+ return item->second->GetLastRenderedFrame(frame);
+}
+
+int32_t ModuleVideoRenderImpl::SetExpectedRenderDelay(
+ uint32_t stream_id, int32_t delay_ms) {
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer) {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+
+ IncomingVideoStreamMap::const_iterator item =
+ _streamRenderMap.find(stream_id);
+ if (item == _streamRenderMap.end()) {
+ // This stream doesn't exist
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s(%u, %d): stream doesn't exist", __FUNCTION__, stream_id,
+ delay_ms);
+ return -1;
+ }
+
+ assert(item->second != NULL);
+ return item->second->SetExpectedRenderDelay(delay_ms);
+}
+
+int32_t ModuleVideoRenderImpl::ConfigureRenderer(
+ const uint32_t streamId,
+ const unsigned int zOrder,
+ const float left,
+ const float top,
+ const float right,
+ const float bottom)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return false;
+ }
+ return _ptrRenderer->ConfigureRenderer(streamId, zOrder, left, top, right,
+ bottom);
+}
+
+int32_t ModuleVideoRenderImpl::SetStartImage(
+ const uint32_t streamId,
+ const I420VideoFrame& videoFrame)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ IncomingVideoStreamMap::const_iterator item =
+ _streamRenderMap.find(streamId);
+ if (item == _streamRenderMap.end())
+ {
+ // This stream doesn't exist
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream doesn't exist", __FUNCTION__);
+ return -1;
+ }
+ assert (item->second != NULL);
+ return item->second->SetStartImage(videoFrame);
+
+}
+
+int32_t ModuleVideoRenderImpl::SetTimeoutImage(
+ const uint32_t streamId,
+ const I420VideoFrame& videoFrame,
+ const uint32_t timeout)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ IncomingVideoStreamMap::const_iterator item =
+ _streamRenderMap.find(streamId);
+ if (item == _streamRenderMap.end())
+ {
+ // This stream doesn't exist
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream doesn't exist", __FUNCTION__);
+ return -1;
+ }
+ assert(item->second != NULL);
+ return item->second->SetTimeoutImage(videoFrame, timeout);
+}
+
+int32_t ModuleVideoRenderImpl::MirrorRenderStream(const int renderId,
+ const bool enable,
+ const bool mirrorXAxis,
+ const bool mirrorYAxis)
+{
+ CriticalSectionScoped cs(&_moduleCrit);
+
+ if (!_ptrRenderer)
+ {
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: No renderer", __FUNCTION__);
+ return -1;
+ }
+
+ IncomingVideoStreamMap::const_iterator item =
+ _streamRenderMap.find(renderId);
+ if (item == _streamRenderMap.end())
+ {
+ // This stream doesn't exist
+ WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
+ "%s: stream doesn't exist", __FUNCTION__);
+ return 0;
+ }
+ assert(item->second != NULL);
+
+ return item->second->EnableMirroring(enable, mirrorXAxis, mirrorYAxis);
+}
+
+} // namespace webrtc
diff --git a/modules/video_render/windows/video_render_direct3d9.cc b/modules/video_render/windows/video_render_direct3d9.cc
index a2c77ce..ad485de 100644
--- a/modules/video_render/windows/video_render_direct3d9.cc
+++ b/modules/video_render/windows/video_render_direct3d9.cc
@@ -294,8 +294,8 @@
_logoRight(0),
_logoBottom(0),
_pd3dSurface(NULL),
- _totalMemory(-1),
- _availableMemory(-1)
+ _totalMemory(0),
+ _availableMemory(0)
{
_screenUpdateThread = ThreadWrapper::CreateThread(ScreenUpdateThreadProc,
this, kRealtimePriority);
diff --git a/modules/video_render_module.target.darwin-arm.mk b/modules/video_render_module.target.darwin-arm.mk
index 19de797..a28660f 100644
--- a/modules/video_render_module.target.darwin-arm.mk
+++ b/modules/video_render_module.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,8 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
@@ -35,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -74,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -206,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -223,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.darwin-arm64.mk b/modules/video_render_module.target.darwin-arm64.mk
index a3e12c0..5e28bd8 100644
--- a/modules/video_render_module.target.darwin-arm64.mk
+++ b/modules/video_render_module.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,15 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -241,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.darwin-mips.mk b/modules/video_render_module.target.darwin-mips.mk
index adbc02e..181bc74 100644
--- a/modules/video_render_module.target.darwin-mips.mk
+++ b/modules/video_render_module.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,8 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
@@ -35,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -44,18 +41,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -139,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -197,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -214,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -260,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.darwin-mips64.mk b/modules/video_render_module.target.darwin-mips64.mk
new file mode 100644
index 0000000..181bc74
--- /dev/null
+++ b/modules/video_render_module.target.darwin-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
+ third_party/webrtc/modules/video_render/incoming_video_stream.cc \
+ third_party/webrtc/modules/video_render/video_render_frames.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module
+video_render_module: third_party_webrtc_modules_video_render_module_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module.target.darwin-x86.mk b/modules/video_render_module.target.darwin-x86.mk
index 4c54e5b..4dd6fbd 100644
--- a/modules/video_render_module.target.darwin-x86.mk
+++ b/modules/video_render_module.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,15 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.darwin-x86_64.mk b/modules/video_render_module.target.darwin-x86_64.mk
index ca59c25..1356618 100644
--- a/modules/video_render_module.target.darwin-x86_64.mk
+++ b/modules/video_render_module.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,8 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
@@ -35,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -207,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -251,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.linux-arm.mk b/modules/video_render_module.target.linux-arm.mk
index 19de797..a28660f 100644
--- a/modules/video_render_module.target.linux-arm.mk
+++ b/modules/video_render_module.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,8 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
@@ -35,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -74,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -144,23 +144,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +179,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -206,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -223,12 +223,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,68 +273,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.linux-arm64.mk b/modules/video_render_module.target.linux-arm64.mk
index a3e12c0..5e28bd8 100644
--- a/modules/video_render_module.target.linux-arm64.mk
+++ b/modules/video_render_module.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,15 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -87,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,21 +130,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -180,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,12 +197,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -241,59 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.linux-mips.mk b/modules/video_render_module.target.linux-mips.mk
index adbc02e..181bc74 100644
--- a/modules/video_render_module.target.linux-mips.mk
+++ b/modules/video_render_module.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,8 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
@@ -35,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -44,18 +41,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -139,23 +133,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,18 +159,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -197,7 +188,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -214,17 +204,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -260,64 +251,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.linux-mips64.mk b/modules/video_render_module.target.linux-mips64.mk
new file mode 100644
index 0000000..181bc74
--- /dev/null
+++ b/modules/video_render_module.target.linux-mips64.mk
@@ -0,0 +1,285 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
+ third_party/webrtc/modules/video_render/incoming_video_stream.cc \
+ third_party/webrtc/modules/video_render/video_render_frames.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module
+video_render_module: third_party_webrtc_modules_video_render_module_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module.target.linux-x86.mk b/modules/video_render_module.target.linux-x86.mk
index 4c54e5b..4dd6fbd 100644
--- a/modules/video_render_module.target.linux-x86.mk
+++ b/modules/video_render_module.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,15 +25,13 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -76,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -136,21 +136,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,63 +256,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module.target.linux-x86_64.mk b/modules/video_render_module.target.linux-x86_64.mk
index ca59c25..1356618 100644
--- a/modules/video_render_module.target.linux-x86_64.mk
+++ b/modules/video_render_module.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_video_render_module_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -26,8 +25,7 @@
LOCAL_SRC_FILES := \
third_party/webrtc/modules/video_render/external/video_render_external_impl.cc \
third_party/webrtc/modules/video_render/incoming_video_stream.cc \
- third_party/webrtc/modules/video_render/video_render_frames.cc \
- third_party/webrtc/modules/video_render/video_render_impl.cc
+ third_party/webrtc/modules/video_render/video_render_frames.cc
# Flags passed to both C and C++ files.
@@ -35,7 +33,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -135,22 +135,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,7 +191,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -207,12 +207,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -251,63 +254,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/video_render_module_impl.target.darwin-arm.mk b/modules/video_render_module_impl.target.darwin-arm.mk
new file mode 100644
index 0000000..73e1f91
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-arm.mk
@@ -0,0 +1,299 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.darwin-arm64.mk b/modules/video_render_module_impl.target.darwin-arm64.mk
new file mode 100644
index 0000000..a538bcc
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-arm64.mk
@@ -0,0 +1,269 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.darwin-mips.mk b/modules/video_render_module_impl.target.darwin-mips.mk
new file mode 100644
index 0000000..90c7fa3
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-mips.mk
@@ -0,0 +1,277 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.darwin-mips64.mk b/modules/video_render_module_impl.target.darwin-mips64.mk
new file mode 100644
index 0000000..90c7fa3
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-mips64.mk
@@ -0,0 +1,277 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.darwin-x86.mk b/modules/video_render_module_impl.target.darwin-x86.mk
new file mode 100644
index 0000000..501d5f4
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-x86.mk
@@ -0,0 +1,281 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.darwin-x86_64.mk b/modules/video_render_module_impl.target.darwin-x86_64.mk
new file mode 100644
index 0000000..719da3e
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-x86_64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.linux-arm.mk b/modules/video_render_module_impl.target.linux-arm.mk
new file mode 100644
index 0000000..73e1f91
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-arm.mk
@@ -0,0 +1,299 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
+ -fno-partial-inlining \
+ -fno-early-inlining \
+ -fno-tree-copy-prop \
+ -fno-tree-loop-optimize \
+ -fno-move-loop-invariants \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_ARCH_ARM' \
+ '-DWEBRTC_ARCH_ARM_V7' \
+ '-DWEBRTC_DETECT_ARM_NEON' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.linux-arm64.mk b/modules/video_render_module_impl.target.linux-arm64.mk
new file mode 100644
index 0000000..a538bcc
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-arm64.mk
@@ -0,0 +1,269 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.linux-mips.mk b/modules/video_render_module_impl.target.linux-mips.mk
new file mode 100644
index 0000000..90c7fa3
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-mips.mk
@@ -0,0 +1,277 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.linux-mips64.mk b/modules/video_render_module_impl.target.linux-mips64.mk
new file mode 100644
index 0000000..90c7fa3
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-mips64.mk
@@ -0,0 +1,277 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.linux-x86.mk b/modules/video_render_module_impl.target.linux-x86.mk
new file mode 100644
index 0000000..501d5f4
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-x86.mk
@@ -0,0 +1,281 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -msse2 \
+ -mfpmath=sse \
+ -mmmx \
+ -m32 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/video_render_module_impl.target.linux-x86_64.mk b/modules/video_render_module_impl.target.linux-x86_64.mk
new file mode 100644
index 0000000..719da3e
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-x86_64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_video_render_module_impl_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_render/video_render_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -m64 \
+ -march=x86-64 \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_video_render_module_impl_gyp
+
+# Alias gyp target name.
+.PHONY: video_render_module_impl
+video_render_module_impl: third_party_webrtc_modules_video_render_module_impl_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_i420.target.darwin-arm.mk b/modules/webrtc_i420.target.darwin-arm.mk
index a1ef131..eb597c4 100644
--- a/modules/webrtc_i420.target.darwin-arm.mk
+++ b/modules/webrtc_i420.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,68 +267,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.darwin-arm64.mk b/modules/webrtc_i420.target.darwin-arm64.mk
index e1531b5..fd54f8e 100644
--- a/modules/webrtc_i420.target.darwin-arm64.mk
+++ b/modules/webrtc_i420.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,59 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.darwin-mips.mk b/modules/webrtc_i420.target.darwin-mips.mk
index 73574ec..e94f467 100644
--- a/modules/webrtc_i420.target.darwin-mips.mk
+++ b/modules/webrtc_i420.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +245,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.darwin-mips64.mk b/modules/webrtc_i420.target.darwin-mips64.mk
new file mode 100644
index 0000000..e94f467
--- /dev/null
+++ b/modules/webrtc_i420.target.darwin-mips64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/codecs/i420/main/source/i420.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_i420_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_i420
+webrtc_i420: third_party_webrtc_modules_webrtc_i420_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_i420.target.darwin-x86.mk b/modules/webrtc_i420.target.darwin-x86.mk
index d85fb3c..b0c0cf3 100644
--- a/modules/webrtc_i420.target.darwin-x86.mk
+++ b/modules/webrtc_i420.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.darwin-x86_64.mk b/modules/webrtc_i420.target.darwin-x86_64.mk
index 4c2779f..4a64b23 100644
--- a/modules/webrtc_i420.target.darwin-x86_64.mk
+++ b/modules/webrtc_i420.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.linux-arm.mk b/modules/webrtc_i420.target.linux-arm.mk
index a1ef131..eb597c4 100644
--- a/modules/webrtc_i420.target.linux-arm.mk
+++ b/modules/webrtc_i420.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +69,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -78,7 +77,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -95,12 +93,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -263,68 +267,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.linux-arm64.mk b/modules/webrtc_i420.target.linux-arm64.mk
index e1531b5..fd54f8e 100644
--- a/modules/webrtc_i420.target.linux-arm64.mk
+++ b/modules/webrtc_i420.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,13 +59,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,59 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.linux-mips.mk b/modules/webrtc_i420.target.linux-mips.mk
index 73574ec..e94f467 100644
--- a/modules/webrtc_i420.target.linux-mips.mk
+++ b/modules/webrtc_i420.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,18 +39,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +61,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +69,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,17 +85,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -253,64 +245,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.linux-mips64.mk b/modules/webrtc_i420.target.linux-mips64.mk
new file mode 100644
index 0000000..e94f467
--- /dev/null
+++ b/modules/webrtc_i420.target.linux-mips64.mk
@@ -0,0 +1,279 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/codecs/i420/main/source/i420.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_i420_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_i420
+webrtc_i420: third_party_webrtc_modules_webrtc_i420_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_i420.target.linux-x86.mk b/modules/webrtc_i420.target.linux-x86.mk
index d85fb3c..b0c0cf3 100644
--- a/modules/webrtc_i420.target.linux-x86.mk
+++ b/modules/webrtc_i420.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,63 +250,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_i420.target.linux-x86_64.mk b/modules/webrtc_i420.target.linux-x86_64.mk
index 4c2779f..4a64b23 100644
--- a/modules/webrtc_i420.target.linux-x86_64.mk
+++ b/modules/webrtc_i420.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_i420_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -244,63 +248,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.darwin-arm.mk b/modules/webrtc_opus.target.darwin-arm.mk
index a79f25f..c0e7b3f 100644
--- a/modules/webrtc_opus.target.darwin-arm.mk
+++ b/modules/webrtc_opus.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +68,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +76,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,12 +92,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -264,68 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.darwin-arm64.mk b/modules/webrtc_opus.target.darwin-arm64.mk
index 88ad7bf..5704884 100644
--- a/modules/webrtc_opus.target.darwin-arm64.mk
+++ b/modules/webrtc_opus.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,13 +58,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -83,12 +81,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,59 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.darwin-mips.mk b/modules/webrtc_opus.target.darwin-mips.mk
index 3b40700..d6b017d 100644
--- a/modules/webrtc_opus.target.darwin-mips.mk
+++ b/modules/webrtc_opus.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -40,18 +38,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +60,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +84,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -254,64 +246,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.darwin-mips64.mk b/modules/webrtc_opus.target.darwin-mips64.mk
new file mode 100644
index 0000000..d6b017d
--- /dev/null
+++ b/modules/webrtc_opus.target.darwin-mips64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_opus_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_opus
+webrtc_opus: third_party_webrtc_modules_webrtc_opus_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_opus.target.darwin-x86.mk b/modules/webrtc_opus.target.darwin-x86.mk
index 6fc0766..4968551 100644
--- a/modules/webrtc_opus.target.darwin-x86.mk
+++ b/modules/webrtc_opus.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.darwin-x86_64.mk b/modules/webrtc_opus.target.darwin-x86_64.mk
index 9df1614..b01b4bf 100644
--- a/modules/webrtc_opus.target.darwin-x86_64.mk
+++ b/modules/webrtc_opus.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -245,63 +249,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.linux-arm.mk b/modules/webrtc_opus.target.linux-arm.mk
index a79f25f..c0e7b3f 100644
--- a/modules/webrtc_opus.target.linux-arm.mk
+++ b/modules/webrtc_opus.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +68,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -77,7 +76,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -94,12 +92,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -139,23 +140,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -264,68 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.linux-arm64.mk b/modules/webrtc_opus.target.linux-arm64.mk
index 88ad7bf..5704884 100644
--- a/modules/webrtc_opus.target.linux-arm64.mk
+++ b/modules/webrtc_opus.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,13 +58,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -83,12 +81,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,59 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.linux-mips.mk b/modules/webrtc_opus.target.linux-mips.mk
index 3b40700..d6b017d 100644
--- a/modules/webrtc_opus.target.linux-mips.mk
+++ b/modules/webrtc_opus.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -40,18 +38,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +60,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,17 +84,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +129,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,18 +155,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,17 +200,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -254,64 +246,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.linux-mips64.mk b/modules/webrtc_opus.target.linux-mips64.mk
new file mode 100644
index 0000000..d6b017d
--- /dev/null
+++ b/modules/webrtc_opus.target.linux-mips64.mk
@@ -0,0 +1,280 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/opus/src/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_opus_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_opus
+webrtc_opus: third_party_webrtc_modules_webrtc_opus_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_opus.target.linux-x86.mk b/modules/webrtc_opus.target.linux-x86.mk
index 6fc0766..4968551 100644
--- a/modules/webrtc_opus.target.linux-x86.mk
+++ b/modules/webrtc_opus.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -72,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -89,12 +87,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,21 +132,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -187,7 +189,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,12 +205,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -247,63 +251,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_opus.target.linux-x86_64.mk b/modules/webrtc_opus.target.linux-x86_64.mk
index 9df1614..b01b4bf 100644
--- a/modules/webrtc_opus.target.linux-x86_64.mk
+++ b/modules/webrtc_opus.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_opus_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -71,7 +70,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -88,12 +86,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -130,22 +131,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,7 +187,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -202,12 +203,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -245,63 +249,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.darwin-arm.mk b/modules/webrtc_utility.target.darwin-arm.mk
index 896fa51..36b785b 100644
--- a/modules/webrtc_utility.target.darwin-arm.mk
+++ b/modules/webrtc_utility.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -41,7 +40,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +57,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -80,6 +78,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,7 +86,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -104,12 +102,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -155,23 +156,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,13 +191,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -217,7 +219,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -234,12 +235,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -286,68 +290,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.darwin-arm64.mk b/modules/webrtc_utility.target.darwin-arm64.mk
index 943e8fc..b3d5d7a 100644
--- a/modules/webrtc_utility.target.darwin-arm64.mk
+++ b/modules/webrtc_utility.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -40,7 +39,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +68,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +91,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -141,21 +142,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -257,59 +261,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.darwin-mips.mk b/modules/webrtc_utility.target.darwin-mips.mk
index 7133160..a71cf45 100644
--- a/modules/webrtc_utility.target.darwin-mips.mk
+++ b/modules/webrtc_utility.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -41,7 +40,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,18 +48,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -76,6 +70,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -83,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -100,17 +94,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -150,23 +145,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,18 +171,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -225,17 +216,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -276,64 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.darwin-mips64.mk b/modules/webrtc_utility.target.darwin-mips64.mk
new file mode 100644
index 0000000..a71cf45
--- /dev/null
+++ b/modules/webrtc_utility.target.darwin-mips64.mk
@@ -0,0 +1,302 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/utility/source/audio_frame_operations.cc \
+ third_party/webrtc/modules/utility/source/coder.cc \
+ third_party/webrtc/modules/utility/source/file_player_impl.cc \
+ third_party/webrtc/modules/utility/source/file_recorder_impl.cc \
+ third_party/webrtc/modules/utility/source/helpers_android.cc \
+ third_party/webrtc/modules/utility/source/process_thread_impl.cc \
+ third_party/webrtc/modules/utility/source/rtp_dump_impl.cc \
+ third_party/webrtc/modules/utility/source/frame_scaler.cc \
+ third_party/webrtc/modules/utility/source/video_coder.cc \
+ third_party/webrtc/modules/utility/source/video_frames_queue.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_utility_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_utility
+webrtc_utility: third_party_webrtc_modules_webrtc_utility_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_utility.target.darwin-x86.mk b/modules/webrtc_utility.target.darwin-x86.mk
index 4fe689f..74fcce2 100644
--- a/modules/webrtc_utility.target.darwin-x86.mk
+++ b/modules/webrtc_utility.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -40,7 +39,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,6 +73,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -82,7 +81,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -99,12 +97,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -147,21 +148,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,7 +205,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -220,12 +221,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,63 +273,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.darwin-x86_64.mk b/modules/webrtc_utility.target.darwin-x86_64.mk
index 90e7db2..7c680a7 100644
--- a/modules/webrtc_utility.target.darwin-x86_64.mk
+++ b/modules/webrtc_utility.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -41,7 +40,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +72,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -146,22 +147,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -267,63 +271,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.linux-arm.mk b/modules/webrtc_utility.target.linux-arm.mk
index 896fa51..36b785b 100644
--- a/modules/webrtc_utility.target.linux-arm.mk
+++ b/modules/webrtc_utility.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -41,7 +40,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +57,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -80,6 +78,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,7 +86,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -104,12 +102,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -155,23 +156,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,13 +191,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -217,7 +219,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -234,12 +235,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -286,68 +290,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.linux-arm64.mk b/modules/webrtc_utility.target.linux-arm64.mk
index 943e8fc..b3d5d7a 100644
--- a/modules/webrtc_utility.target.linux-arm64.mk
+++ b/modules/webrtc_utility.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -40,7 +39,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +68,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -93,12 +91,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -141,21 +142,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -257,59 +261,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.linux-mips.mk b/modules/webrtc_utility.target.linux-mips.mk
index 7133160..a71cf45 100644
--- a/modules/webrtc_utility.target.linux-mips.mk
+++ b/modules/webrtc_utility.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -41,7 +40,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,18 +48,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -76,6 +70,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -83,7 +78,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -100,17 +94,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -150,23 +145,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,18 +171,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -225,17 +216,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -276,64 +268,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.linux-mips64.mk b/modules/webrtc_utility.target.linux-mips64.mk
new file mode 100644
index 0000000..a71cf45
--- /dev/null
+++ b/modules/webrtc_utility.target.linux-mips64.mk
@@ -0,0 +1,302 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/utility/source/audio_frame_operations.cc \
+ third_party/webrtc/modules/utility/source/coder.cc \
+ third_party/webrtc/modules/utility/source/file_player_impl.cc \
+ third_party/webrtc/modules/utility/source/file_recorder_impl.cc \
+ third_party/webrtc/modules/utility/source/helpers_android.cc \
+ third_party/webrtc/modules/utility/source/process_thread_impl.cc \
+ third_party/webrtc/modules/utility/source/rtp_dump_impl.cc \
+ third_party/webrtc/modules/utility/source/frame_scaler.cc \
+ third_party/webrtc/modules/utility/source/video_coder.cc \
+ third_party/webrtc/modules/utility/source/video_frames_queue.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_utility_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_utility
+webrtc_utility: third_party_webrtc_modules_webrtc_utility_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_utility.target.linux-x86.mk b/modules/webrtc_utility.target.linux-x86.mk
index 4fe689f..74fcce2 100644
--- a/modules/webrtc_utility.target.linux-x86.mk
+++ b/modules/webrtc_utility.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -40,7 +39,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,6 +73,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -82,7 +81,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -99,12 +97,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -147,21 +148,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,7 +205,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -220,12 +221,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,63 +273,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_utility.target.linux-x86_64.mk b/modules/webrtc_utility.target.linux-x86_64.mk
index 90e7db2..7c680a7 100644
--- a/modules/webrtc_utility.target.linux-x86_64.mk
+++ b/modules/webrtc_utility.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_utility_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -41,7 +40,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +72,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -81,7 +80,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -98,12 +96,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -146,22 +147,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,7 +203,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -218,12 +219,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -267,63 +271,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.darwin-arm.mk b/modules/webrtc_video_coding.target.darwin-arm.mk
index e4976e1..07b42b9 100644
--- a/modules/webrtc_video_coding.target.darwin-arm.mk
+++ b/modules/webrtc_video_coding.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -54,7 +53,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,13 +70,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -93,6 +91,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +99,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,12 +115,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -163,23 +164,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,13 +199,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -225,7 +227,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +243,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -289,68 +293,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.darwin-arm64.mk b/modules/webrtc_video_coding.target.darwin-arm64.mk
index ca8513d..013dc1f 100644
--- a/modules/webrtc_video_coding.target.darwin-arm64.mk
+++ b/modules/webrtc_video_coding.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -53,7 +52,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -83,13 +81,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -106,12 +104,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -149,21 +150,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,7 +201,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -216,12 +217,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -260,59 +264,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.darwin-mips.mk b/modules/webrtc_video_coding.target.darwin-mips.mk
index 7db12f2..6b1ffa4 100644
--- a/modules/webrtc_video_coding.target.darwin-mips.mk
+++ b/modules/webrtc_video_coding.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -54,7 +53,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,18 +61,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -89,6 +83,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +91,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,17 +107,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -158,23 +153,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -183,18 +179,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -216,7 +208,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,17 +224,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -279,64 +271,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.darwin-mips64.mk b/modules/webrtc_video_coding.target.darwin-mips64.mk
new file mode 100644
index 0000000..6b1ffa4
--- /dev/null
+++ b/modules/webrtc_video_coding.target.darwin-mips64.mk
@@ -0,0 +1,305 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/main/source/codec_database.cc \
+ third_party/webrtc/modules/video_coding/main/source/codec_timer.cc \
+ third_party/webrtc/modules/video_coding/main/source/content_metrics_processing.cc \
+ third_party/webrtc/modules/video_coding/main/source/decoding_state.cc \
+ third_party/webrtc/modules/video_coding/main/source/encoded_frame.cc \
+ third_party/webrtc/modules/video_coding/main/source/frame_buffer.cc \
+ third_party/webrtc/modules/video_coding/main/source/generic_decoder.cc \
+ third_party/webrtc/modules/video_coding/main/source/generic_encoder.cc \
+ third_party/webrtc/modules/video_coding/main/source/inter_frame_delay.cc \
+ third_party/webrtc/modules/video_coding/main/source/jitter_buffer.cc \
+ third_party/webrtc/modules/video_coding/main/source/jitter_estimator.cc \
+ third_party/webrtc/modules/video_coding/main/source/media_opt_util.cc \
+ third_party/webrtc/modules/video_coding/main/source/media_optimization.cc \
+ third_party/webrtc/modules/video_coding/main/source/packet.cc \
+ third_party/webrtc/modules/video_coding/main/source/qm_select.cc \
+ third_party/webrtc/modules/video_coding/main/source/receiver.cc \
+ third_party/webrtc/modules/video_coding/main/source/rtt_filter.cc \
+ third_party/webrtc/modules/video_coding/main/source/session_info.cc \
+ third_party/webrtc/modules/video_coding/main/source/timestamp_map.cc \
+ third_party/webrtc/modules/video_coding/main/source/timing.cc \
+ third_party/webrtc/modules/video_coding/main/source/video_coding_impl.cc \
+ third_party/webrtc/modules/video_coding/main/source/video_sender.cc \
+ third_party/webrtc/modules/video_coding/main/source/video_receiver.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_video_coding_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_video_coding
+webrtc_video_coding: third_party_webrtc_modules_webrtc_video_coding_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_video_coding.target.darwin-x86.mk b/modules/webrtc_video_coding.target.darwin-x86.mk
index fdbbc45..af51da9 100644
--- a/modules/webrtc_video_coding.target.darwin-x86.mk
+++ b/modules/webrtc_video_coding.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -53,7 +52,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,7 +94,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -112,12 +110,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -155,21 +156,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,7 +213,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -228,12 +229,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -272,63 +276,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.darwin-x86_64.mk b/modules/webrtc_video_coding.target.darwin-x86_64.mk
index 0589252..db0b6c7 100644
--- a/modules/webrtc_video_coding.target.darwin-x86_64.mk
+++ b/modules/webrtc_video_coding.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -54,7 +53,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,7 +93,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -111,12 +109,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,22 +155,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,7 +211,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -226,12 +227,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,63 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.linux-arm.mk b/modules/webrtc_video_coding.target.linux-arm.mk
index e4976e1..07b42b9 100644
--- a/modules/webrtc_video_coding.target.linux-arm.mk
+++ b/modules/webrtc_video_coding.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -54,7 +53,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,13 +70,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -93,6 +91,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,7 +99,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -117,12 +115,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -163,23 +164,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,13 +199,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -225,7 +227,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +243,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -289,68 +293,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.linux-arm64.mk b/modules/webrtc_video_coding.target.linux-arm64.mk
index ca8513d..013dc1f 100644
--- a/modules/webrtc_video_coding.target.linux-arm64.mk
+++ b/modules/webrtc_video_coding.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -53,7 +52,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -83,13 +81,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -106,12 +104,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -149,21 +150,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,7 +201,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -216,12 +217,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -260,59 +264,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.linux-mips.mk b/modules/webrtc_video_coding.target.linux-mips.mk
index 7db12f2..6b1ffa4 100644
--- a/modules/webrtc_video_coding.target.linux-mips.mk
+++ b/modules/webrtc_video_coding.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -54,7 +53,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,18 +61,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -89,6 +83,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +91,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,17 +107,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -158,23 +153,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -183,18 +179,14 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -216,7 +208,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,17 +224,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -279,64 +271,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.linux-mips64.mk b/modules/webrtc_video_coding.target.linux-mips64.mk
new file mode 100644
index 0000000..6b1ffa4
--- /dev/null
+++ b/modules/webrtc_video_coding.target.linux-mips64.mk
@@ -0,0 +1,305 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/modules/video_coding/main/source/codec_database.cc \
+ third_party/webrtc/modules/video_coding/main/source/codec_timer.cc \
+ third_party/webrtc/modules/video_coding/main/source/content_metrics_processing.cc \
+ third_party/webrtc/modules/video_coding/main/source/decoding_state.cc \
+ third_party/webrtc/modules/video_coding/main/source/encoded_frame.cc \
+ third_party/webrtc/modules/video_coding/main/source/frame_buffer.cc \
+ third_party/webrtc/modules/video_coding/main/source/generic_decoder.cc \
+ third_party/webrtc/modules/video_coding/main/source/generic_encoder.cc \
+ third_party/webrtc/modules/video_coding/main/source/inter_frame_delay.cc \
+ third_party/webrtc/modules/video_coding/main/source/jitter_buffer.cc \
+ third_party/webrtc/modules/video_coding/main/source/jitter_estimator.cc \
+ third_party/webrtc/modules/video_coding/main/source/media_opt_util.cc \
+ third_party/webrtc/modules/video_coding/main/source/media_optimization.cc \
+ third_party/webrtc/modules/video_coding/main/source/packet.cc \
+ third_party/webrtc/modules/video_coding/main/source/qm_select.cc \
+ third_party/webrtc/modules/video_coding/main/source/receiver.cc \
+ third_party/webrtc/modules/video_coding/main/source/rtt_filter.cc \
+ third_party/webrtc/modules/video_coding/main/source/session_info.cc \
+ third_party/webrtc/modules/video_coding/main/source/timestamp_map.cc \
+ third_party/webrtc/modules/video_coding/main/source/timing.cc \
+ third_party/webrtc/modules/video_coding/main/source/video_coding_impl.cc \
+ third_party/webrtc/modules/video_coding/main/source/video_sender.cc \
+ third_party/webrtc/modules/video_coding/main/source/video_receiver.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_modules_webrtc_video_coding_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_video_coding
+webrtc_video_coding: third_party_webrtc_modules_webrtc_video_coding_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/modules/webrtc_video_coding.target.linux-x86.mk b/modules/webrtc_video_coding.target.linux-x86.mk
index fdbbc45..af51da9 100644
--- a/modules/webrtc_video_coding.target.linux-x86.mk
+++ b/modules/webrtc_video_coding.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -53,7 +52,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,7 +94,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -112,12 +110,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -155,21 +156,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,7 +213,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -228,12 +229,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -272,63 +276,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/modules/webrtc_video_coding.target.linux-x86_64.mk b/modules/webrtc_video_coding.target.linux-x86_64.mk
index 0589252..db0b6c7 100644
--- a/modules/webrtc_video_coding.target.linux-x86_64.mk
+++ b/modules/webrtc_video_coding.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_modules_webrtc_video_coding_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -54,7 +53,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,7 +93,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -111,12 +109,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -154,22 +155,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,7 +211,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -226,12 +227,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -270,63 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/overrides/OWNERS b/overrides/OWNERS
new file mode 100644
index 0000000..1a24a6a
--- /dev/null
+++ b/overrides/OWNERS
@@ -0,0 +1,13 @@
+henrika@webrtc.org
+henrike@webrtc.org
+henrikg@webrtc.org
+hta@webrtc.org
+jiayl@webrtc.org
+juberti@webrtc.org
+mflodman@webrtc.org
+perkj@webrtc.org
+pthatcher@webrtc.org
+sergeyu@chromium.org
+tommi@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/overrides/webrtc/base/constructormagic.h b/overrides/webrtc/base/constructormagic.h
index bb89f91..72b334c 100644
--- a/overrides/webrtc/base/constructormagic.h
+++ b/overrides/webrtc/base/constructormagic.h
@@ -15,6 +15,6 @@
#ifndef OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
#define OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
-#include "base/basictypes.h"
+#include "base/macros.h"
#endif // OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
diff --git a/overrides/webrtc/base/logging.cc b/overrides/webrtc/base/logging.cc
index f0c7910..a2ffba6 100644
--- a/overrides/webrtc/base/logging.cc
+++ b/overrides/webrtc/base/logging.cc
@@ -164,6 +164,11 @@
}
}
+// static
+void LogMessage::LogToDebug(int min_sev) {
+ logging::SetMinLogLevel(min_sev);
+}
+
// Note: this function is a copy from the overriden libjingle implementation.
void LogMultiline(LoggingSeverity level, const char* label, bool input,
const void* data, size_t len, bool hex_mode,
diff --git a/overrides/webrtc/base/logging.h b/overrides/webrtc/base/logging.h
index d8dfca2..d9e0a35 100644
--- a/overrides/webrtc/base/logging.h
+++ b/overrides/webrtc/base/logging.h
@@ -150,6 +150,11 @@
}
};
+class LogMessage {
+ public:
+ static void LogToDebug(int min_sev);
+};
+
// When possible, pass optional state variable to track various data across
// multiple calls to LogMultiline. Otherwise, pass NULL.
void LogMultiline(LoggingSeverity level, const char* label, bool input,
diff --git a/sound/OWNERS b/sound/OWNERS
new file mode 100644
index 0000000..c4325df
--- /dev/null
+++ b/sound/OWNERS
@@ -0,0 +1,14 @@
+henrika@webrtc.org
+henrike@webrtc.org
+henrikg@webrtc.org
+hta@webrtc.org
+jiayl@webrtc.org
+juberti@webrtc.org
+mflodman@webrtc.org
+perkj@webrtc.org
+pthatcher@webrtc.org
+sergeyu@chromium.org
+tommi@webrtc.org
+
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/sound/alsasoundsystem.cc b/sound/alsasoundsystem.cc
new file mode 100644
index 0000000..c2be190
--- /dev/null
+++ b/sound/alsasoundsystem.cc
@@ -0,0 +1,744 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/alsasoundsystem.h"
+
+#include "webrtc/sound/sounddevicelocator.h"
+#include "webrtc/sound/soundinputstreaminterface.h"
+#include "webrtc/sound/soundoutputstreaminterface.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/base/timeutils.h"
+#include "webrtc/base/worker.h"
+
+namespace rtc {
+
+// Lookup table from the rtc format enum in soundsysteminterface.h to
+// ALSA's enums.
+static const snd_pcm_format_t kCricketFormatToAlsaFormatTable[] = {
+ // The order here must match the order in soundsysteminterface.h
+ SND_PCM_FORMAT_S16_LE,
+};
+
+// Lookup table for the size of a single sample of a given format.
+static const size_t kCricketFormatToSampleSizeTable[] = {
+ // The order here must match the order in soundsysteminterface.h
+ sizeof(int16_t), // 2
+};
+
+// Minimum latency we allow, in microseconds. This is more or less arbitrary,
+// but it has to be at least large enough to be able to buffer data during a
+// missed context switch, and the typical Linux scheduling quantum is 10ms.
+static const int kMinimumLatencyUsecs = 20 * 1000;
+
+// The latency we'll use for kNoLatencyRequirements (chosen arbitrarily).
+static const int kDefaultLatencyUsecs = kMinimumLatencyUsecs * 2;
+
+// We translate newlines in ALSA device descriptions to hyphens.
+static const char kAlsaDescriptionSearch[] = "\n";
+static const char kAlsaDescriptionReplace[] = " - ";
+
+class AlsaDeviceLocator : public SoundDeviceLocator {
+ public:
+ AlsaDeviceLocator(const std::string &name,
+ const std::string &device_name)
+ : SoundDeviceLocator(name, device_name) {
+ // The ALSA descriptions have newlines in them, which won't show up in
+ // a drop-down box. Replace them with hyphens.
+ rtc::replace_substrs(kAlsaDescriptionSearch,
+ sizeof(kAlsaDescriptionSearch) - 1,
+ kAlsaDescriptionReplace,
+ sizeof(kAlsaDescriptionReplace) - 1,
+ &name_);
+ }
+
+ virtual SoundDeviceLocator *Copy() const {
+ return new AlsaDeviceLocator(*this);
+ }
+};
+
+// Functionality that is common to both AlsaInputStream and AlsaOutputStream.
+class AlsaStream {
+ public:
+ AlsaStream(AlsaSoundSystem *alsa,
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq)
+ : alsa_(alsa),
+ handle_(handle),
+ frame_size_(frame_size),
+ wait_timeout_ms_(wait_timeout_ms),
+ flags_(flags),
+ freq_(freq) {
+ }
+
+ ~AlsaStream() {
+ Close();
+ }
+
+ // Waits for the stream to be ready to accept/return more data, and returns
+ // how much can be written/read, or 0 if we need to Wait() again.
+ snd_pcm_uframes_t Wait() {
+ snd_pcm_sframes_t frames;
+ // Ideally we would not use snd_pcm_wait() and instead hook snd_pcm_poll_*
+ // into PhysicalSocketServer, but PhysicalSocketServer is nasty enough
+ // already and the current clients of SoundSystemInterface do not run
+ // anything else on their worker threads, so snd_pcm_wait() is good enough.
+ frames = symbol_table()->snd_pcm_avail_update()(handle_);
+ if (frames < 0) {
+ LOG(LS_ERROR) << "snd_pcm_avail_update(): " << GetError(frames);
+ Recover(frames);
+ return 0;
+ } else if (frames > 0) {
+ // Already ready, so no need to wait.
+ return frames;
+ }
+ // Else no space/data available, so must wait.
+ int ready = symbol_table()->snd_pcm_wait()(handle_, wait_timeout_ms_);
+ if (ready < 0) {
+ LOG(LS_ERROR) << "snd_pcm_wait(): " << GetError(ready);
+ Recover(ready);
+ return 0;
+ } else if (ready == 0) {
+ // Timeout, so nothing can be written/read right now.
+ // We set the timeout to twice the requested latency, so continuous
+ // timeouts are indicative of a problem, so log as a warning.
+ LOG(LS_WARNING) << "Timeout while waiting on stream";
+ return 0;
+ }
+ // Else ready > 0 (i.e., 1), so it's ready. Get count.
+ frames = symbol_table()->snd_pcm_avail_update()(handle_);
+ if (frames < 0) {
+ LOG(LS_ERROR) << "snd_pcm_avail_update(): " << GetError(frames);
+ Recover(frames);
+ return 0;
+ } else if (frames == 0) {
+ // wait() said we were ready, so this ought to have been positive. Has
+ // been observed to happen in practice though.
+ LOG(LS_WARNING) << "Spurious wake-up";
+ }
+ return frames;
+ }
+
+ int CurrentDelayUsecs() {
+ if (!(flags_ & SoundSystemInterface::FLAG_REPORT_LATENCY)) {
+ return 0;
+ }
+
+ snd_pcm_sframes_t delay;
+ int err = symbol_table()->snd_pcm_delay()(handle_, &delay);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_delay(): " << GetError(err);
+ Recover(err);
+ // We'd rather continue playout/capture with an incorrect delay than stop
+ // it altogether, so return a valid value.
+ return 0;
+ }
+ // The delay is in frames. Convert to microseconds.
+ return delay * rtc::kNumMicrosecsPerSec / freq_;
+ }
+
+ // Used to recover from certain recoverable errors, principally buffer overrun
+ // or underrun (identified as EPIPE). Without calling this the stream stays
+ // in the error state forever.
+ bool Recover(int error) {
+ int err;
+ err = symbol_table()->snd_pcm_recover()(
+ handle_,
+ error,
+ // Silent; i.e., no logging on stderr.
+ 1);
+ if (err != 0) {
+ // Docs say snd_pcm_recover returns the original error if it is not one
+ // of the recoverable ones, so this log message will probably contain the
+ // same error twice.
+ LOG(LS_ERROR) << "Unable to recover from \"" << GetError(error) << "\": "
+ << GetError(err);
+ return false;
+ }
+ if (error == -EPIPE && // Buffer underrun/overrun.
+ symbol_table()->snd_pcm_stream()(handle_) == SND_PCM_STREAM_CAPTURE) {
+ // For capture streams we also have to repeat the explicit start() to get
+ // data flowing again.
+ err = symbol_table()->snd_pcm_start()(handle_);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_start(): " << GetError(err);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ bool Close() {
+ if (handle_) {
+ int err;
+ err = symbol_table()->snd_pcm_drop()(handle_);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_drop(): " << GetError(err);
+ // Continue anyways.
+ }
+ err = symbol_table()->snd_pcm_close()(handle_);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_close(): " << GetError(err);
+ // Continue anyways.
+ }
+ handle_ = NULL;
+ }
+ return true;
+ }
+
+ AlsaSymbolTable *symbol_table() {
+ return &alsa_->symbol_table_;
+ }
+
+ snd_pcm_t *handle() {
+ return handle_;
+ }
+
+ const char *GetError(int err) {
+ return alsa_->GetError(err);
+ }
+
+ size_t frame_size() {
+ return frame_size_;
+ }
+
+ private:
+ AlsaSoundSystem *alsa_;
+ snd_pcm_t *handle_;
+ size_t frame_size_;
+ int wait_timeout_ms_;
+ int flags_;
+ int freq_;
+
+ DISALLOW_COPY_AND_ASSIGN(AlsaStream);
+};
+
+// Implementation of an input stream. See soundinputstreaminterface.h regarding
+// thread-safety.
+class AlsaInputStream :
+ public SoundInputStreamInterface,
+ private rtc::Worker {
+ public:
+ AlsaInputStream(AlsaSoundSystem *alsa,
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq)
+ : stream_(alsa, handle, frame_size, wait_timeout_ms, flags, freq),
+ buffer_size_(0) {
+ }
+
+ virtual ~AlsaInputStream() {
+ bool success = StopReading();
+ // We need that to live.
+ VERIFY(success);
+ }
+
+ virtual bool StartReading() {
+ return StartWork();
+ }
+
+ virtual bool StopReading() {
+ return StopWork();
+ }
+
+ virtual bool GetVolume(int *volume) {
+ // TODO: Implement this.
+ return false;
+ }
+
+ virtual bool SetVolume(int volume) {
+ // TODO: Implement this.
+ return false;
+ }
+
+ virtual bool Close() {
+ return StopReading() && stream_.Close();
+ }
+
+ virtual int LatencyUsecs() {
+ return stream_.CurrentDelayUsecs();
+ }
+
+ private:
+ // Inherited from Worker.
+ virtual void OnStart() {
+ HaveWork();
+ }
+
+ // Inherited from Worker.
+ virtual void OnHaveWork() {
+ // Block waiting for data.
+ snd_pcm_uframes_t avail = stream_.Wait();
+ if (avail > 0) {
+ // Data is available.
+ size_t size = avail * stream_.frame_size();
+ if (size > buffer_size_) {
+ // Must increase buffer size.
+ buffer_.reset(new char[size]);
+ buffer_size_ = size;
+ }
+ // Read all the data.
+ snd_pcm_sframes_t read = stream_.symbol_table()->snd_pcm_readi()(
+ stream_.handle(),
+ buffer_.get(),
+ avail);
+ if (read < 0) {
+ LOG(LS_ERROR) << "snd_pcm_readi(): " << GetError(read);
+ stream_.Recover(read);
+ } else if (read == 0) {
+ // Docs say this shouldn't happen.
+ ASSERT(false);
+ LOG(LS_ERROR) << "No data?";
+ } else {
+ // Got data. Pass it off to the app.
+ SignalSamplesRead(buffer_.get(),
+ read * stream_.frame_size(),
+ this);
+ }
+ }
+ // Check for more data with no delay, after any pending messages are
+ // dispatched.
+ HaveWork();
+ }
+
+ // Inherited from Worker.
+ virtual void OnStop() {
+ // Nothing to do.
+ }
+
+ const char *GetError(int err) {
+ return stream_.GetError(err);
+ }
+
+ AlsaStream stream_;
+ rtc::scoped_ptr<char[]> buffer_;
+ size_t buffer_size_;
+
+ DISALLOW_COPY_AND_ASSIGN(AlsaInputStream);
+};
+
+// Implementation of an output stream. See soundoutputstreaminterface.h
+// regarding thread-safety.
+class AlsaOutputStream :
+ public SoundOutputStreamInterface,
+ private rtc::Worker {
+ public:
+ AlsaOutputStream(AlsaSoundSystem *alsa,
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq)
+ : stream_(alsa, handle, frame_size, wait_timeout_ms, flags, freq) {
+ }
+
+ virtual ~AlsaOutputStream() {
+ bool success = DisableBufferMonitoring();
+ // We need that to live.
+ VERIFY(success);
+ }
+
+ virtual bool EnableBufferMonitoring() {
+ return StartWork();
+ }
+
+ virtual bool DisableBufferMonitoring() {
+ return StopWork();
+ }
+
+ virtual bool WriteSamples(const void *sample_data,
+ size_t size) {
+ if (size % stream_.frame_size() != 0) {
+ // No client of SoundSystemInterface does this, so let's not support it.
+ // (If we wanted to support it, we'd basically just buffer the fractional
+ // frame until we get more data.)
+ ASSERT(false);
+ LOG(LS_ERROR) << "Writes with fractional frames are not supported";
+ return false;
+ }
+ snd_pcm_uframes_t frames = size / stream_.frame_size();
+ snd_pcm_sframes_t written = stream_.symbol_table()->snd_pcm_writei()(
+ stream_.handle(),
+ sample_data,
+ frames);
+ if (written < 0) {
+ LOG(LS_ERROR) << "snd_pcm_writei(): " << GetError(written);
+ stream_.Recover(written);
+ return false;
+ } else if (static_cast<snd_pcm_uframes_t>(written) < frames) {
+ // Shouldn't happen. Drop the rest of the data.
+ LOG(LS_ERROR) << "Stream wrote only " << written << " of " << frames
+ << " frames!";
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool GetVolume(int *volume) {
+ // TODO: Implement this.
+ return false;
+ }
+
+ virtual bool SetVolume(int volume) {
+ // TODO: Implement this.
+ return false;
+ }
+
+ virtual bool Close() {
+ return DisableBufferMonitoring() && stream_.Close();
+ }
+
+ virtual int LatencyUsecs() {
+ return stream_.CurrentDelayUsecs();
+ }
+
+ private:
+ // Inherited from Worker.
+ virtual void OnStart() {
+ HaveWork();
+ }
+
+ // Inherited from Worker.
+ virtual void OnHaveWork() {
+ snd_pcm_uframes_t avail = stream_.Wait();
+ if (avail > 0) {
+ size_t space = avail * stream_.frame_size();
+ SignalBufferSpace(space, this);
+ }
+ HaveWork();
+ }
+
+ // Inherited from Worker.
+ virtual void OnStop() {
+ // Nothing to do.
+ }
+
+ const char *GetError(int err) {
+ return stream_.GetError(err);
+ }
+
+ AlsaStream stream_;
+
+ DISALLOW_COPY_AND_ASSIGN(AlsaOutputStream);
+};
+
+AlsaSoundSystem::AlsaSoundSystem() : initialized_(false) {}
+
+AlsaSoundSystem::~AlsaSoundSystem() {
+ // Not really necessary, because Terminate() doesn't really do anything.
+ Terminate();
+}
+
+bool AlsaSoundSystem::Init() {
+ if (IsInitialized()) {
+ return true;
+ }
+
+ // Load libasound.
+ if (!symbol_table_.Load()) {
+ // Very odd for a Linux machine to not have a working libasound ...
+ LOG(LS_ERROR) << "Failed to load symbol table";
+ return false;
+ }
+
+ initialized_ = true;
+
+ return true;
+}
+
+void AlsaSoundSystem::Terminate() {
+ if (!IsInitialized()) {
+ return;
+ }
+
+ initialized_ = false;
+
+ // We do not unload the symbol table because we may need it again soon if
+ // Init() is called again.
+}
+
+bool AlsaSoundSystem::EnumeratePlaybackDevices(
+ SoundDeviceLocatorList *devices) {
+ return EnumerateDevices(devices, false);
+}
+
+bool AlsaSoundSystem::EnumerateCaptureDevices(
+ SoundDeviceLocatorList *devices) {
+ return EnumerateDevices(devices, true);
+}
+
+bool AlsaSoundSystem::GetDefaultPlaybackDevice(SoundDeviceLocator **device) {
+ return GetDefaultDevice(device);
+}
+
+bool AlsaSoundSystem::GetDefaultCaptureDevice(SoundDeviceLocator **device) {
+ return GetDefaultDevice(device);
+}
+
+SoundOutputStreamInterface *AlsaSoundSystem::OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return OpenDevice<SoundOutputStreamInterface>(
+ device,
+ params,
+ SND_PCM_STREAM_PLAYBACK,
+ &AlsaSoundSystem::StartOutputStream);
+}
+
+SoundInputStreamInterface *AlsaSoundSystem::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return OpenDevice<SoundInputStreamInterface>(
+ device,
+ params,
+ SND_PCM_STREAM_CAPTURE,
+ &AlsaSoundSystem::StartInputStream);
+}
+
+const char *AlsaSoundSystem::GetName() const {
+ return "ALSA";
+}
+
+bool AlsaSoundSystem::EnumerateDevices(
+ SoundDeviceLocatorList *devices,
+ bool capture_not_playback) {
+ ClearSoundDeviceLocatorList(devices);
+
+ if (!IsInitialized()) {
+ return false;
+ }
+
+ const char *type = capture_not_playback ? "Input" : "Output";
+ // dmix and dsnoop are only for playback and capture, respectively, but ALSA
+ // stupidly includes them in both lists.
+ const char *ignore_prefix = capture_not_playback ? "dmix:" : "dsnoop:";
+ // (ALSA lists many more "devices" of questionable interest, but we show them
+ // just in case the weird devices may actually be desirable for some
+ // users/systems.)
+ const char *ignore_default = "default";
+ const char *ignore_null = "null";
+ const char *ignore_pulse = "pulse";
+ // The 'pulse' entry has a habit of mysteriously disappearing when you query
+ // a second time. Remove it from our list. (GIPS lib did the same thing.)
+ int err;
+
+ void **hints;
+ err = symbol_table_.snd_device_name_hint()(-1, // All cards
+ "pcm", // Only PCM devices
+ &hints);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_device_name_hint(): " << GetError(err);
+ return false;
+ }
+
+ for (void **list = hints; *list != NULL; ++list) {
+ char *actual_type = symbol_table_.snd_device_name_get_hint()(*list, "IOID");
+ if (actual_type) { // NULL means it's both.
+ bool wrong_type = (strcmp(actual_type, type) != 0);
+ free(actual_type);
+ if (wrong_type) {
+ // Wrong type of device (i.e., input vs. output).
+ continue;
+ }
+ }
+
+ char *name = symbol_table_.snd_device_name_get_hint()(*list, "NAME");
+ if (!name) {
+ LOG(LS_ERROR) << "Device has no name???";
+ // Skip it.
+ continue;
+ }
+
+ // Now check if we actually want to show this device.
+ if (strcmp(name, ignore_default) != 0 &&
+ strcmp(name, ignore_null) != 0 &&
+ strcmp(name, ignore_pulse) != 0 &&
+ !rtc::starts_with(name, ignore_prefix)) {
+
+ // Yes, we do.
+ char *desc = symbol_table_.snd_device_name_get_hint()(*list, "DESC");
+ if (!desc) {
+ // Virtual devices don't necessarily have descriptions. Use their names
+ // instead (not pretty!).
+ desc = name;
+ }
+
+ AlsaDeviceLocator *device = new AlsaDeviceLocator(desc, name);
+
+ devices->push_back(device);
+
+ if (desc != name) {
+ free(desc);
+ }
+ }
+
+ free(name);
+ }
+
+ err = symbol_table_.snd_device_name_free_hint()(hints);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_device_name_free_hint(): " << GetError(err);
+ // Continue and return true anyways, since we did get the whole list.
+ }
+
+ return true;
+}
+
+bool AlsaSoundSystem::GetDefaultDevice(SoundDeviceLocator **device) {
+ if (!IsInitialized()) {
+ return false;
+ }
+ *device = new AlsaDeviceLocator("Default device", "default");
+ return true;
+}
+
+inline size_t AlsaSoundSystem::FrameSize(const OpenParams ¶ms) {
+ ASSERT(static_cast<int>(params.format) <
+ ARRAY_SIZE(kCricketFormatToSampleSizeTable));
+ return kCricketFormatToSampleSizeTable[params.format] * params.channels;
+}
+
+template <typename StreamInterface>
+StreamInterface *AlsaSoundSystem::OpenDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms,
+ snd_pcm_stream_t type,
+ StreamInterface *(AlsaSoundSystem::*start_fn)(
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq)) {
+
+ if (!IsInitialized()) {
+ return NULL;
+ }
+
+ StreamInterface *stream;
+ int err;
+
+ const char *dev = static_cast<const AlsaDeviceLocator *>(device)->
+ device_name().c_str();
+
+ snd_pcm_t *handle = NULL;
+ err = symbol_table_.snd_pcm_open()(
+ &handle,
+ dev,
+ type,
+ // No flags.
+ 0);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_open(" << dev << "): " << GetError(err);
+ return NULL;
+ }
+ LOG(LS_VERBOSE) << "Opening " << dev;
+ ASSERT(handle); // If open succeeded, handle ought to be valid
+
+ // Compute requested latency in microseconds.
+ int latency;
+ if (params.latency == kNoLatencyRequirements) {
+ latency = kDefaultLatencyUsecs;
+ } else {
+ // kLowLatency is 0, so we treat it the same as a request for zero latency.
+ // Compute what the user asked for.
+ latency = rtc::kNumMicrosecsPerSec *
+ params.latency /
+ params.freq /
+ FrameSize(params);
+ // And this is what we'll actually use.
+ latency = rtc::_max(latency, kMinimumLatencyUsecs);
+ }
+
+ ASSERT(static_cast<int>(params.format) <
+ ARRAY_SIZE(kCricketFormatToAlsaFormatTable));
+
+ err = symbol_table_.snd_pcm_set_params()(
+ handle,
+ kCricketFormatToAlsaFormatTable[params.format],
+ // SoundSystemInterface only supports interleaved audio.
+ SND_PCM_ACCESS_RW_INTERLEAVED,
+ params.channels,
+ params.freq,
+ 1, // Allow ALSA to resample.
+ latency);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_set_params(): " << GetError(err);
+ goto fail;
+ }
+
+ err = symbol_table_.snd_pcm_prepare()(handle);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_prepare(): " << GetError(err);
+ goto fail;
+ }
+
+ stream = (this->*start_fn)(
+ handle,
+ FrameSize(params),
+ // We set the wait time to twice the requested latency, so that wait
+ // timeouts should be rare.
+ 2 * latency / rtc::kNumMicrosecsPerMillisec,
+ params.flags,
+ params.freq);
+ if (stream) {
+ return stream;
+ }
+ // Else fall through.
+
+ fail:
+ err = symbol_table_.snd_pcm_close()(handle);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_close(): " << GetError(err);
+ }
+ return NULL;
+}
+
+SoundOutputStreamInterface *AlsaSoundSystem::StartOutputStream(
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq) {
+ // Nothing to do here but instantiate the stream.
+ return new AlsaOutputStream(
+ this, handle, frame_size, wait_timeout_ms, flags, freq);
+}
+
+SoundInputStreamInterface *AlsaSoundSystem::StartInputStream(
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq) {
+ // Output streams start automatically once enough data has been written, but
+ // input streams must be started manually or else snd_pcm_wait() will never
+ // return true.
+ int err;
+ err = symbol_table_.snd_pcm_start()(handle);
+ if (err != 0) {
+ LOG(LS_ERROR) << "snd_pcm_start(): " << GetError(err);
+ return NULL;
+ }
+ return new AlsaInputStream(
+ this, handle, frame_size, wait_timeout_ms, flags, freq);
+}
+
+inline const char *AlsaSoundSystem::GetError(int err) {
+ return symbol_table_.snd_strerror()(err);
+}
+
+} // namespace rtc
diff --git a/sound/alsasoundsystem.h b/sound/alsasoundsystem.h
new file mode 100644
index 0000000..f95e686
--- /dev/null
+++ b/sound/alsasoundsystem.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_ALSASOUNDSYSTEM_H_
+#define WEBRTC_SOUND_ALSASOUNDSYSTEM_H_
+
+#include "webrtc/sound/alsasymboltable.h"
+#include "webrtc/sound/soundsysteminterface.h"
+#include "webrtc/base/constructormagic.h"
+
+namespace rtc {
+
+class AlsaStream;
+class AlsaInputStream;
+class AlsaOutputStream;
+
+// Sound system implementation for ALSA, the predominant sound device API on
+// Linux (but typically not used directly by applications anymore).
+class AlsaSoundSystem : public SoundSystemInterface {
+ friend class AlsaStream;
+ friend class AlsaInputStream;
+ friend class AlsaOutputStream;
+ public:
+ static SoundSystemInterface *Create() {
+ return new AlsaSoundSystem();
+ }
+
+ AlsaSoundSystem();
+
+ virtual ~AlsaSoundSystem();
+
+ virtual bool Init();
+ virtual void Terminate();
+
+ virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices);
+ virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices);
+
+ virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device);
+ virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device);
+
+ virtual SoundOutputStreamInterface *OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+
+ virtual const char *GetName() const;
+
+ private:
+ bool IsInitialized() { return initialized_; }
+
+ bool EnumerateDevices(SoundDeviceLocatorList *devices,
+ bool capture_not_playback);
+
+ bool GetDefaultDevice(SoundDeviceLocator **device);
+
+ static size_t FrameSize(const OpenParams ¶ms);
+
+ template <typename StreamInterface>
+ StreamInterface *OpenDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms,
+ snd_pcm_stream_t type,
+ StreamInterface *(AlsaSoundSystem::*start_fn)(
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq));
+
+ SoundOutputStreamInterface *StartOutputStream(
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq);
+
+ SoundInputStreamInterface *StartInputStream(
+ snd_pcm_t *handle,
+ size_t frame_size,
+ int wait_timeout_ms,
+ int flags,
+ int freq);
+
+ const char *GetError(int err);
+
+ bool initialized_;
+ AlsaSymbolTable symbol_table_;
+
+ DISALLOW_COPY_AND_ASSIGN(AlsaSoundSystem);
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_ALSASOUNDSYSTEM_H_
diff --git a/sound/alsasymboltable.cc b/sound/alsasymboltable.cc
new file mode 100644
index 0000000..0670fb2
--- /dev/null
+++ b/sound/alsasymboltable.cc
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/alsasymboltable.h"
+
+namespace rtc {
+
+#define LATE_BINDING_SYMBOL_TABLE_CLASS_NAME ALSA_SYMBOLS_CLASS_NAME
+#define LATE_BINDING_SYMBOL_TABLE_SYMBOLS_LIST ALSA_SYMBOLS_LIST
+#define LATE_BINDING_SYMBOL_TABLE_DLL_NAME "libasound.so.2"
+#include "webrtc/base/latebindingsymboltable.cc.def"
+
+} // namespace rtc
diff --git a/sound/alsasymboltable.h b/sound/alsasymboltable.h
new file mode 100644
index 0000000..2cc8dba
--- /dev/null
+++ b/sound/alsasymboltable.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_ALSASYMBOLTABLE_H_
+#define WEBRTC_SOUND_ALSASYMBOLTABLE_H_
+
+#include <alsa/asoundlib.h>
+
+#include "webrtc/base/latebindingsymboltable.h"
+
+namespace rtc {
+
+#define ALSA_SYMBOLS_CLASS_NAME AlsaSymbolTable
+// The ALSA symbols we need, as an X-Macro list.
+// This list must contain precisely every libasound function that is used in
+// alsasoundsystem.cc.
+#define ALSA_SYMBOLS_LIST \
+ X(snd_device_name_free_hint) \
+ X(snd_device_name_get_hint) \
+ X(snd_device_name_hint) \
+ X(snd_pcm_avail_update) \
+ X(snd_pcm_close) \
+ X(snd_pcm_delay) \
+ X(snd_pcm_drop) \
+ X(snd_pcm_open) \
+ X(snd_pcm_prepare) \
+ X(snd_pcm_readi) \
+ X(snd_pcm_recover) \
+ X(snd_pcm_set_params) \
+ X(snd_pcm_start) \
+ X(snd_pcm_stream) \
+ X(snd_pcm_wait) \
+ X(snd_pcm_writei) \
+ X(snd_strerror)
+
+#define LATE_BINDING_SYMBOL_TABLE_CLASS_NAME ALSA_SYMBOLS_CLASS_NAME
+#define LATE_BINDING_SYMBOL_TABLE_SYMBOLS_LIST ALSA_SYMBOLS_LIST
+#include "webrtc/base/latebindingsymboltable.h.def"
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_ALSASYMBOLTABLE_H_
diff --git a/sound/automaticallychosensoundsystem.h b/sound/automaticallychosensoundsystem.h
new file mode 100644
index 0000000..84ff717
--- /dev/null
+++ b/sound/automaticallychosensoundsystem.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_AUTOMATICALLYCHOSENSOUNDSYSTEM_H_
+#define WEBRTC_SOUND_AUTOMATICALLYCHOSENSOUNDSYSTEM_H_
+
+#include "webrtc/sound/soundsysteminterface.h"
+#include "webrtc/sound/soundsystemproxy.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/scoped_ptr.h"
+
+namespace rtc {
+
+// A function type that creates an instance of a sound system implementation.
+typedef SoundSystemInterface *(*SoundSystemCreator)();
+
+// An AutomaticallyChosenSoundSystem is a sound system proxy that defers to
+// an instance of the first sound system implementation in a list that
+// successfully initializes.
+template <const SoundSystemCreator kSoundSystemCreators[], int kNumSoundSystems>
+class AutomaticallyChosenSoundSystem : public SoundSystemProxy {
+ public:
+ // Chooses and initializes the underlying sound system.
+ virtual bool Init();
+ // Terminates the underlying sound system implementation, but caches it for
+ // future re-use.
+ virtual void Terminate();
+
+ virtual const char *GetName() const;
+
+ private:
+ rtc::scoped_ptr<SoundSystemInterface> sound_systems_[kNumSoundSystems];
+};
+
+template <const SoundSystemCreator kSoundSystemCreators[], int kNumSoundSystems>
+bool AutomaticallyChosenSoundSystem<kSoundSystemCreators,
+ kNumSoundSystems>::Init() {
+ if (wrapped_) {
+ return true;
+ }
+ for (int i = 0; i < kNumSoundSystems; ++i) {
+ if (!sound_systems_[i].get()) {
+ sound_systems_[i].reset((*kSoundSystemCreators[i])());
+ }
+ if (sound_systems_[i]->Init()) {
+ // This is the first sound system in the list to successfully
+ // initialize, so we're done.
+ wrapped_ = sound_systems_[i].get();
+ break;
+ }
+ // Else it failed to initialize, so try the remaining ones.
+ }
+ if (!wrapped_) {
+ LOG(LS_ERROR) << "Failed to find a usable sound system";
+ return false;
+ }
+ LOG(LS_INFO) << "Selected " << wrapped_->GetName() << " sound system";
+ return true;
+}
+
+template <const SoundSystemCreator kSoundSystemCreators[], int kNumSoundSystems>
+void AutomaticallyChosenSoundSystem<kSoundSystemCreators,
+ kNumSoundSystems>::Terminate() {
+ if (!wrapped_) {
+ return;
+ }
+ wrapped_->Terminate();
+ wrapped_ = NULL;
+ // We do not free the scoped_ptrs because we may be re-init'ed soon.
+}
+
+template <const SoundSystemCreator kSoundSystemCreators[], int kNumSoundSystems>
+const char *AutomaticallyChosenSoundSystem<kSoundSystemCreators,
+ kNumSoundSystems>::GetName() const {
+ return wrapped_ ? wrapped_->GetName() : "automatic";
+}
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_AUTOMATICALLYCHOSENSOUNDSYSTEM_H_
diff --git a/sound/automaticallychosensoundsystem_unittest.cc b/sound/automaticallychosensoundsystem_unittest.cc
new file mode 100644
index 0000000..5cfd7c6
--- /dev/null
+++ b/sound/automaticallychosensoundsystem_unittest.cc
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/automaticallychosensoundsystem.h"
+#include "webrtc/sound/nullsoundsystem.h"
+#include "webrtc/base/gunit.h"
+
+namespace rtc {
+
+class NeverFailsToFailSoundSystem : public NullSoundSystem {
+ public:
+ // Overrides superclass.
+ virtual bool Init() {
+ return false;
+ }
+
+ static SoundSystemInterface *Create() {
+ return new NeverFailsToFailSoundSystem();
+ }
+};
+
+class InitCheckingSoundSystem1 : public NullSoundSystem {
+ public:
+ // Overrides superclass.
+ virtual bool Init() {
+ created_ = true;
+ return true;
+ }
+
+ static SoundSystemInterface *Create() {
+ return new InitCheckingSoundSystem1();
+ }
+
+ static bool created_;
+};
+
+bool InitCheckingSoundSystem1::created_ = false;
+
+class InitCheckingSoundSystem2 : public NullSoundSystem {
+ public:
+ // Overrides superclass.
+ virtual bool Init() {
+ created_ = true;
+ return true;
+ }
+
+ static SoundSystemInterface *Create() {
+ return new InitCheckingSoundSystem2();
+ }
+
+ static bool created_;
+};
+
+bool InitCheckingSoundSystem2::created_ = false;
+
+class DeletionCheckingSoundSystem1 : public NeverFailsToFailSoundSystem {
+ public:
+ virtual ~DeletionCheckingSoundSystem1() {
+ deleted_ = true;
+ }
+
+ static SoundSystemInterface *Create() {
+ return new DeletionCheckingSoundSystem1();
+ }
+
+ static bool deleted_;
+};
+
+bool DeletionCheckingSoundSystem1::deleted_ = false;
+
+class DeletionCheckingSoundSystem2 : public NeverFailsToFailSoundSystem {
+ public:
+ virtual ~DeletionCheckingSoundSystem2() {
+ deleted_ = true;
+ }
+
+ static SoundSystemInterface *Create() {
+ return new DeletionCheckingSoundSystem2();
+ }
+
+ static bool deleted_;
+};
+
+bool DeletionCheckingSoundSystem2::deleted_ = false;
+
+class DeletionCheckingSoundSystem3 : public NullSoundSystem {
+ public:
+ virtual ~DeletionCheckingSoundSystem3() {
+ deleted_ = true;
+ }
+
+ static SoundSystemInterface *Create() {
+ return new DeletionCheckingSoundSystem3();
+ }
+
+ static bool deleted_;
+};
+
+bool DeletionCheckingSoundSystem3::deleted_ = false;
+
+extern const SoundSystemCreator kSingleSystemFailingCreators[] = {
+ &NeverFailsToFailSoundSystem::Create,
+};
+
+TEST(AutomaticallyChosenSoundSystem, SingleSystemFailing) {
+ AutomaticallyChosenSoundSystem<
+ kSingleSystemFailingCreators,
+ ARRAY_SIZE(kSingleSystemFailingCreators)> sound_system;
+ EXPECT_FALSE(sound_system.Init());
+}
+
+extern const SoundSystemCreator kSingleSystemSucceedingCreators[] = {
+ &NullSoundSystem::Create,
+};
+
+TEST(AutomaticallyChosenSoundSystem, SingleSystemSucceeding) {
+ AutomaticallyChosenSoundSystem<
+ kSingleSystemSucceedingCreators,
+ ARRAY_SIZE(kSingleSystemSucceedingCreators)> sound_system;
+ EXPECT_TRUE(sound_system.Init());
+}
+
+extern const SoundSystemCreator
+ kFailedFirstSystemResultsInUsingSecondCreators[] = {
+ &NeverFailsToFailSoundSystem::Create,
+ &NullSoundSystem::Create,
+};
+
+TEST(AutomaticallyChosenSoundSystem, FailedFirstSystemResultsInUsingSecond) {
+ AutomaticallyChosenSoundSystem<
+ kFailedFirstSystemResultsInUsingSecondCreators,
+ ARRAY_SIZE(kFailedFirstSystemResultsInUsingSecondCreators)> sound_system;
+ EXPECT_TRUE(sound_system.Init());
+}
+
+extern const SoundSystemCreator kEarlierEntriesHavePriorityCreators[] = {
+ &InitCheckingSoundSystem1::Create,
+ &InitCheckingSoundSystem2::Create,
+};
+
+TEST(AutomaticallyChosenSoundSystem, EarlierEntriesHavePriority) {
+ AutomaticallyChosenSoundSystem<
+ kEarlierEntriesHavePriorityCreators,
+ ARRAY_SIZE(kEarlierEntriesHavePriorityCreators)> sound_system;
+ InitCheckingSoundSystem1::created_ = false;
+ InitCheckingSoundSystem2::created_ = false;
+ EXPECT_TRUE(sound_system.Init());
+ EXPECT_TRUE(InitCheckingSoundSystem1::created_);
+ EXPECT_FALSE(InitCheckingSoundSystem2::created_);
+}
+
+extern const SoundSystemCreator kManySoundSystemsCreators[] = {
+ &NullSoundSystem::Create,
+ &NullSoundSystem::Create,
+ &NullSoundSystem::Create,
+ &NullSoundSystem::Create,
+ &NullSoundSystem::Create,
+ &NullSoundSystem::Create,
+ &NullSoundSystem::Create,
+};
+
+TEST(AutomaticallyChosenSoundSystem, ManySoundSystems) {
+ AutomaticallyChosenSoundSystem<
+ kManySoundSystemsCreators,
+ ARRAY_SIZE(kManySoundSystemsCreators)> sound_system;
+ EXPECT_TRUE(sound_system.Init());
+}
+
+extern const SoundSystemCreator kDeletesAllCreatedSoundSystemsCreators[] = {
+ &DeletionCheckingSoundSystem1::Create,
+ &DeletionCheckingSoundSystem2::Create,
+ &DeletionCheckingSoundSystem3::Create,
+};
+
+TEST(AutomaticallyChosenSoundSystem, DeletesAllCreatedSoundSystems) {
+ typedef AutomaticallyChosenSoundSystem<
+ kDeletesAllCreatedSoundSystemsCreators,
+ ARRAY_SIZE(kDeletesAllCreatedSoundSystemsCreators)> TestSoundSystem;
+ TestSoundSystem *sound_system = new TestSoundSystem();
+ DeletionCheckingSoundSystem1::deleted_ = false;
+ DeletionCheckingSoundSystem2::deleted_ = false;
+ DeletionCheckingSoundSystem3::deleted_ = false;
+ EXPECT_TRUE(sound_system->Init());
+ delete sound_system;
+ EXPECT_TRUE(DeletionCheckingSoundSystem1::deleted_);
+ EXPECT_TRUE(DeletionCheckingSoundSystem2::deleted_);
+ EXPECT_TRUE(DeletionCheckingSoundSystem3::deleted_);
+}
+
+} // namespace rtc
diff --git a/sound/linuxsoundsystem.cc b/sound/linuxsoundsystem.cc
new file mode 100644
index 0000000..c420ab5
--- /dev/null
+++ b/sound/linuxsoundsystem.cc
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/linuxsoundsystem.h"
+
+#include "webrtc/sound/alsasoundsystem.h"
+#include "webrtc/sound/pulseaudiosoundsystem.h"
+
+namespace rtc {
+
+const SoundSystemCreator kLinuxSoundSystemCreators[] = {
+#ifdef HAVE_LIBPULSE
+ &PulseAudioSoundSystem::Create,
+#endif
+ &AlsaSoundSystem::Create,
+};
+
+} // namespace rtc
diff --git a/sound/linuxsoundsystem.h b/sound/linuxsoundsystem.h
new file mode 100644
index 0000000..0016f8a
--- /dev/null
+++ b/sound/linuxsoundsystem.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_LINUXSOUNDSYSTEM_H_
+#define WEBRTC_SOUND_LINUXSOUNDSYSTEM_H_
+
+#include "webrtc/sound/automaticallychosensoundsystem.h"
+
+namespace rtc {
+
+extern const SoundSystemCreator kLinuxSoundSystemCreators[
+#ifdef HAVE_LIBPULSE
+ 2
+#else
+ 1
+#endif
+ ];
+
+// The vast majority of Linux systems use ALSA for the device-level sound API,
+// but an increasing number are using PulseAudio for the application API and
+// only using ALSA internally in PulseAudio itself. But like everything on
+// Linux this is user-configurable, so we need to support both and choose the
+// right one at run-time.
+// PulseAudioSoundSystem is designed to only successfully initialize if
+// PulseAudio is installed and running, and if it is running then direct device
+// access using ALSA typically won't work, so if PulseAudioSoundSystem
+// initializes then we choose that. Otherwise we choose ALSA.
+typedef AutomaticallyChosenSoundSystem<
+ kLinuxSoundSystemCreators,
+ ARRAY_SIZE(kLinuxSoundSystemCreators)> LinuxSoundSystem;
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_LINUXSOUNDSYSTEM_H_
diff --git a/sound/nullsoundsystem.cc b/sound/nullsoundsystem.cc
new file mode 100644
index 0000000..962f410
--- /dev/null
+++ b/sound/nullsoundsystem.cc
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/nullsoundsystem.h"
+
+#include "webrtc/sound/sounddevicelocator.h"
+#include "webrtc/sound/soundinputstreaminterface.h"
+#include "webrtc/sound/soundoutputstreaminterface.h"
+#include "webrtc/base/logging.h"
+
+namespace rtc {
+
+class Thread;
+
+}
+
+namespace rtc {
+
+// Name used for the single device and the sound system itself.
+static const char kNullName[] = "null";
+
+class NullSoundDeviceLocator : public SoundDeviceLocator {
+ public:
+ NullSoundDeviceLocator() : SoundDeviceLocator(kNullName, kNullName) {}
+
+ virtual SoundDeviceLocator *Copy() const {
+ return new NullSoundDeviceLocator();
+ }
+};
+
+class NullSoundInputStream : public SoundInputStreamInterface {
+ public:
+ virtual bool StartReading() {
+ return true;
+ }
+
+ virtual bool StopReading() {
+ return true;
+ }
+
+ virtual bool GetVolume(int *volume) {
+ *volume = SoundSystemInterface::kMinVolume;
+ return true;
+ }
+
+ virtual bool SetVolume(int volume) {
+ return false;
+ }
+
+ virtual bool Close() {
+ return true;
+ }
+
+ virtual int LatencyUsecs() {
+ return 0;
+ }
+};
+
+class NullSoundOutputStream : public SoundOutputStreamInterface {
+ public:
+ virtual bool EnableBufferMonitoring() {
+ return true;
+ }
+
+ virtual bool DisableBufferMonitoring() {
+ return true;
+ }
+
+ virtual bool WriteSamples(const void *sample_data,
+ size_t size) {
+ LOG(LS_VERBOSE) << "Got " << size << " bytes of playback samples";
+ return true;
+ }
+
+ virtual bool GetVolume(int *volume) {
+ *volume = SoundSystemInterface::kMinVolume;
+ return true;
+ }
+
+ virtual bool SetVolume(int volume) {
+ return false;
+ }
+
+ virtual bool Close() {
+ return true;
+ }
+
+ virtual int LatencyUsecs() {
+ return 0;
+ }
+};
+
+NullSoundSystem::~NullSoundSystem() {
+}
+
+bool NullSoundSystem::Init() {
+ return true;
+}
+
+void NullSoundSystem::Terminate() {
+ // Nothing to do.
+}
+
+bool NullSoundSystem::EnumeratePlaybackDevices(
+ SoundSystemInterface::SoundDeviceLocatorList *devices) {
+ ClearSoundDeviceLocatorList(devices);
+ SoundDeviceLocator *device;
+ GetDefaultPlaybackDevice(&device);
+ devices->push_back(device);
+ return true;
+}
+
+bool NullSoundSystem::EnumerateCaptureDevices(
+ SoundSystemInterface::SoundDeviceLocatorList *devices) {
+ ClearSoundDeviceLocatorList(devices);
+ SoundDeviceLocator *device;
+ GetDefaultCaptureDevice(&device);
+ devices->push_back(device);
+ return true;
+}
+
+bool NullSoundSystem::GetDefaultPlaybackDevice(
+ SoundDeviceLocator **device) {
+ *device = new NullSoundDeviceLocator();
+ return true;
+}
+
+bool NullSoundSystem::GetDefaultCaptureDevice(
+ SoundDeviceLocator **device) {
+ *device = new NullSoundDeviceLocator();
+ return true;
+}
+
+SoundOutputStreamInterface *NullSoundSystem::OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return new NullSoundOutputStream();
+}
+
+SoundInputStreamInterface *NullSoundSystem::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return new NullSoundInputStream();
+}
+
+const char *NullSoundSystem::GetName() const {
+ return kNullName;
+}
+
+} // namespace rtc
diff --git a/sound/nullsoundsystem.h b/sound/nullsoundsystem.h
new file mode 100644
index 0000000..6b74997
--- /dev/null
+++ b/sound/nullsoundsystem.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_NULLSOUNDSYSTEM_H_
+#define WEBRTC_SOUND_NULLSOUNDSYSTEM_H_
+
+#include "webrtc/sound/soundsysteminterface.h"
+
+namespace rtc {
+
+class SoundDeviceLocator;
+class SoundInputStreamInterface;
+class SoundOutputStreamInterface;
+
+// A simple reference sound system that drops output samples and generates
+// no input samples.
+class NullSoundSystem : public SoundSystemInterface {
+ public:
+ static SoundSystemInterface *Create() {
+ return new NullSoundSystem();
+ }
+
+ virtual ~NullSoundSystem();
+
+ virtual bool Init();
+ virtual void Terminate();
+
+ virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices);
+ virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices);
+
+ virtual SoundOutputStreamInterface *OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+
+ virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device);
+ virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device);
+
+ virtual const char *GetName() const;
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_NULLSOUNDSYSTEM_H_
diff --git a/sound/nullsoundsystemfactory.cc b/sound/nullsoundsystemfactory.cc
new file mode 100644
index 0000000..f35b6e7
--- /dev/null
+++ b/sound/nullsoundsystemfactory.cc
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/nullsoundsystemfactory.h"
+
+#include "webrtc/sound/nullsoundsystem.h"
+
+namespace rtc {
+
+NullSoundSystemFactory::NullSoundSystemFactory() {
+}
+
+NullSoundSystemFactory::~NullSoundSystemFactory() {
+}
+
+bool NullSoundSystemFactory::SetupInstance() {
+ instance_.reset(new NullSoundSystem());
+ return true;
+}
+
+void NullSoundSystemFactory::CleanupInstance() {
+ instance_.reset();
+}
+
+} // namespace rtc
diff --git a/sound/nullsoundsystemfactory.h b/sound/nullsoundsystemfactory.h
new file mode 100644
index 0000000..8bdb463
--- /dev/null
+++ b/sound/nullsoundsystemfactory.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_NULLSOUNDSYSTEMFACTORY_H_
+#define WEBRTC_SOUND_NULLSOUNDSYSTEMFACTORY_H_
+
+#include "webrtc/sound/soundsystemfactory.h"
+
+namespace rtc {
+
+// A SoundSystemFactory that always returns a NullSoundSystem. Intended for
+// testing.
+class NullSoundSystemFactory : public SoundSystemFactory {
+ public:
+ NullSoundSystemFactory();
+ virtual ~NullSoundSystemFactory();
+
+ protected:
+ // Inherited from SoundSystemFactory.
+ virtual bool SetupInstance();
+ virtual void CleanupInstance();
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_NULLSOUNDSYSTEMFACTORY_H_
diff --git a/sound/platformsoundsystem.cc b/sound/platformsoundsystem.cc
new file mode 100644
index 0000000..e4d7102
--- /dev/null
+++ b/sound/platformsoundsystem.cc
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/platformsoundsystem.h"
+
+#include "webrtc/base/common.h"
+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
+#include "webrtc/sound/linuxsoundsystem.h"
+#else
+#include "webrtc/sound/nullsoundsystem.h"
+#endif
+
+namespace rtc {
+
+SoundSystemInterface *CreatePlatformSoundSystem() {
+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
+ return new LinuxSoundSystem();
+#else
+ ASSERT(false && "Not implemented");
+ return new NullSoundSystem();
+#endif
+}
+
+} // namespace rtc
diff --git a/sound/platformsoundsystem.h b/sound/platformsoundsystem.h
new file mode 100644
index 0000000..40eff26
--- /dev/null
+++ b/sound/platformsoundsystem.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_PLATFORMSOUNDSYSTEM_H_
+#define WEBRTC_SOUND_PLATFORMSOUNDSYSTEM_H_
+
+namespace rtc {
+
+class SoundSystemInterface;
+
+// Creates the sound system implementation for this platform.
+SoundSystemInterface *CreatePlatformSoundSystem();
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_PLATFORMSOUNDSYSTEM_H_
diff --git a/sound/platformsoundsystemfactory.cc b/sound/platformsoundsystemfactory.cc
new file mode 100644
index 0000000..a229236
--- /dev/null
+++ b/sound/platformsoundsystemfactory.cc
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/platformsoundsystemfactory.h"
+
+#include "webrtc/sound/platformsoundsystem.h"
+#include "webrtc/sound/soundsysteminterface.h"
+
+namespace rtc {
+
+PlatformSoundSystemFactory::PlatformSoundSystemFactory() {
+}
+
+PlatformSoundSystemFactory::~PlatformSoundSystemFactory() {
+}
+
+bool PlatformSoundSystemFactory::SetupInstance() {
+ if (!instance_.get()) {
+ instance_.reset(CreatePlatformSoundSystem());
+ }
+ if (!instance_->Init()) {
+ LOG(LS_ERROR) << "Can't initialize platform's sound system";
+ return false;
+ }
+ return true;
+}
+
+void PlatformSoundSystemFactory::CleanupInstance() {
+ instance_->Terminate();
+ // We do not delete the sound system because we might be re-initialized soon.
+}
+
+} // namespace rtc
diff --git a/sound/platformsoundsystemfactory.h b/sound/platformsoundsystemfactory.h
new file mode 100644
index 0000000..c5105ef
--- /dev/null
+++ b/sound/platformsoundsystemfactory.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_PLATFORMSOUNDSYSTEMFACTORY_H_
+#define WEBRTC_SOUND_PLATFORMSOUNDSYSTEMFACTORY_H_
+
+#include "webrtc/sound/soundsystemfactory.h"
+
+namespace rtc {
+
+// A SoundSystemFactory that returns the platform's native sound system
+// implementation.
+class PlatformSoundSystemFactory : public SoundSystemFactory {
+ public:
+ PlatformSoundSystemFactory();
+ virtual ~PlatformSoundSystemFactory();
+
+ protected:
+ // Inherited from SoundSystemFactory.
+ virtual bool SetupInstance();
+ virtual void CleanupInstance();
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_PLATFORMSOUNDSYSTEMFACTORY_H_
+
+
diff --git a/sound/pulseaudiosoundsystem.cc b/sound/pulseaudiosoundsystem.cc
new file mode 100644
index 0000000..e063e17
--- /dev/null
+++ b/sound/pulseaudiosoundsystem.cc
@@ -0,0 +1,1542 @@
+/*
+ * Copyright 2010 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/pulseaudiosoundsystem.h"
+
+#ifdef HAVE_LIBPULSE
+
+#include "webrtc/sound/sounddevicelocator.h"
+#include "webrtc/sound/soundinputstreaminterface.h"
+#include "webrtc/sound/soundoutputstreaminterface.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/fileutils.h" // for GetApplicationName()
+#include "webrtc/base/logging.h"
+#include "webrtc/base/timeutils.h"
+#include "webrtc/base/worker.h"
+
+namespace rtc {
+
+// First PulseAudio protocol version that supports PA_STREAM_ADJUST_LATENCY.
+static const uint32_t kAdjustLatencyProtocolVersion = 13;
+
+// Lookup table from the rtc format enum in soundsysteminterface.h to
+// Pulse's enums.
+static const pa_sample_format_t kCricketFormatToPulseFormatTable[] = {
+ // The order here must match the order in soundsysteminterface.h
+ PA_SAMPLE_S16LE,
+};
+
+// Some timing constants for optimal operation. See
+// https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-January/001170.html
+// for a good explanation of some of the factors that go into this.
+
+// Playback.
+
+// For playback, there is a round-trip delay to fill the server-side playback
+// buffer, so setting too low of a latency is a buffer underflow risk. We will
+// automatically increase the latency if a buffer underflow does occur, but we
+// also enforce a sane minimum at start-up time. Anything lower would be
+// virtually guaranteed to underflow at least once, so there's no point in
+// allowing lower latencies.
+static const int kPlaybackLatencyMinimumMsecs = 20;
+// Every time a playback stream underflows, we will reconfigure it with target
+// latency that is greater by this amount.
+static const int kPlaybackLatencyIncrementMsecs = 20;
+// We also need to configure a suitable request size. Too small and we'd burn
+// CPU from the overhead of transfering small amounts of data at once. Too large
+// and the amount of data remaining in the buffer right before refilling it
+// would be a buffer underflow risk. We set it to half of the buffer size.
+static const int kPlaybackRequestFactor = 2;
+
+// Capture.
+
+// For capture, low latency is not a buffer overflow risk, but it makes us burn
+// CPU from the overhead of transfering small amounts of data at once, so we set
+// a recommended value that we use for the kLowLatency constant (but if the user
+// explicitly requests something lower then we will honour it).
+// 1ms takes about 6-7% CPU. 5ms takes about 5%. 10ms takes about 4.x%.
+static const int kLowCaptureLatencyMsecs = 10;
+// There is a round-trip delay to ack the data to the server, so the
+// server-side buffer needs extra space to prevent buffer overflow. 20ms is
+// sufficient, but there is no penalty to making it bigger, so we make it huge.
+// (750ms is libpulse's default value for the _total_ buffer size in the
+// kNoLatencyRequirements case.)
+static const int kCaptureBufferExtraMsecs = 750;
+
+static void FillPlaybackBufferAttr(int latency,
+ pa_buffer_attr *attr) {
+ attr->maxlength = latency;
+ attr->tlength = latency;
+ attr->minreq = latency / kPlaybackRequestFactor;
+ attr->prebuf = attr->tlength - attr->minreq;
+ LOG(LS_VERBOSE) << "Configuring latency = " << attr->tlength << ", minreq = "
+ << attr->minreq << ", minfill = " << attr->prebuf;
+}
+
+static pa_volume_t CricketVolumeToPulseVolume(int volume) {
+ // PA's volume space goes from 0% at PA_VOLUME_MUTED (value 0) to 100% at
+ // PA_VOLUME_NORM (value 0x10000). It can also go beyond 100% up to
+ // PA_VOLUME_MAX (value UINT32_MAX-1), but using that is probably unwise.
+ // We just linearly map the 0-255 scale of SoundSystemInterface onto
+ // PA_VOLUME_MUTED-PA_VOLUME_NORM. If the programmer exceeds kMaxVolume then
+ // they can access the over-100% features of PA.
+ return PA_VOLUME_MUTED + (PA_VOLUME_NORM - PA_VOLUME_MUTED) *
+ volume / SoundSystemInterface::kMaxVolume;
+}
+
+static int PulseVolumeToCricketVolume(pa_volume_t pa_volume) {
+ return SoundSystemInterface::kMinVolume +
+ (SoundSystemInterface::kMaxVolume - SoundSystemInterface::kMinVolume) *
+ pa_volume / PA_VOLUME_NORM;
+}
+
+static pa_volume_t MaxChannelVolume(pa_cvolume *channel_volumes) {
+ pa_volume_t pa_volume = PA_VOLUME_MUTED; // Minimum possible value.
+ for (int i = 0; i < channel_volumes->channels; ++i) {
+ if (pa_volume < channel_volumes->values[i]) {
+ pa_volume = channel_volumes->values[i];
+ }
+ }
+ return pa_volume;
+}
+
+class PulseAudioDeviceLocator : public SoundDeviceLocator {
+ public:
+ PulseAudioDeviceLocator(const std::string &name,
+ const std::string &device_name)
+ : SoundDeviceLocator(name, device_name) {
+ }
+
+ virtual SoundDeviceLocator *Copy() const {
+ return new PulseAudioDeviceLocator(*this);
+ }
+};
+
+// Functionality that is common to both PulseAudioInputStream and
+// PulseAudioOutputStream.
+class PulseAudioStream {
+ public:
+ PulseAudioStream(PulseAudioSoundSystem *pulse, pa_stream *stream, int flags)
+ : pulse_(pulse), stream_(stream), flags_(flags) {
+ }
+
+ ~PulseAudioStream() {
+ // Close() should have been called during the containing class's destructor.
+ ASSERT(stream_ == NULL);
+ }
+
+ // Must be called with the lock held.
+ bool Close() {
+ if (!IsClosed()) {
+ // Unset this here so that we don't get a TERMINATED callback.
+ symbol_table()->pa_stream_set_state_callback()(stream_, NULL, NULL);
+ if (symbol_table()->pa_stream_disconnect()(stream_) != 0) {
+ LOG(LS_ERROR) << "Can't disconnect stream";
+ // Continue and return true anyways.
+ }
+ symbol_table()->pa_stream_unref()(stream_);
+ stream_ = NULL;
+ }
+ return true;
+ }
+
+ // Must be called with the lock held.
+ int LatencyUsecs() {
+ if (!(flags_ & SoundSystemInterface::FLAG_REPORT_LATENCY)) {
+ return 0;
+ }
+
+ pa_usec_t latency;
+ int negative;
+ Lock();
+ int re = symbol_table()->pa_stream_get_latency()(stream_, &latency,
+ &negative);
+ Unlock();
+ if (re != 0) {
+ LOG(LS_ERROR) << "Can't query latency";
+ // We'd rather continue playout/capture with an incorrect delay than stop
+ // it altogether, so return a valid value.
+ return 0;
+ }
+ if (negative) {
+ // The delay can be negative for monitoring streams if the captured
+ // samples haven't been played yet. In such a case, "latency" contains the
+ // magnitude, so we must negate it to get the real value.
+ return -latency;
+ } else {
+ return latency;
+ }
+ }
+
+ PulseAudioSoundSystem *pulse() {
+ return pulse_;
+ }
+
+ PulseAudioSymbolTable *symbol_table() {
+ return &pulse()->symbol_table_;
+ }
+
+ pa_stream *stream() {
+ ASSERT(stream_ != NULL);
+ return stream_;
+ }
+
+ bool IsClosed() {
+ return stream_ == NULL;
+ }
+
+ void Lock() {
+ pulse()->Lock();
+ }
+
+ void Unlock() {
+ pulse()->Unlock();
+ }
+
+ private:
+ PulseAudioSoundSystem *pulse_;
+ pa_stream *stream_;
+ int flags_;
+
+ DISALLOW_COPY_AND_ASSIGN(PulseAudioStream);
+};
+
+// Implementation of an input stream. See soundinputstreaminterface.h regarding
+// thread-safety.
+class PulseAudioInputStream :
+ public SoundInputStreamInterface,
+ private rtc::Worker {
+
+ struct GetVolumeCallbackData {
+ PulseAudioInputStream *instance;
+ pa_cvolume *channel_volumes;
+ };
+
+ struct GetSourceChannelCountCallbackData {
+ PulseAudioInputStream *instance;
+ uint8_t *channels;
+ };
+
+ public:
+ PulseAudioInputStream(PulseAudioSoundSystem *pulse,
+ pa_stream *stream,
+ int flags)
+ : stream_(pulse, stream, flags),
+ temp_sample_data_(NULL),
+ temp_sample_data_size_(0) {
+ // This callback seems to never be issued, but let's set it anyways.
+ symbol_table()->pa_stream_set_overflow_callback()(stream, &OverflowCallback,
+ NULL);
+ }
+
+ virtual ~PulseAudioInputStream() {
+ bool success = Close();
+ // We need that to live.
+ VERIFY(success);
+ }
+
+ virtual bool StartReading() {
+ return StartWork();
+ }
+
+ virtual bool StopReading() {
+ return StopWork();
+ }
+
+ virtual bool GetVolume(int *volume) {
+ bool ret = false;
+
+ Lock();
+
+ // Unlike output streams, input streams have no concept of a stream volume,
+ // only a device volume. So we have to retrieve the volume of the device
+ // itself.
+
+ pa_cvolume channel_volumes;
+
+ GetVolumeCallbackData data;
+ data.instance = this;
+ data.channel_volumes = &channel_volumes;
+
+ pa_operation *op = symbol_table()->pa_context_get_source_info_by_index()(
+ stream_.pulse()->context_,
+ symbol_table()->pa_stream_get_device_index()(stream_.stream()),
+ &GetVolumeCallbackThunk,
+ &data);
+ if (!stream_.pulse()->FinishOperation(op)) {
+ goto done;
+ }
+
+ if (data.channel_volumes) {
+ // This pointer was never unset by the callback, so we must have received
+ // an empty list of infos. This probably never happens, but we code for it
+ // anyway.
+ LOG(LS_ERROR) << "Did not receive GetVolumeCallback";
+ goto done;
+ }
+
+ // We now have the volume for each channel. Each channel could have a
+ // different volume if, e.g., the user went and changed the volumes in the
+ // PA UI. To get a single volume for SoundSystemInterface we just take the
+ // maximum. Ideally we'd do so with pa_cvolume_max, but it doesn't exist in
+ // Hardy, so we do it manually.
+ pa_volume_t pa_volume;
+ pa_volume = MaxChannelVolume(&channel_volumes);
+ // Now map onto the SoundSystemInterface range.
+ *volume = PulseVolumeToCricketVolume(pa_volume);
+
+ ret = true;
+ done:
+ Unlock();
+ return ret;
+ }
+
+ virtual bool SetVolume(int volume) {
+ bool ret = false;
+ pa_volume_t pa_volume = CricketVolumeToPulseVolume(volume);
+
+ Lock();
+
+ // Unlike output streams, input streams have no concept of a stream volume,
+ // only a device volume. So we have to change the volume of the device
+ // itself.
+
+ // The device may have a different number of channels than the stream and
+ // their mapping may be different, so we don't want to use the channel count
+ // from our sample spec. We could use PA_CHANNELS_MAX to cover our bases,
+ // and the server allows that even if the device's channel count is lower,
+ // but some buggy PA clients don't like that (the pavucontrol on Hardy dies
+ // in an assert if the channel count is different). So instead we look up
+ // the actual number of channels that the device has.
+
+ uint8_t channels;
+
+ GetSourceChannelCountCallbackData data;
+ data.instance = this;
+ data.channels = &channels;
+
+ uint32_t device_index = symbol_table()->pa_stream_get_device_index()(
+ stream_.stream());
+
+ pa_operation *op = symbol_table()->pa_context_get_source_info_by_index()(
+ stream_.pulse()->context_,
+ device_index,
+ &GetSourceChannelCountCallbackThunk,
+ &data);
+ if (!stream_.pulse()->FinishOperation(op)) {
+ goto done;
+ }
+
+ if (data.channels) {
+ // This pointer was never unset by the callback, so we must have received
+ // an empty list of infos. This probably never happens, but we code for it
+ // anyway.
+ LOG(LS_ERROR) << "Did not receive GetSourceChannelCountCallback";
+ goto done;
+ }
+
+ pa_cvolume channel_volumes;
+ symbol_table()->pa_cvolume_set()(&channel_volumes, channels, pa_volume);
+
+ op = symbol_table()->pa_context_set_source_volume_by_index()(
+ stream_.pulse()->context_,
+ device_index,
+ &channel_volumes,
+ // This callback merely logs errors.
+ &SetVolumeCallback,
+ NULL);
+ if (!op) {
+ LOG(LS_ERROR) << "pa_context_set_source_volume_by_index()";
+ goto done;
+ }
+ // Don't need to wait for this to complete.
+ symbol_table()->pa_operation_unref()(op);
+
+ ret = true;
+ done:
+ Unlock();
+ return ret;
+ }
+
+ virtual bool Close() {
+ if (!StopReading()) {
+ return false;
+ }
+ bool ret = true;
+ if (!stream_.IsClosed()) {
+ Lock();
+ ret = stream_.Close();
+ Unlock();
+ }
+ return ret;
+ }
+
+ virtual int LatencyUsecs() {
+ return stream_.LatencyUsecs();
+ }
+
+ private:
+ void Lock() {
+ stream_.Lock();
+ }
+
+ void Unlock() {
+ stream_.Unlock();
+ }
+
+ PulseAudioSymbolTable *symbol_table() {
+ return stream_.symbol_table();
+ }
+
+ void EnableReadCallback() {
+ symbol_table()->pa_stream_set_read_callback()(
+ stream_.stream(),
+ &ReadCallbackThunk,
+ this);
+ }
+
+ void DisableReadCallback() {
+ symbol_table()->pa_stream_set_read_callback()(
+ stream_.stream(),
+ NULL,
+ NULL);
+ }
+
+ static void ReadCallbackThunk(pa_stream *unused1,
+ size_t unused2,
+ void *userdata) {
+ PulseAudioInputStream *instance =
+ static_cast<PulseAudioInputStream *>(userdata);
+ instance->OnReadCallback();
+ }
+
+ void OnReadCallback() {
+ // We get the data pointer and size now in order to save one Lock/Unlock
+ // on OnMessage.
+ if (symbol_table()->pa_stream_peek()(stream_.stream(),
+ &temp_sample_data_,
+ &temp_sample_data_size_) != 0) {
+ LOG(LS_ERROR) << "Can't read data!";
+ return;
+ }
+ // Since we consume the data asynchronously on a different thread, we have
+ // to temporarily disable the read callback or else Pulse will call it
+ // continuously until we consume the data. We re-enable it below.
+ DisableReadCallback();
+ HaveWork();
+ }
+
+ // Inherited from Worker.
+ virtual void OnStart() {
+ Lock();
+ EnableReadCallback();
+ Unlock();
+ }
+
+ // Inherited from Worker.
+ virtual void OnHaveWork() {
+ ASSERT(temp_sample_data_ && temp_sample_data_size_);
+ SignalSamplesRead(temp_sample_data_,
+ temp_sample_data_size_,
+ this);
+ temp_sample_data_ = NULL;
+ temp_sample_data_size_ = 0;
+
+ Lock();
+ for (;;) {
+ // Ack the last thing we read.
+ if (symbol_table()->pa_stream_drop()(stream_.stream()) != 0) {
+ LOG(LS_ERROR) << "Can't ack read data";
+ }
+
+ if (symbol_table()->pa_stream_readable_size()(stream_.stream()) <= 0) {
+ // Then that was all the data.
+ break;
+ }
+
+ // Else more data.
+ const void *sample_data;
+ size_t sample_data_size;
+ if (symbol_table()->pa_stream_peek()(stream_.stream(),
+ &sample_data,
+ &sample_data_size) != 0) {
+ LOG(LS_ERROR) << "Can't read data!";
+ break;
+ }
+
+ // Drop lock for sigslot dispatch, which could take a while.
+ Unlock();
+ SignalSamplesRead(sample_data, sample_data_size, this);
+ Lock();
+
+ // Return to top of loop for the ack and the check for more data.
+ }
+ EnableReadCallback();
+ Unlock();
+ }
+
+ // Inherited from Worker.
+ virtual void OnStop() {
+ Lock();
+ DisableReadCallback();
+ Unlock();
+ }
+
+ static void OverflowCallback(pa_stream *stream,
+ void *userdata) {
+ LOG(LS_WARNING) << "Buffer overflow on capture stream " << stream;
+ }
+
+ static void GetVolumeCallbackThunk(pa_context *unused,
+ const pa_source_info *info,
+ int eol,
+ void *userdata) {
+ GetVolumeCallbackData *data =
+ static_cast<GetVolumeCallbackData *>(userdata);
+ data->instance->OnGetVolumeCallback(info, eol, &data->channel_volumes);
+ }
+
+ void OnGetVolumeCallback(const pa_source_info *info,
+ int eol,
+ pa_cvolume **channel_volumes) {
+ if (eol) {
+ // List is over. Wake GetVolume().
+ stream_.pulse()->Signal();
+ return;
+ }
+
+ if (*channel_volumes) {
+ **channel_volumes = info->volume;
+ // Unset the pointer so that we know that we have have already copied the
+ // volume.
+ *channel_volumes = NULL;
+ } else {
+ // We have received an additional callback after the first one, which
+ // doesn't make sense for a single source. This probably never happens,
+ // but we code for it anyway.
+ LOG(LS_WARNING) << "Ignoring extra GetVolumeCallback";
+ }
+ }
+
+ static void GetSourceChannelCountCallbackThunk(pa_context *unused,
+ const pa_source_info *info,
+ int eol,
+ void *userdata) {
+ GetSourceChannelCountCallbackData *data =
+ static_cast<GetSourceChannelCountCallbackData *>(userdata);
+ data->instance->OnGetSourceChannelCountCallback(info, eol, &data->channels);
+ }
+
+ void OnGetSourceChannelCountCallback(const pa_source_info *info,
+ int eol,
+ uint8_t **channels) {
+ if (eol) {
+ // List is over. Wake SetVolume().
+ stream_.pulse()->Signal();
+ return;
+ }
+
+ if (*channels) {
+ **channels = info->channel_map.channels;
+ // Unset the pointer so that we know that we have have already copied the
+ // channel count.
+ *channels = NULL;
+ } else {
+ // We have received an additional callback after the first one, which
+ // doesn't make sense for a single source. This probably never happens,
+ // but we code for it anyway.
+ LOG(LS_WARNING) << "Ignoring extra GetSourceChannelCountCallback";
+ }
+ }
+
+ static void SetVolumeCallback(pa_context *unused1,
+ int success,
+ void *unused2) {
+ if (!success) {
+ LOG(LS_ERROR) << "Failed to change capture volume";
+ }
+ }
+
+ PulseAudioStream stream_;
+ // Temporary storage for passing data between threads.
+ const void *temp_sample_data_;
+ size_t temp_sample_data_size_;
+
+ DISALLOW_COPY_AND_ASSIGN(PulseAudioInputStream);
+};
+
+// Implementation of an output stream. See soundoutputstreaminterface.h
+// regarding thread-safety.
+class PulseAudioOutputStream :
+ public SoundOutputStreamInterface,
+ private rtc::Worker {
+
+ struct GetVolumeCallbackData {
+ PulseAudioOutputStream *instance;
+ pa_cvolume *channel_volumes;
+ };
+
+ public:
+ PulseAudioOutputStream(PulseAudioSoundSystem *pulse,
+ pa_stream *stream,
+ int flags,
+ int latency)
+ : stream_(pulse, stream, flags),
+ configured_latency_(latency),
+ temp_buffer_space_(0) {
+ symbol_table()->pa_stream_set_underflow_callback()(stream,
+ &UnderflowCallbackThunk,
+ this);
+ }
+
+ virtual ~PulseAudioOutputStream() {
+ bool success = Close();
+ // We need that to live.
+ VERIFY(success);
+ }
+
+ virtual bool EnableBufferMonitoring() {
+ return StartWork();
+ }
+
+ virtual bool DisableBufferMonitoring() {
+ return StopWork();
+ }
+
+ virtual bool WriteSamples(const void *sample_data,
+ size_t size) {
+ bool ret = true;
+ Lock();
+ if (symbol_table()->pa_stream_write()(stream_.stream(),
+ sample_data,
+ size,
+ NULL,
+ 0,
+ PA_SEEK_RELATIVE) != 0) {
+ LOG(LS_ERROR) << "Unable to write";
+ ret = false;
+ }
+ Unlock();
+ return ret;
+ }
+
+ virtual bool GetVolume(int *volume) {
+ bool ret = false;
+
+ Lock();
+
+ pa_cvolume channel_volumes;
+
+ GetVolumeCallbackData data;
+ data.instance = this;
+ data.channel_volumes = &channel_volumes;
+
+ pa_operation *op = symbol_table()->pa_context_get_sink_input_info()(
+ stream_.pulse()->context_,
+ symbol_table()->pa_stream_get_index()(stream_.stream()),
+ &GetVolumeCallbackThunk,
+ &data);
+ if (!stream_.pulse()->FinishOperation(op)) {
+ goto done;
+ }
+
+ if (data.channel_volumes) {
+ // This pointer was never unset by the callback, so we must have received
+ // an empty list of infos. This probably never happens, but we code for it
+ // anyway.
+ LOG(LS_ERROR) << "Did not receive GetVolumeCallback";
+ goto done;
+ }
+
+ // We now have the volume for each channel. Each channel could have a
+ // different volume if, e.g., the user went and changed the volumes in the
+ // PA UI. To get a single volume for SoundSystemInterface we just take the
+ // maximum. Ideally we'd do so with pa_cvolume_max, but it doesn't exist in
+ // Hardy, so we do it manually.
+ pa_volume_t pa_volume;
+ pa_volume = MaxChannelVolume(&channel_volumes);
+ // Now map onto the SoundSystemInterface range.
+ *volume = PulseVolumeToCricketVolume(pa_volume);
+
+ ret = true;
+ done:
+ Unlock();
+ return ret;
+ }
+
+ virtual bool SetVolume(int volume) {
+ bool ret = false;
+ pa_volume_t pa_volume = CricketVolumeToPulseVolume(volume);
+
+ Lock();
+
+ const pa_sample_spec *spec = symbol_table()->pa_stream_get_sample_spec()(
+ stream_.stream());
+ if (!spec) {
+ LOG(LS_ERROR) << "pa_stream_get_sample_spec()";
+ goto done;
+ }
+
+ pa_cvolume channel_volumes;
+ symbol_table()->pa_cvolume_set()(&channel_volumes, spec->channels,
+ pa_volume);
+
+ pa_operation *op;
+ op = symbol_table()->pa_context_set_sink_input_volume()(
+ stream_.pulse()->context_,
+ symbol_table()->pa_stream_get_index()(stream_.stream()),
+ &channel_volumes,
+ // This callback merely logs errors.
+ &SetVolumeCallback,
+ NULL);
+ if (!op) {
+ LOG(LS_ERROR) << "pa_context_set_sink_input_volume()";
+ goto done;
+ }
+ // Don't need to wait for this to complete.
+ symbol_table()->pa_operation_unref()(op);
+
+ ret = true;
+ done:
+ Unlock();
+ return ret;
+ }
+
+ virtual bool Close() {
+ if (!DisableBufferMonitoring()) {
+ return false;
+ }
+ bool ret = true;
+ if (!stream_.IsClosed()) {
+ Lock();
+ symbol_table()->pa_stream_set_underflow_callback()(stream_.stream(),
+ NULL,
+ NULL);
+ ret = stream_.Close();
+ Unlock();
+ }
+ return ret;
+ }
+
+ virtual int LatencyUsecs() {
+ return stream_.LatencyUsecs();
+ }
+
+#if 0
+ // TODO: Versions 0.9.16 and later of Pulse have a new API for
+ // zero-copy writes, but Hardy is not new enough to have that so we can't
+ // rely on it. Perhaps auto-detect if it's present or not and use it if we
+ // can?
+
+ virtual bool GetWriteBuffer(void **buffer, size_t *size) {
+ bool ret = true;
+ Lock();
+ if (symbol_table()->pa_stream_begin_write()(stream_.stream(), buffer, size)
+ != 0) {
+ LOG(LS_ERROR) << "Can't get write buffer";
+ ret = false;
+ }
+ Unlock();
+ return ret;
+ }
+
+ // Releases the caller's hold on the write buffer. "written" must be the
+ // amount of data that was written.
+ virtual bool ReleaseWriteBuffer(void *buffer, size_t written) {
+ bool ret = true;
+ Lock();
+ if (written == 0) {
+ if (symbol_table()->pa_stream_cancel_write()(stream_.stream()) != 0) {
+ LOG(LS_ERROR) << "Can't cancel write";
+ ret = false;
+ }
+ } else {
+ if (symbol_table()->pa_stream_write()(stream_.stream(),
+ buffer,
+ written,
+ NULL,
+ 0,
+ PA_SEEK_RELATIVE) != 0) {
+ LOG(LS_ERROR) << "Unable to write";
+ ret = false;
+ }
+ }
+ Unlock();
+ return ret;
+ }
+#endif
+
+ private:
+ void Lock() {
+ stream_.Lock();
+ }
+
+ void Unlock() {
+ stream_.Unlock();
+ }
+
+ PulseAudioSymbolTable *symbol_table() {
+ return stream_.symbol_table();
+ }
+
+ void EnableWriteCallback() {
+ pa_stream_state_t state = symbol_table()->pa_stream_get_state()(
+ stream_.stream());
+ if (state == PA_STREAM_READY) {
+ // May already have available space. Must check.
+ temp_buffer_space_ = symbol_table()->pa_stream_writable_size()(
+ stream_.stream());
+ if (temp_buffer_space_ > 0) {
+ // Yup, there is already space available, so if we register a write
+ // callback then it will not receive any event. So dispatch one ourself
+ // instead.
+ HaveWork();
+ return;
+ }
+ }
+ symbol_table()->pa_stream_set_write_callback()(
+ stream_.stream(),
+ &WriteCallbackThunk,
+ this);
+ }
+
+ void DisableWriteCallback() {
+ symbol_table()->pa_stream_set_write_callback()(
+ stream_.stream(),
+ NULL,
+ NULL);
+ }
+
+ static void WriteCallbackThunk(pa_stream *unused,
+ size_t buffer_space,
+ void *userdata) {
+ PulseAudioOutputStream *instance =
+ static_cast<PulseAudioOutputStream *>(userdata);
+ instance->OnWriteCallback(buffer_space);
+ }
+
+ void OnWriteCallback(size_t buffer_space) {
+ temp_buffer_space_ = buffer_space;
+ // Since we write the data asynchronously on a different thread, we have
+ // to temporarily disable the write callback or else Pulse will call it
+ // continuously until we write the data. We re-enable it below.
+ DisableWriteCallback();
+ HaveWork();
+ }
+
+ // Inherited from Worker.
+ virtual void OnStart() {
+ Lock();
+ EnableWriteCallback();
+ Unlock();
+ }
+
+ // Inherited from Worker.
+ virtual void OnHaveWork() {
+ ASSERT(temp_buffer_space_ > 0);
+
+ SignalBufferSpace(temp_buffer_space_, this);
+
+ temp_buffer_space_ = 0;
+ Lock();
+ EnableWriteCallback();
+ Unlock();
+ }
+
+ // Inherited from Worker.
+ virtual void OnStop() {
+ Lock();
+ DisableWriteCallback();
+ Unlock();
+ }
+
+ static void UnderflowCallbackThunk(pa_stream *unused,
+ void *userdata) {
+ PulseAudioOutputStream *instance =
+ static_cast<PulseAudioOutputStream *>(userdata);
+ instance->OnUnderflowCallback();
+ }
+
+ void OnUnderflowCallback() {
+ LOG(LS_WARNING) << "Buffer underflow on playback stream "
+ << stream_.stream();
+
+ if (configured_latency_ == SoundSystemInterface::kNoLatencyRequirements) {
+ // We didn't configure a pa_buffer_attr before, so switching to one now
+ // would be questionable.
+ return;
+ }
+
+ // Otherwise reconfigure the stream with a higher target latency.
+
+ const pa_sample_spec *spec = symbol_table()->pa_stream_get_sample_spec()(
+ stream_.stream());
+ if (!spec) {
+ LOG(LS_ERROR) << "pa_stream_get_sample_spec()";
+ return;
+ }
+
+ size_t bytes_per_sec = symbol_table()->pa_bytes_per_second()(spec);
+
+ int new_latency = configured_latency_ +
+ bytes_per_sec * kPlaybackLatencyIncrementMsecs /
+ rtc::kNumMicrosecsPerSec;
+
+ pa_buffer_attr new_attr = {0};
+ FillPlaybackBufferAttr(new_latency, &new_attr);
+
+ pa_operation *op = symbol_table()->pa_stream_set_buffer_attr()(
+ stream_.stream(),
+ &new_attr,
+ // No callback.
+ NULL,
+ NULL);
+ if (!op) {
+ LOG(LS_ERROR) << "pa_stream_set_buffer_attr()";
+ return;
+ }
+ // Don't need to wait for this to complete.
+ symbol_table()->pa_operation_unref()(op);
+
+ // Save the new latency in case we underflow again.
+ configured_latency_ = new_latency;
+ }
+
+ static void GetVolumeCallbackThunk(pa_context *unused,
+ const pa_sink_input_info *info,
+ int eol,
+ void *userdata) {
+ GetVolumeCallbackData *data =
+ static_cast<GetVolumeCallbackData *>(userdata);
+ data->instance->OnGetVolumeCallback(info, eol, &data->channel_volumes);
+ }
+
+ void OnGetVolumeCallback(const pa_sink_input_info *info,
+ int eol,
+ pa_cvolume **channel_volumes) {
+ if (eol) {
+ // List is over. Wake GetVolume().
+ stream_.pulse()->Signal();
+ return;
+ }
+
+ if (*channel_volumes) {
+ **channel_volumes = info->volume;
+ // Unset the pointer so that we know that we have have already copied the
+ // volume.
+ *channel_volumes = NULL;
+ } else {
+ // We have received an additional callback after the first one, which
+ // doesn't make sense for a single sink input. This probably never
+ // happens, but we code for it anyway.
+ LOG(LS_WARNING) << "Ignoring extra GetVolumeCallback";
+ }
+ }
+
+ static void SetVolumeCallback(pa_context *unused1,
+ int success,
+ void *unused2) {
+ if (!success) {
+ LOG(LS_ERROR) << "Failed to change playback volume";
+ }
+ }
+
+ PulseAudioStream stream_;
+ int configured_latency_;
+ // Temporary storage for passing data between threads.
+ size_t temp_buffer_space_;
+
+ DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream);
+};
+
+PulseAudioSoundSystem::PulseAudioSoundSystem()
+ : mainloop_(NULL), context_(NULL) {
+}
+
+PulseAudioSoundSystem::~PulseAudioSoundSystem() {
+ Terminate();
+}
+
+bool PulseAudioSoundSystem::Init() {
+ if (IsInitialized()) {
+ return true;
+ }
+
+ // Load libpulse.
+ if (!symbol_table_.Load()) {
+ // Most likely the Pulse library and sound server are not installed on
+ // this system.
+ LOG(LS_WARNING) << "Failed to load symbol table";
+ return false;
+ }
+
+ // Now create and start the Pulse event thread.
+ mainloop_ = symbol_table_.pa_threaded_mainloop_new()();
+ if (!mainloop_) {
+ LOG(LS_ERROR) << "Can't create mainloop";
+ goto fail0;
+ }
+
+ if (symbol_table_.pa_threaded_mainloop_start()(mainloop_) != 0) {
+ LOG(LS_ERROR) << "Can't start mainloop";
+ goto fail1;
+ }
+
+ Lock();
+ context_ = CreateNewConnection();
+ Unlock();
+
+ if (!context_) {
+ goto fail2;
+ }
+
+ // Otherwise we're now ready!
+ return true;
+
+ fail2:
+ symbol_table_.pa_threaded_mainloop_stop()(mainloop_);
+ fail1:
+ symbol_table_.pa_threaded_mainloop_free()(mainloop_);
+ mainloop_ = NULL;
+ fail0:
+ return false;
+}
+
+void PulseAudioSoundSystem::Terminate() {
+ if (!IsInitialized()) {
+ return;
+ }
+
+ Lock();
+ symbol_table_.pa_context_disconnect()(context_);
+ symbol_table_.pa_context_unref()(context_);
+ Unlock();
+ context_ = NULL;
+ symbol_table_.pa_threaded_mainloop_stop()(mainloop_);
+ symbol_table_.pa_threaded_mainloop_free()(mainloop_);
+ mainloop_ = NULL;
+
+ // We do not unload the symbol table because we may need it again soon if
+ // Init() is called again.
+}
+
+bool PulseAudioSoundSystem::EnumeratePlaybackDevices(
+ SoundDeviceLocatorList *devices) {
+ return EnumerateDevices<pa_sink_info>(
+ devices,
+ symbol_table_.pa_context_get_sink_info_list(),
+ &EnumeratePlaybackDevicesCallbackThunk);
+}
+
+bool PulseAudioSoundSystem::EnumerateCaptureDevices(
+ SoundDeviceLocatorList *devices) {
+ return EnumerateDevices<pa_source_info>(
+ devices,
+ symbol_table_.pa_context_get_source_info_list(),
+ &EnumerateCaptureDevicesCallbackThunk);
+}
+
+bool PulseAudioSoundSystem::GetDefaultPlaybackDevice(
+ SoundDeviceLocator **device) {
+ return GetDefaultDevice<&pa_server_info::default_sink_name>(device);
+}
+
+bool PulseAudioSoundSystem::GetDefaultCaptureDevice(
+ SoundDeviceLocator **device) {
+ return GetDefaultDevice<&pa_server_info::default_source_name>(device);
+}
+
+SoundOutputStreamInterface *PulseAudioSoundSystem::OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return OpenDevice<SoundOutputStreamInterface>(
+ device,
+ params,
+ "Playback",
+ &PulseAudioSoundSystem::ConnectOutputStream);
+}
+
+SoundInputStreamInterface *PulseAudioSoundSystem::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return OpenDevice<SoundInputStreamInterface>(
+ device,
+ params,
+ "Capture",
+ &PulseAudioSoundSystem::ConnectInputStream);
+}
+
+const char *PulseAudioSoundSystem::GetName() const {
+ return "PulseAudio";
+}
+
+inline bool PulseAudioSoundSystem::IsInitialized() {
+ return mainloop_ != NULL;
+}
+
+struct ConnectToPulseCallbackData {
+ PulseAudioSoundSystem *instance;
+ bool connect_done;
+};
+
+void PulseAudioSoundSystem::ConnectToPulseCallbackThunk(
+ pa_context *context, void *userdata) {
+ ConnectToPulseCallbackData *data =
+ static_cast<ConnectToPulseCallbackData *>(userdata);
+ data->instance->OnConnectToPulseCallback(context, &data->connect_done);
+}
+
+void PulseAudioSoundSystem::OnConnectToPulseCallback(
+ pa_context *context, bool *connect_done) {
+ pa_context_state_t state = symbol_table_.pa_context_get_state()(context);
+ if (state == PA_CONTEXT_READY ||
+ state == PA_CONTEXT_FAILED ||
+ state == PA_CONTEXT_TERMINATED) {
+ // Connection process has reached a terminal state. Wake ConnectToPulse().
+ *connect_done = true;
+ Signal();
+ }
+}
+
+// Must be called with the lock held.
+bool PulseAudioSoundSystem::ConnectToPulse(pa_context *context) {
+ bool ret = true;
+ ConnectToPulseCallbackData data;
+ // Have to put this up here to satisfy the compiler.
+ pa_context_state_t state;
+
+ data.instance = this;
+ data.connect_done = false;
+
+ symbol_table_.pa_context_set_state_callback()(context,
+ &ConnectToPulseCallbackThunk,
+ &data);
+
+ // Connect to PulseAudio sound server.
+ if (symbol_table_.pa_context_connect()(
+ context,
+ NULL, // Default server
+ PA_CONTEXT_NOAUTOSPAWN,
+ NULL) != 0) { // No special fork handling needed
+ LOG(LS_ERROR) << "Can't start connection to PulseAudio sound server";
+ ret = false;
+ goto done;
+ }
+
+ // Wait for the connection state machine to reach a terminal state.
+ do {
+ Wait();
+ } while (!data.connect_done);
+
+ // Now check to see what final state we reached.
+ state = symbol_table_.pa_context_get_state()(context);
+
+ if (state != PA_CONTEXT_READY) {
+ if (state == PA_CONTEXT_FAILED) {
+ LOG(LS_ERROR) << "Failed to connect to PulseAudio sound server";
+ } else if (state == PA_CONTEXT_TERMINATED) {
+ LOG(LS_ERROR) << "PulseAudio connection terminated early";
+ } else {
+ // Shouldn't happen, because we only signal on one of those three states.
+ LOG(LS_ERROR) << "Unknown problem connecting to PulseAudio";
+ }
+ ret = false;
+ }
+
+ done:
+ // We unset our callback for safety just in case the state might somehow
+ // change later, because the pointer to "data" will be invalid after return
+ // from this function.
+ symbol_table_.pa_context_set_state_callback()(context, NULL, NULL);
+ return ret;
+}
+
+// Must be called with the lock held.
+pa_context *PulseAudioSoundSystem::CreateNewConnection() {
+ // Create connection context.
+ std::string app_name;
+ // TODO: Pulse etiquette says this name should be localized. Do
+ // we care?
+ rtc::Filesystem::GetApplicationName(&app_name);
+ pa_context *context = symbol_table_.pa_context_new()(
+ symbol_table_.pa_threaded_mainloop_get_api()(mainloop_),
+ app_name.c_str());
+ if (!context) {
+ LOG(LS_ERROR) << "Can't create context";
+ goto fail0;
+ }
+
+ // Now connect.
+ if (!ConnectToPulse(context)) {
+ goto fail1;
+ }
+
+ // Otherwise the connection succeeded and is ready.
+ return context;
+
+ fail1:
+ symbol_table_.pa_context_unref()(context);
+ fail0:
+ return NULL;
+}
+
+struct EnumerateDevicesCallbackData {
+ PulseAudioSoundSystem *instance;
+ SoundSystemInterface::SoundDeviceLocatorList *devices;
+};
+
+void PulseAudioSoundSystem::EnumeratePlaybackDevicesCallbackThunk(
+ pa_context *unused,
+ const pa_sink_info *info,
+ int eol,
+ void *userdata) {
+ EnumerateDevicesCallbackData *data =
+ static_cast<EnumerateDevicesCallbackData *>(userdata);
+ data->instance->OnEnumeratePlaybackDevicesCallback(data->devices, info, eol);
+}
+
+void PulseAudioSoundSystem::EnumerateCaptureDevicesCallbackThunk(
+ pa_context *unused,
+ const pa_source_info *info,
+ int eol,
+ void *userdata) {
+ EnumerateDevicesCallbackData *data =
+ static_cast<EnumerateDevicesCallbackData *>(userdata);
+ data->instance->OnEnumerateCaptureDevicesCallback(data->devices, info, eol);
+}
+
+void PulseAudioSoundSystem::OnEnumeratePlaybackDevicesCallback(
+ SoundDeviceLocatorList *devices,
+ const pa_sink_info *info,
+ int eol) {
+ if (eol) {
+ // List is over. Wake EnumerateDevices().
+ Signal();
+ return;
+ }
+
+ // Else this is the next device.
+ devices->push_back(
+ new PulseAudioDeviceLocator(info->description, info->name));
+}
+
+void PulseAudioSoundSystem::OnEnumerateCaptureDevicesCallback(
+ SoundDeviceLocatorList *devices,
+ const pa_source_info *info,
+ int eol) {
+ if (eol) {
+ // List is over. Wake EnumerateDevices().
+ Signal();
+ return;
+ }
+
+ if (info->monitor_of_sink != PA_INVALID_INDEX) {
+ // We don't want to list monitor sources, since they are almost certainly
+ // not what the user wants for voice conferencing.
+ return;
+ }
+
+ // Else this is the next device.
+ devices->push_back(
+ new PulseAudioDeviceLocator(info->description, info->name));
+}
+
+template <typename InfoStruct>
+bool PulseAudioSoundSystem::EnumerateDevices(
+ SoundDeviceLocatorList *devices,
+ pa_operation *(*enumerate_fn)(
+ pa_context *c,
+ void (*callback_fn)(
+ pa_context *c,
+ const InfoStruct *i,
+ int eol,
+ void *userdata),
+ void *userdata),
+ void (*callback_fn)(
+ pa_context *c,
+ const InfoStruct *i,
+ int eol,
+ void *userdata)) {
+ ClearSoundDeviceLocatorList(devices);
+ if (!IsInitialized()) {
+ return false;
+ }
+
+ EnumerateDevicesCallbackData data;
+ data.instance = this;
+ data.devices = devices;
+
+ Lock();
+ pa_operation *op = (*enumerate_fn)(
+ context_,
+ callback_fn,
+ &data);
+ bool ret = FinishOperation(op);
+ Unlock();
+ return ret;
+}
+
+struct GetDefaultDeviceCallbackData {
+ PulseAudioSoundSystem *instance;
+ SoundDeviceLocator **device;
+};
+
+template <const char *(pa_server_info::*field)>
+void PulseAudioSoundSystem::GetDefaultDeviceCallbackThunk(
+ pa_context *unused,
+ const pa_server_info *info,
+ void *userdata) {
+ GetDefaultDeviceCallbackData *data =
+ static_cast<GetDefaultDeviceCallbackData *>(userdata);
+ data->instance->OnGetDefaultDeviceCallback<field>(info, data->device);
+}
+
+template <const char *(pa_server_info::*field)>
+void PulseAudioSoundSystem::OnGetDefaultDeviceCallback(
+ const pa_server_info *info,
+ SoundDeviceLocator **device) {
+ if (info) {
+ const char *dev = info->*field;
+ if (dev) {
+ *device = new PulseAudioDeviceLocator("Default device", dev);
+ }
+ }
+ Signal();
+}
+
+template <const char *(pa_server_info::*field)>
+bool PulseAudioSoundSystem::GetDefaultDevice(SoundDeviceLocator **device) {
+ if (!IsInitialized()) {
+ return false;
+ }
+ bool ret;
+ *device = NULL;
+ GetDefaultDeviceCallbackData data;
+ data.instance = this;
+ data.device = device;
+ Lock();
+ pa_operation *op = symbol_table_.pa_context_get_server_info()(
+ context_,
+ &GetDefaultDeviceCallbackThunk<field>,
+ &data);
+ ret = FinishOperation(op);
+ Unlock();
+ return ret && (*device != NULL);
+}
+
+void PulseAudioSoundSystem::StreamStateChangedCallbackThunk(
+ pa_stream *stream,
+ void *userdata) {
+ PulseAudioSoundSystem *instance =
+ static_cast<PulseAudioSoundSystem *>(userdata);
+ instance->OnStreamStateChangedCallback(stream);
+}
+
+void PulseAudioSoundSystem::OnStreamStateChangedCallback(pa_stream *stream) {
+ pa_stream_state_t state = symbol_table_.pa_stream_get_state()(stream);
+ if (state == PA_STREAM_READY) {
+ LOG(LS_INFO) << "Pulse stream " << stream << " ready";
+ } else if (state == PA_STREAM_FAILED ||
+ state == PA_STREAM_TERMINATED ||
+ state == PA_STREAM_UNCONNECTED) {
+ LOG(LS_ERROR) << "Pulse stream " << stream << " failed to connect: "
+ << LastError();
+ }
+}
+
+template <typename StreamInterface>
+StreamInterface *PulseAudioSoundSystem::OpenDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms,
+ const char *stream_name,
+ StreamInterface *(PulseAudioSoundSystem::*connect_fn)(
+ pa_stream *stream,
+ const char *dev,
+ int flags,
+ pa_stream_flags_t pa_flags,
+ int latency,
+ const pa_sample_spec &spec)) {
+ if (!IsInitialized()) {
+ return NULL;
+ }
+
+ const char *dev = static_cast<const PulseAudioDeviceLocator *>(device)->
+ device_name().c_str();
+
+ StreamInterface *stream_interface = NULL;
+
+ ASSERT(params.format < ARRAY_SIZE(kCricketFormatToPulseFormatTable));
+
+ pa_sample_spec spec;
+ spec.format = kCricketFormatToPulseFormatTable[params.format];
+ spec.rate = params.freq;
+ spec.channels = params.channels;
+
+ int pa_flags = 0;
+ if (params.flags & FLAG_REPORT_LATENCY) {
+ pa_flags |= PA_STREAM_INTERPOLATE_TIMING |
+ PA_STREAM_AUTO_TIMING_UPDATE;
+ }
+
+ if (params.latency != kNoLatencyRequirements) {
+ // If configuring a specific latency then we want to specify
+ // PA_STREAM_ADJUST_LATENCY to make the server adjust parameters
+ // automatically to reach that target latency. However, that flag doesn't
+ // exist in Ubuntu 8.04 and many people still use that, so we have to check
+ // the protocol version of libpulse.
+ if (symbol_table_.pa_context_get_protocol_version()(context_) >=
+ kAdjustLatencyProtocolVersion) {
+ pa_flags |= PA_STREAM_ADJUST_LATENCY;
+ }
+ }
+
+ Lock();
+
+ pa_stream *stream = symbol_table_.pa_stream_new()(context_, stream_name,
+ &spec, NULL);
+ if (!stream) {
+ LOG(LS_ERROR) << "Can't create pa_stream";
+ goto done;
+ }
+
+ // Set a state callback to log errors.
+ symbol_table_.pa_stream_set_state_callback()(stream,
+ &StreamStateChangedCallbackThunk,
+ this);
+
+ stream_interface = (this->*connect_fn)(
+ stream,
+ dev,
+ params.flags,
+ static_cast<pa_stream_flags_t>(pa_flags),
+ params.latency,
+ spec);
+ if (!stream_interface) {
+ LOG(LS_ERROR) << "Can't connect stream to " << dev;
+ symbol_table_.pa_stream_unref()(stream);
+ }
+
+ done:
+ Unlock();
+ return stream_interface;
+}
+
+// Must be called with the lock held.
+SoundOutputStreamInterface *PulseAudioSoundSystem::ConnectOutputStream(
+ pa_stream *stream,
+ const char *dev,
+ int flags,
+ pa_stream_flags_t pa_flags,
+ int latency,
+ const pa_sample_spec &spec) {
+ pa_buffer_attr attr = {0};
+ pa_buffer_attr *pattr = NULL;
+ if (latency != kNoLatencyRequirements) {
+ // kLowLatency is 0, so we treat it the same as a request for zero latency.
+ ssize_t bytes_per_sec = symbol_table_.pa_bytes_per_second()(&spec);
+ latency = rtc::_max(
+ latency,
+ static_cast<int>(
+ bytes_per_sec * kPlaybackLatencyMinimumMsecs /
+ rtc::kNumMicrosecsPerSec));
+ FillPlaybackBufferAttr(latency, &attr);
+ pattr = &attr;
+ }
+ if (symbol_table_.pa_stream_connect_playback()(
+ stream,
+ dev,
+ pattr,
+ pa_flags,
+ // Let server choose volume
+ NULL,
+ // Not synchronized to any other playout
+ NULL) != 0) {
+ return NULL;
+ }
+ return new PulseAudioOutputStream(this, stream, flags, latency);
+}
+
+// Must be called with the lock held.
+SoundInputStreamInterface *PulseAudioSoundSystem::ConnectInputStream(
+ pa_stream *stream,
+ const char *dev,
+ int flags,
+ pa_stream_flags_t pa_flags,
+ int latency,
+ const pa_sample_spec &spec) {
+ pa_buffer_attr attr = {0};
+ pa_buffer_attr *pattr = NULL;
+ if (latency != kNoLatencyRequirements) {
+ size_t bytes_per_sec = symbol_table_.pa_bytes_per_second()(&spec);
+ if (latency == kLowLatency) {
+ latency = bytes_per_sec * kLowCaptureLatencyMsecs /
+ rtc::kNumMicrosecsPerSec;
+ }
+ // Note: fragsize specifies a maximum transfer size, not a minimum, so it is
+ // not possible to force a high latency setting, only a low one.
+ attr.fragsize = latency;
+ attr.maxlength = latency + bytes_per_sec * kCaptureBufferExtraMsecs /
+ rtc::kNumMicrosecsPerSec;
+ LOG(LS_VERBOSE) << "Configuring latency = " << attr.fragsize
+ << ", maxlength = " << attr.maxlength;
+ pattr = &attr;
+ }
+ if (symbol_table_.pa_stream_connect_record()(stream,
+ dev,
+ pattr,
+ pa_flags) != 0) {
+ return NULL;
+ }
+ return new PulseAudioInputStream(this, stream, flags);
+}
+
+// Must be called with the lock held.
+bool PulseAudioSoundSystem::FinishOperation(pa_operation *op) {
+ if (!op) {
+ LOG(LS_ERROR) << "Failed to start operation";
+ return false;
+ }
+
+ do {
+ Wait();
+ } while (symbol_table_.pa_operation_get_state()(op) == PA_OPERATION_RUNNING);
+
+ symbol_table_.pa_operation_unref()(op);
+
+ return true;
+}
+
+inline void PulseAudioSoundSystem::Lock() {
+ symbol_table_.pa_threaded_mainloop_lock()(mainloop_);
+}
+
+inline void PulseAudioSoundSystem::Unlock() {
+ symbol_table_.pa_threaded_mainloop_unlock()(mainloop_);
+}
+
+// Must be called with the lock held.
+inline void PulseAudioSoundSystem::Wait() {
+ symbol_table_.pa_threaded_mainloop_wait()(mainloop_);
+}
+
+// Must be called with the lock held.
+inline void PulseAudioSoundSystem::Signal() {
+ symbol_table_.pa_threaded_mainloop_signal()(mainloop_, 0);
+}
+
+// Must be called with the lock held.
+const char *PulseAudioSoundSystem::LastError() {
+ return symbol_table_.pa_strerror()(symbol_table_.pa_context_errno()(
+ context_));
+}
+
+} // namespace rtc
+
+#endif // HAVE_LIBPULSE
diff --git a/sound/pulseaudiosoundsystem.h b/sound/pulseaudiosoundsystem.h
new file mode 100644
index 0000000..4e67acc
--- /dev/null
+++ b/sound/pulseaudiosoundsystem.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_PULSEAUDIOSOUNDSYSTEM_H_
+#define WEBRTC_SOUND_PULSEAUDIOSOUNDSYSTEM_H_
+
+#ifdef HAVE_LIBPULSE
+
+#include "webrtc/sound/pulseaudiosymboltable.h"
+#include "webrtc/sound/soundsysteminterface.h"
+#include "webrtc/base/constructormagic.h"
+
+namespace rtc {
+
+class PulseAudioInputStream;
+class PulseAudioOutputStream;
+class PulseAudioStream;
+
+// Sound system implementation for PulseAudio, a cross-platform sound server
+// (but commonly used only on Linux, which is the only platform we support
+// it on).
+// Init(), Terminate(), and the destructor should never be invoked concurrently,
+// but all other methods are thread-safe.
+class PulseAudioSoundSystem : public SoundSystemInterface {
+ friend class PulseAudioInputStream;
+ friend class PulseAudioOutputStream;
+ friend class PulseAudioStream;
+ public:
+ static SoundSystemInterface *Create() {
+ return new PulseAudioSoundSystem();
+ }
+
+ PulseAudioSoundSystem();
+
+ virtual ~PulseAudioSoundSystem();
+
+ virtual bool Init();
+ virtual void Terminate();
+
+ virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices);
+ virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices);
+
+ virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device);
+ virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device);
+
+ virtual SoundOutputStreamInterface *OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+
+ virtual const char *GetName() const;
+
+ private:
+ bool IsInitialized();
+
+ static void ConnectToPulseCallbackThunk(pa_context *context, void *userdata);
+
+ void OnConnectToPulseCallback(pa_context *context, bool *connect_done);
+
+ bool ConnectToPulse(pa_context *context);
+
+ pa_context *CreateNewConnection();
+
+ template <typename InfoStruct>
+ bool EnumerateDevices(SoundDeviceLocatorList *devices,
+ pa_operation *(*enumerate_fn)(
+ pa_context *c,
+ void (*callback_fn)(
+ pa_context *c,
+ const InfoStruct *i,
+ int eol,
+ void *userdata),
+ void *userdata),
+ void (*callback_fn)(
+ pa_context *c,
+ const InfoStruct *i,
+ int eol,
+ void *userdata));
+
+ static void EnumeratePlaybackDevicesCallbackThunk(pa_context *unused,
+ const pa_sink_info *info,
+ int eol,
+ void *userdata);
+
+ static void EnumerateCaptureDevicesCallbackThunk(pa_context *unused,
+ const pa_source_info *info,
+ int eol,
+ void *userdata);
+
+ void OnEnumeratePlaybackDevicesCallback(
+ SoundDeviceLocatorList *devices,
+ const pa_sink_info *info,
+ int eol);
+
+ void OnEnumerateCaptureDevicesCallback(
+ SoundDeviceLocatorList *devices,
+ const pa_source_info *info,
+ int eol);
+
+ template <const char *(pa_server_info::*field)>
+ static void GetDefaultDeviceCallbackThunk(
+ pa_context *unused,
+ const pa_server_info *info,
+ void *userdata);
+
+ template <const char *(pa_server_info::*field)>
+ void OnGetDefaultDeviceCallback(
+ const pa_server_info *info,
+ SoundDeviceLocator **device);
+
+ template <const char *(pa_server_info::*field)>
+ bool GetDefaultDevice(SoundDeviceLocator **device);
+
+ static void StreamStateChangedCallbackThunk(pa_stream *stream,
+ void *userdata);
+
+ void OnStreamStateChangedCallback(pa_stream *stream);
+
+ template <typename StreamInterface>
+ StreamInterface *OpenDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms,
+ const char *stream_name,
+ StreamInterface *(PulseAudioSoundSystem::*connect_fn)(
+ pa_stream *stream,
+ const char *dev,
+ int flags,
+ pa_stream_flags_t pa_flags,
+ int latency,
+ const pa_sample_spec &spec));
+
+ SoundOutputStreamInterface *ConnectOutputStream(
+ pa_stream *stream,
+ const char *dev,
+ int flags,
+ pa_stream_flags_t pa_flags,
+ int latency,
+ const pa_sample_spec &spec);
+
+ SoundInputStreamInterface *ConnectInputStream(
+ pa_stream *stream,
+ const char *dev,
+ int flags,
+ pa_stream_flags_t pa_flags,
+ int latency,
+ const pa_sample_spec &spec);
+
+ bool FinishOperation(pa_operation *op);
+
+ void Lock();
+ void Unlock();
+ void Wait();
+ void Signal();
+
+ const char *LastError();
+
+ pa_threaded_mainloop *mainloop_;
+ pa_context *context_;
+ PulseAudioSymbolTable symbol_table_;
+
+ DISALLOW_COPY_AND_ASSIGN(PulseAudioSoundSystem);
+};
+
+} // namespace rtc
+
+#endif // HAVE_LIBPULSE
+
+#endif // WEBRTC_SOUND_PULSEAUDIOSOUNDSYSTEM_H_
diff --git a/sound/pulseaudiosymboltable.cc b/sound/pulseaudiosymboltable.cc
new file mode 100644
index 0000000..7dd073f
--- /dev/null
+++ b/sound/pulseaudiosymboltable.cc
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifdef HAVE_LIBPULSE
+
+#include "webrtc/sound/pulseaudiosymboltable.h"
+
+namespace rtc {
+
+#define LATE_BINDING_SYMBOL_TABLE_CLASS_NAME PULSE_AUDIO_SYMBOLS_CLASS_NAME
+#define LATE_BINDING_SYMBOL_TABLE_SYMBOLS_LIST PULSE_AUDIO_SYMBOLS_LIST
+#define LATE_BINDING_SYMBOL_TABLE_DLL_NAME "libpulse.so.0"
+#include "webrtc/base/latebindingsymboltable.cc.def"
+
+} // namespace rtc
+
+#endif // HAVE_LIBPULSE
diff --git a/sound/pulseaudiosymboltable.h b/sound/pulseaudiosymboltable.h
new file mode 100644
index 0000000..35e9523
--- /dev/null
+++ b/sound/pulseaudiosymboltable.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_PULSEAUDIOSYMBOLTABLE_H_
+#define WEBRTC_SOUND_PULSEAUDIOSYMBOLTABLE_H_
+
+#include <pulse/context.h>
+#include <pulse/def.h>
+#include <pulse/error.h>
+#include <pulse/introspect.h>
+#include <pulse/stream.h>
+#include <pulse/thread-mainloop.h>
+
+#include "webrtc/base/latebindingsymboltable.h"
+
+namespace rtc {
+
+#define PULSE_AUDIO_SYMBOLS_CLASS_NAME PulseAudioSymbolTable
+// The PulseAudio symbols we need, as an X-Macro list.
+// This list must contain precisely every libpulse function that is used in
+// pulseaudiosoundsystem.cc.
+#define PULSE_AUDIO_SYMBOLS_LIST \
+ X(pa_bytes_per_second) \
+ X(pa_context_connect) \
+ X(pa_context_disconnect) \
+ X(pa_context_errno) \
+ X(pa_context_get_protocol_version) \
+ X(pa_context_get_server_info) \
+ X(pa_context_get_sink_info_list) \
+ X(pa_context_get_sink_input_info) \
+ X(pa_context_get_source_info_by_index) \
+ X(pa_context_get_source_info_list) \
+ X(pa_context_get_state) \
+ X(pa_context_new) \
+ X(pa_context_set_sink_input_volume) \
+ X(pa_context_set_source_volume_by_index) \
+ X(pa_context_set_state_callback) \
+ X(pa_context_unref) \
+ X(pa_cvolume_set) \
+ X(pa_operation_get_state) \
+ X(pa_operation_unref) \
+ X(pa_stream_connect_playback) \
+ X(pa_stream_connect_record) \
+ X(pa_stream_disconnect) \
+ X(pa_stream_drop) \
+ X(pa_stream_get_device_index) \
+ X(pa_stream_get_index) \
+ X(pa_stream_get_latency) \
+ X(pa_stream_get_sample_spec) \
+ X(pa_stream_get_state) \
+ X(pa_stream_new) \
+ X(pa_stream_peek) \
+ X(pa_stream_readable_size) \
+ X(pa_stream_set_buffer_attr) \
+ X(pa_stream_set_overflow_callback) \
+ X(pa_stream_set_read_callback) \
+ X(pa_stream_set_state_callback) \
+ X(pa_stream_set_underflow_callback) \
+ X(pa_stream_set_write_callback) \
+ X(pa_stream_unref) \
+ X(pa_stream_writable_size) \
+ X(pa_stream_write) \
+ X(pa_strerror) \
+ X(pa_threaded_mainloop_free) \
+ X(pa_threaded_mainloop_get_api) \
+ X(pa_threaded_mainloop_lock) \
+ X(pa_threaded_mainloop_new) \
+ X(pa_threaded_mainloop_signal) \
+ X(pa_threaded_mainloop_start) \
+ X(pa_threaded_mainloop_stop) \
+ X(pa_threaded_mainloop_unlock) \
+ X(pa_threaded_mainloop_wait)
+
+#define LATE_BINDING_SYMBOL_TABLE_CLASS_NAME PULSE_AUDIO_SYMBOLS_CLASS_NAME
+#define LATE_BINDING_SYMBOL_TABLE_SYMBOLS_LIST PULSE_AUDIO_SYMBOLS_LIST
+#include "webrtc/base/latebindingsymboltable.h.def"
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_PULSEAUDIOSYMBOLTABLE_H_
diff --git a/sound/rtc_sound_unittest.isolate b/sound/rtc_sound_unittest.isolate
new file mode 100644
index 0000000..38a2acb
--- /dev/null
+++ b/sound/rtc_sound_unittest.isolate
@@ -0,0 +1,25 @@
+# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'conditions': [
+ ['OS=="linux" or OS=="mac" or OS=="win"', {
+ 'variables': {
+ 'command': [
+ '<(PRODUCT_DIR)/rtc_sound_unittest<(EXECUTABLE_SUFFIX)',
+ ],
+ 'isolate_dependency_tracked': [
+ '<(PRODUCT_DIR)/rtc_sound_unittest<(EXECUTABLE_SUFFIX)',
+ ],
+ 'isolate_dependency_untracked': [
+ '<(DEPTH)/tools/swarming_client/',
+ ],
+ },
+ }],
+ ],
+}
diff --git a/sound/sound.gyp b/sound/sound.gyp
new file mode 100644
index 0000000..a7d929b
--- /dev/null
+++ b/sound/sound.gyp
@@ -0,0 +1,55 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': [ '../build/common.gypi', ],
+ 'targets': [
+ {
+ 'target_name': 'rtc_sound',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(webrtc_root)/base/base.gyp:rtc_base',
+ ],
+ 'sources': [
+ 'automaticallychosensoundsystem.h',
+ 'nullsoundsystem.cc',
+ 'nullsoundsystem.h',
+ 'nullsoundsystemfactory.cc',
+ 'nullsoundsystemfactory.h',
+ 'platformsoundsystem.cc',
+ 'platformsoundsystem.h',
+ 'platformsoundsystemfactory.cc',
+ 'platformsoundsystemfactory.h',
+ 'sounddevicelocator.h',
+ 'soundinputstreaminterface.h',
+ 'soundoutputstreaminterface.h',
+ 'soundsystemfactory.h',
+ 'soundsysteminterface.cc',
+ 'soundsysteminterface.h',
+ 'soundsystemproxy.cc',
+ 'soundsystemproxy.h',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'sources': [
+ 'alsasoundsystem.cc',
+ 'alsasoundsystem.h',
+ 'alsasymboltable.cc',
+ 'alsasymboltable.h',
+ 'linuxsoundsystem.cc',
+ 'linuxsoundsystem.h',
+ 'pulseaudiosoundsystem.cc',
+ 'pulseaudiosoundsystem.h',
+ 'pulseaudiosymboltable.cc',
+ 'pulseaudiosymboltable.h',
+ ],
+ }],
+ ],
+ },
+ ],
+}
diff --git a/sound/sound_tests.gyp b/sound/sound_tests.gyp
new file mode 100644
index 0000000..3fe3574
--- /dev/null
+++ b/sound/sound_tests.gyp
@@ -0,0 +1,49 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': [ '../build/common.gypi', ],
+ 'targets': [
+ {
+ 'target_name': 'rtc_sound_unittest',
+ 'type': 'executable',
+ 'dependencies': [
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
+ '<(webrtc_root)/sound/sound.gyp:rtc_sound',
+ ],
+ 'cflags_cc!': [
+ '-Wnon-virtual-dtor',
+ ],
+ 'sources': [
+ 'automaticallychosensoundsystem_unittest.cc',
+ ],
+ },
+ ],
+ 'conditions': [
+ ['test_isolation_mode != "noop"', {
+ 'targets': [
+ {
+ 'target_name': 'rtc_sound_unittest_run',
+ 'type': 'none',
+ 'dependencies': [
+ 'rtc_sound_unittest',
+ ],
+ 'includes': [
+ '../build/isolate.gypi',
+ 'rtc_sound_unittest.isolate',
+ ],
+ 'sources': [
+ 'rtc_sound_unittest.isolate',
+ ],
+ },
+ ],
+ }],
+ ],
+}
+
diff --git a/sound/sounddevicelocator.h b/sound/sounddevicelocator.h
new file mode 100644
index 0000000..4e8e148
--- /dev/null
+++ b/sound/sounddevicelocator.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_SOUNDDEVICELOCATOR_H_
+#define WEBRTC_SOUND_SOUNDDEVICELOCATOR_H_
+
+#include <string>
+
+#include "webrtc/base/constructormagic.h"
+
+namespace rtc {
+
+// A simple container for holding the name of a device and any additional id
+// information needed to locate and open it. Implementations of
+// SoundSystemInterface must subclass this to add any id information that they
+// need.
+class SoundDeviceLocator {
+ public:
+ virtual ~SoundDeviceLocator() {}
+
+ // Human-readable name for the device.
+ const std::string &name() const { return name_; }
+
+ // Name sound system uses to locate this device.
+ const std::string &device_name() const { return device_name_; }
+
+ // Makes a duplicate of this locator.
+ virtual SoundDeviceLocator *Copy() const = 0;
+
+ protected:
+ SoundDeviceLocator(const std::string &name,
+ const std::string &device_name)
+ : name_(name), device_name_(device_name) {}
+
+ explicit SoundDeviceLocator(const SoundDeviceLocator &that)
+ : name_(that.name_), device_name_(that.device_name_) {}
+
+ std::string name_;
+ std::string device_name_;
+
+ private:
+ DISALLOW_ASSIGN(SoundDeviceLocator);
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDDEVICELOCATOR_H_
diff --git a/sound/soundinputstreaminterface.h b/sound/soundinputstreaminterface.h
new file mode 100644
index 0000000..6ce9446
--- /dev/null
+++ b/sound/soundinputstreaminterface.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_SOUNDINPUTSTREAMINTERFACE_H_
+#define WEBRTC_SOUND_SOUNDINPUTSTREAMINTERFACE_H_
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/sigslot.h"
+
+namespace rtc {
+
+// Interface for consuming an input stream from a recording device.
+// Semantics and thread-safety of StartReading()/StopReading() are the same as
+// for rtc::Worker.
+class SoundInputStreamInterface {
+ public:
+ virtual ~SoundInputStreamInterface() {}
+
+ // Starts the reading of samples on the current thread.
+ virtual bool StartReading() = 0;
+ // Stops the reading of samples.
+ virtual bool StopReading() = 0;
+
+ // Retrieves the current input volume for this stream. Nominal range is
+ // defined by SoundSystemInterface::k(Max|Min)Volume, but values exceeding the
+ // max may be possible in some implementations. This call retrieves the actual
+ // volume currently in use by the OS, not a cached value from a previous
+ // (Get|Set)Volume() call.
+ virtual bool GetVolume(int *volume) = 0;
+
+ // Changes the input volume for this stream. Nominal range is defined by
+ // SoundSystemInterface::k(Max|Min)Volume. The effect of exceeding kMaxVolume
+ // is implementation-defined.
+ virtual bool SetVolume(int volume) = 0;
+
+ // Closes this stream object. If currently reading then this may only be
+ // called from the reading thread.
+ virtual bool Close() = 0;
+
+ // Get the latency of the stream.
+ virtual int LatencyUsecs() = 0;
+
+ // Notifies the consumer of new data read from the device.
+ // The first parameter is a pointer to the data read, and is only valid for
+ // the duration of the call.
+ // The second parameter is the amount of data read in bytes (i.e., the valid
+ // length of the memory pointed to).
+ // The 3rd parameter is the stream that is issuing the callback.
+ sigslot::signal3<const void *, size_t,
+ SoundInputStreamInterface *> SignalSamplesRead;
+
+ protected:
+ SoundInputStreamInterface() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SoundInputStreamInterface);
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDOUTPUTSTREAMINTERFACE_H_
diff --git a/sound/soundoutputstreaminterface.h b/sound/soundoutputstreaminterface.h
new file mode 100644
index 0000000..2b501d6
--- /dev/null
+++ b/sound/soundoutputstreaminterface.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_SOUNDOUTPUTSTREAMINTERFACE_H_
+#define WEBRTC_SOUND_SOUNDOUTPUTSTREAMINTERFACE_H_
+
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/sigslot.h"
+
+namespace rtc {
+
+// Interface for outputting a stream to a playback device.
+// Semantics and thread-safety of EnableBufferMonitoring()/
+// DisableBufferMonitoring() are the same as for rtc::Worker.
+class SoundOutputStreamInterface {
+ public:
+ virtual ~SoundOutputStreamInterface() {}
+
+ // Enables monitoring the available buffer space on the current thread.
+ virtual bool EnableBufferMonitoring() = 0;
+ // Disables the monitoring.
+ virtual bool DisableBufferMonitoring() = 0;
+
+ // Write the given samples to the devices. If currently monitoring then this
+ // may only be called from the monitoring thread.
+ virtual bool WriteSamples(const void *sample_data,
+ size_t size) = 0;
+
+ // Retrieves the current output volume for this stream. Nominal range is
+ // defined by SoundSystemInterface::k(Max|Min)Volume, but values exceeding the
+ // max may be possible in some implementations. This call retrieves the actual
+ // volume currently in use by the OS, not a cached value from a previous
+ // (Get|Set)Volume() call.
+ virtual bool GetVolume(int *volume) = 0;
+
+ // Changes the output volume for this stream. Nominal range is defined by
+ // SoundSystemInterface::k(Max|Min)Volume. The effect of exceeding kMaxVolume
+ // is implementation-defined.
+ virtual bool SetVolume(int volume) = 0;
+
+ // Closes this stream object. If currently monitoring then this may only be
+ // called from the monitoring thread.
+ virtual bool Close() = 0;
+
+ // Get the latency of the stream.
+ virtual int LatencyUsecs() = 0;
+
+ // Notifies the producer of the available buffer space for writes.
+ // It fires continuously as long as the space is greater than zero.
+ // The first parameter is the amount of buffer space available for data to
+ // be written (i.e., the maximum amount of data that can be written right now
+ // with WriteSamples() without blocking).
+ // The 2nd parameter is the stream that is issuing the callback.
+ sigslot::signal2<size_t, SoundOutputStreamInterface *> SignalBufferSpace;
+
+ protected:
+ SoundOutputStreamInterface() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SoundOutputStreamInterface);
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDOUTPUTSTREAMINTERFACE_H_
diff --git a/sound/soundsystemfactory.h b/sound/soundsystemfactory.h
new file mode 100644
index 0000000..b86246c
--- /dev/null
+++ b/sound/soundsystemfactory.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_SOUNDSYSTEMFACTORY_H_
+#define WEBRTC_SOUND_SOUNDSYSTEMFACTORY_H_
+
+#include "webrtc/base/referencecountedsingletonfactory.h"
+
+namespace rtc {
+
+class SoundSystemInterface;
+
+typedef rtc::ReferenceCountedSingletonFactory<SoundSystemInterface>
+ SoundSystemFactory;
+
+typedef rtc::rcsf_ptr<SoundSystemInterface> SoundSystemHandle;
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDSYSTEMFACTORY_H_
diff --git a/sound/soundsysteminterface.cc b/sound/soundsysteminterface.cc
new file mode 100644
index 0000000..f1ee5a9
--- /dev/null
+++ b/sound/soundsysteminterface.cc
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/soundsysteminterface.h"
+
+#include "webrtc/sound/sounddevicelocator.h"
+
+namespace rtc {
+
+void SoundSystemInterface::ClearSoundDeviceLocatorList(
+ SoundSystemInterface::SoundDeviceLocatorList *devices) {
+ for (SoundDeviceLocatorList::iterator i = devices->begin();
+ i != devices->end();
+ ++i) {
+ if (*i) {
+ delete *i;
+ }
+ }
+ devices->clear();
+}
+
+} // namespace rtc
diff --git a/sound/soundsysteminterface.h b/sound/soundsysteminterface.h
new file mode 100644
index 0000000..aa9a53a
--- /dev/null
+++ b/sound/soundsysteminterface.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_SOUNDSYSTEMINTERFACE_H_
+#define WEBRTC_SOUND_SOUNDSYSTEMINTERFACE_H_
+
+#include <vector>
+
+#include "webrtc/base/constructormagic.h"
+
+namespace rtc {
+
+class SoundDeviceLocator;
+class SoundInputStreamInterface;
+class SoundOutputStreamInterface;
+
+// Interface for a platform's sound system.
+// Implementations must guarantee thread-safety for at least the following use
+// cases:
+// 1) Concurrent enumeration and opening of devices from different threads.
+// 2) Concurrent use of different Sound(Input|Output)StreamInterface
+// instances from different threads (but concurrent use of the _same_ one from
+// different threads need not be supported).
+class SoundSystemInterface {
+ public:
+ typedef std::vector<SoundDeviceLocator *> SoundDeviceLocatorList;
+
+ enum SampleFormat {
+ // Only one supported sample format at this time.
+ // The values here may be used in lookup tables, so they shouldn't change.
+ FORMAT_S16LE = 0,
+ };
+
+ enum Flags {
+ // Enable reporting the current stream latency in
+ // Sound(Input|Output)StreamInterface. See those classes for more details.
+ FLAG_REPORT_LATENCY = (1 << 0),
+ };
+
+ struct OpenParams {
+ // Format for the sound stream.
+ SampleFormat format;
+ // Sampling frequency in hertz.
+ unsigned int freq;
+ // Number of channels in the PCM stream.
+ unsigned int channels;
+ // Misc flags. Should be taken from the Flags enum above.
+ int flags;
+ // Desired latency, measured as number of bytes of sample data
+ int latency;
+ };
+
+ // Special values for the "latency" field of OpenParams.
+ // Use this one to say you don't care what the latency is. The sound system
+ // will optimize for other things instead.
+ static const int kNoLatencyRequirements = -1;
+ // Use this one to say that you want the sound system to pick an appropriate
+ // small latency value. The sound system may pick the minimum allowed one, or
+ // a slightly higher one in the event that the true minimum requires an
+ // undesirable trade-off.
+ static const int kLowLatency = 0;
+
+ // Max value for the volume parameters for Sound(Input|Output)StreamInterface.
+ static const int kMaxVolume = 255;
+ // Min value for the volume parameters for Sound(Input|Output)StreamInterface.
+ static const int kMinVolume = 0;
+
+ // Helper for clearing a locator list and deleting the entries.
+ static void ClearSoundDeviceLocatorList(SoundDeviceLocatorList *devices);
+
+ virtual ~SoundSystemInterface() {}
+
+ virtual bool Init() = 0;
+ virtual void Terminate() = 0;
+
+ // Enumerates the available devices. (Any pre-existing locators in the lists
+ // are deleted.)
+ virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices) = 0;
+ virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices) = 0;
+
+ // Gets a special locator for the default device.
+ virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device) = 0;
+ virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device) = 0;
+
+ // Opens the given device, or returns NULL on error.
+ virtual SoundOutputStreamInterface *OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) = 0;
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) = 0;
+
+ // A human-readable name for this sound system.
+ virtual const char *GetName() const = 0;
+
+ protected:
+ SoundSystemInterface() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SoundSystemInterface);
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDSYSTEMINTERFACE_H_
diff --git a/sound/soundsystemproxy.cc b/sound/soundsystemproxy.cc
new file mode 100644
index 0000000..e26a6bd
--- /dev/null
+++ b/sound/soundsystemproxy.cc
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/sound/soundsystemproxy.h"
+
+namespace rtc {
+
+bool SoundSystemProxy::EnumeratePlaybackDevices(
+ SoundDeviceLocatorList *devices) {
+ return wrapped_ ? wrapped_->EnumeratePlaybackDevices(devices) : false;
+}
+
+bool SoundSystemProxy::EnumerateCaptureDevices(
+ SoundDeviceLocatorList *devices) {
+ return wrapped_ ? wrapped_->EnumerateCaptureDevices(devices) : false;
+}
+
+bool SoundSystemProxy::GetDefaultPlaybackDevice(
+ SoundDeviceLocator **device) {
+ return wrapped_ ? wrapped_->GetDefaultPlaybackDevice(device) : false;
+}
+
+bool SoundSystemProxy::GetDefaultCaptureDevice(
+ SoundDeviceLocator **device) {
+ return wrapped_ ? wrapped_->GetDefaultCaptureDevice(device) : false;
+}
+
+SoundOutputStreamInterface *SoundSystemProxy::OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return wrapped_ ? wrapped_->OpenPlaybackDevice(device, params) : NULL;
+}
+
+SoundInputStreamInterface *SoundSystemProxy::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms) {
+ return wrapped_ ? wrapped_->OpenCaptureDevice(device, params) : NULL;
+}
+
+} // namespace rtc
diff --git a/sound/soundsystemproxy.h b/sound/soundsystemproxy.h
new file mode 100644
index 0000000..d13cf15
--- /dev/null
+++ b/sound/soundsystemproxy.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_
+#define WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_
+
+#include "webrtc/sound/soundsysteminterface.h"
+#include "webrtc/base/basictypes.h" // for NULL
+
+namespace rtc {
+
+// A SoundSystemProxy is a sound system that defers to another one.
+// Init(), Terminate(), and GetName() are left as pure virtual, so a sub-class
+// must define them.
+class SoundSystemProxy : public SoundSystemInterface {
+ public:
+ SoundSystemProxy() : wrapped_(NULL) {}
+
+ // Each of these methods simply defers to wrapped_ if non-NULL, else fails.
+
+ virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices);
+ virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices);
+
+ virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device);
+ virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device);
+
+ virtual SoundOutputStreamInterface *OpenPlaybackDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams ¶ms);
+
+ protected:
+ SoundSystemInterface *wrapped_;
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_
diff --git a/supplement.gypi b/supplement.gypi
index 2fad574..4bf8598 100644
--- a/supplement.gypi
+++ b/supplement.gypi
@@ -1,6 +1,26 @@
{
'variables': {
+ 'variables': {
+ 'webrtc_root%': '<(DEPTH)/webrtc',
+ },
+ 'webrtc_root%': '<(webrtc_root)',
'build_with_chromium': 0,
- 'use_sanitizer_options': 0,
- }
+ },
+ 'target_defaults': {
+ 'target_conditions': [
+ ['_target_name=="sanitizer_options"', {
+ 'conditions': [
+ ['tsan==1', {
+ # Replace Chromium's TSan v2 suppressions with our own for WebRTC.
+ 'sources/': [
+ ['exclude', 'tsan_suppressions.cc'],
+ ],
+ 'sources': [
+ '<(webrtc_root)/build/tsan_suppressions_webrtc.cc',
+ ],
+ }],
+ ],
+ }],
+ ],
+ },
}
diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn
new file mode 100644
index 0000000..262189c
--- /dev/null
+++ b/system_wrappers/BUILD.gn
@@ -0,0 +1,227 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("//build/config/android/config.gni")
+import("../build/webrtc.gni")
+
+config("system_wrappers_inherited_config") {
+ include_dirs = [
+ "interface",
+ ]
+}
+
+static_library("system_wrappers") {
+ sources = [
+ "interface/aligned_malloc.h",
+ "interface/atomic32.h",
+ "interface/clock.h",
+ "interface/compile_assert.h",
+ "interface/condition_variable_wrapper.h",
+ "interface/cpu_info.h",
+ "interface/cpu_features_wrapper.h",
+ "interface/critical_section_wrapper.h",
+ "interface/data_log.h",
+ "interface/data_log_c.h",
+ "interface/data_log_impl.h",
+ "interface/event_tracer.h",
+ "interface/event_wrapper.h",
+ "interface/field_trial.h",
+ "interface/file_wrapper.h",
+ "interface/fix_interlocked_exchange_pointer_win.h",
+ "interface/logging.h",
+ "interface/ref_count.h",
+ "interface/rtp_to_ntp.h",
+ "interface/rw_lock_wrapper.h",
+ "interface/scoped_ptr.h",
+ "interface/scoped_refptr.h",
+ "interface/scoped_vector.h",
+ "interface/sleep.h",
+ "interface/sort.h",
+ "interface/static_instance.h",
+ "interface/stl_util.h",
+ "interface/stringize_macros.h",
+ "interface/thread_wrapper.h",
+ "interface/tick_util.h",
+ "interface/timestamp_extrapolator.h",
+ "interface/trace.h",
+ "interface/trace_event.h",
+ "interface/utf_util_win.h",
+ "source/aligned_malloc.cc",
+ "source/atomic32_mac.cc",
+ "source/atomic32_win.cc",
+ "source/clock.cc",
+ "source/condition_variable.cc",
+ "source/condition_variable_posix.cc",
+ "source/condition_variable_posix.h",
+ "source/condition_variable_event_win.cc",
+ "source/condition_variable_event_win.h",
+ "source/condition_variable_native_win.cc",
+ "source/condition_variable_native_win.h",
+ "source/cpu_info.cc",
+ "source/cpu_features.cc",
+ "source/critical_section.cc",
+ "source/critical_section_posix.cc",
+ "source/critical_section_posix.h",
+ "source/critical_section_win.cc",
+ "source/critical_section_win.h",
+ "source/data_log_c.cc",
+ "source/event.cc",
+ "source/event_posix.cc",
+ "source/event_posix.h",
+ "source/event_tracer.cc",
+ "source/event_win.cc",
+ "source/event_win.h",
+ "source/file_impl.cc",
+ "source/file_impl.h",
+ "source/logging.cc",
+ "source/rtp_to_ntp.cc",
+ "source/rw_lock.cc",
+ "source/rw_lock_generic.cc",
+ "source/rw_lock_generic.h",
+ "source/rw_lock_posix.cc",
+ "source/rw_lock_posix.h",
+ "source/rw_lock_win.cc",
+ "source/rw_lock_win.h",
+ "source/set_thread_name_win.h",
+ "source/sleep.cc",
+ "source/sort.cc",
+ "source/tick_util.cc",
+ "source/thread.cc",
+ "source/thread_posix.cc",
+ "source/thread_posix.h",
+ "source/thread_win.cc",
+ "source/thread_win.h",
+ "source/timestamp_extrapolator.cc",
+ "source/trace_impl.cc",
+ "source/trace_impl.h",
+ "source/trace_posix.cc",
+ "source/trace_posix.h",
+ "source/trace_win.cc",
+ "source/trace_win.h",
+ ]
+
+ configs += [ "..:common_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ direct_dependent_configs = [
+ "..:common_inherited_config",
+ ":system_wrappers_inherited_config",
+ ]
+
+ if (rtc_enable_data_logging) {
+ sources += [ "source/data_log.cc" ]
+ } else {
+ sources += [ "source/data_log_no_op.cc" ]
+ }
+
+ defines = []
+ libs = []
+ deps = []
+
+ if (is_android) {
+ sources += [
+ "interface/logcat_trace_context.h",
+ "source/logcat_trace_context.cc",
+ ]
+
+ defines += [
+ "WEBRTC_THREAD_RR",
+ # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
+ # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
+ # remove it after I verify that CLOCK_MONOTONIC is fully functional
+ # with condition and event functions in system_wrappers.
+ "WEBRTC_CLOCK_TYPE_REALTIME",
+ ]
+
+ deps += [ ":cpu_features_android" ]
+
+ libs += [ "log" ]
+ }
+
+ if (is_linux) {
+ defines += [
+ "WEBRTC_THREAD_RR",
+ # TODO(andrew): can we select this automatically?
+ # Define this if the Linux system does not support CLOCK_MONOTONIC.
+ #"WEBRTC_CLOCK_TYPE_REALTIME",
+ ]
+
+ libs += [ "rt" ]
+ }
+
+ if (!is_mac && !is_ios) {
+ sources += [
+ "source/atomic32_posix.cc",
+ ]
+ }
+
+ if (is_ios || is_mac) {
+ defines += [
+ "WEBRTC_THREAD_RR",
+ "WEBRTC_CLOCK_TYPE_REALTIME",
+ ]
+ }
+
+ if (is_ios) {
+ sources += [
+ "source/atomic32_mac.cc",
+ ]
+ }
+
+ if (is_win) {
+ libs += [ "winmm.lib" ]
+
+ cflags = [
+ "/wd4267", # size_t to int truncation.
+ "/wd4334", # Ignore warning on shift operator promotion.
+ ]
+ }
+
+ include_dirs = [
+ "source/spreadsortlib",
+ ]
+
+ deps += [
+ "../base:rtc_base_approved",
+ ]
+}
+
+source_set("field_trial_default") {
+ sources = [
+ "source/field_trial_default.cc",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":system_wrappers",
+ ]
+}
+
+if (is_android) {
+ source_set("cpu_features_android") {
+ sources = [
+ "source/cpu_features_android.c",
+ ]
+
+ if (is_android_webview_build) {
+ libs += [ "cpufeatures.a" ]
+ } else {
+ deps = [ "//third_party/android_tools:cpu_features" ]
+ }
+ }
+}
diff --git a/system_wrappers/OWNERS b/system_wrappers/OWNERS
index 4091a93..14637b1 100644
--- a/system_wrappers/OWNERS
+++ b/system_wrappers/OWNERS
@@ -1,7 +1,8 @@
henrike@webrtc.org
-pwestin@webrtc.org
perkj@webrtc.org
henrika@webrtc.org
henrikg@webrtc.org
mflodman@webrtc.org
-niklas.enbom@webrtc.org
\ No newline at end of file
+niklas.enbom@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/system_wrappers/interface/clock.h b/system_wrappers/interface/clock.h
index c03f976..ed65006 100644
--- a/system_wrappers/interface/clock.h
+++ b/system_wrappers/interface/clock.h
@@ -11,14 +11,12 @@
#ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CLOCK_H_
#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CLOCK_H_
+#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
namespace webrtc {
-class RWLockWrapper;
-
// January 1970, in NTP seconds.
const uint32_t kNtpJan1970 = 2208988800UL;
@@ -78,7 +76,7 @@
void AdvanceTimeMicroseconds(int64_t microseconds);
private:
- int64_t time_us_ GUARDED_BY(lock_);
+ int64_t time_us_;
scoped_ptr<RWLockWrapper> lock_;
};
diff --git a/system_wrappers/interface/critical_section_wrapper.h b/system_wrappers/interface/critical_section_wrapper.h
index 4979b5c..e93a249 100644
--- a/system_wrappers/interface/critical_section_wrapper.h
+++ b/system_wrappers/interface/critical_section_wrapper.h
@@ -14,8 +14,8 @@
// If the critical section is heavily contended it may be beneficial to use
// read/write locks instead.
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
namespace webrtc {
class LOCKABLE CriticalSectionWrapper {
diff --git a/system_wrappers/interface/rw_lock_wrapper.h b/system_wrappers/interface/rw_lock_wrapper.h
index 91126e5..dbe6d6c 100644
--- a/system_wrappers/interface/rw_lock_wrapper.h
+++ b/system_wrappers/interface/rw_lock_wrapper.h
@@ -11,7 +11,7 @@
#ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_RW_LOCK_WRAPPER_H_
#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_RW_LOCK_WRAPPER_H_
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
+#include "webrtc/base/thread_annotations.h"
// Note, Windows pre-Vista version of RW locks are not supported natively. For
// these OSs regular critical sections have been used to approximate RW lock
diff --git a/system_wrappers/source/Android.mk b/system_wrappers/source/Android.mk
deleted file mode 100644
index 4767e72..0000000
--- a/system_wrappers/source/Android.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc_system_wrappers
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- cpu_features_android.c \
- sort.cc \
- aligned_malloc.cc \
- atomic32_posix.cc \
- condition_variable.cc \
- cpu_features.cc \
- cpu_info.cc \
- critical_section.cc \
- event.cc \
- event_tracer.cc \
- file_impl.cc \
- list_no_stl.cc \
- rw_lock.cc \
- thread.cc \
- trace_impl.cc \
- condition_variable_posix.cc \
- critical_section_posix.cc \
- event_posix.cc \
- rtp_to_ntp.cc \
- sleep.cc \
- thread_posix.cc \
- tick_util.cc \
- timestamp_extrapolator.cc \
- trace_posix.cc \
- rw_lock_posix.cc
-
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../.. \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/spreadsortlib \
- external/webrtc
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-LOCAL_STATIC_LIBRARIES := cpufeatures
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/system_wrappers/source/condition_variable_unittest.cc b/system_wrappers/source/condition_variable_unittest.cc
index 0d287b7..b5c1c36 100644
--- a/system_wrappers/source/condition_variable_unittest.cc
+++ b/system_wrappers/source/condition_variable_unittest.cc
@@ -14,13 +14,11 @@
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
#include "webrtc/system_wrappers/interface/trace.h"
-#include "webrtc/system_wrappers/source/unittest_utilities.h"
namespace webrtc {
namespace {
-const int kLogTrace = false; // Set to true to enable debug logging to stdout.
const int kLongWaitMs = 100 * 1000; // A long time in testing terms
const int kShortWaitMs = 2 * 1000; // Long enough for process switches to happen
@@ -143,9 +141,7 @@
class CondVarTest : public ::testing::Test {
public:
- CondVarTest()
- : trace_(kLogTrace) {
- }
+ CondVarTest() {}
virtual void SetUp() {
thread_ = ThreadWrapper::CreateThread(&WaitingRunFunction,
@@ -171,7 +167,6 @@
Baton baton_;
private:
- ScopedTracing trace_;
ThreadWrapper* thread_;
};
diff --git a/system_wrappers/source/cpu_features_android.target.darwin-arm.mk b/system_wrappers/source/cpu_features_android.target.darwin-arm.mk
index 1040b33..c05b9f5 100644
--- a/system_wrappers/source/cpu_features_android.target.darwin-arm.mk
+++ b/system_wrappers/source/cpu_features_android.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -133,23 +134,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,13 +165,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.darwin-arm64.mk b/system_wrappers/source/cpu_features_android.target.darwin-arm64.mk
index d4ca310..a0dd964 100644
--- a/system_wrappers/source/cpu_features_android.target.darwin-arm64.mk
+++ b/system_wrappers/source/cpu_features_android.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -79,12 +77,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -119,21 +120,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -165,7 +167,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -182,12 +183,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -223,54 +227,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.darwin-mips.mk b/system_wrappers/source/cpu_features_android.target.darwin-mips.mk
index d905611..e2641b6 100644
--- a/system_wrappers/source/cpu_features_android.target.darwin-mips.mk
+++ b/system_wrappers/source/cpu_features_android.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -40,13 +38,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -61,6 +56,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -68,7 +64,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,17 +80,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -127,23 +123,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -152,13 +149,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -180,7 +174,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,17 +190,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -240,59 +234,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.darwin-mips64.mk b/system_wrappers/source/cpu_features_android.target.darwin-mips64.mk
new file mode 100644
index 0000000..e2641b6
--- /dev/null
+++ b/system_wrappers/source/cpu_features_android.target.darwin-mips64.mk
@@ -0,0 +1,274 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/system_wrappers/source/cpu_features_android.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_STATIC_LIBRARIES := \
+ cpufeatures
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
+
+# Alias gyp target name.
+.PHONY: cpu_features_android
+cpu_features_android: third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/system_wrappers/source/cpu_features_android.target.darwin-x86.mk b/system_wrappers/source/cpu_features_android.target.darwin-x86.mk
index 8ccce5c..ddce165 100644
--- a/system_wrappers/source/cpu_features_android.target.darwin-x86.mk
+++ b/system_wrappers/source/cpu_features_android.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -68,7 +67,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,7 +179,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -194,12 +195,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,58 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.darwin-x86_64.mk b/system_wrappers/source/cpu_features_android.target.darwin-x86_64.mk
index f75ddd3..78fe2b8 100644
--- a/system_wrappers/source/cpu_features_android.target.darwin-x86_64.mk
+++ b/system_wrappers/source/cpu_features_android.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -67,7 +66,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -124,22 +125,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -233,58 +237,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.linux-arm.mk b/system_wrappers/source/cpu_features_android.target.linux-arm.mk
index 1040b33..c05b9f5 100644
--- a/system_wrappers/source/cpu_features_android.target.linux-arm.mk
+++ b/system_wrappers/source/cpu_features_android.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +64,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -73,7 +72,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -90,12 +88,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -133,23 +134,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,13 +165,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -191,7 +193,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -208,12 +209,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -252,63 +256,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.linux-arm64.mk b/system_wrappers/source/cpu_features_android.target.linux-arm64.mk
index d4ca310..a0dd964 100644
--- a/system_wrappers/source/cpu_features_android.target.linux-arm64.mk
+++ b/system_wrappers/source/cpu_features_android.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -79,12 +77,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -119,21 +120,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -165,7 +167,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -182,12 +183,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -223,54 +227,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.linux-mips.mk b/system_wrappers/source/cpu_features_android.target.linux-mips.mk
index d905611..e2641b6 100644
--- a/system_wrappers/source/cpu_features_android.target.linux-mips.mk
+++ b/system_wrappers/source/cpu_features_android.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -40,13 +38,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -61,6 +56,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -68,7 +64,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,17 +80,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -127,23 +123,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -152,13 +149,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -180,7 +174,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -197,17 +190,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -240,59 +234,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.linux-mips64.mk b/system_wrappers/source/cpu_features_android.target.linux-mips64.mk
new file mode 100644
index 0000000..e2641b6
--- /dev/null
+++ b/system_wrappers/source/cpu_features_android.target.linux-mips64.mk
@@ -0,0 +1,274 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/system_wrappers/source/cpu_features_android.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_STATIC_LIBRARIES := \
+ cpufeatures
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
+
+# Alias gyp target name.
+.PHONY: cpu_features_android
+cpu_features_android: third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/system_wrappers/source/cpu_features_android.target.linux-x86.mk b/system_wrappers/source/cpu_features_android.target.linux-x86.mk
index 8ccce5c..ddce165 100644
--- a/system_wrappers/source/cpu_features_android.target.linux-x86.mk
+++ b/system_wrappers/source/cpu_features_android.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,7 +29,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -68,7 +67,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,21 +126,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,7 +179,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -194,12 +195,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -235,58 +239,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/cpu_features_android.target.linux-x86_64.mk b/system_wrappers/source/cpu_features_android.target.linux-x86_64.mk
index f75ddd3..78fe2b8 100644
--- a/system_wrappers/source/cpu_features_android.target.linux-x86_64.mk
+++ b/system_wrappers/source/cpu_features_android.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_cpu_features_android_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -67,7 +66,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -84,12 +82,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -124,22 +125,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,7 +177,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -192,12 +193,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -233,58 +237,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
LOCAL_STATIC_LIBRARIES := \
cpufeatures
diff --git a/system_wrappers/source/critical_section_unittest.cc b/system_wrappers/source/critical_section_unittest.cc
index 5c416b2..9b88e6b 100644
--- a/system_wrappers/source/critical_section_unittest.cc
+++ b/system_wrappers/source/critical_section_unittest.cc
@@ -14,14 +14,11 @@
#include "webrtc/system_wrappers/interface/sleep.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
#include "webrtc/system_wrappers/interface/trace.h"
-#include "webrtc/system_wrappers/source/unittest_utilities.h"
namespace webrtc {
namespace {
-const bool kLogTrace = false; // Set to true to enable debug logging to stdout.
-
// Cause a process switch. Needed to avoid depending on
// busy-wait in tests.
static void SwitchProcess() {
@@ -54,8 +51,7 @@
class CritSectTest : public ::testing::Test {
public:
- CritSectTest() : trace_(kLogTrace) {
- }
+ CritSectTest() {}
// Waits a number of cycles for the count to reach a given value.
// Returns true if the target is reached or passed.
@@ -70,9 +66,6 @@
}
return (count->Count() >= target);
}
-
-private:
- ScopedTracing trace_;
};
bool LockUnlockThenStopRunFunction(void* obj) {
diff --git a/system_wrappers/source/logging_unittest.cc b/system_wrappers/source/logging_unittest.cc
index 19f1394..6e45c5c 100644
--- a/system_wrappers/source/logging_unittest.cc
+++ b/system_wrappers/source/logging_unittest.cc
@@ -46,22 +46,19 @@
void SetUp() {
Trace::CreateTrace();
Trace::SetTraceCallback(this);
- // Reduce the chance that spurious traces will ruin the test.
- Trace::set_level_filter(kTraceWarning | kTraceError);
}
void TearDown() {
- CriticalSectionScoped cs(crit_.get());
Trace::SetTraceCallback(NULL);
Trace::ReturnTrace();
+ CriticalSectionScoped cs(crit_.get());
ASSERT_EQ(kTraceNone, level_) << "Print() was not called";
}
scoped_ptr<CriticalSectionWrapper> crit_;
scoped_ptr<ConditionVariableWrapper> cv_;
- TraceLevel level_;
- int length_;
- std::ostringstream expected_log_;
+ TraceLevel level_ GUARDED_BY(crit_);
+ std::ostringstream expected_log_ GUARDED_BY(crit_);
};
TEST_F(LoggingTest, LogStream) {
diff --git a/system_wrappers/source/system_wrappers.gyp b/system_wrappers/source/system_wrappers.gyp
index 66b3435..e6c4216 100644
--- a/system_wrappers/source/system_wrappers.gyp
+++ b/system_wrappers/source/system_wrappers.gyp
@@ -17,7 +17,7 @@
'../interface',
],
'dependencies': [
- '../../base/base.gyp:webrtc_base',
+ '../../base/base.gyp:rtc_base_approved',
],
'direct_dependent_settings': {
'include_dirs': [
@@ -54,7 +54,6 @@
'../interface/static_instance.h',
'../interface/stl_util.h',
'../interface/stringize_macros.h',
- '../interface/thread_annotations.h',
'../interface/thread_wrapper.h',
'../interface/tick_util.h',
'../interface/timestamp_extrapolator.h',
diff --git a/system_wrappers/source/system_wrappers.target.darwin-arm.mk b/system_wrappers/source/system_wrappers.target.darwin-arm.mk
index 223df81..b45148b 100644
--- a/system_wrappers/source/system_wrappers.target.darwin-arm.mk
+++ b/system_wrappers/source/system_wrappers.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +117,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -137,12 +138,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -172,23 +167,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +198,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +226,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +242,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,12 +263,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -301,68 +293,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.darwin-arm64.mk b/system_wrappers/source/system_wrappers.target.darwin-arm64.mk
index b17991b..ffaa2f9 100644
--- a/system_wrappers/source/system_wrappers.target.darwin-arm64.mk
+++ b/system_wrappers/source/system_wrappers.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,13 +83,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +106,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -123,12 +124,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -158,21 +153,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,12 +234,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -272,59 +264,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.darwin-mips.mk b/system_wrappers/source/system_wrappers.target.darwin-mips.mk
index 28c9228..935d484 100644
--- a/system_wrappers/source/system_wrappers.target.darwin-mips.mk
+++ b/system_wrappers/source/system_wrappers.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,13 +67,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -90,6 +85,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +93,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,29 +109,24 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -166,23 +156,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,13 +182,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -219,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -236,29 +223,24 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -289,64 +271,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.darwin-mips64.mk b/system_wrappers/source/system_wrappers.target.darwin-mips64.mk
new file mode 100644
index 0000000..935d484
--- /dev/null
+++ b/system_wrappers/source/system_wrappers.target.darwin-mips64.mk
@@ -0,0 +1,305 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/system_wrappers/source/aligned_malloc.cc \
+ third_party/webrtc/system_wrappers/source/atomic32_posix.cc \
+ third_party/webrtc/system_wrappers/source/clock.cc \
+ third_party/webrtc/system_wrappers/source/condition_variable.cc \
+ third_party/webrtc/system_wrappers/source/condition_variable_posix.cc \
+ third_party/webrtc/system_wrappers/source/cpu_info.cc \
+ third_party/webrtc/system_wrappers/source/cpu_features.cc \
+ third_party/webrtc/system_wrappers/source/critical_section.cc \
+ third_party/webrtc/system_wrappers/source/critical_section_posix.cc \
+ third_party/webrtc/system_wrappers/source/data_log_c.cc \
+ third_party/webrtc/system_wrappers/source/data_log_no_op.cc \
+ third_party/webrtc/system_wrappers/source/event.cc \
+ third_party/webrtc/system_wrappers/source/event_posix.cc \
+ third_party/webrtc/system_wrappers/source/event_tracer.cc \
+ third_party/webrtc/system_wrappers/source/file_impl.cc \
+ third_party/webrtc/system_wrappers/source/logcat_trace_context.cc \
+ third_party/webrtc/system_wrappers/source/logging.cc \
+ third_party/webrtc/system_wrappers/source/rtp_to_ntp.cc \
+ third_party/webrtc/system_wrappers/source/rw_lock.cc \
+ third_party/webrtc/system_wrappers/source/rw_lock_generic.cc \
+ third_party/webrtc/system_wrappers/source/rw_lock_posix.cc \
+ third_party/webrtc/system_wrappers/source/sleep.cc \
+ third_party/webrtc/system_wrappers/source/sort.cc \
+ third_party/webrtc/system_wrappers/source/tick_util.cc \
+ third_party/webrtc/system_wrappers/source/thread.cc \
+ third_party/webrtc/system_wrappers/source/thread_posix.cc \
+ third_party/webrtc/system_wrappers/source/timestamp_extrapolator.cc \
+ third_party/webrtc/system_wrappers/source/trace_impl.cc \
+ third_party/webrtc/system_wrappers/source/trace_posix.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_THREAD_RR' \
+ '-DWEBRTC_CLOCK_TYPE_REALTIME' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/source/spreadsortlib \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_THREAD_RR' \
+ '-DWEBRTC_CLOCK_TYPE_REALTIME' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/source/spreadsortlib \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_system_wrappers_source_system_wrappers_gyp
+
+# Alias gyp target name.
+.PHONY: system_wrappers
+system_wrappers: third_party_webrtc_system_wrappers_source_system_wrappers_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/system_wrappers/source/system_wrappers.target.darwin-x86.mk b/system_wrappers/source/system_wrappers.target.darwin-x86.mk
index dcf42d3..5531fb5 100644
--- a/system_wrappers/source/system_wrappers.target.darwin-x86.mk
+++ b/system_wrappers/source/system_wrappers.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +112,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -129,12 +130,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -164,21 +159,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +212,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +228,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -248,12 +246,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -284,63 +276,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.darwin-x86_64.mk b/system_wrappers/source/system_wrappers.target.darwin-x86_64.mk
index 858dd80..5545607 100644
--- a/system_wrappers/source/system_wrappers.target.darwin-x86_64.mk
+++ b/system_wrappers/source/system_wrappers.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +111,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,12 +129,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -163,22 +158,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +210,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +226,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,12 +244,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -282,63 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.linux-arm.mk b/system_wrappers/source/system_wrappers.target.linux-arm.mk
index 223df81..b45148b 100644
--- a/system_wrappers/source/system_wrappers.target.linux-arm.mk
+++ b/system_wrappers/source/system_wrappers.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -95,6 +93,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,7 +101,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -119,12 +117,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -137,12 +138,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -172,23 +167,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +198,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -230,7 +226,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -247,12 +242,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -265,12 +263,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -301,68 +293,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.linux-arm64.mk b/system_wrappers/source/system_wrappers.target.linux-arm64.mk
index b17991b..ffaa2f9 100644
--- a/system_wrappers/source/system_wrappers.target.linux-arm64.mk
+++ b/system_wrappers/source/system_wrappers.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,13 +83,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +106,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -123,12 +124,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -158,21 +153,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -221,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,12 +234,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -272,59 +264,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.linux-mips.mk b/system_wrappers/source/system_wrappers.target.linux-mips.mk
index 28c9228..935d484 100644
--- a/system_wrappers/source/system_wrappers.target.linux-mips.mk
+++ b/system_wrappers/source/system_wrappers.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,13 +67,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -90,6 +85,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +93,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,29 +109,24 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -166,23 +156,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,13 +182,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -219,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -236,29 +223,24 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -289,64 +271,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.linux-mips64.mk b/system_wrappers/source/system_wrappers.target.linux-mips64.mk
new file mode 100644
index 0000000..935d484
--- /dev/null
+++ b/system_wrappers/source/system_wrappers.target.linux-mips64.mk
@@ -0,0 +1,305 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/system_wrappers/source/aligned_malloc.cc \
+ third_party/webrtc/system_wrappers/source/atomic32_posix.cc \
+ third_party/webrtc/system_wrappers/source/clock.cc \
+ third_party/webrtc/system_wrappers/source/condition_variable.cc \
+ third_party/webrtc/system_wrappers/source/condition_variable_posix.cc \
+ third_party/webrtc/system_wrappers/source/cpu_info.cc \
+ third_party/webrtc/system_wrappers/source/cpu_features.cc \
+ third_party/webrtc/system_wrappers/source/critical_section.cc \
+ third_party/webrtc/system_wrappers/source/critical_section_posix.cc \
+ third_party/webrtc/system_wrappers/source/data_log_c.cc \
+ third_party/webrtc/system_wrappers/source/data_log_no_op.cc \
+ third_party/webrtc/system_wrappers/source/event.cc \
+ third_party/webrtc/system_wrappers/source/event_posix.cc \
+ third_party/webrtc/system_wrappers/source/event_tracer.cc \
+ third_party/webrtc/system_wrappers/source/file_impl.cc \
+ third_party/webrtc/system_wrappers/source/logcat_trace_context.cc \
+ third_party/webrtc/system_wrappers/source/logging.cc \
+ third_party/webrtc/system_wrappers/source/rtp_to_ntp.cc \
+ third_party/webrtc/system_wrappers/source/rw_lock.cc \
+ third_party/webrtc/system_wrappers/source/rw_lock_generic.cc \
+ third_party/webrtc/system_wrappers/source/rw_lock_posix.cc \
+ third_party/webrtc/system_wrappers/source/sleep.cc \
+ third_party/webrtc/system_wrappers/source/sort.cc \
+ third_party/webrtc/system_wrappers/source/tick_util.cc \
+ third_party/webrtc/system_wrappers/source/thread.cc \
+ third_party/webrtc/system_wrappers/source/thread_posix.cc \
+ third_party/webrtc/system_wrappers/source/timestamp_extrapolator.cc \
+ third_party/webrtc/system_wrappers/source/trace_impl.cc \
+ third_party/webrtc/system_wrappers/source/trace_posix.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_THREAD_RR' \
+ '-DWEBRTC_CLOCK_TYPE_REALTIME' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/source/spreadsortlib \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DWEBRTC_THREAD_RR' \
+ '-DWEBRTC_CLOCK_TYPE_REALTIME' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/source/spreadsortlib \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_system_wrappers_source_system_wrappers_gyp
+
+# Alias gyp target name.
+.PHONY: system_wrappers
+system_wrappers: third_party_webrtc_system_wrappers_source_system_wrappers_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/system_wrappers/source/system_wrappers.target.linux-x86.mk b/system_wrappers/source/system_wrappers.target.linux-x86.mk
index dcf42d3..5531fb5 100644
--- a/system_wrappers/source/system_wrappers.target.linux-x86.mk
+++ b/system_wrappers/source/system_wrappers.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -59,7 +58,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +112,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -129,12 +130,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -164,21 +159,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,7 +212,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -233,12 +228,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -248,12 +246,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -284,63 +276,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers.target.linux-x86_64.mk b/system_wrappers/source/system_wrappers.target.linux-x86_64.mk
index 858dd80..5545607 100644
--- a/system_wrappers/source/system_wrappers.target.linux-x86_64.mk
+++ b/system_wrappers/source/system_wrappers.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_system_wrappers_source_system_wrappers_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,7 +95,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -113,12 +111,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -128,12 +129,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -163,22 +158,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,7 +210,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,12 +226,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -246,12 +244,6 @@
'-DWEBRTC_ANDROID_OPENSLES' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DFEATURE_ENABLE_SSL' \
- '-DGTEST_RELATIVE_PATH' \
- '-DNO_MAIN_THREAD_WRAPPING' \
- '-DSSL_USE_NSS' \
- '-DSSL_USE_OPENSSL' \
- '-DHAVE_OPENSSL_SSL_H' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -282,63 +274,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/system_wrappers/source/system_wrappers_tests.gyp b/system_wrappers/source/system_wrappers_tests.gyp
index f2f6156..75081b9 100644
--- a/system_wrappers/source/system_wrappers_tests.gyp
+++ b/system_wrappers/source/system_wrappers_tests.gyp
@@ -35,7 +35,6 @@
'stl_util_unittest.cc',
'thread_unittest.cc',
'thread_posix_unittest.cc',
- 'unittest_utilities_unittest.cc',
],
'conditions': [
['enable_data_logging==1', {
@@ -46,9 +45,7 @@
['os_posix==0', {
'sources!': [ 'thread_posix_unittest.cc', ],
}],
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -61,9 +58,7 @@
},
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['include_tests==1 and build_with_chromium==1 and OS=="android"', {
+ ['include_tests==1 and OS=="android"', {
'targets': [
{
'target_name': 'system_wrappers_unittests_apk_target',
diff --git a/system_wrappers/source/thread_unittest.cc b/system_wrappers/source/thread_unittest.cc
index 25095e6..f54d065 100644
--- a/system_wrappers/source/thread_unittest.cc
+++ b/system_wrappers/source/thread_unittest.cc
@@ -12,11 +12,13 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/system_wrappers/interface/sleep.h"
namespace webrtc {
// Function that does nothing, and reports success.
bool NullRunFunction(void* obj) {
+ SleepMs(0); // Hand over timeslice, prevents busy looping.
return true;
}
@@ -32,6 +34,7 @@
bool SetFlagRunFunction(void* obj) {
bool* obj_as_bool = static_cast<bool*>(obj);
*obj_as_bool = true;
+ SleepMs(0); // Hand over timeslice, prevents busy looping.
return true;
}
diff --git a/system_wrappers/source/thread_win.cc b/system_wrappers/source/thread_win.cc
index c68ee1a..bcb95e7 100644
--- a/system_wrappers/source/thread_win.cc
+++ b/system_wrappers/source/thread_win.cc
@@ -159,7 +159,7 @@
if (set_thread_name_) {
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, id_,
"Thread with name:%s started ", name_);
- SetThreadName(-1, name_); // -1, set thread name for the calling thread.
+ SetThreadName(static_cast<DWORD>(-1), name_); // -1 == caller thread.
} else {
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, id_,
"Thread without name started");
diff --git a/system_wrappers/source/trace_win.cc b/system_wrappers/source/trace_win.cc
index 129e3dd..f1a03a5 100644
--- a/system_wrappers/source/trace_win.cc
+++ b/system_wrappers/source/trace_win.cc
@@ -60,7 +60,7 @@
dw_delta_time = 99999;
}
- sprintf(trace_message, "(%2u:%2u:%2u:%3u |%5lu) ", system_time.wHour,
+ sprintf(trace_message, "(%2u:%2u:%2u:%3u |%5u) ", system_time.wHour,
system_time.wMinute, system_time.wSecond,
system_time.wMilliseconds, dw_delta_time);
} else {
@@ -77,7 +77,7 @@
if (dw_delta_time > 99999) {
dw_delta_time = 99999;
}
- sprintf(trace_message, "(%2u:%2u:%2u:%3u |%5lu) ", system_time.wHour,
+ sprintf(trace_message, "(%2u:%2u:%2u:%3u |%5u) ", system_time.wHour,
system_time.wMinute, system_time.wSecond,
system_time.wMilliseconds, dw_delta_time);
}
@@ -109,7 +109,7 @@
GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, &sys_time, TEXT("HH':'mm':'ss"),
sz_time_str, 20);
- sprintf(trace_message, "Local Date: %s Local Time: %s", sz_date_str,
+ sprintf(trace_message, "Local Date: %ls Local Time: %ls", sz_date_str,
sz_time_str);
// Include NULL termination (hence + 1).
diff --git a/system_wrappers/source/unittest_utilities.h b/system_wrappers/source/unittest_utilities.h
deleted file mode 100644
index b32308e..0000000
--- a/system_wrappers/source/unittest_utilities.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_UNITTEST_UTILITIES_H_
-#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_UNITTEST_UTILITIES_H_
-
-// This file contains utilities that make it simpler to write unittests
-// that are appropriate for the system_wrappers classes.
-
-#include <stdio.h>
-#include <string.h>
-
-#include "webrtc/system_wrappers/interface/trace.h"
-
-namespace webrtc {
-
-class TestTraceCallback : public TraceCallback {
- public:
- virtual void Print(TraceLevel level, const char* msg, int length) {
- if (msg) {
- char* cmd_print = new char[length+1];
- memcpy(cmd_print, msg, length);
- cmd_print[length] = '\0';
- printf("%s\n", cmd_print);
- fflush(stdout);
- delete[] cmd_print;
- }
- }
-};
-
-// A class that turns on tracing to stdout at the beginning of the test,
-// and turns it off once the test is finished.
-// Intended usage:
-// class SomeTest : public ::testing::Test {
-// protected:
-// SomeTest()
-// : trace_(false) {} // Change to true to turn on tracing.
-// private:
-// ScopedTracing trace_;
-// }
-class ScopedTracing {
- public:
- explicit ScopedTracing(bool logOn) {
- logging_ = logOn;
- StartTrace();
- }
-
- ~ScopedTracing() {
- StopTrace();
- }
-
- private:
- void StartTrace() {
- if (logging_) {
- Trace::CreateTrace();
- Trace::set_level_filter(webrtc::kTraceAll);
- Trace::SetTraceCallback(&trace_);
- }
- }
-
- void StopTrace() {
- if (logging_) {
- Trace::SetTraceCallback(NULL);
- Trace::ReturnTrace();
- }
- }
-
- private:
- bool logging_;
- TestTraceCallback trace_;
-};
-
-} // namespace webrtc
-
-#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_UNITTEST_UTILITIES_H_
diff --git a/system_wrappers/source/unittest_utilities_unittest.cc b/system_wrappers/source/unittest_utilities_unittest.cc
deleted file mode 100644
index be6647b..0000000
--- a/system_wrappers/source/unittest_utilities_unittest.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/system_wrappers/source/unittest_utilities.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/trace.h"
-
-namespace webrtc {
-
-// These tests merely check that the code compiles and that no
-// fatal accidents happen when logging.
-TEST(UnittestUtilities, TraceOn) {
- ScopedTracing trace(true);
- WEBRTC_TRACE(kTraceInfo, kTraceUtility, 0, "Log line that should appear");
- // TODO(hta): Verify that output appears.
- // Note - output is written on another thread, so can take time to appear.
-}
-
-TEST(UnittestUtilities, TraceOff) {
- ScopedTracing trace(false);
- WEBRTC_TRACE(kTraceInfo, kTraceUtility, 0,
- "Log line that should not appear");
- // TODO(hta): Verify that no output appears.
-}
-
-} // namespace webrtc
diff --git a/test/Android.mk b/test/Android.mk
deleted file mode 100644
index 73dceea..0000000
--- a/test/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE:= libwebrtc_test_support
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= \
- testsupport/android/root_path_android.cc \
- testsupport/fileutils.cc \
- testsupport/perf_test.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- external/gtest/include \
- external/webrtc \
- external/webrtc/webrtc
-
-LOCAL_STATIC_LIBRARIES := \
- libgtest
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/test/OWNERS b/test/OWNERS
index 1532e3f..98a0d4d 100644
--- a/test/OWNERS
+++ b/test/OWNERS
@@ -1,5 +1,6 @@
-phoglund@webrtc.org
kjellander@webrtc.org
+pbos@webrtc.org
+phoglund@webrtc.org
per-file *.isolate=kjellander@webrtc.org
diff --git a/test/buildbot_tests.py b/test/buildbot_tests.py
deleted file mode 100755
index da038d7..0000000
--- a/test/buildbot_tests.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-
-"""Script to run tests with pre-configured command line arguments.
-
-NOTICE: This test is designed to be run from the build output folder! It is
-copied automatically during build.
-
-With this script, it's easier for anyone to enable/disable or extend a test that
-runs on the buildbots. It is also easier for developers to run the tests in the
-same way as they run on the bots.
-"""
-
-import optparse
-import os
-import subprocess
-import sys
-
-_CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
-_HOME = os.environ.get('HOME', '')
-
-_VIE_AUTO_TEST_CMD_LIST = [
- 'vie_auto_test',
- '--automated',
- '--capture_test_ensure_resolution_alignment_in_capture_device=false']
-_WIN_TESTS = {
- 'vie_auto_test': _VIE_AUTO_TEST_CMD_LIST,
- 'voe_auto_test': ['voe_auto_test',
- '--automated'],
-}
-_MAC_TESTS = {
- 'libjingle_peerconnection_objc_test': [
- ('libjingle_peerconnection_objc_test.app/Contents/MacOS/'
- 'libjingle_peerconnection_objc_test')],
- 'vie_auto_test': _VIE_AUTO_TEST_CMD_LIST,
- 'voe_auto_test': ['voe_auto_test',
- '--automated',
- ('--gtest_filter='
- '-VolumeTest.SetVolumeBeforePlayoutWorks' # bug 527
- )],
-}
-_LINUX_TESTS = {
- 'vie_auto_test': _VIE_AUTO_TEST_CMD_LIST,
- 'voe_auto_test': ['voe_auto_test',
- '--automated'],
- 'audio_e2e_test': ['python',
- 'run_audio_test.py',
- '--input=../../resources/e2e_audio_in.pcm',
- '--output=/tmp/e2e_audio_out.pcm',
- '--codec=L16',
- '--harness=%s/audio_e2e_harness' % _CURRENT_DIR,
- '--compare=%s/bin/compare-audio +16000 +wb' % _HOME,
- '--regexp=(\d\.\d{3})'],
- 'audioproc_perf': ['audioproc',
- '-aecm', '-ns', '-agc', '--fixed_digital', '--perf',
- '-pb', '../../resources/audioproc.aecdump'],
- 'isac_fixed_perf': ['iSACFixtest',
- '32000', '../../resources/speech_and_misc_wb.pcm',
- 'isac_speech_and_misc_wb.pcm'],
- 'libjingle_peerconnection_java_unittest': [
- 'libjingle_peerconnection_java_unittest'],
-}
-
-_CUSTOM_ENV = {
- 'libjingle_peerconnection_java_unittest':
- {'LD_PRELOAD': '/usr/lib/x86_64-linux-gnu/libpulse.so.0'},
-}
-
-def main():
- parser = optparse.OptionParser('usage: %prog -t <test> [-t <test> ...]\n'
- 'If no test is specified, all tests are run.')
- parser.add_option('-l', '--list', action='store_true', default=False,
- help='Lists all currently supported tests.')
- parser.add_option('-t', '--test', action='append', default=[],
- help='Which test to run. May be specified multiple times.')
- options, _ = parser.parse_args()
-
- if sys.platform.startswith('win'):
- test_dict = _WIN_TESTS
- elif sys.platform.startswith('linux'):
- test_dict = _LINUX_TESTS
- elif sys.platform.startswith('darwin'):
- test_dict = _MAC_TESTS
- else:
- parser.error('Unsupported platform: %s' % sys.platform)
-
- if options.list:
- print 'Available tests:'
- print 'Test name Command line'
- print '========= ============'
- for test, cmd_line in test_dict.items():
- print '%-20s %s' % (test, ' '.join(cmd_line))
- return
-
- if not options.test:
- options.test = test_dict.keys()
- for test in options.test:
- if test not in test_dict:
- parser.error('Test "%s" is not supported (use --list to view supported '
- 'tests).')
-
- # Change current working directory to the script's dir to make the relative
- # paths always work.
- os.chdir(_CURRENT_DIR)
- print 'Changed working directory to: %s' % _CURRENT_DIR
-
- print 'Running WebRTC Buildbot tests: %s' % options.test
- for test in options.test:
- cmd_line = test_dict[test]
- env = os.environ.copy()
- if test in _CUSTOM_ENV:
- env.update(_CUSTOM_ENV[test])
-
- # Create absolute paths to test executables for non-Python tests.
- if cmd_line[0] != 'python':
- cmd_line[0] = os.path.join(_CURRENT_DIR, cmd_line[0])
-
- print 'Running: %s' % ' '.join(cmd_line)
- try:
- subprocess.check_call(cmd_line, env=env)
- except subprocess.CalledProcessError as e:
- print >> sys.stderr, ('An error occurred during test execution: return '
- 'code: %d' % e.returncode)
- return -1
-
- print 'Testing completed successfully.'
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/test/call_test.cc b/test/call_test.cc
new file mode 100644
index 0000000..d49f6e3
--- /dev/null
+++ b/test/call_test.cc
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#include "webrtc/test/call_test.h"
+
+#include "webrtc/test/encoder_settings.h"
+
+namespace webrtc {
+namespace test {
+
+CallTest::CallTest()
+ : clock_(Clock::GetRealTimeClock()),
+ send_stream_(NULL),
+ fake_encoder_(clock_) {
+}
+CallTest::~CallTest() {
+}
+
+void CallTest::RunBaseTest(BaseTest* test) {
+ CreateSenderCall(test->GetSenderCallConfig());
+ if (test->ShouldCreateReceivers())
+ CreateReceiverCall(test->GetReceiverCallConfig());
+ test->OnCallsCreated(sender_call_.get(), receiver_call_.get());
+
+ if (test->ShouldCreateReceivers()) {
+ test->SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
+ } else {
+ // Sender-only call delivers to itself.
+ test->SetReceivers(sender_call_->Receiver(), NULL);
+ }
+
+ CreateSendConfig(test->GetNumStreams());
+ if (test->ShouldCreateReceivers()) {
+ CreateMatchingReceiveConfigs();
+ }
+ test->ModifyConfigs(&send_config_, &receive_configs_, &encoder_config_);
+ CreateStreams();
+ test->OnStreamsCreated(send_stream_, receive_streams_);
+
+ CreateFrameGeneratorCapturer();
+ test->OnFrameGeneratorCapturerCreated(frame_generator_capturer_.get());
+
+ Start();
+ test->PerformTest();
+ test->StopSending();
+ Stop();
+
+ DestroyStreams();
+}
+
+void CallTest::Start() {
+ send_stream_->Start();
+ for (size_t i = 0; i < receive_streams_.size(); ++i)
+ receive_streams_[i]->Start();
+ if (frame_generator_capturer_.get() != NULL)
+ frame_generator_capturer_->Start();
+}
+
+void CallTest::Stop() {
+ if (frame_generator_capturer_.get() != NULL)
+ frame_generator_capturer_->Stop();
+ for (size_t i = 0; i < receive_streams_.size(); ++i)
+ receive_streams_[i]->Stop();
+ send_stream_->Stop();
+}
+
+void CallTest::CreateCalls(const Call::Config& sender_config,
+ const Call::Config& receiver_config) {
+ CreateSenderCall(sender_config);
+ CreateReceiverCall(receiver_config);
+}
+
+void CallTest::CreateSenderCall(const Call::Config& config) {
+ sender_call_.reset(Call::Create(config));
+}
+
+void CallTest::CreateReceiverCall(const Call::Config& config) {
+ receiver_call_.reset(Call::Create(config));
+}
+
+void CallTest::CreateSendConfig(size_t num_streams) {
+ assert(num_streams <= kNumSsrcs);
+ send_config_ = VideoSendStream::Config();
+ send_config_.encoder_settings.encoder = &fake_encoder_;
+ send_config_.encoder_settings.payload_name = "FAKE";
+ send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
+ encoder_config_.streams = test::CreateVideoStreams(num_streams);
+ for (size_t i = 0; i < num_streams; ++i)
+ send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]);
+}
+
+void CallTest::CreateMatchingReceiveConfigs() {
+ assert(!send_config_.rtp.ssrcs.empty());
+ assert(receive_configs_.empty());
+ assert(fake_decoders_.empty());
+ VideoReceiveStream::Config config;
+ VideoCodec codec =
+ test::CreateDecoderVideoCodec(send_config_.encoder_settings);
+ config.codecs.push_back(codec);
+ config.rtp.local_ssrc = kReceiverLocalSsrc;
+ if (send_config_.encoder_settings.encoder == &fake_encoder_) {
+ config.external_decoders.resize(1);
+ config.external_decoders[0].payload_type =
+ send_config_.encoder_settings.payload_type;
+ }
+ for (size_t i = 0; i < send_config_.rtp.ssrcs.size(); ++i) {
+ if (send_config_.encoder_settings.encoder == &fake_encoder_) {
+ FakeDecoder* decoder = new FakeDecoder();
+ fake_decoders_.push_back(decoder);
+ config.external_decoders[0].decoder = decoder;
+ }
+ config.rtp.remote_ssrc = send_config_.rtp.ssrcs[i];
+ receive_configs_.push_back(config);
+ }
+}
+
+void CallTest::CreateFrameGeneratorCapturer() {
+ VideoStream stream = encoder_config_.streams.back();
+ frame_generator_capturer_.reset(
+ test::FrameGeneratorCapturer::Create(send_stream_->Input(),
+ stream.width,
+ stream.height,
+ stream.max_framerate,
+ clock_));
+}
+void CallTest::CreateStreams() {
+ assert(send_stream_ == NULL);
+ assert(receive_streams_.empty());
+
+ send_stream_ =
+ sender_call_->CreateVideoSendStream(send_config_, encoder_config_);
+
+ for (size_t i = 0; i < receive_configs_.size(); ++i) {
+ receive_streams_.push_back(
+ receiver_call_->CreateVideoReceiveStream(receive_configs_[i]));
+ }
+}
+
+void CallTest::DestroyStreams() {
+ if (send_stream_ != NULL)
+ sender_call_->DestroyVideoSendStream(send_stream_);
+ send_stream_ = NULL;
+ for (size_t i = 0; i < receive_streams_.size(); ++i)
+ receiver_call_->DestroyVideoReceiveStream(receive_streams_[i]);
+ receive_streams_.clear();
+ fake_decoders_.clear();
+}
+
+const unsigned int CallTest::kDefaultTimeoutMs = 30 * 1000;
+const unsigned int CallTest::kLongTimeoutMs = 120 * 1000;
+const uint8_t CallTest::kSendPayloadType = 100;
+const uint8_t CallTest::kFakeSendPayloadType = 125;
+const uint8_t CallTest::kSendRtxPayloadType = 98;
+const uint8_t CallTest::kRedPayloadType = 118;
+const uint8_t CallTest::kUlpfecPayloadType = 119;
+const uint32_t CallTest::kSendRtxSsrcs[kNumSsrcs] = {0xBADCAFD, 0xBADCAFE,
+ 0xBADCAFF};
+const uint32_t CallTest::kSendSsrcs[kNumSsrcs] = {0xC0FFED, 0xC0FFEE, 0xC0FFEF};
+const uint32_t CallTest::kReceiverLocalSsrc = 0x123456;
+const int CallTest::kNackRtpHistoryMs = 1000;
+
+BaseTest::BaseTest(unsigned int timeout_ms) : RtpRtcpObserver(timeout_ms) {
+}
+
+BaseTest::BaseTest(unsigned int timeout_ms,
+ const FakeNetworkPipe::Config& config)
+ : RtpRtcpObserver(timeout_ms, config) {
+}
+
+BaseTest::~BaseTest() {
+}
+
+Call::Config BaseTest::GetSenderCallConfig() {
+ return Call::Config(SendTransport());
+}
+
+Call::Config BaseTest::GetReceiverCallConfig() {
+ return Call::Config(ReceiveTransport());
+}
+
+void BaseTest::OnCallsCreated(Call* sender_call, Call* receiver_call) {
+}
+
+size_t BaseTest::GetNumStreams() const {
+ return 1;
+}
+
+void BaseTest::ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) {
+}
+
+void BaseTest::OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) {
+}
+
+void BaseTest::OnFrameGeneratorCapturerCreated(
+ FrameGeneratorCapturer* frame_generator_capturer) {
+}
+
+SendTest::SendTest(unsigned int timeout_ms) : BaseTest(timeout_ms) {
+}
+
+SendTest::SendTest(unsigned int timeout_ms,
+ const FakeNetworkPipe::Config& config)
+ : BaseTest(timeout_ms, config) {
+}
+
+bool SendTest::ShouldCreateReceivers() const {
+ return false;
+}
+
+EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) {
+}
+
+EndToEndTest::EndToEndTest(unsigned int timeout_ms,
+ const FakeNetworkPipe::Config& config)
+ : BaseTest(timeout_ms, config) {
+}
+
+bool EndToEndTest::ShouldCreateReceivers() const {
+ return true;
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/test/call_test.h b/test/call_test.h
new file mode 100644
index 0000000..695fb2a
--- /dev/null
+++ b/test/call_test.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#ifndef WEBRTC_TEST_COMMON_CALL_TEST_H_
+#define WEBRTC_TEST_COMMON_CALL_TEST_H_
+
+#include <vector>
+
+#include "webrtc/call.h"
+#include "webrtc/system_wrappers/interface/scoped_vector.h"
+#include "webrtc/test/fake_decoder.h"
+#include "webrtc/test/fake_encoder.h"
+#include "webrtc/test/frame_generator_capturer.h"
+#include "webrtc/test/rtp_rtcp_observer.h"
+
+namespace webrtc {
+namespace test {
+
+class BaseTest;
+
+class CallTest : public ::testing::Test {
+ public:
+ CallTest();
+ ~CallTest();
+
+ static const size_t kNumSsrcs = 3;
+
+ static const unsigned int kDefaultTimeoutMs;
+ static const unsigned int kLongTimeoutMs;
+ static const uint8_t kSendPayloadType;
+ static const uint8_t kSendRtxPayloadType;
+ static const uint8_t kFakeSendPayloadType;
+ static const uint8_t kRedPayloadType;
+ static const uint8_t kUlpfecPayloadType;
+ static const uint32_t kSendRtxSsrcs[kNumSsrcs];
+ static const uint32_t kSendSsrcs[kNumSsrcs];
+ static const uint32_t kReceiverLocalSsrc;
+ static const int kNackRtpHistoryMs;
+
+ protected:
+ void RunBaseTest(BaseTest* test);
+
+ void CreateCalls(const Call::Config& sender_config,
+ const Call::Config& receiver_config);
+ void CreateSenderCall(const Call::Config& config);
+ void CreateReceiverCall(const Call::Config& config);
+
+ void CreateSendConfig(size_t num_streams);
+ void CreateMatchingReceiveConfigs();
+
+ void CreateFrameGeneratorCapturer();
+
+ void CreateStreams();
+ void Start();
+ void Stop();
+ void DestroyStreams();
+
+ Clock* const clock_;
+
+ scoped_ptr<Call> sender_call_;
+ VideoSendStream::Config send_config_;
+ VideoEncoderConfig encoder_config_;
+ VideoSendStream* send_stream_;
+
+ scoped_ptr<Call> receiver_call_;
+ std::vector<VideoReceiveStream::Config> receive_configs_;
+ std::vector<VideoReceiveStream*> receive_streams_;
+
+ scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
+ test::FakeEncoder fake_encoder_;
+ ScopedVector<test::FakeDecoder> fake_decoders_;
+};
+
+class BaseTest : public RtpRtcpObserver {
+ public:
+ explicit BaseTest(unsigned int timeout_ms);
+ BaseTest(unsigned int timeout_ms, const FakeNetworkPipe::Config& config);
+ virtual ~BaseTest();
+
+ virtual void PerformTest() = 0;
+ virtual bool ShouldCreateReceivers() const = 0;
+
+ virtual size_t GetNumStreams() const;
+
+ virtual Call::Config GetSenderCallConfig();
+ virtual Call::Config GetReceiverCallConfig();
+ virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config);
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams);
+
+ virtual void OnFrameGeneratorCapturerCreated(
+ FrameGeneratorCapturer* frame_generator_capturer);
+};
+
+class SendTest : public BaseTest {
+ public:
+ explicit SendTest(unsigned int timeout_ms);
+ SendTest(unsigned int timeout_ms, const FakeNetworkPipe::Config& config);
+
+ virtual bool ShouldCreateReceivers() const OVERRIDE;
+};
+
+class EndToEndTest : public BaseTest {
+ public:
+ explicit EndToEndTest(unsigned int timeout_ms);
+ EndToEndTest(unsigned int timeout_ms, const FakeNetworkPipe::Config& config);
+
+ virtual bool ShouldCreateReceivers() const OVERRIDE;
+};
+
+} // namespace test
+} // namespace webrtc
+
+#endif // WEBRTC_TEST_COMMON_CALL_TEST_H_
diff --git a/test/channel_transport/OWNERS b/test/channel_transport/OWNERS
index 5fd9f4a..8117cdd 100644
--- a/test/channel_transport/OWNERS
+++ b/test/channel_transport/OWNERS
@@ -1,4 +1,3 @@
-pwestin@webrtc.org
henrikg@webrtc.org
mallinath@webrtc.org
tomasl@webrtc.org
diff --git a/test/channel_transport/udp_socket2_win.cc b/test/channel_transport/udp_socket2_win.cc
index 97cd5e1..98afcb2 100644
--- a/test/channel_transport/udp_socket2_win.cc
+++ b/test/channel_transport/udp_socket2_win.cc
@@ -426,7 +426,8 @@
{
return len;
}
- if((error = _mgr->PushIoContext(pIoContext)))
+ error = _mgr->PushIoContext(pIoContext);
+ if(error)
{
WEBRTC_TRACE(
kTraceError,
@@ -493,8 +494,8 @@
{
assert(false);
}
- int32_t err = 0;
- if((err = _mgr->PushIoContext(pIOContext)))
+ int32_t err = _mgr->PushIoContext(pIOContext);
+ if(err)
{
WEBRTC_TRACE(
kTraceError,
@@ -648,8 +649,8 @@
{
assert(false);
}
- int32_t error = 0;
- if((error = _mgr->PushIoContext(pIoContext)))
+ int32_t error = _mgr->PushIoContext(pIoContext);
+ if(error)
{
WEBRTC_TRACE(
kTraceError,
diff --git a/test/channel_transport/udp_socket2_win.h b/test/channel_transport/udp_socket2_win.h
index e4d6b8c..629c9c3 100644
--- a/test/channel_transport/udp_socket2_win.h
+++ b/test/channel_transport/udp_socket2_win.h
@@ -42,36 +42,37 @@
bool ipV6Enable = false, bool disableGQOS = false);
virtual ~UdpSocket2Windows();
- virtual int32_t ChangeUniqueId(const int32_t id);
+ virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
- virtual bool ValidHandle();
+ virtual bool ValidHandle() OVERRIDE;
- virtual bool SetCallback(CallbackObj, IncomingSocketCallback);
+ virtual bool SetCallback(CallbackObj, IncomingSocketCallback) OVERRIDE;
- virtual bool Bind(const SocketAddress& name);
+ virtual bool Bind(const SocketAddress& name) OVERRIDE;
virtual bool SetSockopt(int32_t level, int32_t optname,
- const int8_t* optval, int32_t optlen);
+ const int8_t* optval, int32_t optlen) OVERRIDE;
- virtual bool StartReceiving(const uint32_t receiveBuffers);
- virtual inline bool StartReceiving() {return StartReceiving(8);}
- virtual bool StopReceiving();
+ virtual bool StartReceiving(const uint32_t receiveBuffers) OVERRIDE;
+ virtual inline bool StartReceiving() OVERRIDE {return StartReceiving(8);}
+ virtual bool StopReceiving() OVERRIDE;
virtual int32_t SendTo(const int8_t* buf, int32_t len,
- const SocketAddress& to);
+ const SocketAddress& to) OVERRIDE;
- virtual void CloseBlocking();
+ virtual void CloseBlocking() OVERRIDE;
- virtual SOCKET GetFd() { return _socket;}
+ SOCKET GetFd() { return _socket;}
+
virtual bool SetQos(int32_t serviceType, int32_t tokenRate,
int32_t bucketSize, int32_t peekBandwith,
int32_t minPolicedSize, int32_t maxSduSize,
const SocketAddress &stRemName,
- int32_t overrideDSCP = 0);
+ int32_t overrideDSCP = 0) OVERRIDE;
- virtual int32_t SetTOS(const int32_t serviceType);
- virtual int32_t SetPCP(const int32_t pcp);
+ virtual int32_t SetTOS(const int32_t serviceType) OVERRIDE;
+ virtual int32_t SetPCP(const int32_t pcp) OVERRIDE;
- virtual uint32_t ReceiveBuffers(){return _receiveBuffers.Value();}
+ virtual uint32_t ReceiveBuffers() OVERRIDE {return _receiveBuffers.Value();}
protected:
void IOCompleted(PerIoContext* pIOContext, uint32_t ioSize, uint32_t error);
diff --git a/test/channel_transport/udp_socket_posix.cc b/test/channel_transport/udp_socket_posix.cc
index 6fc9441..355da53 100644
--- a/test/channel_transport/udp_socket_posix.cc
+++ b/test/channel_transport/udp_socket_posix.cc
@@ -33,7 +33,6 @@
"UdpSocketPosix::UdpSocketPosix()");
_wantsIncoming = false;
- _error = 0;
_mgr = mgr;
_id = id;
@@ -129,9 +128,8 @@
return true;
}
- _error = errno;
WEBRTC_TRACE(kTraceError, kTraceTransport, _id,
- "UdpSocketPosix::SetSockopt(), error:%d", _error);
+ "UdpSocketPosix::SetSockopt(), error:%d", errno);
return false;
}
@@ -151,9 +149,8 @@
{
return true;
}
- _error = errno;
WEBRTC_TRACE(kTraceError, kTraceTransport, _id,
- "UdpSocketPosix::Bind() error: %d",_error);
+ "UdpSocketPosix::Bind() error: %d", errno);
return false;
}
@@ -165,16 +162,14 @@
reinterpret_cast<const sockaddr*>(&to), size);
if(retVal == SOCKET_ERROR)
{
- _error = errno;
WEBRTC_TRACE(kTraceError, kTraceTransport, _id,
- "UdpSocketPosix::SendTo() error: %d", _error);
+ "UdpSocketPosix::SendTo() error: %d", errno);
}
return retVal;
}
SOCKET UdpSocketPosix::GetFd() { return _socket; }
-int32_t UdpSocketPosix::GetError() { return _error; }
bool UdpSocketPosix::ValidHandle()
{
diff --git a/test/channel_transport/udp_socket_posix.h b/test/channel_transport/udp_socket_posix.h
index 9b2c037..8458ca0 100644
--- a/test/channel_transport/udp_socket_posix.h
+++ b/test/channel_transport/udp_socket_posix.h
@@ -52,8 +52,7 @@
// TODO (hellner): make destructor protected.
virtual void CloseBlocking() OVERRIDE;
- virtual SOCKET GetFd();
- virtual int32_t GetError();
+ SOCKET GetFd();
virtual bool ValidHandle() OVERRIDE;
@@ -76,7 +75,6 @@
int32_t _id;
IncomingSocketCallback _incomingCb;
CallbackObj _obj;
- int32_t _error;
SOCKET _socket;
UdpSocketManager* _mgr;
diff --git a/test/channel_transport/udp_transport_impl.h b/test/channel_transport/udp_transport_impl.h
index 8c74daf..2b804c3 100644
--- a/test/channel_transport/udp_transport_impl.h
+++ b/test/channel_transport/udp_transport_impl.h
@@ -60,8 +60,8 @@
virtual int32_t InitializeSourcePorts(
const uint16_t rtpPort,
const uint16_t rtcpPort = 0) OVERRIDE;
- virtual int32_t SourcePorts(uint16_t& rtpPort, uint16_t& rtcpPort) const
- OVERRIDE;
+ virtual int32_t SourcePorts(uint16_t& rtpPort,
+ uint16_t& rtcpPort) const OVERRIDE;
virtual int32_t ReceiveSocketInformation(
char ipAddr[kIpAddressVersion6Length],
uint16_t& rtpPort,
diff --git a/test/configurable_frame_size_encoder.cc b/test/configurable_frame_size_encoder.cc
index b246da3..d3ed784 100644
--- a/test/configurable_frame_size_encoder.cc
+++ b/test/configurable_frame_size_encoder.cc
@@ -12,9 +12,11 @@
#include <string.h>
-#include "webrtc/common_video/interface/video_image.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/common_video/interface/video_image.h"
+#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
+
namespace webrtc {
namespace test {
diff --git a/test/configurable_frame_size_encoder.h b/test/configurable_frame_size_encoder.h
index f29038f..4120bc6 100644
--- a/test/configurable_frame_size_encoder.h
+++ b/test/configurable_frame_size_encoder.h
@@ -14,7 +14,7 @@
#include <vector>
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
+#include "webrtc/video_encoder.h"
namespace webrtc {
namespace test {
diff --git a/test/encoder_settings.cc b/test/encoder_settings.cc
index 5193be6..0eeb0b9 100644
--- a/test/encoder_settings.cc
+++ b/test/encoder_settings.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <string.h>
+#include "webrtc/video_encoder.h"
#include "webrtc/video_engine/vie_defines.h"
namespace webrtc {
@@ -59,18 +60,18 @@
codec.plType = encoder_settings.payload_type;
strcpy(codec.plName, encoder_settings.payload_name.c_str());
- codec.codecType =
- (encoder_settings.payload_name == "VP8" ? kVideoCodecVP8
- : kVideoCodecGeneric);
+ if (encoder_settings.payload_name == "VP8") {
+ codec.codecType = kVideoCodecVP8;
+ } else if (encoder_settings.payload_name == "H264") {
+ codec.codecType = kVideoCodecH264;
+ } else {
+ codec.codecType = kVideoCodecGeneric;
+ }
if (codec.codecType == kVideoCodecVP8) {
- codec.codecSpecific.VP8.resilience = kResilientStream;
- codec.codecSpecific.VP8.numberOfTemporalLayers = 1;
- codec.codecSpecific.VP8.denoisingOn = true;
- codec.codecSpecific.VP8.errorConcealmentOn = false;
- codec.codecSpecific.VP8.automaticResizeOn = false;
- codec.codecSpecific.VP8.frameDroppingOn = true;
- codec.codecSpecific.VP8.keyFrameInterval = 3000;
+ codec.codecSpecific.VP8 = VideoEncoder::GetDefaultVp8Settings();
+ } else if (codec.codecType == kVideoCodecH264) {
+ codec.codecSpecific.H264 = VideoEncoder::GetDefaultH264Settings();
}
codec.width = 320;
diff --git a/test/fake_decoder.cc b/test/fake_decoder.cc
index 1624ea0..63316e0 100644
--- a/test/fake_decoder.cc
+++ b/test/fake_decoder.cc
@@ -57,5 +57,31 @@
return WEBRTC_VIDEO_CODEC_OK;
}
+int32_t FakeH264Decoder::Decode(const EncodedImage& input,
+ bool missing_frames,
+ const RTPFragmentationHeader* fragmentation,
+ const CodecSpecificInfo* codec_specific_info,
+ int64_t render_time_ms) {
+ uint8_t value = 0;
+ for (size_t i = 0; i < input._length; ++i) {
+ uint8_t kStartCode[] = {0, 0, 0, 1};
+ if (i < input._length - sizeof(kStartCode) &&
+ !memcmp(&input._buffer[i], kStartCode, sizeof(kStartCode))) {
+ i += sizeof(kStartCode) + 1; // Skip start code and NAL header.
+ }
+ if (input._buffer[i] != value) {
+ EXPECT_EQ(value, input._buffer[i])
+ << "Bitstream mismatch between sender and receiver.";
+ return -1;
+ }
+ ++value;
+ }
+ return FakeDecoder::Decode(input,
+ missing_frames,
+ fragmentation,
+ codec_specific_info,
+ render_time_ms);
+}
+
} // namespace test
} // namespace webrtc
diff --git a/test/fake_decoder.h b/test/fake_decoder.h
index 1055952..5a03825 100644
--- a/test/fake_decoder.h
+++ b/test/fake_decoder.h
@@ -22,6 +22,7 @@
class FakeDecoder : public VideoDecoder {
public:
FakeDecoder();
+ virtual ~FakeDecoder() {}
virtual int32_t InitDecode(const VideoCodec* config,
int32_t number_of_cores) OVERRIDE;
@@ -43,6 +44,17 @@
I420VideoFrame frame_;
DecodedImageCallback* callback_;
};
+
+class FakeH264Decoder : public FakeDecoder {
+ public:
+ virtual ~FakeH264Decoder() {}
+
+ virtual int32_t Decode(const EncodedImage& input,
+ bool missing_frames,
+ const RTPFragmentationHeader* fragmentation,
+ const CodecSpecificInfo* codec_specific_info,
+ int64_t render_time_ms) OVERRIDE;
+};
} // namespace test
} // namespace webrtc
diff --git a/test/fake_encoder.cc b/test/fake_encoder.cc
index 4ff81a1..9551c82 100644
--- a/test/fake_encoder.cc
+++ b/test/fake_encoder.cc
@@ -12,6 +12,8 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
+
namespace webrtc {
namespace test {
@@ -117,5 +119,60 @@
return 0;
}
+FakeH264Encoder::FakeH264Encoder(Clock* clock)
+ : FakeEncoder(clock), callback_(NULL), idr_counter_(0) {
+ FakeEncoder::RegisterEncodeCompleteCallback(this);
+}
+
+int32_t FakeH264Encoder::RegisterEncodeCompleteCallback(
+ EncodedImageCallback* callback) {
+ callback_ = callback;
+ return 0;
+}
+
+int32_t FakeH264Encoder::Encoded(EncodedImage& encoded_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const RTPFragmentationHeader* fragments) {
+ const size_t kSpsSize = 8;
+ const size_t kPpsSize = 11;
+ const int kIdrFrequency = 10;
+ RTPFragmentationHeader fragmentation;
+ if (idr_counter_++ % kIdrFrequency == 0 &&
+ encoded_image._length > kSpsSize + kPpsSize + 1) {
+ const size_t kNumSlices = 3;
+ fragmentation.VerifyAndAllocateFragmentationHeader(kNumSlices);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = kSpsSize;
+ fragmentation.fragmentationOffset[1] = kSpsSize;
+ fragmentation.fragmentationLength[1] = kPpsSize;
+ fragmentation.fragmentationOffset[2] = kSpsSize + kPpsSize;
+ fragmentation.fragmentationLength[2] =
+ encoded_image._length - (kSpsSize + kPpsSize);
+ const uint8_t kSpsNalHeader = 0x37;
+ const uint8_t kPpsNalHeader = 0x38;
+ const uint8_t kIdrNalHeader = 0x15;
+ encoded_image._buffer[fragmentation.fragmentationOffset[0]] = kSpsNalHeader;
+ encoded_image._buffer[fragmentation.fragmentationOffset[1]] = kPpsNalHeader;
+ encoded_image._buffer[fragmentation.fragmentationOffset[2]] = kIdrNalHeader;
+ } else {
+ const size_t kNumSlices = 1;
+ fragmentation.VerifyAndAllocateFragmentationHeader(kNumSlices);
+ fragmentation.fragmentationOffset[0] = 0;
+ fragmentation.fragmentationLength[0] = encoded_image._length;
+ const uint8_t kNalHeader = 0x11;
+ encoded_image._buffer[fragmentation.fragmentationOffset[0]] = kNalHeader;
+ }
+ uint8_t value = 0;
+ int fragment_counter = 0;
+ for (size_t i = 0; i < encoded_image._length; ++i) {
+ if (fragment_counter == fragmentation.fragmentationVectorSize ||
+ i != fragmentation.fragmentationOffset[fragment_counter]) {
+ encoded_image._buffer[i] = value++;
+ } else {
+ ++fragment_counter;
+ }
+ }
+ return callback_->Encoded(encoded_image, NULL, &fragmentation);
+}
} // namespace test
} // namespace webrtc
diff --git a/test/fake_encoder.h b/test/fake_encoder.h
index 2a444a1..50b8652 100644
--- a/test/fake_encoder.h
+++ b/test/fake_encoder.h
@@ -13,8 +13,9 @@
#include <vector>
-#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
+#include "webrtc/common_types.h"
#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/video_encoder.h"
namespace webrtc {
namespace test {
@@ -50,6 +51,24 @@
int64_t last_encode_time_ms_;
uint8_t encoded_buffer_[100000];
};
+
+class FakeH264Encoder : public FakeEncoder, public EncodedImageCallback {
+ public:
+ explicit FakeH264Encoder(Clock* clock);
+ virtual ~FakeH264Encoder() {}
+
+ virtual int32_t RegisterEncodeCompleteCallback(
+ EncodedImageCallback* callback) OVERRIDE;
+
+ virtual int32_t Encoded(
+ EncodedImage& encodedImage,
+ const CodecSpecificInfo* codecSpecificInfo = NULL,
+ const RTPFragmentationHeader* fragments = NULL) OVERRIDE;
+
+ private:
+ EncodedImageCallback* callback_;
+ int idr_counter_;
+};
} // namespace test
} // namespace webrtc
diff --git a/test/fake_network_pipe.cc b/test/fake_network_pipe.cc
index c5caef2..c88205b 100644
--- a/test/fake_network_pipe.cc
+++ b/test/fake_network_pipe.cc
@@ -33,6 +33,11 @@
sqrt(-2 * log(uniform1)) * cos(2 * kPi * uniform2));
}
+static bool UniformLoss(int loss_percent) {
+ int outcome = rand() % 100;
+ return outcome < loss_percent;
+}
+
class NetworkPacket {
public:
NetworkPacket(const uint8_t* data, size_t length, int64_t send_time,
@@ -104,8 +109,8 @@
if (packet_receiver_ == NULL)
return;
CriticalSectionScoped crit(lock_.get());
- if (config_.queue_length > 0 &&
- capacity_link_.size() >= config_.queue_length) {
+ if (config_.queue_length_packets > 0 &&
+ capacity_link_.size() >= config_.queue_length_packets) {
// Too many packet on the link, drop this one.
++dropped_packets_;
return;
@@ -159,6 +164,12 @@
NetworkPacket* packet = capacity_link_.front();
capacity_link_.pop();
+ // Packets are randomly dropped after being affected by the bottleneck.
+ if (UniformLoss(config_.loss_percent)) {
+ delete packet;
+ continue;
+ }
+
// Add extra delay and jitter, but make sure the arrival time is not
// earlier than the last packet in the queue.
int extra_delay = GaussianRandom(config_.queue_delay_ms,
diff --git a/test/fake_network_pipe.h b/test/fake_network_pipe.h
index b9690e7..a9ca760 100644
--- a/test/fake_network_pipe.h
+++ b/test/fake_network_pipe.h
@@ -33,21 +33,21 @@
public:
struct Config {
Config()
- : queue_length(0),
+ : queue_length_packets(0),
queue_delay_ms(0),
delay_standard_deviation_ms(0),
link_capacity_kbps(0),
loss_percent(0) {
}
// Queue length in number of packets.
- size_t queue_length;
+ size_t queue_length_packets;
// Delay in addition to capacity induced delay.
int queue_delay_ms;
// Standard deviation of the extra delay.
int delay_standard_deviation_ms;
// Link capacity in kbps.
int link_capacity_kbps;
- // Random packet loss. Not implemented.
+ // Random packet loss.
int loss_percent;
};
diff --git a/test/fake_network_pipe_unittest.cc b/test/fake_network_pipe_unittest.cc
index 0399688..b10f297 100644
--- a/test/fake_network_pipe_unittest.cc
+++ b/test/fake_network_pipe_unittest.cc
@@ -41,6 +41,8 @@
virtual void SetUp() {
TickTime::UseFakeClock(12345);
receiver_.reset(new MockReceiver());
+ ON_CALL(*receiver_, DeliverPacket(_, _))
+ .WillByDefault(Return(PacketReceiver::DELIVERY_OK));
}
virtual void TearDown() {
@@ -65,7 +67,7 @@
// Test the capacity link and verify we get as many packets as we expect.
TEST_F(FakeNetworkPipeTest, CapacityTest) {
FakeNetworkPipe::Config config;
- config.queue_length = 20;
+ config.queue_length_packets = 20;
config.link_capacity_kbps = 80;
scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
pipe->SetReceiver(receiver_.get());
@@ -107,7 +109,7 @@
// Test the extra network delay.
TEST_F(FakeNetworkPipeTest, ExtraDelayTest) {
FakeNetworkPipe::Config config;
- config.queue_length = 20;
+ config.queue_length_packets = 20;
config.queue_delay_ms = 100;
config.link_capacity_kbps = 80;
scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
@@ -144,7 +146,7 @@
// packets too quickly.
TEST_F(FakeNetworkPipeTest, QueueLengthTest) {
FakeNetworkPipe::Config config;
- config.queue_length = 2;
+ config.queue_length_packets = 2;
config.link_capacity_kbps = 80;
scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
pipe->SetReceiver(receiver_.get());
@@ -167,7 +169,7 @@
// Test we get statistics as expected.
TEST_F(FakeNetworkPipeTest, StatisticsTest) {
FakeNetworkPipe::Config config;
- config.queue_length = 2;
+ config.queue_length_packets = 2;
config.queue_delay_ms = 20;
config.link_capacity_kbps = 80;
scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
@@ -197,7 +199,7 @@
// delivery times change accordingly.
TEST_F(FakeNetworkPipeTest, ChangingCapacityWithEmptyPipeTest) {
FakeNetworkPipe::Config config;
- config.queue_length = 20;
+ config.queue_length_packets = 20;
config.link_capacity_kbps = 80;
scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
pipe->SetReceiver(receiver_.get());
@@ -255,7 +257,7 @@
// delivery times change accordingly.
TEST_F(FakeNetworkPipeTest, ChangingCapacityWithPacketsInPipeTest) {
FakeNetworkPipe::Config config;
- config.queue_length = 20;
+ config.queue_length_packets = 20;
config.link_capacity_kbps = 80;
scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
pipe->SetReceiver(receiver_.get());
diff --git a/test/rtcp_packet_parser.cc b/test/rtcp_packet_parser.cc
index 69c50d1..558bee3 100644
--- a/test/rtcp_packet_parser.cc
+++ b/test/rtcp_packet_parser.cc
@@ -80,6 +80,41 @@
case RTCPUtility::kRtcpRtpfbNackItemCode:
nack_item_.Set(parser.Packet().NACKItem);
break;
+ case RTCPUtility::kRtcpPsfbAppCode:
+ psfb_app_.Set(parser.Packet().PSFBAPP);
+ break;
+ case RTCPUtility::kRtcpPsfbRembItemCode:
+ remb_item_.Set(parser.Packet().REMBItem);
+ break;
+ case RTCPUtility::kRtcpRtpfbTmmbrCode:
+ tmmbr_.Set(parser.Packet().TMMBR);
+ break;
+ case RTCPUtility::kRtcpRtpfbTmmbrItemCode:
+ tmmbr_item_.Set(parser.Packet().TMMBRItem);
+ break;
+ case RTCPUtility::kRtcpRtpfbTmmbnCode:
+ tmmbn_.Set(parser.Packet().TMMBN);
+ tmmbn_items_.Clear();
+ break;
+ case RTCPUtility::kRtcpRtpfbTmmbnItemCode:
+ tmmbn_items_.Set(parser.Packet().TMMBNItem);
+ break;
+ case RTCPUtility::kRtcpXrHeaderCode:
+ xr_header_.Set(parser.Packet().XR);
+ dlrr_items_.Clear();
+ break;
+ case RTCPUtility::kRtcpXrReceiverReferenceTimeCode:
+ rrtr_.Set(parser.Packet().XRReceiverReferenceTimeItem);
+ break;
+ case RTCPUtility::kRtcpXrDlrrReportBlockCode:
+ dlrr_.Set();
+ break;
+ case RTCPUtility::kRtcpXrDlrrReportBlockItemCode:
+ dlrr_items_.Set(parser.Packet().XRDLRRReportBlockItem);
+ break;
+ case RTCPUtility::kRtcpXrVoipMetricCode:
+ voip_metric_.Set(parser.Packet().XRVOIPMetricItem);
+ break;
default:
break;
}
diff --git a/test/rtcp_packet_parser.h b/test/rtcp_packet_parser.h
index a09674f..f7d36ba 100644
--- a/test/rtcp_packet_parser.h
+++ b/test/rtcp_packet_parser.h
@@ -378,6 +378,254 @@
std::vector<uint16_t> last_nack_list_;
};
+class PsfbApp : public PacketType {
+ public:
+ PsfbApp() {}
+ virtual ~PsfbApp() {}
+
+ uint32_t Ssrc() const { return psfb_app_.SenderSSRC; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketPSFBAPP& psfb_app) {
+ psfb_app_ = psfb_app;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketPSFBAPP psfb_app_;
+};
+
+class RembItem : public PacketType {
+ public:
+ RembItem() : last_bitrate_bps_(0) {}
+ virtual ~RembItem() {}
+
+ int last_bitrate_bps() const { return last_bitrate_bps_; }
+ std::vector<uint32_t> last_ssrc_list() {
+ return last_ssrc_list_;
+ }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketPSFBREMBItem& remb_item) {
+ last_bitrate_bps_ = remb_item.BitRate;
+ last_ssrc_list_.clear();
+ last_ssrc_list_.insert(
+ last_ssrc_list_.end(),
+ remb_item.SSRCs,
+ remb_item.SSRCs + remb_item.NumberOfSSRCs);
+ ++num_packets_;
+ }
+
+ uint32_t last_bitrate_bps_;
+ std::vector<uint32_t> last_ssrc_list_;
+};
+
+class Tmmbr : public PacketType {
+ public:
+ Tmmbr() {}
+ virtual ~Tmmbr() {}
+
+ uint32_t Ssrc() const { return tmmbr_.SenderSSRC; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketRTPFBTMMBR& tmmbr) {
+ tmmbr_ = tmmbr;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketRTPFBTMMBR tmmbr_;
+};
+
+class TmmbrItem : public PacketType {
+ public:
+ TmmbrItem() {}
+ virtual ~TmmbrItem() {}
+
+ uint32_t Ssrc() const { return tmmbr_item_.SSRC; }
+ uint32_t BitrateKbps() const { return tmmbr_item_.MaxTotalMediaBitRate; }
+ uint32_t Overhead() const { return tmmbr_item_.MeasuredOverhead; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketRTPFBTMMBRItem& tmmbr_item) {
+ tmmbr_item_ = tmmbr_item;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketRTPFBTMMBRItem tmmbr_item_;
+};
+
+
+class Tmmbn : public PacketType {
+ public:
+ Tmmbn() {}
+ virtual ~Tmmbn() {}
+
+ uint32_t Ssrc() const { return tmmbn_.SenderSSRC; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketRTPFBTMMBN& tmmbn) {
+ tmmbn_ = tmmbn;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketRTPFBTMMBN tmmbn_;
+};
+
+class TmmbnItems : public PacketType {
+ public:
+ TmmbnItems() {}
+ virtual ~TmmbnItems() {}
+
+ uint32_t Ssrc(uint8_t num) const {
+ assert(num < tmmbns_.size());
+ return tmmbns_[num].SSRC;
+ }
+ uint32_t BitrateKbps(uint8_t num) const {
+ assert(num < tmmbns_.size());
+ return tmmbns_[num].MaxTotalMediaBitRate;
+ }
+ uint32_t Overhead(uint8_t num) const {
+ assert(num < tmmbns_.size());
+ return tmmbns_[num].MeasuredOverhead;
+ }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketRTPFBTMMBNItem& tmmbn_item) {
+ tmmbns_.push_back(tmmbn_item);
+ ++num_packets_;
+ }
+ void Clear() { tmmbns_.clear(); }
+
+ std::vector<RTCPUtility::RTCPPacketRTPFBTMMBNItem> tmmbns_;
+};
+
+class XrHeader : public PacketType {
+ public:
+ XrHeader() {}
+ virtual ~XrHeader() {}
+
+ uint32_t Ssrc() const { return xr_header_.OriginatorSSRC; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketXR& xr_header) {
+ xr_header_ = xr_header;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketXR xr_header_;
+};
+
+class Rrtr : public PacketType {
+ public:
+ Rrtr() {}
+ virtual ~Rrtr() {}
+
+ uint32_t NtpSec() const { return rrtr_.NTPMostSignificant; }
+ uint32_t NtpFrac() const { return rrtr_.NTPLeastSignificant; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketXRReceiverReferenceTimeItem& rrtr) {
+ rrtr_ = rrtr;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketXRReceiverReferenceTimeItem rrtr_;
+};
+
+class Dlrr : public PacketType {
+ public:
+ Dlrr() {}
+ virtual ~Dlrr() {}
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set() { ++num_packets_; }
+};
+
+class DlrrItems : public PacketType {
+ public:
+ DlrrItems() {}
+ virtual ~DlrrItems() {}
+
+ uint32_t Ssrc(uint8_t num) const {
+ assert(num < dlrrs_.size());
+ return dlrrs_[num].SSRC;
+ }
+ uint32_t LastRr(uint8_t num) const {
+ assert(num < dlrrs_.size());
+ return dlrrs_[num].LastRR;
+ }
+ uint32_t DelayLastRr(uint8_t num) const {
+ assert(num < dlrrs_.size());
+ return dlrrs_[num].DelayLastRR;
+ }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketXRDLRRReportBlockItem& dlrr) {
+ dlrrs_.push_back(dlrr);
+ ++num_packets_;
+ }
+ void Clear() { dlrrs_.clear(); }
+
+ std::vector<RTCPUtility::RTCPPacketXRDLRRReportBlockItem> dlrrs_;
+};
+
+class VoipMetric : public PacketType {
+ public:
+ VoipMetric() {}
+ virtual ~VoipMetric() {}
+
+ uint32_t Ssrc() const { return voip_metric_.SSRC; }
+ uint8_t LossRate() { return voip_metric_.lossRate; }
+ uint8_t DiscardRate() { return voip_metric_.discardRate; }
+ uint8_t BurstDensity() { return voip_metric_.burstDensity; }
+ uint8_t GapDensity() { return voip_metric_.gapDensity; }
+ uint16_t BurstDuration() { return voip_metric_.burstDuration; }
+ uint16_t GapDuration() { return voip_metric_.gapDuration; }
+ uint16_t RoundTripDelay() { return voip_metric_.roundTripDelay; }
+ uint16_t EndSystemDelay() { return voip_metric_.endSystemDelay; }
+ uint8_t SignalLevel() { return voip_metric_.signalLevel; }
+ uint8_t NoiseLevel() { return voip_metric_.noiseLevel; }
+ uint8_t Rerl() { return voip_metric_.RERL; }
+ uint8_t Gmin() { return voip_metric_.Gmin; }
+ uint8_t Rfactor() { return voip_metric_.Rfactor; }
+ uint8_t ExtRfactor() { return voip_metric_.extRfactor; }
+ uint8_t MosLq() { return voip_metric_.MOSLQ; }
+ uint8_t MosCq() { return voip_metric_.MOSCQ; }
+ uint8_t RxConfig() { return voip_metric_.RXconfig; }
+ uint16_t JbNominal() { return voip_metric_.JBnominal; }
+ uint16_t JbMax() { return voip_metric_.JBmax; }
+ uint16_t JbAbsMax() { return voip_metric_.JBabsMax; }
+
+ private:
+ friend class RtcpPacketParser;
+
+ void Set(const RTCPUtility::RTCPPacketXRVOIPMetricItem& voip_metric) {
+ voip_metric_ = voip_metric;
+ ++num_packets_;
+ }
+
+ RTCPUtility::RTCPPacketXRVOIPMetricItem voip_metric_;
+};
+
class RtcpPacketParser {
public:
RtcpPacketParser();
@@ -403,6 +651,17 @@
FirItem* fir_item() { return &fir_item_; }
Nack* nack() { return &nack_; }
NackItem* nack_item() { return &nack_item_; }
+ PsfbApp* psfb_app() { return &psfb_app_; }
+ RembItem* remb_item() { return &remb_item_; }
+ Tmmbr* tmmbr() { return &tmmbr_; }
+ TmmbrItem* tmmbr_item() { return &tmmbr_item_; }
+ Tmmbn* tmmbn() { return &tmmbn_; }
+ TmmbnItems* tmmbn_items() { return &tmmbn_items_; }
+ XrHeader* xr_header() { return &xr_header_; }
+ Rrtr* rrtr() { return &rrtr_; }
+ Dlrr* dlrr() { return &dlrr_; }
+ DlrrItems* dlrr_items() { return &dlrr_items_; }
+ VoipMetric* voip_metric() { return &voip_metric_; }
int report_blocks_per_ssrc(uint32_t ssrc) {
return report_blocks_per_ssrc_[ssrc];
@@ -427,6 +686,17 @@
FirItem fir_item_;
Nack nack_;
NackItem nack_item_;
+ PsfbApp psfb_app_;
+ RembItem remb_item_;
+ Tmmbr tmmbr_;
+ TmmbrItem tmmbr_item_;
+ Tmmbn tmmbn_;
+ TmmbnItems tmmbn_items_;
+ XrHeader xr_header_;
+ Rrtr rrtr_;
+ Dlrr dlrr_;
+ DlrrItems dlrr_items_;
+ VoipMetric voip_metric_;
std::map<uint32_t, int> report_blocks_per_ssrc_;
};
diff --git a/modules/video_coding/main/test/pcap_file_reader.cc b/test/rtp_file_reader.cc
similarity index 63%
rename from modules/video_coding/main/test/pcap_file_reader.cc
rename to test/rtp_file_reader.cc
index 3d4e265..be8dc2b 100644
--- a/modules/video_coding/main/test/pcap_file_reader.cc
+++ b/test/rtp_file_reader.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@@ -8,15 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/video_coding/main/test/pcap_file_reader.h"
+#include "webrtc/test/rtp_file_reader.h"
-#ifdef WIN32
-#include <windows.h>
-#include <Winsock2.h>
-#else
-#include <arpa/inet.h>
-#endif
-#include <assert.h>
#include <stdio.h>
#include <map>
@@ -24,11 +17,142 @@
#include <vector>
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
-namespace rtpplayer {
+namespace test {
+
+static const size_t kFirstLineLength = 40;
+static uint16_t kPacketHeaderSize = 8;
+
+#if 1
+# define DEBUG_LOG(text)
+# define DEBUG_LOG1(text, arg)
+#else
+# define DEBUG_LOG(text) (printf(text "\n"))
+# define DEBUG_LOG1(text, arg) (printf(text "\n", arg))
+#endif
+
+#define TRY(expr) \
+ do { \
+ if (!(expr)) { \
+ DEBUG_LOG1("FAIL at " __FILE__ ":%d", __LINE__); \
+ return false; \
+ } \
+ } while (0)
+
+class RtpFileReaderImpl : public RtpFileReader {
+ public:
+ virtual bool Init(const std::string& filename) = 0;
+};
+
+// Read RTP packets from file in rtpdump format, as documented at:
+// http://www.cs.columbia.edu/irt/software/rtptools/
+class RtpDumpReader : public RtpFileReaderImpl {
+ public:
+ RtpDumpReader() : file_(NULL) {}
+ virtual ~RtpDumpReader() {
+ if (file_ != NULL) {
+ fclose(file_);
+ file_ = NULL;
+ }
+ }
+
+ bool Init(const std::string& filename) {
+ file_ = fopen(filename.c_str(), "rb");
+ if (file_ == NULL) {
+ printf("ERROR: Can't open file: %s\n", filename.c_str());
+ return false;
+ }
+
+ char firstline[kFirstLineLength + 1] = {0};
+ if (fgets(firstline, kFirstLineLength, file_) == NULL) {
+ DEBUG_LOG("ERROR: Can't read from file\n");
+ return false;
+ }
+ if (strncmp(firstline, "#!rtpplay", 9) == 0) {
+ if (strncmp(firstline, "#!rtpplay1.0", 12) != 0) {
+ DEBUG_LOG("ERROR: wrong rtpplay version, must be 1.0\n");
+ return false;
+ }
+ } else if (strncmp(firstline, "#!RTPencode", 11) == 0) {
+ if (strncmp(firstline, "#!RTPencode1.0", 14) != 0) {
+ DEBUG_LOG("ERROR: wrong RTPencode version, must be 1.0\n");
+ return false;
+ }
+ } else {
+ DEBUG_LOG("ERROR: wrong file format of input file\n");
+ return false;
+ }
+
+ uint32_t start_sec;
+ uint32_t start_usec;
+ uint32_t source;
+ uint16_t port;
+ uint16_t padding;
+ TRY(Read(&start_sec));
+ TRY(Read(&start_usec));
+ TRY(Read(&source));
+ TRY(Read(&port));
+ TRY(Read(&padding));
+
+ return true;
+ }
+
+ virtual bool NextPacket(Packet* packet) OVERRIDE {
+ uint8_t* rtp_data = packet->data;
+ packet->length = Packet::kMaxPacketBufferSize;
+
+ uint16_t len;
+ uint16_t plen;
+ uint32_t offset;
+ TRY(Read(&len));
+ TRY(Read(&plen));
+ TRY(Read(&offset));
+
+ // Use 'len' here because a 'plen' of 0 specifies rtcp.
+ len -= kPacketHeaderSize;
+ if (packet->length < len) {
+ return false;
+ }
+ if (fread(rtp_data, 1, len, file_) != len) {
+ return false;
+ }
+
+ packet->length = len;
+ packet->time_ms = offset;
+ return true;
+ }
+
+ private:
+ bool Read(uint32_t* out) {
+ *out = 0;
+ for (size_t i = 0; i < 4; ++i) {
+ *out <<= 8;
+ uint8_t tmp;
+ if (fread(&tmp, 1, sizeof(uint8_t), file_) != sizeof(uint8_t))
+ return false;
+ *out |= tmp;
+ }
+ return true;
+ }
+
+ bool Read(uint16_t* out) {
+ *out = 0;
+ for (size_t i = 0; i < 2; ++i) {
+ *out <<= 8;
+ uint8_t tmp;
+ if (fread(&tmp, 1, sizeof(uint8_t), file_) != sizeof(uint8_t))
+ return false;
+ *out |= tmp;
+ }
+ return true;
+ }
+
+ FILE* file_;
+
+ DISALLOW_COPY_AND_ASSIGN(RtpDumpReader);
+};
enum {
kResultFail = -1,
@@ -56,50 +180,46 @@
const uint32_t kPcapBOMSwapOrder = 0xd4c3b2a1UL;
const uint32_t kPcapBOMNoSwapOrder = 0xa1b2c3d4UL;
-#if 1
-# define DEBUG_LOG(text)
-# define DEBUG_LOG1(text, arg)
-#else
-# define DEBUG_LOG(text) (printf(text "\n"))
-# define DEBUG_LOG1(text, arg) (printf(text "\n", arg))
-#endif
-
-#define TRY(expr) \
- do { \
- int r = (expr); \
- if (r == kResultFail) { \
- DEBUG_LOG1("FAIL at " __FILE__ ":%d", __LINE__); \
- return kResultFail; \
- } else if (r == kResultSkip) { \
- return kResultSkip; \
- } \
+#define TRY_PCAP(expr) \
+ do { \
+ int r = (expr); \
+ if (r == kResultFail) { \
+ DEBUG_LOG1("FAIL at " __FILE__ ":%d", __LINE__); \
+ return kResultFail; \
+ } else if (r == kResultSkip) { \
+ return kResultSkip; \
+ } \
} while (0)
// Read RTP packets from file in tcpdump/libpcap format, as documented at:
// http://wiki.wireshark.org/Development/LibpcapFileFormat
-class PcapFileReaderImpl : public RtpPacketSourceInterface {
+class PcapReader : public RtpFileReaderImpl {
public:
- PcapFileReaderImpl()
+ PcapReader()
: file_(NULL),
swap_pcap_byte_order_(false),
+#ifdef WEBRTC_ARCH_BIG_ENDIAN
swap_network_byte_order_(false),
+#else
+ swap_network_byte_order_(true),
+#endif
read_buffer_(),
packets_by_ssrc_(),
packets_(),
next_packet_it_() {
- int16_t test = 0x7f00;
- if (test != htons(test)) {
- swap_network_byte_order_ = true;
- }
}
- virtual ~PcapFileReaderImpl() {
+ virtual ~PcapReader() {
if (file_ != NULL) {
fclose(file_);
file_ = NULL;
}
}
+ bool Init(const std::string& filename) OVERRIDE {
+ return Initialize(filename) == kResultSuccess;
+ }
+
int Initialize(const std::string& filename) {
file_ = fopen(filename.c_str(), "rb");
if (file_ == NULL) {
@@ -115,7 +235,7 @@
uint32_t stream_start_ms = 0;
int32_t next_packet_pos = ftell(file_);
for (;;) {
- TRY(fseek(file_, next_packet_pos, SEEK_SET));
+ TRY_PCAP(fseek(file_, next_packet_pos, SEEK_SET));
int result = ReadPacket(&next_packet_pos, stream_start_ms,
++total_packet_count);
if (result == kResultFail) {
@@ -165,7 +285,15 @@
return kResultSuccess;
}
- virtual int NextPacket(uint8_t* data, uint32_t* length, uint32_t* time_ms) {
+ virtual bool NextPacket(Packet* packet) OVERRIDE {
+ uint32_t length = Packet::kMaxPacketBufferSize;
+ if (NextPcap(packet->data, &length, &packet->time_ms) != kResultSuccess)
+ return false;
+ packet->length = static_cast<size_t>(length);
+ return true;
+ }
+
+ virtual int NextPcap(uint8_t* data, uint32_t* length, uint32_t* time_ms) {
assert(data);
assert(length);
assert(time_ms);
@@ -176,8 +304,8 @@
if (*length < next_packet_it_->payload_length) {
return -1;
}
- TRY(fseek(file_, next_packet_it_->pos_in_file, SEEK_SET));
- TRY(Read(data, next_packet_it_->payload_length));
+ TRY_PCAP(fseek(file_, next_packet_it_->pos_in_file, SEEK_SET));
+ TRY_PCAP(Read(data, next_packet_it_->payload_length));
*length = next_packet_it_->payload_length;
*time_ms = next_packet_it_->time_offset_ms;
next_packet_it_++;
@@ -205,7 +333,7 @@
int ReadGlobalHeader() {
uint32_t magic;
- TRY(Read(&magic, false));
+ TRY_PCAP(Read(&magic, false));
if (magic == kPcapBOMSwapOrder) {
swap_pcap_byte_order_ = true;
} else if (magic == kPcapBOMNoSwapOrder) {
@@ -216,8 +344,8 @@
uint16_t version_major;
uint16_t version_minor;
- TRY(Read(&version_major, false));
- TRY(Read(&version_minor, false));
+ TRY_PCAP(Read(&version_major, false));
+ TRY_PCAP(Read(&version_minor, false));
if (version_major != kPcapVersionMajor ||
version_minor != kPcapVersionMinor) {
return kResultFail;
@@ -227,10 +355,10 @@
uint32_t sigfigs; // Accuracy of timestamps.
uint32_t snaplen; // Max length of captured packets, in octets.
uint32_t network; // Data link type.
- TRY(Read(&this_zone, false));
- TRY(Read(&sigfigs, false));
- TRY(Read(&snaplen, false));
- TRY(Read(&network, false));
+ TRY_PCAP(Read(&this_zone, false));
+ TRY_PCAP(Read(&sigfigs, false));
+ TRY_PCAP(Read(&snaplen, false));
+ TRY_PCAP(Read(&network, false));
// Accept only LINKTYPE_NULL and LINKTYPE_ETHERNET.
// See: http://www.tcpdump.org/linktypes.html
@@ -249,27 +377,26 @@
uint32_t ts_usec; // Timestamp microseconds.
uint32_t incl_len; // Number of octets of packet saved in file.
uint32_t orig_len; // Actual length of packet.
- TRY(Read(&ts_sec, false));
- TRY(Read(&ts_usec, false));
- TRY(Read(&incl_len, false));
- TRY(Read(&orig_len, false));
+ TRY_PCAP(Read(&ts_sec, false));
+ TRY_PCAP(Read(&ts_usec, false));
+ TRY_PCAP(Read(&incl_len, false));
+ TRY_PCAP(Read(&orig_len, false));
*next_packet_pos = ftell(file_) + incl_len;
RtpPacketMarker marker = {0};
marker.packet_number = number;
marker.time_offset_ms = CalcTimeDelta(ts_sec, ts_usec, stream_start_ms);
- TRY(ReadPacketHeader(&marker));
+ TRY_PCAP(ReadPacketHeader(&marker));
marker.pos_in_file = ftell(file_);
if (marker.payload_length > sizeof(read_buffer_)) {
printf("Packet too large!\n");
return kResultFail;
}
- TRY(Read(read_buffer_, marker.payload_length));
+ TRY_PCAP(Read(read_buffer_, marker.payload_length));
- ModuleRTPUtility::RTPHeaderParser rtp_parser(read_buffer_,
- marker.payload_length);
+ RtpUtility::RtpHeaderParser rtp_parser(read_buffer_, marker.payload_length);
if (rtp_parser.RTCP()) {
rtp_parser.ParseRtcp(&marker.rtp_header);
packets_.push_back(marker);
@@ -295,7 +422,7 @@
// the header as such and will likely fail reading the IP header if this is
// something else than null/loopback.
uint32_t protocol;
- TRY(Read(&protocol, true));
+ TRY_PCAP(Read(&protocol, true));
if (protocol == kBsdNullLoopback1 || protocol == kBsdNullLoopback2) {
int result = ReadXxpIpHeader(marker);
DEBUG_LOG("Recognized loopback frame");
@@ -304,12 +431,12 @@
}
}
- TRY(fseek(file_, file_pos, SEEK_SET));
+ TRY_PCAP(fseek(file_, file_pos, SEEK_SET));
// Check for Ethernet II, IP frame header.
uint16_t type;
- TRY(Skip(kEthernetIIHeaderMacSkip)); // Source+destination MAC.
- TRY(Read(&type, true));
+ TRY_PCAP(Skip(kEthernetIIHeaderMacSkip)); // Source+destination MAC.
+ TRY_PCAP(Read(&type, true));
if (type == kEthertypeIp) {
int result = ReadXxpIpHeader(marker);
DEBUG_LOG("Recognized ethernet 2 frame");
@@ -342,14 +469,14 @@
uint16_t fragment;
uint16_t protocol;
uint16_t checksum;
- TRY(Read(&version, true));
- TRY(Read(&length, true));
- TRY(Read(&id, true));
- TRY(Read(&fragment, true));
- TRY(Read(&protocol, true));
- TRY(Read(&checksum, true));
- TRY(Read(&marker->source_ip, true));
- TRY(Read(&marker->dest_ip, true));
+ TRY_PCAP(Read(&version, true));
+ TRY_PCAP(Read(&length, true));
+ TRY_PCAP(Read(&id, true));
+ TRY_PCAP(Read(&fragment, true));
+ TRY_PCAP(Read(&protocol, true));
+ TRY_PCAP(Read(&checksum, true));
+ TRY_PCAP(Read(&marker->source_ip, true));
+ TRY_PCAP(Read(&marker->dest_ip, true));
if (((version >> 12) & 0x000f) != kIpVersion4) {
DEBUG_LOG("IP header is not IPv4");
@@ -365,7 +492,7 @@
// Skip remaining fields of IP header.
uint16_t header_length = (version & 0x0f00) >> (8 - 2);
assert(header_length >= kMinIpHeaderLength);
- TRY(Skip(header_length - kMinIpHeaderLength));
+ TRY_PCAP(Skip(header_length - kMinIpHeaderLength));
protocol = protocol & 0x00ff;
if (protocol == kProtocolTcp) {
@@ -374,10 +501,10 @@
} else if (protocol == kProtocolUdp) {
uint16_t length;
uint16_t checksum;
- TRY(Read(&marker->source_port, true));
- TRY(Read(&marker->dest_port, true));
- TRY(Read(&length, true));
- TRY(Read(&checksum, true));
+ TRY_PCAP(Read(&marker->source_port, true));
+ TRY_PCAP(Read(&marker->dest_port, true));
+ TRY_PCAP(Read(&length, true));
+ TRY_PCAP(Read(&checksum, true));
marker->payload_length = length - kUdpHeaderLength;
} else {
DEBUG_LOG("Unknown transport (expected UDP or TCP)");
@@ -444,22 +571,33 @@
FILE* file_;
bool swap_pcap_byte_order_;
- bool swap_network_byte_order_;
+ const bool swap_network_byte_order_;
uint8_t read_buffer_[kMaxReadBufferSize];
SsrcMap packets_by_ssrc_;
std::vector<RtpPacketMarker> packets_;
PacketIterator next_packet_it_;
- DISALLOW_COPY_AND_ASSIGN(PcapFileReaderImpl);
+ DISALLOW_COPY_AND_ASSIGN(PcapReader);
};
-RtpPacketSourceInterface* CreatePcapFileReader(const std::string& filename) {
- scoped_ptr<PcapFileReaderImpl> impl(new PcapFileReaderImpl());
- if (impl->Initialize(filename) != 0) {
+RtpFileReader* RtpFileReader::Create(FileFormat format,
+ const std::string& filename) {
+ RtpFileReaderImpl* reader = NULL;
+ switch (format) {
+ case kPcap:
+ reader = new PcapReader();
+ break;
+ case kRtpDump:
+ reader = new RtpDumpReader();
+ break;
+ }
+ if (!reader->Init(filename)) {
+ delete reader;
return NULL;
}
- return impl.release();
+ return reader;
}
-} // namespace rtpplayer
+
+} // namespace test
} // namespace webrtc
diff --git a/test/rtp_file_reader.h b/test/rtp_file_reader.h
new file mode 100644
index 0000000..379bf2d
--- /dev/null
+++ b/test/rtp_file_reader.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#ifndef WEBRTC_TEST_RTP_FILE_READER_H_
+#define WEBRTC_TEST_RTP_FILE_READER_H_
+
+#include <string>
+
+#include "webrtc/common_types.h"
+
+namespace webrtc {
+namespace test {
+class RtpFileReader {
+ public:
+ enum FileFormat {
+ kPcap,
+ kRtpDump,
+ };
+
+ struct Packet {
+ static const size_t kMaxPacketBufferSize = 1500;
+ uint8_t data[kMaxPacketBufferSize];
+ size_t length;
+
+ uint32_t time_ms;
+ };
+
+ virtual ~RtpFileReader() {}
+ static RtpFileReader* Create(FileFormat format,
+ const std::string& filename);
+
+ virtual bool NextPacket(Packet* packet) = 0;
+};
+} // namespace test
+} // namespace webrtc
+#endif // WEBRTC_TEST_RTP_FILE_READER_H_
diff --git a/modules/video_coding/main/test/pcap_file_reader_unittest.cc b/test/rtp_file_reader_unittest.cc
similarity index 63%
rename from modules/video_coding/main/test/pcap_file_reader_unittest.cc
rename to test/rtp_file_reader_unittest.cc
index 1810071..b5fa260 100644
--- a/modules/video_coding/main/test/pcap_file_reader_unittest.cc
+++ b/test/rtp_file_reader_unittest.cc
@@ -12,13 +12,38 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/modules/video_coding/main/test/pcap_file_reader.h"
-#include "webrtc/modules/video_coding/main/test/rtp_player.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/test/rtp_file_reader.h"
#include "webrtc/test/testsupport/fileutils.h"
namespace webrtc {
-namespace rtpplayer {
+
+class TestRtpFileReader : public ::testing::Test {
+ public:
+ void Init(const std::string& filename) {
+ std::string filepath =
+ test::ResourcePath("video_coding/" + filename, "rtp");
+ rtp_packet_source_.reset(
+ test::RtpFileReader::Create(test::RtpFileReader::kRtpDump, filepath));
+ ASSERT_TRUE(rtp_packet_source_.get() != NULL);
+ }
+
+ int CountRtpPackets() {
+ test::RtpFileReader::Packet packet;
+ int c = 0;
+ while (rtp_packet_source_->NextPacket(&packet))
+ c++;
+ return c;
+ }
+
+ private:
+ scoped_ptr<test::RtpFileReader> rtp_packet_source_;
+};
+
+TEST_F(TestRtpFileReader, Test60Packets) {
+ Init("pltype103");
+ EXPECT_EQ(60, CountRtpPackets());
+}
typedef std::map<uint32_t, int> PacketsPerSsrc;
@@ -27,35 +52,24 @@
void Init(const std::string& filename) {
std::string filepath =
test::ResourcePath("video_coding/" + filename, "pcap");
- rtp_packet_source_.reset(CreatePcapFileReader(filepath));
+ rtp_packet_source_.reset(
+ test::RtpFileReader::Create(test::RtpFileReader::kPcap, filepath));
ASSERT_TRUE(rtp_packet_source_.get() != NULL);
}
int CountRtpPackets() {
- const uint32_t kBufferSize = 4096;
- uint8_t data[kBufferSize];
- uint32_t length = kBufferSize;
- uint32_t dummy_time_ms = 0;
int c = 0;
- while (rtp_packet_source_->NextPacket(data, &length, &dummy_time_ms) == 0) {
- EXPECT_GE(kBufferSize, length);
- length = kBufferSize;
+ test::RtpFileReader::Packet packet;
+ while (rtp_packet_source_->NextPacket(&packet))
c++;
- }
return c;
}
PacketsPerSsrc CountRtpPacketsPerSsrc() {
- const uint32_t kBufferSize = 4096;
- uint8_t data[kBufferSize];
- uint32_t length = kBufferSize;
- uint32_t dummy_time_ms = 0;
PacketsPerSsrc pps;
- while (rtp_packet_source_->NextPacket(data, &length, &dummy_time_ms) == 0) {
- EXPECT_GE(kBufferSize, length);
- length = kBufferSize;
-
- ModuleRTPUtility::RTPHeaderParser rtp_header_parser(data, length);
+ test::RtpFileReader::Packet packet;
+ while (rtp_packet_source_->NextPacket(&packet)) {
+ RtpUtility::RtpHeaderParser rtp_header_parser(packet.data, packet.length);
webrtc::RTPHeader header;
if (!rtp_header_parser.RTCP() && rtp_header_parser.Parse(header, NULL)) {
pps[header.ssrc]++;
@@ -65,7 +79,7 @@
}
private:
- scoped_ptr<RtpPacketSourceInterface> rtp_packet_source_;
+ scoped_ptr<test::RtpFileReader> rtp_packet_source_;
};
TEST_F(TestPcapFileReader, TestEthernetIIFrame) {
@@ -94,6 +108,4 @@
EXPECT_EQ(113, pps[0x59fe6ef0]);
EXPECT_EQ(61, pps[0xed2bd2ac]);
}
-
-} // namespace rtpplayer
} // namespace webrtc
diff --git a/test/rtp_rtcp_observer.h b/test/rtp_rtcp_observer.h
index e448653..11531b3 100644
--- a/test/rtp_rtcp_observer.h
+++ b/test/rtp_rtcp_observer.h
@@ -16,6 +16,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
+#include "webrtc/test/direct_transport.h"
#include "webrtc/typedefs.h"
#include "webrtc/video_send_stream.h"
@@ -128,7 +129,7 @@
private:
virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- EXPECT_FALSE(RtpHeaderParser::IsRtcp(packet, static_cast<int>(length)));
+ EXPECT_FALSE(RtpHeaderParser::IsRtcp(packet, length));
Action action;
{
CriticalSectionScoped lock(crit_);
@@ -145,7 +146,7 @@
}
virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- EXPECT_TRUE(RtpHeaderParser::IsRtcp(packet, static_cast<int>(length)));
+ EXPECT_TRUE(RtpHeaderParser::IsRtcp(packet, length));
Action action;
{
CriticalSectionScoped lock(crit_);
diff --git a/test/test.gyp b/test/test.gyp
index 69776e7..154ba2c 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -115,9 +115,7 @@
'testsupport/trace_to_stderr.h',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
],
@@ -179,6 +177,7 @@
'channel_transport/udp_transport_unittest.cc',
'channel_transport/udp_socket_manager_unittest.cc',
'channel_transport/udp_socket_wrapper_unittest.cc',
+ 'testsupport/always_passing_unittest.cc',
'testsupport/unittest_utils.h',
'testsupport/fileutils_unittest.cc',
'testsupport/frame_reader_unittest.cc',
@@ -191,9 +190,7 @@
4267, # size_t to int truncation.
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -202,33 +199,7 @@
},
],
'conditions': [
- ['build_with_chromium==0', {
- 'targets': [
- {
- 'target_name': 'buildbot_tests_scripts',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- 'buildbot_tests.py',
- '<(webrtc_root)/tools/e2e_quality/audio/run_audio_test.py',
- ],
- },
- {
- 'destination': '<(PRODUCT_DIR)/perf',
- 'files': [
- '<(DEPTH)/tools/perf/__init__.py',
- '<(DEPTH)/tools/perf/perf_utils.py',
- ],
- },
- ],
- }, # target buildbot_tests_scripts
- ],
- }],
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['include_tests==1 and build_with_chromium==1 and OS=="android"', {
+ ['include_tests==1 and OS=="android"', {
'targets': [
{
'target_name': 'test_support_unittests_apk_target',
diff --git a/modules/desktop_capture/mac/osx_version.h b/test/testsupport/always_passing_unittest.cc
similarity index 64%
rename from modules/desktop_capture/mac/osx_version.h
rename to test/testsupport/always_passing_unittest.cc
index 0ba49a4..afb80e6 100644
--- a/modules/desktop_capture/mac/osx_version.h
+++ b/test/testsupport/always_passing_unittest.cc
@@ -8,9 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "testing/gtest/include/gtest/gtest.h"
+
namespace webrtc {
-// Returns true if the OS version >= OSX 10.7.
-bool IsOSLionOrLater();
+// A test that always passes. Useful when all tests in a executable are
+// disabled, since a gtest returns exit code 1 if no tests have executed.
+TEST(AlwaysPassingTest, AlwaysPassingTest) {}
} // namespace webrtc
diff --git a/test/w3c/getusermedia_conformance_test.html b/test/w3c/getusermedia_conformance_test.html
deleted file mode 100644
index 7b724a9..0000000
--- a/test/w3c/getusermedia_conformance_test.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<!--
-Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
-
-Use of this source code is governed by a BSD-style license
-that can be found in the LICENSE file in the root of the source
-tree. An additional intellectual property rights grant can be found
-in the file PATENTS. All contributing project authors may
-be found in the AUTHORS file in the root of the source tree.
--->
-<html>
-<head>
- <title>getUserMedia Browser Conformance Test</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta charset="utf-8">
-</head>
-
-<!--
-To quickly iterate when developing this test, make sure you select
-'Always allow this site to use this webcam' option in the dropdown menu of
-Chrome when it's requesting access to your webcam.
-Notice that this requires the site you're browsing to use HTTPS.
--->
-
-<body>
- <h1>Conformance test for the Media Capture and Streams API</h1>
- <p>This page contains a foundation of conformance tests that can be expanded
- to cover most things in the W3C specification of the Media Capture and Streams
- API.</p>
- <p>VERSION: These tests are based on the W3C Editor's Draft of 07 May,
- 2014
- (<a href="http://dev.w3.org/2011/webrtc/editor/archives/20140507/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20140507/getusermedia.html</a>)
- <p>STATUS: In its current state, it only performs simple checks on the various
- attributes and methods of the objects exposed by the API. There's not much
- functionality tested so far. The spec doesn't define if an attribute shall be
- owned by the object itself (<code>assert_own_propety</code>) or if it shall be
- inherited (<code>assert_inherits</code>). Since testharness.js doesn't offer
- any generic function that covers both, the method for verification is
- currently chosen according to the current Chrome implementation.</p>
- <p>HOW TO RUN: For Chrome, do this:
- <ul>
- <li>Provide a fake webcam (<code>--use-fake-ui-for-media-stream</code> in
- Chrome)</li>
- <li>Automatically allow access to the webcam
- (<code>--use-fake-device-for-media-stream</code> in Chrome)</li>
- <li>Allow loading HTML files from disk
- (<code>--allow-file-access-from-files</code> in Chrome)</li>
- </ul>
- Then just load this HTML file to execute the tests.</p>
- <p>For Firefox, set the media.navigator.permission.disabled property to true
- about:config. You must have a webcam and microphone available on the system.
- </p>
-
- <div id="log"></div>
- <!-- These files are in place when executing on W3C. -->
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- <script src="/common/vendor-prefix.js"
- data-prefixed-objects=
- '[{"ancestors":["navigator"], "name":"getUserMedia"},
- {"ancestors":["window"], "name":"RTCPeerConnection"}]'
- data-prefixed-prototypes=
- '[{"ancestors":["HTMLMediaElement"],"name":"srcObject"}]'>
- </script>
-
- <script src="getusermedia_conformance_test.js"></script>
-</body>
-</html>
diff --git a/test/w3c/getusermedia_conformance_test.js b/test/w3c/getusermedia_conformance_test.js
deleted file mode 100644
index d7c7828..0000000
--- a/test/w3c/getusermedia_conformance_test.js
+++ /dev/null
@@ -1,531 +0,0 @@
-// Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
-//
-// Use of this source code is governed by a BSD-style license
-// that can be found in the LICENSE file in the root of the source
-// tree. An additional intellectual property rights grant can be found
-// in the file PATENTS. All contributing project authors may
-// be found in the AUTHORS file in the root of the source tree.
-
-setup({timeout:5000});
-
-// Helper functions to minimize code duplication.
-function failedCallback(test) {
- return test.step_func(function (error) {
- assert_unreached('Should not get an error callback');
- });
-}
-function invokeGetUserMedia(test, okCallback) {
- navigator.getUserMedia({ video: true, audio: true }, okCallback,
- failedCallback(test));
-}
-
-function createInvisibleVideoTag() {
- var video = document.createElement('video');
- video.autoplay = true;
- video.style.display = 'none';
- document.body.appendChild(video);
- return video;
-}
-
-// 4.2 MediaStream.
-var mediaStreamTest = async_test('4.2 MediaStream');
-
-function verifyMediaStream(stream) {
- // TODO(kjellander): Add checks for default values where applicable.
- test(function () {
- assert_own_property(stream, 'id');
- assert_true(typeof stream.id === 'string');
- assert_readonly(stream, 'id');
- }, '[MediaStream] id attribute');
-
- test(function () {
- assert_inherits(stream, 'getAudioTracks');
- assert_true(typeof stream.getAudioTracks === 'function');
- }, '[MediaStream] getAudioTracks function');
-
- test(function () {
- assert_inherits(stream, 'getVideoTracks');
- assert_true(typeof stream.getVideoTracks === 'function');
- }, '[MediaStream] getVideoTracks function');
-
- test(function () {
- assert_inherits(stream, 'getTrackById');
- assert_true(typeof stream.getTrackById === 'function');
- }, '[MediaStream] getTrackById function');
-
- test(function () {
- assert_inherits(stream, 'addTrack');
- assert_true(typeof stream.addTrack === 'function');
- }, '[MediaStream] addTrack function');
-
- test(function () {
- assert_inherits(stream, 'removeTrack');
- assert_true(typeof stream.removeTrack === 'function');
- }, '[MediaStream] removeTrack function');
-
- test(function () {
- assert_inherits(stream, 'clone');
- assert_true(typeof stream.clone === 'function');
- }, '[MediaStream] clone function');
-
- test(function () {
- assert_own_property(stream, 'active');
- assert_true(typeof stream.active === 'boolean');
- assert_readonly(stream, 'active');
- }, '[MediaStream] active attribute');
-
- test(function () {
- assert_own_property(stream, 'onactive');
- assert_true(stream.onactive === null);
- }, '[MediaStream] onactive EventHandler');
-
- test(function () {
- assert_own_property(stream, 'oninactive');
- assert_true(stream.oninactive === null);
- }, '[MediaStream] oninactive EventHandler');
-
- test(function () {
- assert_own_property(stream, 'onaddtrack');
- assert_true(stream.onaddtrack === null);
- }, '[MediaStream] onaddtrack EventHandler');
-
- test(function () {
- assert_own_property(stream, 'onremovetrack');
- assert_true(stream.onremovetrack === null);
- }, '[MediaStream] onremovetrack EventHandler');
-}
-
-mediaStreamTest.step(function() {
- var okCallback = mediaStreamTest.step_func(function (stream) {
- verifyMediaStream(stream);
- var videoTracks = stream.getVideoTracks();
- assert_true(videoTracks.length > 0);
- mediaStreamTest.done();
- });
-
- invokeGetUserMedia(mediaStreamTest, okCallback);
-});
-
-var mediaStreamCallbacksTest = async_test('4.2.2 MediaStream callbacks');
-
-mediaStreamCallbacksTest.step(function() {
- var addCallbackCalled = false;
- var onAddTrackCallback = mediaStreamCallbacksTest.step_func(function (event) {
- assert_true(event.track instanceof MediaStreamTrack);
- addCallbackCalled = true;
- });
- var onRemoveTrackCallback =
- mediaStreamCallbacksTest.step_func(function (event) {
- assert_true(event.track instanceof MediaStreamTrack);
- assert_true(addCallbackCalled, 'Add should have been called after remove.');
- mediaStreamCallbacksTest.done();
- });
- var okCallback = mediaStreamCallbacksTest.step_func(function (stream) {
- var videoTracks = stream.getVideoTracks();
-
- // Verify event handlers are working.
- stream.onaddtrack = onAddTrackCallback;
- stream.onremovetrack = onRemoveTrackCallback;
- stream.removeTrack(videoTracks[0]);
- stream.addTrack(videoTracks[0]);
- });
-
- invokeGetUserMedia(mediaStreamCallbacksTest, okCallback);
-});
-
-// TODO(phoglund): add test for onactive/oninactive.
-
-// 4.3 MediaStreamTrack.
-var mediaStreamTrackTest = async_test('4.3 MediaStreamTrack');
-
-function verifyTrack(type, track) {
- test(function () {
- assert_own_property(track, 'kind');
- assert_readonly(track, 'kind');
- assert_true(typeof track.kind === 'string',
- 'kind is an object (DOMString)');
- }, '[MediaStreamTrack (' + type + ')] kind attribute');
-
- test(function () {
- assert_own_property(track, 'id');
- assert_readonly(track, 'id');
- assert_true(typeof track.id === 'string',
- 'id is an object (DOMString)');
- }, '[MediaStreamTrack (' + type + ')] id attribute');
-
- test(function () {
- assert_own_property(track, 'label');
- assert_readonly(track, 'label');
- assert_true(typeof track.label === 'string',
- 'label is an object (DOMString)');
- }, '[MediaStreamTrack (' + type + ')] label attribute');
-
- test(function () {
- assert_own_property(track, 'enabled');
- assert_true(typeof track.enabled === 'boolean');
- assert_true(track.enabled, 'enabled property must be true initially');
- }, '[MediaStreamTrack (' + type + ')] enabled attribute');
-
- test(function () {
- assert_own_property(track, 'muted');
- assert_readonly(track, 'muted');
- assert_true(typeof track.muted === 'boolean');
- assert_false(track.muted, 'muted property must be false initially');
- }, '[MediaStreamTrack (' + type + ')] muted attribute');
-
- test(function () {
- assert_own_property(track, 'onmute');
- assert_true(track.onmute === null);
- }, '[MediaStreamTrack (' + type + ')] onmute EventHandler');
-
- test(function () {
- assert_own_property(track, 'onunmute');
- assert_true(track.onunmute === null);
- }, '[MediaStreamTrack (' + type + ')] onunmute EventHandler');
-
- test(function () {
- assert_own_property(track, '_readonly');
- assert_readonly(track, '_readonly');
- assert_true(typeof track._readonly === 'boolean');
- }, '[MediaStreamTrack (' + type + ')] _readonly attribute');
-
- test(function () {
- assert_own_property(track, 'remote');
- assert_readonly(track, 'remote');
- assert_true(typeof track.remote === 'boolean');
- }, '[MediaStreamTrack (' + type + ')] remote attribute');
-
- test(function () {
- assert_own_property(track, 'readyState');
- assert_readonly(track, 'readyState');
- assert_true(typeof track.readyState === 'string');
- // TODO(kjellander): verify the initial state.
- }, '[MediaStreamTrack (' + type + ')] readyState attribute');
-
- test(function () {
- assert_own_property(track, 'onstarted');
- assert_true(track.onstarted === null);
- }, '[MediaStreamTrack (' + type + ')] onstarted EventHandler');
-
- test(function () {
- assert_own_property(track, 'onended');
- assert_true(track.onended === null);
- }, '[MediaStreamTrack (' + type + ')] onended EventHandler');
-
- test(function () {
- assert_inherits(track, 'getNativeSettings');
- assert_true(typeof track.capabilities === 'function');
- }, '[MediaStreamTrack (' + type + ')]: getNativeSettings function');
-
- test(function () {
- assert_inherits(track, 'clone');
- assert_true(typeof track.clone === 'function');
- }, '[MediaStreamTrack (' + type + ')] clone function');
-
- test(function () {
- assert_inherits(track, 'stop');
- assert_true(typeof track.stop === 'function');
- }, '[MediaStreamTrack (' + type + ')] stop function');
-
- test(function () {
- assert_inherits(track, 'getCapabilities');
- assert_true(typeof track.capabilities === 'function');
- }, '[MediaStreamTrack (' + type + ')]: getCapabilities function');
-
- test(function () {
- assert_inherits(track, 'getConstraints');
- assert_true(typeof track.constraints === 'function');
- }, '[MediaStreamTrack (' + type + ')]: getConstraints function');
-
- test(function () {
- assert_inherits(track, 'getSettings');
- assert_true(typeof track.constraints === 'function');
- }, '[MediaStreamTrack (' + type + ')]: getSettings function');
-
- test(function () {
- assert_inherits(track, 'applyConstraints');
- assert_true(typeof track.applyConstraints === 'function');
- }, '[MediaStreamTrack (' + type + ')]: applyConstraints function');
-};
-
-mediaStreamTrackTest.step(function() {
- var okCallback = mediaStreamTrackTest.step_func(function (stream) {
- verifyTrack('audio', stream.getAudioTracks()[0]);
- verifyTrack('video', stream.getVideoTracks()[0]);
- mediaStreamTrackTest.done();
- });
- invokeGetUserMedia(mediaStreamTrackTest, okCallback);
-});
-
-mediaStreamTrackTest.step(function() {
- var okCallback = mediaStreamTrackTest.step_func(function (stream) {
- // Verify event handlers are working.
- var track = stream.getVideoTracks()[0];
- track.onended = onEndedCallback
- track.stop();
- mediaStreamTrackTest.done();
- });
- var onEndedCallback = mediaStreamTrackTest.step_func(function () {
- assert_true(track.ended);
- mediaStreamTrackTest.done();
- });
- invokeGetUserMedia(mediaStreamTrackTest, okCallback);
-});
-
-// 4.4 MediaStreamTrackEvent tests.
-var mediaStreamTrackEventTest = async_test('4.4 MediaStreamTrackEvent');
-mediaStreamTrackEventTest.step(function() {
- var okCallback = mediaStreamTrackEventTest.step_func(function (stream) {
- // TODO(kjellander): verify attributes.
- mediaStreamTrackEventTest.done();
- });
- invokeGetUserMedia(mediaStreamTrackEventTest, okCallback);
-});
-
-// 6. Media streams as media elements.
-
-var playingInMediaElementTest = async_test(
- '6.2 Loading and Playing a MediaStream in a Media Element');
-playingInMediaElementTest.step(function() {
- var video = createInvisibleVideoTag();
-
- var okCallback = playingInMediaElementTest.step_func(function (stream) {
- video.onplay = playingInMediaElementTest.step_func(function() {
- // This depends on what webcam we're actually running with, but the
- // resolution should at least be greater than or equal to QVGA.
- assert_greater_than_equal(video.videoWidth, 320);
- assert_greater_than_equal(video.videoHeight, 240);
-
- playingInMediaElementTest.done();
- });
- video.srcObject = stream;
- });
- invokeGetUserMedia(playingInMediaElementTest, okCallback);
-});
-
-// Verifies a media element track (for instance belonging to a video tag)
-// after it has been assigned a media stream.
-function verifyOneMediaElementTrack(track, correspondingMediaStreamTrack) {
- assert_equals(track.id, correspondingMediaStreamTrack.id);
- assert_equals(track.kind, 'main');
- assert_equals(track.label, correspondingMediaStreamTrack.label);
- assert_equals(track.language, '');
-}
-
-var setsUpMediaTracksRightTest = async_test(
- '6.2 Sets up <video> audio and video tracks right');
-setsUpMediaTracksRightTest.step(function() {
- var video = createInvisibleVideoTag();
-
- var okCallback = setsUpMediaTracksRightTest.step_func(function (stream) {
- video.onplay = setsUpMediaTracksRightTest.step_func(function() {
- // Verify the requirements on the video tag's streams as outlined in 6.2.
- // There could be any number of tracks depending on what device we have
- // connected, so verify all of them. There should be at least one of audio
- // and video each though.
- assert_inherits(video, 'videoTracks',
- 'Browser missing videoTracks support on media elements.');
- assert_readonly(video, 'videoTracks');
- assert_greater_than_equal(video.videoTracks.length, 1);
- assert_equals(video.videoTracks.length, stream.getVideoTracks().length);
-
- for (var i = 0; i < video.videoTracks.length; i++) {
- verifyOneMediaElementTrack(video.videoTracks[i],
- stream.getVideoTracks()[i]);
- }
-
- assert_inherits(video, 'audioTracks',
- 'Browser missing audioTracks support on media elements.');
- assert_readonly(video, 'audioTracks');
- assert_greater_than_equal(video.audioTracks.length, 1);
- assert_equals(video.audioTracks.length, stream.getAudioTracks().length);
-
- for (var i = 0; i < video.audioTracks.length; i++) {
- verifyOneMediaElementTrack(audio.audioTracks[i],
- stream.getAudioTracks()[i]);
- }
-
- setsUpMediaTracksRightTest.done();
- });
- video.srcObject = stream;
- });
- invokeGetUserMedia(setsUpMediaTracksRightTest, okCallback);
-});
-
-var mediaElementsTest =
- async_test('6.3 Media Element Attributes when Playing a MediaStream');
-
-function verifyVideoTagWithStream(videoTag) {
- test(function () {
- assert_equals(videoTag.currentSrc, '');
- }, '[Video tag] currentSrc attribute');
-
- test(function () {
- assert_equals(videoTag.preload, 'none');
- }, '[Video tag] preload attribute');
-
- test(function () {
- assert_equals(videoTag.buffered.length, 0);
- }, '[Video tag] buffered attribute');
-
- test(function () {
- // Where 1 is NETWORK_IDLE.
- assert_equals(videoTag.networkState, 1);
- }, '[Video tag] networkState attribute');
-
- test(function () {
- // 0 is HAVE_NOTHING, 4 is HAVE_ENOUGH_DATA.
- assert_true(videoTag.readyState == 0 || videoTag.readyState == 4);
- }, '[Video tag] readyState attribute');
-
- test(function () {
- assert_true(videoTag.currentTime >= 0);
- assert_throws(
- 'InvalidStateError', function () { videoTag.currentTime = 1234; },
- 'Attempts to modify currentTime shall throw InvalidStateError');
- }, '[Video tag] currentTime attribute');
-
- test(function () {
- assert_equals(videoTag.duration, Infinity, 'videoTag.duration');
- }, '[Video tag] duration attribute');
-
- test(function () {
- assert_false(videoTag.seeking, 'videoTag.seeking');
- }, '[Video tag] seeking attribute');
-
- test(function () {
- assert_equals(videoTag.defaultPlaybackRate, 1.0);
- assert_throws(
- 'DOMException', function () { videoTag.defaultPlaybackRate = 2.0; },
- 'Attempts to alter videoTag.defaultPlaybackRate MUST fail');
- }, '[Video tag] defaultPlaybackRate attribute');
-
- test(function () {
- assert_equals(videoTag.playbackRate, 1.0);
- assert_throws(
- 'DOMException', function () { videoTag.playbackRate = 2.0; },
- 'Attempts to alter videoTag.playbackRate MUST fail');
- }, '[Video tag] playbackRate attribute');
-
- test(function () {
- assert_equals(videoTag.played.length, 1, 'videoTag.played.length');
- assert_equals(videoTag.played.start(0), 0);
- assert_true(videoTag.played.end(0) >= videoTag.currentTime);
- }, '[Video tag] played attribute');
-
- test(function () {
- assert_equals(videoTag.seekable.length, 0);
- // This is wrong in the standard: start() and end() must have arguments, but
- // since the time range is empty as we assert in the line above, there is no
- // valid argument with which we can call the methods.
- // assert_equals(videoTag.seekable.start(), videoTag.currentTime);
- // assert_equals(videoTag.seekable.end(), videoTag.currentTime);
- }, '[Video tag] seekable attribute');
-
- test(function () {
- assert_equals(videoTag.startDate, NaN, 'videoTag.startDate');
- }, '[Video tag] startDate attribute');
-
- test(function () {
- assert_false(videoTag.loop);
- }, '[Video tag] loop attribute');
-
-};
-
-mediaElementsTest.step(function() {
- var okCallback = mediaElementsTest.step_func(function (stream) {
- var video = createInvisibleVideoTag();
- video.srcObject = stream;
- verifyVideoTagWithStream(video);
- mediaElementsTest.done();
- });
- invokeGetUserMedia(mediaElementsTest, okCallback);
-});
-
-// 9. Enumerating local media devices.
-// TODO(phoglund): add tests.
-
-// 10. Obtaining local multimedia content.
-
-function testGetUserMedia(test, constraints) {
- var okCallback = test.step_func(function (stream) {
- assert_true(stream !== null);
- test.done();
- });
- navigator.getUserMedia(constraints, okCallback, failedCallback(test));
-}
-
-var getUserMediaTestAudioVideo = async_test('10.1.1 NavigatorUserMedia A/V');
-getUserMediaTestAudioVideo.step(function() {
- testGetUserMedia(getUserMediaTestAudioVideo, { video: true, audio: true });
-});
-
-var getUserMediaTestVideo = async_test('10.1.1 NavigatorUserMedia V');
-getUserMediaTestVideo.step(function() {
- testGetUserMedia(getUserMediaTestVideo, { video: true, audio: false });
-});
-
-var getUserMediaTestAudio = async_test('10.1.1 NavigatorUserMedia A');
-getUserMediaTestAudio.step(function() {
- testGetUserMedia(getUserMediaTestAudio, { video: false, audio: true });
-});
-
-var getUserMediaTestNull = async_test('10.1.1 NavigatorUserMedia Null');
-getUserMediaTestNull.step(function() {
- testGetUserMedia(getUserMediaTestNull, null);
-});
-
-var getUserMediaTestPeerIdentity =
- async_test('10.2 NavigatorUserMedia with peerIdentity');
-getUserMediaTestPeerIdentity.step(function() {
- var peerIdentity = 'my_identity';
- var okCallback = getUserMediaTestPeerIdentity.step_func(function (stream) {
- assert_true(stream !== null);
- stream.getVideoTracks().forEach(function(track) {
- assert_equals(track.peerIdentity, peerIdentity);
- });
- stream.getAudioTracks().forEach(function(track) {
- assert_equals(track.peerIdentity, peerIdentity);
- });
- getUserMediaTestPeerIdentity.done();
- });
- navigator.getUserMedia(
- {video: true, audio: true, peerIdentity: 'my_identity' },
- okCallback, failedCallback(getUserMediaTestPeerIdentity));
-});
-
-// 10.2 MediaStreamConstraints.
-var constraintsTest = async_test('10.2 MediaStreamConstraints');
-constraintsTest.step(function() {
- var okCallback = constraintsTest.step_func(function (stream) {
- assert_true(stream !== null);
- constraintsTest.done();
- });
-
- // See https://googlechrome.github.io/webrtc/samples/web/content/constraints/
- // for more examples of constraints.
- // TODO(phoglund): test more constraints; the possibilities here are endless.
- var constraints = {};
- constraints.audio = true;
- constraints.video = { mandatory: {}, optional: [] };
- constraints.video.mandatory.minWidth = 640;
- constraints.video.mandatory.minHeight = 480;
- constraints.video.mandatory.minFrameRate = 15;
-
- navigator.getUserMedia(constraints, okCallback,
- failedCallback(constraintsTest));
-});
-
-// 10.4 NavigatorUserMediaSuccessCallback.
-var successCallbackTest =
- async_test('10.4 NavigatorUserMediaSuccessCallback');
-successCallbackTest.step(function() {
- var okCallback = successCallbackTest.step_func(function (stream) {
- assert_true(stream !== null);
- successCallbackTest.done();
- });
- invokeGetUserMedia(successCallbackTest, okCallback);
-});
-
-// 11. Constrainable Pattern.
-// TODO(phoglund): add tests.
diff --git a/test/w3c/peerconnection_conformance_test.html b/test/w3c/peerconnection_conformance_test.html
deleted file mode 100644
index 05b7a9a..0000000
--- a/test/w3c/peerconnection_conformance_test.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<!--
-To quickly iterate when developing this test, use --use-fake-ui-for-media-stream
-for Chrome and set the media.navigator.permission.disabled property to true in
-Firefox. You must either have a webcam/mic available on the system or use for
-instance --use-fake-device-for-media-stream for Chrome.
--->
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>PeerConnection Connection Test</title>
-</head>
-<body>
- <div id="log"></div>
- <div>
- <video id="local-view" autoplay="autoplay"></video>
- <video id="remote-view" autoplay="autoplay"/>
- </video>
- </div>
-
- <!-- These files are in place when executing on W3C. -->
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- <script src="/common/vendor-prefix.js"
- data-prefixed-objects=
- '[{"ancestors":["navigator"], "name":"getUserMedia"},
- {"ancestors":["window"], "name":"RTCPeerConnection"},
- {"ancestors":["window"], "name":"RTCSessionDescription"},
- {"ancestors":["window"], "name":"RTCIceCandidate"}]'
- data-prefixed-prototypes=
- '[{"ancestors":["HTMLMediaElement"],"name":"srcObject"}]'>
- </script>
- <script type="text/javascript">
- var test = async_test('Can set up a basic WebRTC call.', {timeout: 5000});
-
- var gFirstConnection = null;
- var gSecondConnection = null;
-
- function getUserMediaOkCallback(localStream) {
- gFirstConnection = new RTCPeerConnection(null, null);
- gFirstConnection.onicecandidate = onIceCandidateToFirst;
- gFirstConnection.addStream(localStream);
- gFirstConnection.createOffer(onOfferCreated, failed('createOffer'));
-
- var videoTag = document.getElementById('local-view');
- videoTag.src = URL.createObjectURL(localStream);
- };
-
- var onOfferCreated = test.step_func(function(offer) {
- gFirstConnection.setLocalDescription(offer);
-
- // This would normally go across the application's signaling solution.
- // In our case, the "signaling" is to call this function.
- receiveCall(offer.sdp);
- });
-
- function receiveCall(offerSdp) {
- gSecondConnection = new RTCPeerConnection(null, null);
- gSecondConnection.onicecandidate = onIceCandidateToSecond;
- gSecondConnection.onaddstream = onRemoteStream;
-
- var parsedOffer = new RTCSessionDescription({ type: 'offer',
- sdp: offerSdp });
- gSecondConnection.setRemoteDescription(parsedOffer);
-
- gSecondConnection.createAnswer(onAnswerCreated,
- failed('createAnswer'));
- };
-
- var onAnswerCreated = test.step_func(function(answer) {
- gSecondConnection.setLocalDescription(answer);
-
- // Similarly, this would go over the application's signaling solution.
- handleAnswer(answer.sdp);
- });
-
- function handleAnswer(answerSdp) {
- var parsedAnswer = new RTCSessionDescription({ type: 'answer',
- sdp: answerSdp });
- gFirstConnection.setRemoteDescription(parsedAnswer);
-
- // Call negotiated: done.
- test.done();
- };
-
- // Note: the ice candidate handlers are special. We can not wrap them in test
- // steps since that seems to cause some kind of starvation that prevents the
- // call of being set up. Unfortunately we cannot report errors in here.
- var onIceCandidateToFirst = function(event) {
- // If event.candidate is null = no more candidates.
- if (event.candidate) {
- var candidate = new RTCIceCandidate(event.candidate);
- gSecondConnection.addIceCandidate(candidate);
- }
- };
-
- var onIceCandidateToSecond = function(event) {
- if (event.candidate) {
- var candidate = new RTCIceCandidate(event.candidate);
- gFirstConnection.addIceCandidate(candidate);
- }
- };
-
- var onRemoteStream = test.step_func(function(event) {
- var videoTag = document.getElementById('remote-view');
- videoTag.src = URL.createObjectURL(event.stream);
- });
-
- // Returns a suitable error callback.
- function failed(function_name) {
- return test.step_func(function() {
- assert_unreached('WebRTC called error callback for ' + function_name);
- });
- }
-
- // This function starts the test.
- test.step(function() {
- navigator.getUserMedia({ video: true, audio: true },
- getUserMediaOkCallback,
- failed('getUserMedia'));
- });
-</script>
-
-</body>
-</html>
diff --git a/test/webrtc_test_common.gyp b/test/webrtc_test_common.gyp
index 556a445..d422a4b 100644
--- a/test/webrtc_test_common.gyp
+++ b/test/webrtc_test_common.gyp
@@ -14,6 +14,8 @@
'target_name': 'webrtc_test_common',
'type': 'static_library',
'sources': [
+ 'call_test.cc',
+ 'call_test.h',
'configurable_frame_size_encoder.cc',
'configurable_frame_size_encoder.h',
'direct_transport.cc',
@@ -33,6 +35,8 @@
'mock_transport.h',
'null_transport.cc',
'null_transport.h',
+ 'rtp_file_reader.cc',
+ 'rtp_file_reader.h',
'rtp_rtcp_observer.h',
'run_loop.cc',
'run_loop.h',
@@ -54,10 +58,12 @@
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
- '<(webrtc_root)/modules/modules.gyp:video_capture_module',
'<(webrtc_root)/modules/modules.gyp:media_file',
+ '<(webrtc_root)/modules/modules.gyp:video_capture_module_impl',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_impl',
'<(webrtc_root)/test/test.gyp:frame_generator',
'<(webrtc_root)/test/test.gyp:test_support',
+ '<(webrtc_root)/webrtc.gyp:webrtc',
],
},
{
@@ -98,11 +104,13 @@
'sources!': [
'null_platform_renderer.cc',
],
+ 'include_dirs': [
+ '<(directx_sdk_path)/Include',
+ ],
}],
],
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
- '<(webrtc_root)/modules/modules.gyp:video_capture_module',
'<(webrtc_root)/modules/modules.gyp:media_file',
'<(webrtc_root)/test/test.gyp:frame_generator',
'<(webrtc_root)/test/test.gyp:test_support',
@@ -133,39 +141,6 @@
],
},
},
- {
- # This target is only needed since the video render module builds platform
- # specific code and depends on these libraries. This target should be
- # removed as soon as the new video API doesn't depend on the module.
- # TODO(mflodman) Remove this target as described above.
- 'target_name': 'webrtc_test_video_render_dependencies',
- 'type': 'static_library',
- 'direct_dependent_settings': {
- 'conditions': [
- ['OS=="linux"', {
- 'libraries': [
- '-lXext',
- '-lX11',
- '-lGL',
- ],
- }],
- ['OS=="android"', {
- 'libraries' : [
- '-lGLESv2', '-llog',
- ],
- }],
- ['OS=="mac"', {
- 'xcode_settings' : {
- 'OTHER_LDFLAGS' : [
- '-framework Cocoa',
- '-framework OpenGL',
- '-framework CoreVideo',
- ],
- },
- }],
- ],
- },
- },
],
'conditions': [
['include_tests==1', {
@@ -181,6 +156,7 @@
],
'sources': [
'fake_network_pipe_unittest.cc',
+ 'rtp_file_reader_unittest.cc',
],
},
], #targets
diff --git a/test/win/d3d_renderer.h b/test/win/d3d_renderer.h
index e8b0692..7f37535 100644
--- a/test/win/d3d_renderer.h
+++ b/test/win/d3d_renderer.h
@@ -12,6 +12,7 @@
#include <Windows.h>
#include <d3d9.h>
+#pragma comment(lib, "d3d9.lib") // located in DirectX SDK
#include "webrtc/system_wrappers/interface/scoped_refptr.h"
#include "webrtc/test/video_renderer.h"
diff --git a/tools/e2e_quality/audio/audio_e2e_harness.cc b/tools/e2e_quality/audio/audio_e2e_harness.cc
index 4d44377..39e9974 100644
--- a/tools/e2e_quality/audio/audio_e2e_harness.cc
+++ b/tools/e2e_quality/audio/audio_e2e_harness.cc
@@ -13,7 +13,7 @@
// flags.
#include "gflags/gflags.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/test/channel_transport/include/channel_transport.h"
diff --git a/tools/rtcbot/OWNERS b/tools/rtcbot/OWNERS
new file mode 100644
index 0000000..efdce51
--- /dev/null
+++ b/tools/rtcbot/OWNERS
@@ -0,0 +1,2 @@
+andresp@webrtc.org
+houssainy@google.com
diff --git a/tools/rtcbot/README b/tools/rtcbot/README
new file mode 100644
index 0000000..8b5bab1
--- /dev/null
+++ b/tools/rtcbot/README
@@ -0,0 +1,41 @@
+=== RTCBot ===
+RTCBot is a framework to write tests that need to spawn multiple webrtc
+endpoints.
+
+== Description ==
+RTCBot is a framework that allows to write tests where logic runs on a single
+host that controls multiple endpoints ("bots"). It allows creating complex
+scenarios that would otherwise require non-trival signalling between multiple
+parties.
+
+The host runs in node.js, but the test code is run in an isolated context with
+no access to node.js specifics other than the exposed api via a test variable.
+
+Part of the exposed api (test.spawnBot) allows a test to spawn a bot and
+access its exposed API. Details are in botmanager.js.
+
+== How to run the test ==
+ $ cd trunk/webrtc/tool/rtcbot
+ $ npm install express browserify ws websocket-stream dnode
+ $ node test.js <bot_type> <test_file_path>
+
+ <bot_type> — the type of the running bot. For example:
+ - chrome: chrome on host machine.
+ - android: android device. Details in "Android" Section.
+ - android-chrome: chrome on android device. Details in "Android" Section.
+
+== Example on how to install nodejs ==
+ $ cd /work/tools/
+ $ git clone https://github.com/creationix/nvm.git
+ $ export NVM_DIR=/work/tools/nvm; source $NVM_DIR/nvm.sh
+ $ nvm install 0.10
+ $ nvm use 0.10
+
+== Android ==
+Before running test with Android one MUST forward the device port 8080 to the
+host machine. That is easy to achieve with chrome port forwarding tools.
+ - Visit chrome://inspect/devices on the host machine.
+ - Configure and enable port forwarding 8080 -> localhost:8080
+ - Open chrome on you Android device before running test, and leave it
+ running until the end of test.
+ - Run your test.
diff --git a/tools/rtcbot/bot/api.js b/tools/rtcbot/bot/api.js
new file mode 100644
index 0000000..b51d49d
--- /dev/null
+++ b/tools/rtcbot/bot/api.js
@@ -0,0 +1,37 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+// This file exposes the api for the bot to connect to the host script
+// waiting a websocket connection and using dnode for javascript rpc.
+//
+// This file is served to the browser via browserify to resolve the
+// dnode requires.
+var WebSocketStream = require('websocket-stream');
+var Dnode = require('dnode');
+
+function connectToServer(api) {
+ var stream = new WebSocketStream("ws://127.0.0.1:8080/");
+ var dnode = new Dnode(api);
+ dnode.on('error', function (error) { console.log(error); });
+ dnode.pipe(stream).pipe(dnode);
+}
+
+// Dnode loses certain method calls when exposing native browser objects such as
+// peer connections. This methods helps work around that by allowing one to
+// redefine a non-native method in a target "obj" from "src" that applies a list
+// of casts to the arguments (types are lost in dnode).
+function expose(obj, src, method, casts) {
+ obj[method] = function () {
+ for (index in casts)
+ arguments[index] = new (casts[index])(arguments[index]);
+ src[method].apply(src, arguments);
+ }
+}
+
+window.expose = expose;
+window.connectToServer = connectToServer;
diff --git a/tools/rtcbot/bot/browser/bot.js b/tools/rtcbot/bot/browser/bot.js
new file mode 100644
index 0000000..8839802
--- /dev/null
+++ b/tools/rtcbot/bot/browser/bot.js
@@ -0,0 +1,84 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+var localStreams = [];
+var remoteStreams = [];
+
+function ping(callback) {
+ callback("pong");
+}
+
+function getUserMedia(constraints, onSuccessCallback, onFailCallback){
+ console.log("Getting user media.");
+ navigator.webkitGetUserMedia(constraints,
+ onSuccessCallbackWraper, onFailCallback);
+
+ function onSuccessCallbackWraper(stream) {
+ console.log("GetUserMedia success.");
+ localStreams[stream.id] = stream;
+ onSuccessCallback(stream);
+ }
+}
+
+function createPeerConnection(doneCallback, failCallback) {
+ console.log("Creating peer connection");
+ var obj = {};
+ var pc = new webkitRTCPeerConnection(null);
+
+ expose(obj, pc, "close");
+ expose(obj, pc, "createOffer");
+ expose(obj, pc, "createAnswer");
+ expose(obj, pc, "addEventListener");
+ expose(obj, pc, "addIceCandidate", { 0: RTCIceCandidate});
+ expose(obj, pc, "setRemoteDescription", { 0: RTCSessionDescription });
+ expose(obj, pc, "setLocalDescription", { 0: RTCSessionDescription });
+
+ obj.addStream = function(stream) {
+ console.log("Adding local stream.");
+ var tempStream = localStreams[stream.id];
+ if (!tempStream) {
+ console.log("Undefined stream!");
+ return;
+ }
+ pc.addStream(tempStream);
+ };
+
+ pc.addEventListener('addstream', function(event) {
+ remoteStreams[event.stream.id] = event.stream;
+ });
+
+ doneCallback(obj);
+}
+
+function showStream(streamId, autoplay, muted) {
+ var stream = getStreamFromIdentifier_(streamId);
+ var video = document.createElement('video');
+ video.autoplay = autoplay;
+ video.muted = muted;
+ document.body.appendChild(video);
+ video.src = URL.createObjectURL(stream);
+ console.log("Stream " + stream.id + " attached to video element");
+};
+
+function getStreamFromIdentifier_(id) {
+ var tempStream = localStreams[id];
+ if (tempStream)
+ return tempStream;
+ tempStream = remoteStreams[id];
+ if (tempStream)
+ return tempStream;
+ console.log(id + " is not id for stream.");
+ return null;
+}
+
+connectToServer({
+ ping: ping,
+ getUserMedia: getUserMedia,
+ createPeerConnection: createPeerConnection,
+ showStream: showStream,
+});
diff --git a/tools/rtcbot/bot/browser/index.html b/tools/rtcbot/bot/browser/index.html
new file mode 100644
index 0000000..57bf596
--- /dev/null
+++ b/tools/rtcbot/bot/browser/index.html
@@ -0,0 +1,11 @@
+<!--
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+-->
+<script src="../api.js"></script>
+<script src="bot.js"></script>
diff --git a/tools/rtcbot/botmanager.js b/tools/rtcbot/botmanager.js
new file mode 100644
index 0000000..cd88f19
--- /dev/null
+++ b/tools/rtcbot/botmanager.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+// botmanager.js module allows a test to spawn bots that expose an RPC API
+// to be controlled by tests.
+var http = require('http');
+var child = require('child_process');
+var Browserify = require('browserify');
+var Dnode = require('dnode');
+var Express = require('express');
+var WebSocketServer = require('ws').Server;
+var WebSocketStream = require('websocket-stream');
+
+// BotManager runs a HttpServer that serves bots assets and and WebSocketServer
+// that listens to incoming connections. Once a connection is available it
+// connects it to bots pending endpoints.
+//
+// TODO(andresp): There should be a way to control which bot was spawned
+// and what bot instance it gets connected to.
+BotManager = function () {
+ this.webSocketServer_ = null;
+ this.bots_ = [];
+ this.pendingConnections_ = [];
+ this.androidDeviceManager_ = new AndroidDeviceManager();
+}
+
+BotManager.BotTypes = {
+ CHROME : 'chrome',
+ ANDROID_CHROME : 'android-chrome',
+};
+
+BotManager.prototype = {
+ createBot_: function (name, botType, callback) {
+ switch(botType) {
+ case BotManager.BotTypes.CHROME:
+ return new BrowserBot(name, callback);
+ case BotManager.BotTypes.ANDROID_CHROME:
+ return new AndroidChromeBot(name, this.androidDeviceManager_,
+ callback);
+ default:
+ console.log('Error: Type ' + botType + ' not supported by rtc-Bot!');
+ process.exit(1);
+ }
+ },
+
+ spawnNewBot: function (name, botType, callback) {
+ this.startWebSocketServer_();
+ var bot = this.createBot_(name, botType, callback);
+ this.bots_.push(bot);
+ this.pendingConnections_.push(bot.onBotConnected.bind(bot));
+ },
+
+ startWebSocketServer_: function () {
+ if (this.webSocketServer_) return;
+
+ this.app_ = new Express();
+
+ this.app_.use('/bot/api.js',
+ this.serveBrowserifyFile_.bind(this,
+ __dirname + '/bot/api.js'));
+
+ this.app_.use('/bot/', Express.static(__dirname + '/bot'));
+
+ this.server_ = http.createServer(this.app_);
+
+ this.webSocketServer_ = new WebSocketServer({ server: this.server_ });
+ this.webSocketServer_.on('connection', this.onConnection_.bind(this));
+
+ this.server_.listen(8080);
+ },
+
+ onConnection_: function (ws) {
+ var callback = this.pendingConnections_.shift();
+ callback(new WebSocketStream(ws));
+ },
+
+ serveBrowserifyFile_: function (file, request, result) {
+ // TODO(andresp): Cache browserify result for future serves.
+ var browserify = new Browserify();
+ browserify.add(file);
+ browserify.bundle().pipe(result);
+ }
+}
+
+// A basic bot waits for onBotConnected to be called with a stream to the actual
+// endpoint with the bot. Once that stream is available it establishes a dnode
+// connection and calls the callback with the other endpoint interface so the
+// test can interact with it.
+Bot = function (name, callback) {
+ this.name_ = name;
+ this.onbotready_ = callback;
+}
+
+Bot.prototype = {
+ log: function (msg) {
+ console.log("bot:" + this.name_ + " > " + msg);
+ },
+
+ name: function () { return this.name_; },
+
+ onBotConnected: function (stream) {
+ this.log('Connected');
+ this.stream_ = stream;
+ this.dnode_ = new Dnode();
+ this.dnode_.on('remote', this.onRemoteFromDnode_.bind(this));
+ this.dnode_.pipe(this.stream_).pipe(this.dnode_);
+ },
+
+ onRemoteFromDnode_: function (remote) {
+ this.onbotready_(remote);
+ }
+}
+
+// BrowserBot spawns a process to open "http://localhost:8080/bot/browser".
+//
+// That page once loaded, connects to the websocket server run by BotManager
+// and exposes the bot api.
+BrowserBot = function (name, callback) {
+ Bot.call(this, name, callback);
+ this.spawnBotProcess_();
+}
+
+BrowserBot.prototype = {
+ spawnBotProcess_: function () {
+ this.log('Spawning browser');
+ child.exec('google-chrome "http://localhost:8080/bot/browser/"');
+ },
+
+ __proto__: Bot.prototype
+}
+
+// AndroidChromeBot spawns a process to open
+// "http://localhost:8080/bot/browser/" on chrome for Android.
+AndroidChromeBot = function (name, androidDeviceManager, callback) {
+ Bot.call(this, name, callback);
+ androidDeviceManager.getNewDevice(function (serialNumber) {
+ this.serialNumber_ = serialNumber;
+ this.spawnBotProcess_();
+ }.bind(this));
+}
+
+AndroidChromeBot.prototype = {
+ spawnBotProcess_: function () {
+ this.log('Spawning Android device with serial ' + this.serialNumber_);
+ var runChrome = 'adb -s ' + this.serialNumber_ + ' shell am start ' +
+ '-n com.android.chrome/com.google.android.apps.chrome.Main ' +
+ '-d http://localhost:8080/bot/browser/';
+ child.exec(runChrome, function (error, stdout, stderr) {
+ if (error) {
+ this.log(error);
+ process.exit(1);
+ }
+ this.log('Opening Chrome for Android...');
+ this.log(stdout);
+ }.bind(this));
+ },
+
+ __proto__: Bot.prototype
+}
+
+AndroidDeviceManager = function () {
+ this.connectedDevices_ = [];
+}
+
+AndroidDeviceManager.prototype = {
+ getNewDevice: function (callback) {
+ this.listDevices_(function (devices) {
+ for (var i = 0; i < devices.length; i++) {
+ if (!this.connectedDevices_[devices[i]]) {
+ this.connectedDevices_[devices[i]] = devices[i];
+ callback(this.connectedDevices_[devices[i]]);
+ return;
+ }
+ }
+ if (devices.length == 0) {
+ console.log('Error: No connected devices!');
+ } else {
+ console.log('Error: There is no enough connected devices.');
+ }
+ process.exit(1);
+ }.bind(this));
+ },
+
+ listDevices_: function (callback) {
+ child.exec('adb devices' , function (error, stdout, stderr) {
+ var devices = [];
+ if (error || stderr) {
+ console.log(error || stderr);
+ }
+ if (stdout) {
+ // The first line is "List of devices attached"
+ // and the following lines:
+ // <serial number> <device/emulator>
+ var tempList = stdout.split("\n").slice(1);
+ for (var i = 0; i < tempList.length; i++) {
+ if (tempList[i] == "") {
+ continue;
+ }
+ devices.push(tempList[i].split("\t")[0]);
+ }
+ }
+ callback(devices);
+ });
+ },
+}
+module.exports = BotManager;
diff --git a/tools/rtcbot/test.js b/tools/rtcbot/test.js
new file mode 100644
index 0000000..36675cc
--- /dev/null
+++ b/tools/rtcbot/test.js
@@ -0,0 +1,85 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+// This script loads the test file in the virtual machine and runs it in a
+// context that only exposes a test variable with methods for testing and to
+// spawn bots.
+//
+// Note: an important part of this script is to keep nodejs-isms away from test
+// code and isolate it from implementation details.
+var fs = require('fs');
+var vm = require('vm');
+var BotManager = require('./botmanager.js');
+
+function Test(botType) {
+ // TODO(houssainy) set the time out.
+ this.timeout_ = setTimeout(
+ this.fail.bind(this, "Test timeout!"),
+ 10000);
+ this.botType_ = botType;
+}
+
+Test.prototype = {
+ log: function () {
+ console.log.apply(console.log, arguments);
+ },
+
+ abort: function (error) {
+ var error = new Error(error || "Test aborted");
+ console.log(error.stack);
+ process.exit(1);
+ },
+
+ assert: function (value, message) {
+ if (value !== true) {
+ this.abort(message || "Assert failed.");
+ }
+ },
+
+ fail: function () {
+ this.assert(false, "Test failed.");
+ },
+
+ done: function () {
+ clearTimeout(this.timeout_);
+ console.log("Test succeeded");
+ process.exit(0);
+ },
+
+ // Utility method to wait for multiple callbacks to be executed.
+ // functions - array of functions to call with a callback.
+ // doneCallback - called when all callbacks on the array have completed.
+ wait: function (functions, doneCallback) {
+ var result = new Array(functions.length);
+ var missingResult = functions.length;
+ for (var i = 0; i != functions.length; ++i)
+ functions[i](complete.bind(this, i));
+
+ function complete(index, value) {
+ missingResult--;
+ result[index] = value;
+ if (missingResult == 0)
+ doneCallback.apply(null, result);
+ }
+ },
+
+ spawnBot: function (name, doneCallback) {
+ // Lazy initialization of botmanager.
+ if (!this.botManager_)
+ this.botManager_ = new BotManager();
+ this.botManager_.spawnNewBot(name, this.botType_, doneCallback);
+ },
+}
+
+function runTest(botType, testfile) {
+ console.log("Running test: " + testfile);
+ var script = vm.createScript(fs.readFileSync(testfile), testfile);
+ script.runInNewContext({ test: new Test(botType) });
+}
+
+runTest(process.argv[2], process.argv[3]);
diff --git a/tools/rtcbot/test/ping_pong.js b/tools/rtcbot/test/ping_pong.js
new file mode 100644
index 0000000..e519738
--- /dev/null
+++ b/tools/rtcbot/test/ping_pong.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+function testPingPong(bot) {
+ test.log('bot:alice > Sending Ping to bot');
+ bot.ping(gotAnswer);
+
+ function gotAnswer(answer) {
+ test.log('bot > ' + answer);
+ test.done();
+ }
+}
+
+test.spawnBot("alice", testPingPong);
diff --git a/tools/rtcbot/test/simple_offer_answer.js b/tools/rtcbot/test/simple_offer_answer.js
new file mode 100644
index 0000000..61eb0ba
--- /dev/null
+++ b/tools/rtcbot/test/simple_offer_answer.js
@@ -0,0 +1,54 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+// Test that offer/answer between 2 peers completes successfully.
+//
+// Note: This test does not performs ice candidate exchange and
+// does not verifies that media can flow between the peers.
+function testOfferAnswer(peer1, peer2) {
+ test.wait([
+ createPeerConnection.bind(peer1),
+ createPeerConnection.bind(peer2) ],
+ establishCall);
+
+ function createPeerConnection(done) {
+ this.createPeerConnection(done, test.fail);
+ }
+
+ function establishCall(pc1, pc2) {
+ test.log("Establishing call.");
+ pc1.createOffer(gotOffer);
+
+ function gotOffer(offer) {
+ test.log("Got offer");
+ expectedCall();
+ pc1.setLocalDescription(offer, expectedCall, test.fail);
+ pc2.setRemoteDescription(offer, expectedCall, test.fail);
+ pc2.createAnswer(gotAnswer, test.fail);
+ }
+
+ function gotAnswer(answer) {
+ test.log("Got answer");
+ expectedCall();
+ pc2.setLocalDescription(answer, expectedCall, test.fail);
+ pc1.setRemoteDescription(answer, expectedCall, test.fail);
+ }
+ }
+}
+
+// TODO(andresp): Implement utilities in test to write expectations that certain
+// methods must be called.
+var expectedCalls = 0;
+function expectedCall() {
+ if (++expectedCalls == 6)
+ test.done();
+}
+
+test.wait( [ test.spawnBot.bind(test, "alice"),
+ test.spawnBot.bind(test, "bob") ],
+ testOfferAnswer);
diff --git a/tools/rtcbot/test/webrtc_video_streaming.js b/tools/rtcbot/test/webrtc_video_streaming.js
new file mode 100644
index 0000000..a907976
--- /dev/null
+++ b/tools/rtcbot/test/webrtc_video_streaming.js
@@ -0,0 +1,94 @@
+// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the LICENSE file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+//
+// A unidirectional video and audio flowing test from bot 1 to bot 2.
+//
+// Note: the source of the video and audio stream is getUserMedia().
+//
+// TODO(houssainy): get a condition to terminate the test.
+//
+function testVideoStreaming(bot1, bot2) {
+ var pc1 = null;
+ var pc2 = null;
+
+ test.wait([
+ createPeerConnection.bind(bot1),
+ createPeerConnection.bind(bot2) ],
+ onPeerConnectionCreated);
+
+ function createPeerConnection(done) {
+ this.createPeerConnection(done, test.fail);
+ }
+
+ function onPeerConnectionCreated(peer1, peer2) {
+ test.log("RTC Peers created.");
+ pc1 = peer1;
+ pc2 = peer2;
+ pc1.addEventListener('addstream', test.fail);
+ pc2.addEventListener('addstream', onAddStream);
+ pc1.addEventListener('icecandidate', onIceCandidate.bind(pc2));
+ pc2.addEventListener('icecandidate', onIceCandidate.bind(pc1));
+
+ bot1.getUserMedia({video:true, audio:true}, onUserMediaSuccess, test.fail);
+
+ function onUserMediaSuccess(stream) {
+ test.log("User has granted access to local media.");
+ pc1.addStream(stream);
+ bot1.showStream(stream.id, true, true);
+
+ createOfferAndAnswer();
+ }
+ }
+
+ function onAddStream(event) {
+ test.log("On Add stream.");
+ bot2.showStream(event.stream.id, true, false);
+ }
+
+ function onIceCandidate(event) {
+ if(event.candidate){
+ test.log(event.candidate.candidate);
+ this.addIceCandidate(event.candidate,
+ onAddIceCandidateSuccess, test.fail);
+ };
+
+ function onAddIceCandidateSuccess() {
+ test.log("Candidate added successfully");
+ };
+ }
+
+ function createOfferAndAnswer() {
+ test.log("Creating offer.");
+ pc1.createOffer(gotOffer, test.fail);
+
+ function gotOffer(offer) {
+ test.log("Got offer");
+ pc1.setLocalDescription(offer, onSetSessionDescriptionSuccess, test.fail);
+ pc2.setRemoteDescription(offer, onSetSessionDescriptionSuccess,
+ test.fail);
+ test.log("Creating answer");
+ pc2.createAnswer(gotAnswer, test.fail);
+ }
+
+ function gotAnswer(answer) {
+ test.log("Got answer");
+ pc2.setLocalDescription(answer, onSetSessionDescriptionSuccess,
+ test.fail);
+ pc1.setRemoteDescription(answer, onSetSessionDescriptionSuccess,
+ test.fail);
+ }
+
+ function onSetSessionDescriptionSuccess() {
+ test.log("Set session description success.");
+ }
+ }
+}
+
+test.wait( [ test.spawnBot.bind(test, "alice"),
+ test.spawnBot.bind(test, "bob") ],
+ testVideoStreaming);
diff --git a/tools/tools.gyp b/tools/tools.gyp
index ee2a11d..38a19fc 100644
--- a/tools/tools.gyp
+++ b/tools/tools.gyp
@@ -135,9 +135,7 @@
4267, # size_t to int truncation.
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -145,10 +143,8 @@
],
}, # tools_unittests
], # targets
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
'conditions': [
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'tools_unittests_apk_target',
diff --git a/typedefs.h b/typedefs.h
index d8977ff..871f04e 100644
--- a/typedefs.h
+++ b/typedefs.h
@@ -109,4 +109,24 @@
#endif
#endif // WARN_UNUSED_RESULT
+// Put after a variable that might not be used, to prevent compiler warnings:
+// int result UNUSED = DoSomething();
+// assert(result == 17);
+#ifndef UNUSED
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+#endif
+
+// Annotate a function that will not return control flow to the caller.
+#if defined(_MSC_VER)
+#define NO_RETURN __declspec(noreturn)
+#elif defined(__GNUC__)
+#define NO_RETURN __attribute__((noreturn))
+#else
+#define NO_RETURN
+#endif
+
#endif // WEBRTC_TYPEDEFS_H_
diff --git a/video/BUILD.gn b/video/BUILD.gn
new file mode 100644
index 0000000..f06d632
--- /dev/null
+++ b/video/BUILD.gn
@@ -0,0 +1,38 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../build/webrtc.gni")
+
+source_set("video") {
+ sources = [
+ "call.cc",
+ "encoded_frame_callback_adapter.cc",
+ "encoded_frame_callback_adapter.h",
+ "receive_statistics_proxy.cc",
+ "receive_statistics_proxy.h",
+ "send_statistics_proxy.cc",
+ "send_statistics_proxy.h",
+ "transport_adapter.cc",
+ "transport_adapter.h",
+ "video_receive_stream.cc",
+ "video_receive_stream.h",
+ "video_send_stream.cc",
+ "video_send_stream.h",
+ ]
+
+ configs += [ "..:common_inherited_config" ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [ "../video_engine:video_engine_core" ]
+}
+
diff --git a/video/OWNERS b/video/OWNERS
index cb0452f..b5f9aeb 100644
--- a/video/OWNERS
+++ b/video/OWNERS
@@ -1,9 +1,10 @@
mflodman@webrtc.org
stefan@webrtc.org
-wu@webrtc.org
-mallinath@webrtc.org
+pbos@webrtc.org
# These are for the common case of adding or renaming files. If you're doing
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/video/bitrate_estimator_tests.cc b/video/bitrate_estimator_tests.cc
index f8b9060..cb7c391 100644
--- a/video/bitrate_estimator_tests.cc
+++ b/video/bitrate_estimator_tests.cc
@@ -13,12 +13,13 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/call.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/event_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/system_wrappers/interface/trace.h"
+#include "webrtc/test/call_test.h"
#include "webrtc/test/direct_transport.h"
#include "webrtc/test/encoder_settings.h"
#include "webrtc/test/fake_decoder.h"
@@ -26,103 +27,45 @@
#include "webrtc/test/frame_generator_capturer.h"
namespace webrtc {
-
-static const int kTOFExtensionId = 4;
-static const int kASTExtensionId = 5;
-
-static unsigned int kDefaultTimeoutMs = 30 * 1000;
-static const uint32_t kSendSsrc = 0x654321;
-static const uint32_t kReceiverLocalSsrc = 0x123456;
-static const uint8_t kSendPayloadType = 125;
-
-class BitrateEstimatorTest : public ::testing::Test {
+namespace {
+// Note: consider to write tests that don't depend on the trace system instead
+// of re-using this class.
+class TraceObserver {
public:
- BitrateEstimatorTest()
- : receiver_trace_(),
- send_transport_(),
- receive_transport_(),
- sender_call_(),
- receiver_call_(),
- send_config_(),
- receive_config_(),
- streams_() {
- }
-
- virtual ~BitrateEstimatorTest() {
- EXPECT_TRUE(streams_.empty());
- }
-
- virtual void SetUp() {
- Trace::CreateTrace();
- Trace::SetTraceCallback(&receiver_trace_);
- // Reduce the chance that spurious traces will ruin the test.
+ TraceObserver() {
Trace::set_level_filter(kTraceTerseInfo);
- Call::Config receiver_call_config(&receive_transport_);
- receiver_call_.reset(Call::Create(receiver_call_config));
+ Trace::CreateTrace();
+ Trace::SetTraceCallback(&callback_);
- Call::Config sender_call_config(&send_transport_);
- sender_call_.reset(Call::Create(sender_call_config));
-
- send_transport_.SetReceiver(receiver_call_->Receiver());
- receive_transport_.SetReceiver(sender_call_->Receiver());
-
- send_config_ = sender_call_->GetDefaultSendConfig();
- send_config_.rtp.ssrcs.push_back(kSendSsrc);
- // Encoders will be set separately per stream.
- send_config_.encoder_settings.encoder = NULL;
- send_config_.encoder_settings.payload_name = "FAKE";
- send_config_.encoder_settings.payload_type = kSendPayloadType;
- video_streams_ = test::CreateVideoStreams(1);
-
- receive_config_ = receiver_call_->GetDefaultReceiveConfig();
- assert(receive_config_.codecs.empty());
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config_.encoder_settings);
- receive_config_.codecs.push_back(codec);
- // receive_config_.external_decoders will be set by every stream separately.
- receive_config_.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
- receive_config_.rtp.local_ssrc = kReceiverLocalSsrc;
- receive_config_.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
- receive_config_.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId));
+ // Call webrtc trace to initialize the tracer that would otherwise trigger a
+ // data-race if left to be initialized by multiple threads (i.e. threads
+ // spawned by test::DirectTransport members in BitrateEstimatorTest).
+ WEBRTC_TRACE(kTraceStateInfo,
+ kTraceUtility,
+ -1,
+ "Instantiate without data races.");
}
- virtual void TearDown() {
- std::for_each(streams_.begin(), streams_.end(),
- std::mem_fun(&Stream::StopSending));
-
- send_transport_.StopSending();
- receive_transport_.StopSending();
-
- while (!streams_.empty()) {
- delete streams_.back();
- streams_.pop_back();
- }
-
- receiver_call_.reset();
-
+ ~TraceObserver() {
Trace::SetTraceCallback(NULL);
Trace::ReturnTrace();
}
- protected:
- friend class Stream;
+ void PushExpectedLogLine(const std::string& expected_log_line) {
+ callback_.PushExpectedLogLine(expected_log_line);
+ }
- class TraceObserver : public TraceCallback {
+ EventTypeWrapper Wait() {
+ return callback_.Wait();
+ }
+
+ private:
+ class Callback : public TraceCallback {
public:
- TraceObserver()
+ Callback()
: crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
- received_log_lines_(),
- expected_log_lines_(),
- done_(EventWrapper::Create()) {
- }
-
- void PushExpectedLogLine(const std::string& expected_log_line) {
- CriticalSectionScoped lock(crit_sect_.get());
- expected_log_lines_.push_back(expected_log_line);
- }
+ done_(EventWrapper::Create()) {}
virtual void Print(TraceLevel level,
const char* message,
@@ -149,7 +92,14 @@
}
}
- EventTypeWrapper Wait() { return done_->Wait(kDefaultTimeoutMs); }
+ EventTypeWrapper Wait() {
+ return done_->Wait(test::CallTest::kDefaultTimeoutMs);
+ }
+
+ void PushExpectedLogLine(const std::string& expected_log_line) {
+ CriticalSectionScoped lock(crit_sect_.get());
+ expected_log_lines_.push_back(expected_log_line);
+ }
private:
typedef std::list<std::string> Strings;
@@ -159,6 +109,79 @@
scoped_ptr<EventWrapper> done_;
};
+ Callback callback_;
+};
+} // namespace
+
+static const int kTOFExtensionId = 4;
+static const int kASTExtensionId = 5;
+
+class BitrateEstimatorTest : public test::CallTest {
+ public:
+ BitrateEstimatorTest()
+ : receiver_trace_(),
+ send_transport_(),
+ receive_transport_(),
+ sender_call_(),
+ receiver_call_(),
+ receive_config_(),
+ streams_() {
+ }
+
+ virtual ~BitrateEstimatorTest() {
+ EXPECT_TRUE(streams_.empty());
+ }
+
+ virtual void SetUp() {
+ Call::Config receiver_call_config(&receive_transport_);
+ receiver_call_.reset(Call::Create(receiver_call_config));
+
+ Call::Config sender_call_config(&send_transport_);
+ sender_call_.reset(Call::Create(sender_call_config));
+
+ send_transport_.SetReceiver(receiver_call_->Receiver());
+ receive_transport_.SetReceiver(sender_call_->Receiver());
+
+ send_config_ = VideoSendStream::Config();
+ send_config_.rtp.ssrcs.push_back(kSendSsrcs[0]);
+ // Encoders will be set separately per stream.
+ send_config_.encoder_settings.encoder = NULL;
+ send_config_.encoder_settings.payload_name = "FAKE";
+ send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
+ encoder_config_.streams = test::CreateVideoStreams(1);
+
+ receive_config_ = VideoReceiveStream::Config();
+ assert(receive_config_.codecs.empty());
+ VideoCodec codec =
+ test::CreateDecoderVideoCodec(send_config_.encoder_settings);
+ receive_config_.codecs.push_back(codec);
+ // receive_config_.external_decoders will be set by every stream separately.
+ receive_config_.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
+ receive_config_.rtp.local_ssrc = kReceiverLocalSsrc;
+ receive_config_.rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
+ receive_config_.rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId));
+ }
+
+ virtual void TearDown() {
+ std::for_each(streams_.begin(), streams_.end(),
+ std::mem_fun(&Stream::StopSending));
+
+ send_transport_.StopSending();
+ receive_transport_.StopSending();
+
+ while (!streams_.empty()) {
+ delete streams_.back();
+ streams_.pop_back();
+ }
+
+ receiver_call_.reset();
+ }
+
+ protected:
+ friend class Stream;
+
class Stream {
public:
explicit Stream(BitrateEstimatorTest* test)
@@ -172,14 +195,14 @@
test_->send_config_.rtp.ssrcs[0]++;
test_->send_config_.encoder_settings.encoder = &fake_encoder_;
send_stream_ = test_->sender_call_->CreateVideoSendStream(
- test_->send_config_, test_->video_streams_, NULL);
- assert(test_->video_streams_.size() == 1);
- frame_generator_capturer_.reset(
- test::FrameGeneratorCapturer::Create(send_stream_->Input(),
- test_->video_streams_[0].width,
- test_->video_streams_[0].height,
- 30,
- Clock::GetRealTimeClock()));
+ test_->send_config_, test_->encoder_config_);
+ assert(test_->encoder_config_.streams.size() == 1);
+ frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create(
+ send_stream_->Input(),
+ test_->encoder_config_.streams[0].width,
+ test_->encoder_config_.streams[0].height,
+ 30,
+ Clock::GetRealTimeClock()));
send_stream_->Start();
frame_generator_capturer_->Start();
@@ -228,8 +251,6 @@
test::DirectTransport receive_transport_;
scoped_ptr<Call> sender_call_;
scoped_ptr<Call> receiver_call_;
- VideoSendStream::Config send_config_;
- std::vector<VideoStream> video_streams_;
VideoReceiveStream::Config receive_config_;
std::vector<Stream*> streams_;
};
diff --git a/video/call.cc b/video/call.cc
index 6daa8b0..25853f8 100644
--- a/video/call.cc
+++ b/video/call.cc
@@ -14,30 +14,48 @@
#include <map>
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/call.h"
#include "webrtc/common.h"
#include "webrtc/config.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
+#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/video/video_receive_stream.h"
#include "webrtc/video/video_send_stream.h"
#include "webrtc/video_engine/include/vie_base.h"
#include "webrtc/video_engine/include/vie_codec.h"
#include "webrtc/video_engine/include/vie_rtp_rtcp.h"
+#include "webrtc/video_engine/include/vie_network.h"
+#include "webrtc/video_engine/include/vie_rtp_rtcp.h"
namespace webrtc {
const char* RtpExtension::kTOffset = "urn:ietf:params:rtp-hdrext:toffset";
const char* RtpExtension::kAbsSendTime =
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time";
+
+bool RtpExtension::IsSupported(const std::string& name) {
+ return name == webrtc::RtpExtension::kTOffset ||
+ name == webrtc::RtpExtension::kAbsSendTime;
+}
+
+VideoEncoder* VideoEncoder::Create(VideoEncoder::EncoderType codec_type) {
+ switch (codec_type) {
+ case kVp8:
+ return VP8Encoder::Create();
+ }
+ assert(false);
+ return NULL;
+}
+
namespace internal {
class CpuOveruseObserverProxy : public webrtc::CpuOveruseObserver {
public:
- CpuOveruseObserverProxy(OveruseCallback* overuse_callback)
+ explicit CpuOveruseObserverProxy(OveruseCallback* overuse_callback)
: crit_(CriticalSectionWrapper::CreateCriticalSection()),
overuse_callback_(overuse_callback) {
assert(overuse_callback != NULL);
@@ -67,18 +85,13 @@
virtual PacketReceiver* Receiver() OVERRIDE;
- virtual VideoSendStream::Config GetDefaultSendConfig() OVERRIDE;
-
virtual VideoSendStream* CreateVideoSendStream(
const VideoSendStream::Config& config,
- const std::vector<VideoStream>& video_streams,
- const void* encoder_settings) OVERRIDE;
+ const VideoEncoderConfig& encoder_config) OVERRIDE;
virtual void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream)
OVERRIDE;
- virtual VideoReceiveStream::Config GetDefaultReceiveConfig() OVERRIDE;
-
virtual VideoReceiveStream* CreateVideoReceiveStream(
const VideoReceiveStream::Config& config) OVERRIDE;
@@ -91,25 +104,31 @@
virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
size_t length) OVERRIDE;
+ virtual void SignalNetworkState(NetworkState state) OVERRIDE;
+
private:
DeliveryStatus DeliverRtcp(const uint8_t* packet, size_t length);
- DeliveryStatus DeliverRtp(const RTPHeader& header,
- const uint8_t* packet,
- size_t length);
+ DeliveryStatus DeliverRtp(const uint8_t* packet, size_t length);
Call::Config config_;
+ // Needs to be held while write-locking |receive_crit_| or |send_crit_|. This
+ // ensures that we have a consistent network state signalled to all senders
+ // and receivers.
+ scoped_ptr<CriticalSectionWrapper> network_enabled_crit_;
+ bool network_enabled_ GUARDED_BY(network_enabled_crit_);
+
+ scoped_ptr<RWLockWrapper> receive_crit_;
std::map<uint32_t, VideoReceiveStream*> receive_ssrcs_
- GUARDED_BY(receive_lock_);
- scoped_ptr<RWLockWrapper> receive_lock_;
+ GUARDED_BY(receive_crit_);
- std::map<uint32_t, VideoSendStream*> send_ssrcs_ GUARDED_BY(send_lock_);
- scoped_ptr<RWLockWrapper> send_lock_;
-
- scoped_ptr<RtpHeaderParser> rtp_header_parser_;
+ scoped_ptr<RWLockWrapper> send_crit_;
+ std::map<uint32_t, VideoSendStream*> send_ssrcs_ GUARDED_BY(send_crit_);
scoped_ptr<CpuOveruseObserverProxy> overuse_observer_proxy_;
+ VideoSendStream::RtpStateMap suspended_send_ssrcs_;
+
VideoEngine* video_engine_;
ViERTP_RTCP* rtp_rtcp_;
ViECodec* codec_;
@@ -135,9 +154,10 @@
Call::Call(webrtc::VideoEngine* video_engine, const Call::Config& config)
: config_(config),
- receive_lock_(RWLockWrapper::CreateRWLock()),
- send_lock_(RWLockWrapper::CreateRWLock()),
- rtp_header_parser_(RtpHeaderParser::Create()),
+ network_enabled_crit_(CriticalSectionWrapper::CreateCriticalSection()),
+ network_enabled_(true),
+ receive_crit_(RWLockWrapper::CreateRWLock()),
+ send_crit_(RWLockWrapper::CreateRWLock()),
video_engine_(video_engine),
base_channel_id_(-1) {
assert(video_engine != NULL);
@@ -173,15 +193,9 @@
PacketReceiver* Call::Receiver() { return this; }
-VideoSendStream::Config Call::GetDefaultSendConfig() {
- VideoSendStream::Config config;
- return config;
-}
-
VideoSendStream* Call::CreateVideoSendStream(
const VideoSendStream::Config& config,
- const std::vector<VideoStream>& video_streams,
- const void* encoder_settings) {
+ const VideoEncoderConfig& encoder_config) {
assert(config.rtp.ssrcs.size() > 0);
// TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if
@@ -191,48 +205,56 @@
overuse_observer_proxy_.get(),
video_engine_,
config,
- video_streams,
- encoder_settings,
+ encoder_config,
+ suspended_send_ssrcs_,
base_channel_id_,
config_.start_bitrate_bps != -1 ? config_.start_bitrate_bps
: kDefaultVideoStreamBitrateBps);
- WriteLockScoped write_lock(*send_lock_);
+ // This needs to be taken before send_crit_ as both locks need to be held
+ // while changing network state.
+ CriticalSectionScoped lock(network_enabled_crit_.get());
+ WriteLockScoped write_lock(*send_crit_);
for (size_t i = 0; i < config.rtp.ssrcs.size(); ++i) {
assert(send_ssrcs_.find(config.rtp.ssrcs[i]) == send_ssrcs_.end());
send_ssrcs_[config.rtp.ssrcs[i]] = send_stream;
}
+ if (!network_enabled_)
+ send_stream->SignalNetworkState(kNetworkDown);
return send_stream;
}
void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
assert(send_stream != NULL);
+ send_stream->Stop();
+
VideoSendStream* send_stream_impl = NULL;
{
- WriteLockScoped write_lock(*send_lock_);
- for (std::map<uint32_t, VideoSendStream*>::iterator it =
- send_ssrcs_.begin();
- it != send_ssrcs_.end();
- ++it) {
+ WriteLockScoped write_lock(*send_crit_);
+ std::map<uint32_t, VideoSendStream*>::iterator it = send_ssrcs_.begin();
+ while (it != send_ssrcs_.end()) {
if (it->second == static_cast<VideoSendStream*>(send_stream)) {
send_stream_impl = it->second;
- send_ssrcs_.erase(it);
- break;
+ send_ssrcs_.erase(it++);
+ } else {
+ ++it;
}
}
}
+ VideoSendStream::RtpStateMap rtp_state = send_stream_impl->GetRtpStates();
+
+ for (VideoSendStream::RtpStateMap::iterator it = rtp_state.begin();
+ it != rtp_state.end();
+ ++it) {
+ suspended_send_ssrcs_[it->first] = it->second;
+ }
+
assert(send_stream_impl != NULL);
delete send_stream_impl;
}
-VideoReceiveStream::Config Call::GetDefaultReceiveConfig() {
- VideoReceiveStream::Config config;
- config.rtp.remb = true;
- return config;
-}
-
VideoReceiveStream* Call::CreateVideoReceiveStream(
const VideoReceiveStream::Config& config) {
VideoReceiveStream* receive_stream =
@@ -242,7 +264,10 @@
config_.voice_engine,
base_channel_id_);
- WriteLockScoped write_lock(*receive_lock_);
+ // This needs to be taken before receive_crit_ as both locks need to be held
+ // while changing network state.
+ CriticalSectionScoped lock(network_enabled_crit_.get());
+ WriteLockScoped write_lock(*receive_crit_);
assert(receive_ssrcs_.find(config.rtp.remote_ssrc) == receive_ssrcs_.end());
receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream;
// TODO(pbos): Configure different RTX payloads per receive payload.
@@ -251,6 +276,8 @@
if (it != config.rtp.rtx.end())
receive_ssrcs_[it->second.ssrc] = receive_stream;
+ if (!network_enabled_)
+ receive_stream->SignalNetworkState(kNetworkDown);
return receive_stream;
}
@@ -260,7 +287,7 @@
VideoReceiveStream* receive_stream_impl = NULL;
{
- WriteLockScoped write_lock(*receive_lock_);
+ WriteLockScoped write_lock(*receive_crit_);
// Remove all ssrcs pointing to a receive stream. As RTX retransmits on a
// separate SSRC there can be either one or two.
std::map<uint32_t, VideoReceiveStream*>::iterator it =
@@ -291,7 +318,32 @@
return 0;
}
-Call::PacketReceiver::DeliveryStatus Call::DeliverRtcp(const uint8_t* packet,
+void Call::SignalNetworkState(NetworkState state) {
+ // Take crit for entire function, it needs to be held while updating streams
+ // to guarantee a consistent state across streams.
+ CriticalSectionScoped lock(network_enabled_crit_.get());
+ network_enabled_ = state == kNetworkUp;
+ {
+ ReadLockScoped write_lock(*send_crit_);
+ for (std::map<uint32_t, VideoSendStream*>::iterator it =
+ send_ssrcs_.begin();
+ it != send_ssrcs_.end();
+ ++it) {
+ it->second->SignalNetworkState(state);
+ }
+ }
+ {
+ ReadLockScoped write_lock(*receive_crit_);
+ for (std::map<uint32_t, VideoReceiveStream*>::iterator it =
+ receive_ssrcs_.begin();
+ it != receive_ssrcs_.end();
+ ++it) {
+ it->second->SignalNetworkState(state);
+ }
+ }
+}
+
+PacketReceiver::DeliveryStatus Call::DeliverRtcp(const uint8_t* packet,
size_t length) {
// TODO(pbos): Figure out what channel needs it actually.
// Do NOT broadcast! Also make sure it's a valid packet.
@@ -299,7 +351,7 @@
// there's no receiver of the packet.
bool rtcp_delivered = false;
{
- ReadLockScoped read_lock(*receive_lock_);
+ ReadLockScoped read_lock(*receive_crit_);
for (std::map<uint32_t, VideoReceiveStream*>::iterator it =
receive_ssrcs_.begin();
it != receive_ssrcs_.end();
@@ -310,7 +362,7 @@
}
{
- ReadLockScoped read_lock(*send_lock_);
+ ReadLockScoped read_lock(*send_crit_);
for (std::map<uint32_t, VideoSendStream*>::iterator it =
send_ssrcs_.begin();
it != send_ssrcs_.end();
@@ -322,32 +374,32 @@
return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR;
}
-Call::PacketReceiver::DeliveryStatus Call::DeliverRtp(const RTPHeader& header,
- const uint8_t* packet,
- size_t length) {
- ReadLockScoped read_lock(*receive_lock_);
+PacketReceiver::DeliveryStatus Call::DeliverRtp(const uint8_t* packet,
+ size_t length) {
+ // Minimum RTP header size.
+ if (length < 12)
+ return DELIVERY_PACKET_ERROR;
+
+ const uint8_t* ptr = &packet[8];
+ uint32_t ssrc = ptr[0] << 24 | ptr[1] << 16 | ptr[2] << 8 | ptr[3];
+
+ ReadLockScoped read_lock(*receive_crit_);
std::map<uint32_t, VideoReceiveStream*>::iterator it =
- receive_ssrcs_.find(header.ssrc);
+ receive_ssrcs_.find(ssrc);
if (it == receive_ssrcs_.end())
return DELIVERY_UNKNOWN_SSRC;
- return it->second->DeliverRtp(static_cast<const uint8_t*>(packet), length)
- ? DELIVERY_OK
- : DELIVERY_PACKET_ERROR;
+ return it->second->DeliverRtp(packet, length) ? DELIVERY_OK
+ : DELIVERY_PACKET_ERROR;
}
-Call::PacketReceiver::DeliveryStatus Call::DeliverPacket(const uint8_t* packet,
- size_t length) {
- // TODO(pbos): ExtensionMap if there are extensions.
- if (RtpHeaderParser::IsRtcp(packet, static_cast<int>(length)))
+PacketReceiver::DeliveryStatus Call::DeliverPacket(const uint8_t* packet,
+ size_t length) {
+ if (RtpHeaderParser::IsRtcp(packet, length))
return DeliverRtcp(packet, length);
- RTPHeader rtp_header;
- if (!rtp_header_parser_->Parse(packet, static_cast<int>(length), &rtp_header))
- return DELIVERY_PACKET_ERROR;
-
- return DeliverRtp(rtp_header, packet, length);
+ return DeliverRtp(packet, length);
}
} // namespace internal
diff --git a/video/call_perf_tests.cc b/video/call_perf_tests.cc
index fa3f238..cd83698 100644
--- a/video/call_perf_tests.cc
+++ b/video/call_perf_tests.cc
@@ -15,6 +15,7 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/call.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
@@ -22,7 +23,7 @@
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/rtp_to_ntp.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
+#include "webrtc/test/call_test.h"
#include "webrtc/test/direct_transport.h"
#include "webrtc/test/encoder_settings.h"
#include "webrtc/test/fake_audio_device.h"
@@ -42,43 +43,9 @@
namespace webrtc {
-static unsigned int kLongTimeoutMs = 120 * 1000;
-static const uint32_t kSendSsrc = 0x654321;
-static const uint32_t kReceiverLocalSsrc = 0x123456;
-static const uint8_t kSendPayloadType = 125;
-
-class CallPerfTest : public ::testing::Test {
- public:
- CallPerfTest()
- : send_stream_(NULL), fake_encoder_(Clock::GetRealTimeClock()) {}
-
+class CallPerfTest : public test::CallTest {
protected:
- void CreateTestConfig(Call* call) {
- send_config_ = call->GetDefaultSendConfig();
- send_config_.rtp.ssrcs.push_back(kSendSsrc);
- send_config_.encoder_settings.encoder = &fake_encoder_;
- send_config_.encoder_settings.payload_type = kSendPayloadType;
- send_config_.encoder_settings.payload_name = "FAKE";
- video_streams_ = test::CreateVideoStreams(1);
- }
-
- void RunVideoSendTest(Call* call,
- const VideoSendStream::Config& config,
- test::RtpRtcpObserver* observer) {
- send_stream_ = call->CreateVideoSendStream(config, video_streams_, NULL);
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(
- send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
- send_stream_->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, observer->Wait());
-
- observer->StopSending();
- frame_generator_capturer->Stop();
- send_stream_->Stop();
- call->DestroyVideoSendStream(send_stream_);
- }
+ void TestAudioVideoSync(bool fec);
void TestMinTransmitBitrate(bool pad_to_min_bitrate);
@@ -86,17 +53,12 @@
int threshold_ms,
int start_time_ms,
int run_time_ms);
-
- VideoSendStream::Config send_config_;
- std::vector<VideoStream> video_streams_;
- VideoSendStream* send_stream_;
- test::FakeEncoder fake_encoder_;
};
class SyncRtcpObserver : public test::RtpRtcpObserver {
public:
explicit SyncRtcpObserver(const FakeNetworkPipe::Config& config)
- : test::RtpRtcpObserver(kLongTimeoutMs, config),
+ : test::RtpRtcpObserver(CallPerfTest::kLongTimeoutMs, config),
crit_(CriticalSectionWrapper::CreateCriticalSection()) {}
virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
@@ -225,39 +187,10 @@
int64_t first_time_in_sync_;
};
-TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
- VoiceEngine* voice_engine = VoiceEngine::Create();
- VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
- VoECodec* voe_codec = VoECodec::GetInterface(voice_engine);
- VoENetwork* voe_network = VoENetwork::GetInterface(voice_engine);
- VoEVideoSync* voe_sync = VoEVideoSync::GetInterface(voice_engine);
- const std::string audio_filename =
- test::ResourcePath("voice_engine/audio_long16", "pcm");
- ASSERT_STRNE("", audio_filename.c_str());
- test::FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(),
- audio_filename);
- EXPECT_EQ(0, voe_base->Init(&fake_audio_device, NULL));
- int channel = voe_base->CreateChannel();
-
- FakeNetworkPipe::Config net_config;
- net_config.queue_delay_ms = 500;
- SyncRtcpObserver audio_observer(net_config);
- VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock(),
- channel,
- voe_sync,
- &audio_observer);
-
- Call::Config receiver_config(observer.ReceiveTransport());
- receiver_config.voice_engine = voice_engine;
- scoped_ptr<Call> sender_call(
- Call::Create(Call::Config(observer.SendTransport())));
- scoped_ptr<Call> receiver_call(Call::Create(receiver_config));
- CodecInst isac = {103, "ISAC", 16000, 480, 1, 32000};
- EXPECT_EQ(0, voe_codec->SetSendCodec(channel, isac));
-
- class VoicePacketReceiver : public PacketReceiver {
+void CallPerfTest::TestAudioVideoSync(bool fec) {
+ class AudioPacketReceiver : public PacketReceiver {
public:
- VoicePacketReceiver(int channel, VoENetwork* voe_network)
+ AudioPacketReceiver(int channel, VoENetwork* voe_network)
: channel_(channel),
voe_network_(voe_network),
parser_(RtpHeaderParser::Create()) {}
@@ -278,8 +211,38 @@
int channel_;
VoENetwork* voe_network_;
scoped_ptr<RtpHeaderParser> parser_;
- } voe_packet_receiver(channel, voe_network);
+ };
+ VoiceEngine* voice_engine = VoiceEngine::Create();
+ VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
+ VoECodec* voe_codec = VoECodec::GetInterface(voice_engine);
+ VoENetwork* voe_network = VoENetwork::GetInterface(voice_engine);
+ VoEVideoSync* voe_sync = VoEVideoSync::GetInterface(voice_engine);
+ const std::string audio_filename =
+ test::ResourcePath("voice_engine/audio_long16", "pcm");
+ ASSERT_STRNE("", audio_filename.c_str());
+ test::FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(),
+ audio_filename);
+ EXPECT_EQ(0, voe_base->Init(&fake_audio_device, NULL));
+ int channel = voe_base->CreateChannel();
+
+ FakeNetworkPipe::Config net_config;
+ net_config.queue_delay_ms = 500;
+ net_config.loss_percent = 5;
+ SyncRtcpObserver audio_observer(net_config);
+ VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock(),
+ channel,
+ voe_sync,
+ &audio_observer);
+
+ Call::Config receiver_config(observer.ReceiveTransport());
+ receiver_config.voice_engine = voice_engine;
+ CreateCalls(Call::Config(observer.SendTransport()), receiver_config);
+
+ CodecInst isac = {103, "ISAC", 16000, 480, 1, 32000};
+ EXPECT_EQ(0, voe_codec->SetSendCodec(channel, isac));
+
+ AudioPacketReceiver voe_packet_receiver(channel, voe_network);
audio_observer.SetReceivers(&voe_packet_receiver, &voe_packet_receiver);
internal::TransportAdapter transport_adapter(audio_observer.SendTransport());
@@ -287,41 +250,29 @@
EXPECT_EQ(0,
voe_network->RegisterExternalTransport(channel, transport_adapter));
- observer.SetReceivers(receiver_call->Receiver(), sender_call->Receiver());
+ observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
test::FakeDecoder fake_decoder;
- CreateTestConfig(sender_call.get());
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
- VideoReceiveStream::Config receive_config =
- receiver_call->GetDefaultReceiveConfig();
- assert(receive_config.codecs.empty());
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config_.encoder_settings);
- receive_config.codecs.push_back(codec);
- assert(receive_config.external_decoders.empty());
- ExternalVideoDecoder decoder;
- decoder.decoder = &fake_decoder;
- decoder.payload_type = send_config_.encoder_settings.payload_type;
- receive_config.external_decoders.push_back(decoder);
- receive_config.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
- receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
- receive_config.renderer = &observer;
- receive_config.audio_channel_id = channel;
+ send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ if (fec) {
+ send_config_.rtp.fec.red_payload_type = kRedPayloadType;
+ send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
+ receive_configs_[0].rtp.fec.red_payload_type = kRedPayloadType;
+ receive_configs_[0].rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
+ }
+ receive_configs_[0].rtp.nack.rtp_history_ms = 1000;
+ receive_configs_[0].renderer = &observer;
+ receive_configs_[0].audio_channel_id = channel;
- VideoSendStream* send_stream =
- sender_call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- VideoReceiveStream* receive_stream =
- receiver_call->CreateVideoReceiveStream(receive_config);
- scoped_ptr<test::FrameGeneratorCapturer> capturer(
- test::FrameGeneratorCapturer::Create(send_stream->Input(),
- video_streams_[0].width,
- video_streams_[0].height,
- 30,
- Clock::GetRealTimeClock()));
- receive_stream->Start();
- send_stream->Start();
- capturer->Start();
+ CreateStreams();
+
+ CreateFrameGeneratorCapturer();
+
+ Start();
fake_audio_device.Start();
EXPECT_EQ(0, voe_base->StartPlayout(channel));
@@ -336,9 +287,7 @@
EXPECT_EQ(0, voe_base->StopPlayout(channel));
fake_audio_device.Stop();
- capturer->Stop();
- send_stream->Stop();
- receive_stream->Stop();
+ Stop();
observer.StopSending();
audio_observer.StopSending();
@@ -347,174 +296,134 @@
voe_codec->Release();
voe_network->Release();
voe_sync->Release();
- sender_call->DestroyVideoSendStream(send_stream);
- receiver_call->DestroyVideoReceiveStream(receive_stream);
+
+ DestroyStreams();
+
VoiceEngine::Delete(voice_engine);
}
-class CaptureNtpTimeObserver : public test::RtpRtcpObserver,
- public VideoRenderer {
- public:
- CaptureNtpTimeObserver(Clock* clock,
- const FakeNetworkPipe::Config& config,
- int threshold_ms,
- int start_time_ms,
- int run_time_ms)
- : RtpRtcpObserver(kLongTimeoutMs, config),
- clock_(clock),
- threshold_ms_(threshold_ms),
- start_time_ms_(start_time_ms),
- run_time_ms_(run_time_ms),
- creation_time_ms_(clock_->TimeInMilliseconds()),
- capturer_(NULL),
- rtp_start_timestamp_set_(false),
- rtp_start_timestamp_(0) {}
+TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
+ TestAudioVideoSync(false);
+}
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int time_to_render_ms) OVERRIDE {
- if (video_frame.ntp_time_ms() <= 0) {
- // Haven't got enough RTCP SR in order to calculate the capture ntp time.
- return;
- }
-
- int64_t now_ms = clock_->TimeInMilliseconds();
- int64_t time_since_creation = now_ms - creation_time_ms_;
- if (time_since_creation < start_time_ms_) {
- // Wait for |start_time_ms_| before start measuring.
- return;
- }
-
- if (time_since_creation > run_time_ms_) {
- observation_complete_->Set();
- }
-
- FrameCaptureTimeList::iterator iter =
- capture_time_list_.find(video_frame.timestamp());
- EXPECT_TRUE(iter != capture_time_list_.end());
-
- // The real capture time has been wrapped to uint32_t before converted
- // to rtp timestamp in the sender side. So here we convert the estimated
- // capture time to a uint32_t 90k timestamp also for comparing.
- uint32_t estimated_capture_timestamp =
- 90 * static_cast<uint32_t>(video_frame.ntp_time_ms());
- uint32_t real_capture_timestamp = iter->second;
- int time_offset_ms = real_capture_timestamp - estimated_capture_timestamp;
- time_offset_ms = time_offset_ms / 90;
- std::stringstream ss;
- ss << time_offset_ms;
-
- webrtc::test::PrintResult("capture_ntp_time",
- "",
- "real - estimated",
- ss.str(),
- "ms",
- true);
- EXPECT_TRUE(std::abs(time_offset_ms) < threshold_ms_);
- }
-
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) {
- RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
-
- if (!rtp_start_timestamp_set_) {
- // Calculate the rtp timestamp offset in order to calculate the real
- // capture time.
- uint32_t first_capture_timestamp =
- 90 * static_cast<uint32_t>(capturer_->first_frame_capture_time());
- rtp_start_timestamp_ = header.timestamp - first_capture_timestamp;
- rtp_start_timestamp_set_ = true;
- }
-
- uint32_t capture_timestamp = header.timestamp - rtp_start_timestamp_;
- capture_time_list_.insert(capture_time_list_.end(),
- std::make_pair(header.timestamp,
- capture_timestamp));
- return SEND_PACKET;
- }
-
- void SetCapturer(test::FrameGeneratorCapturer* capturer) {
- capturer_ = capturer;
- }
-
- private:
- Clock* clock_;
- int threshold_ms_;
- int start_time_ms_;
- int run_time_ms_;
- int64_t creation_time_ms_;
- test::FrameGeneratorCapturer* capturer_;
- bool rtp_start_timestamp_set_;
- uint32_t rtp_start_timestamp_;
- typedef std::map<uint32_t, uint32_t> FrameCaptureTimeList;
- FrameCaptureTimeList capture_time_list_;
-};
+TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSyncWithFec) {
+ TestAudioVideoSync(true);
+}
void CallPerfTest::TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config,
int threshold_ms,
int start_time_ms,
int run_time_ms) {
- CaptureNtpTimeObserver observer(Clock::GetRealTimeClock(),
- net_config,
- threshold_ms,
- start_time_ms,
- run_time_ms);
+ class CaptureNtpTimeObserver : public test::EndToEndTest,
+ public VideoRenderer {
+ public:
+ CaptureNtpTimeObserver(const FakeNetworkPipe::Config& config,
+ int threshold_ms,
+ int start_time_ms,
+ int run_time_ms)
+ : EndToEndTest(kLongTimeoutMs, config),
+ clock_(Clock::GetRealTimeClock()),
+ threshold_ms_(threshold_ms),
+ start_time_ms_(start_time_ms),
+ run_time_ms_(run_time_ms),
+ creation_time_ms_(clock_->TimeInMilliseconds()),
+ capturer_(NULL),
+ rtp_start_timestamp_set_(false),
+ rtp_start_timestamp_(0) {}
- // Sender/receiver call.
- Call::Config receiver_config(observer.ReceiveTransport());
- scoped_ptr<Call> receiver_call(Call::Create(receiver_config));
- scoped_ptr<Call> sender_call(
- Call::Create(Call::Config(observer.SendTransport())));
- observer.SetReceivers(receiver_call->Receiver(), sender_call->Receiver());
+ private:
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int time_to_render_ms) OVERRIDE {
+ if (video_frame.ntp_time_ms() <= 0) {
+ // Haven't got enough RTCP SR in order to calculate the capture ntp
+ // time.
+ return;
+ }
- // Configure send stream.
- CreateTestConfig(sender_call.get());
- VideoSendStream* send_stream =
- sender_call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- scoped_ptr<test::FrameGeneratorCapturer> capturer(
- test::FrameGeneratorCapturer::Create(send_stream->Input(),
- video_streams_[0].width,
- video_streams_[0].height,
- 30,
- Clock::GetRealTimeClock()));
- observer.SetCapturer(capturer.get());
+ int64_t now_ms = clock_->TimeInMilliseconds();
+ int64_t time_since_creation = now_ms - creation_time_ms_;
+ if (time_since_creation < start_time_ms_) {
+ // Wait for |start_time_ms_| before start measuring.
+ return;
+ }
- // Configure receive stream.
- VideoReceiveStream::Config receive_config =
- receiver_call->GetDefaultReceiveConfig();
- assert(receive_config.codecs.empty());
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config_.encoder_settings);
- receive_config.codecs.push_back(codec);
- assert(receive_config.external_decoders.empty());
- ExternalVideoDecoder decoder;
- test::FakeDecoder fake_decoder;
- decoder.decoder = &fake_decoder;
- decoder.payload_type = send_config_.encoder_settings.payload_type;
- receive_config.external_decoders.push_back(decoder);
- receive_config.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
- receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
- receive_config.renderer = &observer;
- // Enable the receiver side rtt calculation.
- receive_config.rtp.rtcp_xr.receiver_reference_time_report = true;
- VideoReceiveStream* receive_stream =
- receiver_call->CreateVideoReceiveStream(receive_config);
+ if (time_since_creation > run_time_ms_) {
+ observation_complete_->Set();
+ }
- // Start the test
- receive_stream->Start();
- send_stream->Start();
- capturer->Start();
+ FrameCaptureTimeList::iterator iter =
+ capture_time_list_.find(video_frame.timestamp());
+ EXPECT_TRUE(iter != capture_time_list_.end());
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for estimated capture ntp time to be "
- << "within bounds.";
+ // The real capture time has been wrapped to uint32_t before converted
+ // to rtp timestamp in the sender side. So here we convert the estimated
+ // capture time to a uint32_t 90k timestamp also for comparing.
+ uint32_t estimated_capture_timestamp =
+ 90 * static_cast<uint32_t>(video_frame.ntp_time_ms());
+ uint32_t real_capture_timestamp = iter->second;
+ int time_offset_ms = real_capture_timestamp - estimated_capture_timestamp;
+ time_offset_ms = time_offset_ms / 90;
+ std::stringstream ss;
+ ss << time_offset_ms;
- capturer->Stop();
- send_stream->Stop();
- receive_stream->Stop();
- observer.StopSending();
+ webrtc::test::PrintResult(
+ "capture_ntp_time", "", "real - estimated", ss.str(), "ms", true);
+ EXPECT_TRUE(std::abs(time_offset_ms) < threshold_ms_);
+ }
- sender_call->DestroyVideoSendStream(send_stream);
- receiver_call->DestroyVideoReceiveStream(receive_stream);
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+
+ if (!rtp_start_timestamp_set_) {
+ // Calculate the rtp timestamp offset in order to calculate the real
+ // capture time.
+ uint32_t first_capture_timestamp =
+ 90 * static_cast<uint32_t>(capturer_->first_frame_capture_time());
+ rtp_start_timestamp_ = header.timestamp - first_capture_timestamp;
+ rtp_start_timestamp_set_ = true;
+ }
+
+ uint32_t capture_timestamp = header.timestamp - rtp_start_timestamp_;
+ capture_time_list_.insert(
+ capture_time_list_.end(),
+ std::make_pair(header.timestamp, capture_timestamp));
+ return SEND_PACKET;
+ }
+
+ virtual void OnFrameGeneratorCapturerCreated(
+ test::FrameGeneratorCapturer* frame_generator_capturer) OVERRIDE {
+ capturer_ = frame_generator_capturer;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ (*receive_configs)[0].renderer = this;
+ // Enable the receiver side rtt calculation.
+ (*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report = true;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait()) << "Timed out while waiting for "
+ "estimated capture NTP time to be "
+ "within bounds.";
+ }
+
+ Clock* clock_;
+ int threshold_ms_;
+ int start_time_ms_;
+ int run_time_ms_;
+ int64_t creation_time_ms_;
+ test::FrameGeneratorCapturer* capturer_;
+ bool rtp_start_timestamp_set_;
+ uint32_t rtp_start_timestamp_;
+ typedef std::map<uint32_t, uint32_t> FrameCaptureTimeList;
+ FrameCaptureTimeList capture_time_list_;
+ } test(net_config, threshold_ms, start_time_ms, run_time_ms);
+
+ RunBaseTest(&test);
}
TEST_F(CallPerfTest, CaptureNtpTimeWithNetworkDelay) {
@@ -542,26 +451,32 @@
TEST_F(CallPerfTest, RegisterCpuOveruseObserver) {
// Verifies that either a normal or overuse callback is triggered.
- class OveruseCallbackObserver : public test::RtpRtcpObserver,
+ class OveruseCallbackObserver : public test::SendTest,
public webrtc::OveruseCallback {
public:
- OveruseCallbackObserver() : RtpRtcpObserver(kLongTimeoutMs) {}
+ OveruseCallbackObserver() : SendTest(kLongTimeoutMs) {}
virtual void OnOveruse() OVERRIDE {
observation_complete_->Set();
}
+
virtual void OnNormalUse() OVERRIDE {
observation_complete_->Set();
}
- };
- OveruseCallbackObserver observer;
- Call::Config call_config(observer.SendTransport());
- call_config.overuse_callback = &observer;
- scoped_ptr<Call> call(Call::Create(call_config));
+ virtual Call::Config GetSenderCallConfig() OVERRIDE {
+ Call::Config config(SendTransport());
+ config.overuse_callback = this;
+ return config;
+ }
- CreateTestConfig(call.get());
- RunVideoSendTest(call.get(), send_config_, &observer);
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out before receiving an overuse callback.";
+ }
+ } test;
+
+ RunBaseTest(&test);
}
void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) {
@@ -570,15 +485,16 @@
static const int kMinAcceptableTransmitBitrate = 130;
static const int kMaxAcceptableTransmitBitrate = 170;
static const int kNumBitrateObservationsInRange = 100;
- class BitrateObserver : public test::RtpRtcpObserver, public PacketReceiver {
+ class BitrateObserver : public test::EndToEndTest, public PacketReceiver {
public:
explicit BitrateObserver(bool using_min_transmit_bitrate)
- : test::RtpRtcpObserver(kLongTimeoutMs),
+ : EndToEndTest(kLongTimeoutMs),
send_stream_(NULL),
send_transport_receiver_(NULL),
- using_min_transmit_bitrate_(using_min_transmit_bitrate),
+ pad_to_min_bitrate_(using_min_transmit_bitrate),
num_bitrate_observations_in_range_(0) {}
+ private:
virtual void SetReceivers(PacketReceiver* send_transport_receiver,
PacketReceiver* receive_transport_receiver)
OVERRIDE {
@@ -586,11 +502,6 @@
test::RtpRtcpObserver::SetReceivers(this, receive_transport_receiver);
}
- void SetSendStream(VideoSendStream* send_stream) {
- send_stream_ = send_stream;
- }
-
- private:
virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
size_t length) OVERRIDE {
VideoSendStream::Stats stats = send_stream_->GetStats();
@@ -600,13 +511,13 @@
if (bitrate_kbps > 0) {
test::PrintResult(
"bitrate_stats_",
- (using_min_transmit_bitrate_ ? "min_transmit_bitrate"
- : "without_min_transmit_bitrate"),
+ (pad_to_min_bitrate_ ? "min_transmit_bitrate"
+ : "without_min_transmit_bitrate"),
"bitrate_kbps",
static_cast<size_t>(bitrate_kbps),
"kbps",
false);
- if (using_min_transmit_bitrate_) {
+ if (pad_to_min_bitrate_) {
if (bitrate_kbps > kMinAcceptableTransmitBitrate &&
bitrate_kbps < kMaxAcceptableTransmitBitrate) {
++num_bitrate_observations_in_range_;
@@ -626,66 +537,36 @@
return send_transport_receiver_->DeliverPacket(packet, length);
}
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ send_stream_ = send_stream;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ if (pad_to_min_bitrate_) {
+ send_config->rtp.min_transmit_bitrate_bps = kMinTransmitBitrateBps;
+ } else {
+ assert(send_config->rtp.min_transmit_bitrate_bps == 0);
+ }
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timeout while waiting for send-bitrate stats.";
+ }
+
VideoSendStream* send_stream_;
PacketReceiver* send_transport_receiver_;
- const bool using_min_transmit_bitrate_;
+ const bool pad_to_min_bitrate_;
int num_bitrate_observations_in_range_;
- } observer(pad_to_min_bitrate);
+ } test(pad_to_min_bitrate);
- scoped_ptr<Call> sender_call(
- Call::Create(Call::Config(observer.SendTransport())));
- scoped_ptr<Call> receiver_call(
- Call::Create(Call::Config(observer.ReceiveTransport())));
-
- CreateTestConfig(sender_call.get());
fake_encoder_.SetMaxBitrate(kMaxEncodeBitrateKbps);
-
- observer.SetReceivers(receiver_call->Receiver(), sender_call->Receiver());
-
- if (pad_to_min_bitrate) {
- send_config_.rtp.min_transmit_bitrate_bps = kMinTransmitBitrateBps;
- } else {
- assert(send_config_.rtp.min_transmit_bitrate_bps == 0);
- }
-
- VideoReceiveStream::Config receive_config =
- receiver_call->GetDefaultReceiveConfig();
- receive_config.codecs.clear();
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config_.encoder_settings);
- receive_config.codecs.push_back(codec);
- test::FakeDecoder fake_decoder;
- ExternalVideoDecoder decoder;
- decoder.decoder = &fake_decoder;
- decoder.payload_type = send_config_.encoder_settings.payload_type;
- receive_config.external_decoders.push_back(decoder);
- receive_config.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
- receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
-
- VideoSendStream* send_stream =
- sender_call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- VideoReceiveStream* receive_stream =
- receiver_call->CreateVideoReceiveStream(receive_config);
- scoped_ptr<test::FrameGeneratorCapturer> capturer(
- test::FrameGeneratorCapturer::Create(send_stream->Input(),
- video_streams_[0].width,
- video_streams_[0].height,
- 30,
- Clock::GetRealTimeClock()));
- observer.SetSendStream(send_stream);
- receive_stream->Start();
- send_stream->Start();
- capturer->Start();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timeout while waiting for send-bitrate stats.";
-
- send_stream->Stop();
- receive_stream->Stop();
- observer.StopSending();
- capturer->Stop();
- sender_call->DestroyVideoSendStream(send_stream);
- receiver_call->DestroyVideoReceiveStream(receive_stream);
+ RunBaseTest(&test);
}
TEST_F(CallPerfTest, PadsToMinTransmitBitrate) { TestMinTransmitBitrate(true); }
diff --git a/video/call_tests.cc b/video/call_tests.cc
deleted file mode 100644
index 5bcf115..0000000
--- a/video/call_tests.cc
+++ /dev/null
@@ -1,1612 +0,0 @@
-/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-#include <assert.h>
-
-#include <algorithm>
-#include <map>
-#include <sstream>
-#include <string>
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-#include "webrtc/call.h"
-#include "webrtc/frame_callback.h"
-#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
-#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/sleep.h"
-#include "webrtc/test/direct_transport.h"
-#include "webrtc/test/encoder_settings.h"
-#include "webrtc/test/fake_audio_device.h"
-#include "webrtc/test/fake_decoder.h"
-#include "webrtc/test/fake_encoder.h"
-#include "webrtc/test/frame_generator.h"
-#include "webrtc/test/frame_generator_capturer.h"
-#include "webrtc/test/null_transport.h"
-#include "webrtc/test/rtp_rtcp_observer.h"
-#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/test/testsupport/perf_test.h"
-#include "webrtc/video/transport_adapter.h"
-
-namespace webrtc {
-
-static unsigned int kDefaultTimeoutMs = 30 * 1000;
-static unsigned int kLongTimeoutMs = 120 * 1000;
-static const uint32_t kSendSsrc = 0x654321;
-static const uint32_t kSendRtxSsrc = 0x424242;
-static const uint32_t kReceiverLocalSsrc = 0x123456;
-static const uint8_t kSendPayloadType = 125;
-static const uint8_t kSendRtxPayloadType = 126;
-static const int kRedPayloadType = 118;
-static const int kUlpfecPayloadType = 119;
-
-class CallTest : public ::testing::Test {
- public:
- CallTest()
- : send_stream_(NULL),
- receive_stream_(NULL),
- fake_encoder_(Clock::GetRealTimeClock()) {}
-
- virtual ~CallTest() {
- EXPECT_EQ(NULL, send_stream_);
- EXPECT_EQ(NULL, receive_stream_);
- }
-
- protected:
- void CreateCalls(const Call::Config& sender_config,
- const Call::Config& receiver_config) {
- sender_call_.reset(Call::Create(sender_config));
- receiver_call_.reset(Call::Create(receiver_config));
- }
-
- void CreateTestConfigs() {
- send_config_ = sender_call_->GetDefaultSendConfig();
- receive_config_ = receiver_call_->GetDefaultReceiveConfig();
-
- send_config_.rtp.ssrcs.push_back(kSendSsrc);
- send_config_.encoder_settings.encoder = &fake_encoder_;
- send_config_.encoder_settings.payload_name = "FAKE";
- send_config_.encoder_settings.payload_type = kSendPayloadType;
- video_streams_ = test::CreateVideoStreams(1);
-
- assert(receive_config_.codecs.empty());
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config_.encoder_settings);
- receive_config_.codecs.push_back(codec);
- ExternalVideoDecoder decoder;
- decoder.decoder = &fake_decoder_;
- decoder.payload_type = send_config_.encoder_settings.payload_type;
- receive_config_.external_decoders.push_back(decoder);
- receive_config_.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
- receive_config_.rtp.local_ssrc = kReceiverLocalSsrc;
- }
-
- void CreateStreams() {
- assert(send_stream_ == NULL);
- assert(receive_stream_ == NULL);
-
- send_stream_ =
- sender_call_->CreateVideoSendStream(send_config_, video_streams_, NULL);
- receive_stream_ = receiver_call_->CreateVideoReceiveStream(receive_config_);
- }
-
- void CreateFrameGenerator() {
- frame_generator_capturer_.reset(
- test::FrameGeneratorCapturer::Create(send_stream_->Input(),
- video_streams_[0].width,
- video_streams_[0].height,
- 30,
- Clock::GetRealTimeClock()));
- }
-
- void StartSending() {
- receive_stream_->Start();
- send_stream_->Start();
- if (frame_generator_capturer_.get() != NULL)
- frame_generator_capturer_->Start();
- }
-
- void StopSending() {
- if (frame_generator_capturer_.get() != NULL)
- frame_generator_capturer_->Stop();
- if (send_stream_ != NULL)
- send_stream_->Stop();
- if (receive_stream_ != NULL)
- receive_stream_->Stop();
- }
-
- void DestroyStreams() {
- if (send_stream_ != NULL)
- sender_call_->DestroyVideoSendStream(send_stream_);
- if (receive_stream_ != NULL)
- receiver_call_->DestroyVideoReceiveStream(receive_stream_);
- send_stream_ = NULL;
- receive_stream_ = NULL;
- }
-
- void DecodesRetransmittedFrame(bool retransmit_over_rtx);
- void ReceivesPliAndRecovers(int rtp_history_ms);
- void RespectsRtcpMode(newapi::RtcpMode rtcp_mode);
- void TestXrReceiverReferenceTimeReport(bool enable_rrtr);
-
- scoped_ptr<Call> sender_call_;
- scoped_ptr<Call> receiver_call_;
-
- VideoSendStream::Config send_config_;
- std::vector<VideoStream> video_streams_;
- VideoReceiveStream::Config receive_config_;
-
- VideoSendStream* send_stream_;
- VideoReceiveStream* receive_stream_;
-
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
-
- test::FakeEncoder fake_encoder_;
- test::FakeDecoder fake_decoder_;
-};
-
-class NackObserver : public test::RtpRtcpObserver {
- static const int kNumberOfNacksToObserve = 2;
- static const int kLossBurstSize = 2;
- static const int kPacketsBetweenLossBursts = 9;
-
- public:
- NackObserver()
- : test::RtpRtcpObserver(kLongTimeoutMs),
- rtp_parser_(RtpHeaderParser::Create()),
- sent_rtp_packets_(0),
- packets_left_to_drop_(0),
- nacks_left_(kNumberOfNacksToObserve) {}
-
- private:
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- RTPHeader header;
- EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast<int>(length), &header));
-
- // Never drop retransmitted packets.
- if (dropped_packets_.find(header.sequenceNumber) !=
- dropped_packets_.end()) {
- retransmitted_packets_.insert(header.sequenceNumber);
- if (nacks_left_ == 0 &&
- retransmitted_packets_.size() == dropped_packets_.size()) {
- observation_complete_->Set();
- }
- return SEND_PACKET;
- }
-
- ++sent_rtp_packets_;
-
- // Enough NACKs received, stop dropping packets.
- if (nacks_left_ == 0)
- return SEND_PACKET;
-
- // Check if it's time for a new loss burst.
- if (sent_rtp_packets_ % kPacketsBetweenLossBursts == 0)
- packets_left_to_drop_ = kLossBurstSize;
-
- if (packets_left_to_drop_ > 0) {
- --packets_left_to_drop_;
- dropped_packets_.insert(header.sequenceNumber);
- return DROP_PACKET;
- }
-
- return SEND_PACKET;
- }
-
- virtual Action OnReceiveRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
-
- RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
- while (packet_type != RTCPUtility::kRtcpNotValidCode) {
- if (packet_type == RTCPUtility::kRtcpRtpfbNackCode) {
- --nacks_left_;
- break;
- }
- packet_type = parser.Iterate();
- }
- return SEND_PACKET;
- }
-
- private:
- scoped_ptr<RtpHeaderParser> rtp_parser_;
- std::set<uint16_t> dropped_packets_;
- std::set<uint16_t> retransmitted_packets_;
- uint64_t sent_rtp_packets_;
- int packets_left_to_drop_;
- int nacks_left_;
-};
-
-TEST_F(CallTest, ReceiverCanBeStartedTwice) {
- test::NullTransport transport;
- CreateCalls(Call::Config(&transport), Call::Config(&transport));
-
- CreateTestConfigs();
- CreateStreams();
-
- receive_stream_->Start();
- receive_stream_->Start();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, ReceiverCanBeStoppedTwice) {
- test::NullTransport transport;
- CreateCalls(Call::Config(&transport), Call::Config(&transport));
-
- CreateTestConfigs();
- CreateStreams();
-
- receive_stream_->Stop();
- receive_stream_->Stop();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, RendersSingleDelayedFrame) {
- static const int kWidth = 320;
- static const int kHeight = 240;
- // This constant is chosen to be higher than the timeout in the video_render
- // module. This makes sure that frames aren't dropped if there are no other
- // frames in the queue.
- static const int kDelayRenderCallbackMs = 1000;
-
- class Renderer : public VideoRenderer {
- public:
- Renderer() : event_(EventWrapper::Create()) {}
-
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int /*time_to_render_ms*/) OVERRIDE {
- event_->Set();
- }
-
- EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
-
- scoped_ptr<EventWrapper> event_;
- } renderer;
-
- class TestFrameCallback : public I420FrameCallback {
- public:
- TestFrameCallback() : event_(EventWrapper::Create()) {}
-
- EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
-
- private:
- virtual void FrameCallback(I420VideoFrame* frame) OVERRIDE {
- SleepMs(kDelayRenderCallbackMs);
- event_->Set();
- }
-
- scoped_ptr<EventWrapper> event_;
- };
-
- test::DirectTransport sender_transport, receiver_transport;
-
- CreateCalls(Call::Config(&sender_transport),
- Call::Config(&receiver_transport));
-
- sender_transport.SetReceiver(receiver_call_->Receiver());
- receiver_transport.SetReceiver(sender_call_->Receiver());
-
- CreateTestConfigs();
-
- TestFrameCallback pre_render_callback;
- receive_config_.pre_render_callback = &pre_render_callback;
- receive_config_.renderer = &renderer;
-
- CreateStreams();
- StartSending();
-
- // Create frames that are smaller than the send width/height, this is done to
- // check that the callbacks are done after processing video.
- scoped_ptr<test::FrameGenerator> frame_generator(
- test::FrameGenerator::Create(kWidth, kHeight));
- send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
- EXPECT_EQ(kEventSignaled, pre_render_callback.Wait())
- << "Timed out while waiting for pre-render callback.";
- EXPECT_EQ(kEventSignaled, renderer.Wait())
- << "Timed out while waiting for the frame to render.";
-
- StopSending();
-
- sender_transport.StopSending();
- receiver_transport.StopSending();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, TransmitsFirstFrame) {
- class Renderer : public VideoRenderer {
- public:
- Renderer() : event_(EventWrapper::Create()) {}
-
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int /*time_to_render_ms*/) OVERRIDE {
- event_->Set();
- }
-
- EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
-
- scoped_ptr<EventWrapper> event_;
- } renderer;
-
- test::DirectTransport sender_transport, receiver_transport;
-
- CreateCalls(Call::Config(&sender_transport),
- Call::Config(&receiver_transport));
-
- sender_transport.SetReceiver(receiver_call_->Receiver());
- receiver_transport.SetReceiver(sender_call_->Receiver());
-
- CreateTestConfigs();
- receive_config_.renderer = &renderer;
-
- CreateStreams();
- StartSending();
-
- scoped_ptr<test::FrameGenerator> frame_generator(test::FrameGenerator::Create(
- video_streams_[0].width, video_streams_[0].height));
- send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
-
- EXPECT_EQ(kEventSignaled, renderer.Wait())
- << "Timed out while waiting for the frame to render.";
-
- StopSending();
-
- sender_transport.StopSending();
- receiver_transport.StopSending();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, ReceiverUsesLocalSsrc) {
- class SyncRtcpObserver : public test::RtpRtcpObserver {
- public:
- SyncRtcpObserver() : test::RtpRtcpObserver(kDefaultTimeoutMs) {}
-
- virtual Action OnReceiveRtcp(const uint8_t* packet,
- size_t length) OVERRIDE {
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
- uint32_t ssrc = 0;
- ssrc |= static_cast<uint32_t>(packet[4]) << 24;
- ssrc |= static_cast<uint32_t>(packet[5]) << 16;
- ssrc |= static_cast<uint32_t>(packet[6]) << 8;
- ssrc |= static_cast<uint32_t>(packet[7]) << 0;
- EXPECT_EQ(kReceiverLocalSsrc, ssrc);
- observation_complete_->Set();
-
- return SEND_PACKET;
- }
- } observer;
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for a receiver RTCP packet to be sent.";
-
- StopSending();
-
- observer.StopSending();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, ReceivesAndRetransmitsNack) {
- NackObserver observer;
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- int rtp_history_ms = 1000;
- send_config_.rtp.nack.rtp_history_ms = rtp_history_ms;
- receive_config_.rtp.nack.rtp_history_ms = rtp_history_ms;
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- // Wait() waits for an event triggered when NACKs have been received, NACKed
- // packets retransmitted and frames rendered again.
- EXPECT_EQ(kEventSignaled, observer.Wait());
-
- StopSending();
-
- observer.StopSending();
-
- DestroyStreams();
-}
-
-// TODO(pbos): Flaky, webrtc:3269
-TEST_F(CallTest, DISABLED_CanReceiveFec) {
- class FecRenderObserver : public test::RtpRtcpObserver, public VideoRenderer {
- public:
- FecRenderObserver()
- : RtpRtcpObserver(kDefaultTimeoutMs),
- state_(kFirstPacket),
- protected_sequence_number_(0),
- protected_frame_timestamp_(0) {}
-
- private:
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE
- EXCLUSIVE_LOCKS_REQUIRED(crit_) {
- RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
-
- EXPECT_EQ(kRedPayloadType, header.payloadType);
- int encapsulated_payload_type =
- static_cast<int>(packet[header.headerLength]);
- if (encapsulated_payload_type != kSendPayloadType)
- EXPECT_EQ(kUlpfecPayloadType, encapsulated_payload_type);
-
- switch(state_) {
- case kFirstPacket:
- state_ = kDropEveryOtherPacketUntilFec;
- break;
- case kDropEveryOtherPacketUntilFec:
- if (encapsulated_payload_type == kUlpfecPayloadType) {
- state_ = kDropNextMediaPacket;
- return SEND_PACKET;
- }
- if (header.sequenceNumber % 2 == 0)
- return DROP_PACKET;
- break;
- case kDropNextMediaPacket:
- if (encapsulated_payload_type == kSendPayloadType) {
- protected_sequence_number_ = header.sequenceNumber;
- protected_frame_timestamp_ = header.timestamp;
- state_ = kProtectedPacketDropped;
- return DROP_PACKET;
- }
- break;
- case kProtectedPacketDropped:
- EXPECT_NE(header.sequenceNumber, protected_sequence_number_)
- << "Protected packet retransmitted. Should not happen with FEC.";
- break;
- }
-
- return SEND_PACKET;
- }
-
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int time_to_render_ms) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- // Rendering frame with timestamp associated with dropped packet -> FEC
- // protection worked.
- if (state_ == kProtectedPacketDropped &&
- video_frame.timestamp() == protected_frame_timestamp_) {
- observation_complete_->Set();
- }
- }
-
- enum {
- kFirstPacket,
- kDropEveryOtherPacketUntilFec,
- kDropNextMediaPacket,
- kProtectedPacketDropped,
- } state_;
-
- uint32_t protected_sequence_number_ GUARDED_BY(crit_);
- uint32_t protected_frame_timestamp_ GUARDED_BY(crit_);
- } observer;
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- // TODO(pbos): Run this test with combined NACK/FEC enabled as well.
- // int rtp_history_ms = 1000;
- // receive_config_.rtp.nack.rtp_history_ms = rtp_history_ms;
- // send_config_.rtp.nack.rtp_history_ms = rtp_history_ms;
- send_config_.rtp.fec.red_payload_type = kRedPayloadType;
- send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
-
- receive_config_.rtp.fec.red_payload_type = kRedPayloadType;
- receive_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
- receive_config_.renderer = &observer;
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- // Wait() waits for an event triggered when NACKs have been received, NACKed
- // packets retransmitted and frames rendered again.
- EXPECT_EQ(kEventSignaled, observer.Wait());
-
- StopSending();
-
- observer.StopSending();
-
- DestroyStreams();
-}
-
-// This test drops second RTP packet with a marker bit set, makes sure it's
-// retransmitted and renders. Retransmission SSRCs are also checked.
-void CallTest::DecodesRetransmittedFrame(bool retransmit_over_rtx) {
- static const int kDroppedFrameNumber = 2;
- class RetransmissionObserver : public test::RtpRtcpObserver,
- public I420FrameCallback {
- public:
- RetransmissionObserver(bool expect_rtx)
- : RtpRtcpObserver(kDefaultTimeoutMs),
- retransmission_ssrc_(expect_rtx ? kSendRtxSsrc : kSendSsrc),
- retransmission_payload_type_(expect_rtx ? kSendRtxPayloadType
- : kSendPayloadType),
- marker_bits_observed_(0),
- retransmitted_timestamp_(0),
- frame_retransmitted_(false) {}
-
- private:
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
-
- if (header.timestamp == retransmitted_timestamp_) {
- EXPECT_EQ(retransmission_ssrc_, header.ssrc);
- EXPECT_EQ(retransmission_payload_type_, header.payloadType);
- frame_retransmitted_ = true;
- return SEND_PACKET;
- }
-
- EXPECT_EQ(kSendSsrc, header.ssrc);
- EXPECT_EQ(kSendPayloadType, header.payloadType);
-
- // Found the second frame's final packet, drop this and expect a
- // retransmission.
- if (header.markerBit && ++marker_bits_observed_ == kDroppedFrameNumber) {
- retransmitted_timestamp_ = header.timestamp;
- return DROP_PACKET;
- }
-
- return SEND_PACKET;
- }
-
- virtual void FrameCallback(I420VideoFrame* frame) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- if (frame->timestamp() == retransmitted_timestamp_) {
- EXPECT_TRUE(frame_retransmitted_);
- observation_complete_->Set();
- }
- }
-
- const uint32_t retransmission_ssrc_;
- const int retransmission_payload_type_;
- int marker_bits_observed_;
- uint32_t retransmitted_timestamp_;
- bool frame_retransmitted_;
- } observer(retransmit_over_rtx);
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- send_config_.rtp.nack.rtp_history_ms =
- receive_config_.rtp.nack.rtp_history_ms = 1000;
- if (retransmit_over_rtx) {
- send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrc);
- send_config_.rtp.rtx.payload_type = kSendRtxPayloadType;
- int payload_type = send_config_.encoder_settings.payload_type;
- receive_config_.rtp.rtx[payload_type].ssrc = kSendRtxSsrc;
- receive_config_.rtp.rtx[payload_type].payload_type = kSendRtxPayloadType;
- }
- receive_config_.pre_render_callback = &observer;
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for retransmission to render.";
-
- StopSending();
- observer.StopSending();
- DestroyStreams();
-}
-
-TEST_F(CallTest, DecodesRetransmittedFrame) {
- DecodesRetransmittedFrame(false);
-}
-
-TEST_F(CallTest, DecodesRetransmittedFrameOverRtx) {
- DecodesRetransmittedFrame(true);
-}
-
-TEST_F(CallTest, UsesFrameCallbacks) {
- static const int kWidth = 320;
- static const int kHeight = 240;
-
- class Renderer : public VideoRenderer {
- public:
- Renderer() : event_(EventWrapper::Create()) {}
-
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int /*time_to_render_ms*/) OVERRIDE {
- EXPECT_EQ(0, *video_frame.buffer(kYPlane))
- << "Rendered frame should have zero luma which is applied by the "
- "pre-render callback.";
- event_->Set();
- }
-
- EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
- scoped_ptr<EventWrapper> event_;
- } renderer;
-
- class TestFrameCallback : public I420FrameCallback {
- public:
- TestFrameCallback(int expected_luma_byte, int next_luma_byte)
- : event_(EventWrapper::Create()),
- expected_luma_byte_(expected_luma_byte),
- next_luma_byte_(next_luma_byte) {}
-
- EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
-
- private:
- virtual void FrameCallback(I420VideoFrame* frame) {
- EXPECT_EQ(kWidth, frame->width())
- << "Width not as expected, callback done before resize?";
- EXPECT_EQ(kHeight, frame->height())
- << "Height not as expected, callback done before resize?";
-
- // Previous luma specified, observed luma should be fairly close.
- if (expected_luma_byte_ != -1) {
- EXPECT_NEAR(expected_luma_byte_, *frame->buffer(kYPlane), 10);
- }
-
- memset(frame->buffer(kYPlane),
- next_luma_byte_,
- frame->allocated_size(kYPlane));
-
- event_->Set();
- }
-
- scoped_ptr<EventWrapper> event_;
- int expected_luma_byte_;
- int next_luma_byte_;
- };
-
- TestFrameCallback pre_encode_callback(-1, 255); // Changes luma to 255.
- TestFrameCallback pre_render_callback(255, 0); // Changes luma from 255 to 0.
-
- test::DirectTransport sender_transport, receiver_transport;
-
- CreateCalls(Call::Config(&sender_transport),
- Call::Config(&receiver_transport));
-
- sender_transport.SetReceiver(receiver_call_->Receiver());
- receiver_transport.SetReceiver(sender_call_->Receiver());
-
- CreateTestConfigs();
- scoped_ptr<VP8Encoder> encoder(VP8Encoder::Create());
- send_config_.encoder_settings.encoder = encoder.get();
- send_config_.encoder_settings.payload_name = "VP8";
- ASSERT_EQ(1u, video_streams_.size()) << "Test setup error.";
- video_streams_[0].width = kWidth;
- video_streams_[0].height = kHeight;
- send_config_.pre_encode_callback = &pre_encode_callback;
- receive_config_.codecs.clear();
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config_.encoder_settings);
- receive_config_.external_decoders.clear();
- receive_config_.codecs.push_back(codec);
- receive_config_.pre_render_callback = &pre_render_callback;
- receive_config_.renderer = &renderer;
-
- CreateStreams();
- StartSending();
-
- // Create frames that are smaller than the send width/height, this is done to
- // check that the callbacks are done after processing video.
- scoped_ptr<test::FrameGenerator> frame_generator(
- test::FrameGenerator::Create(kWidth / 2, kHeight / 2));
- send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
-
- EXPECT_EQ(kEventSignaled, pre_encode_callback.Wait())
- << "Timed out while waiting for pre-encode callback.";
- EXPECT_EQ(kEventSignaled, pre_render_callback.Wait())
- << "Timed out while waiting for pre-render callback.";
- EXPECT_EQ(kEventSignaled, renderer.Wait())
- << "Timed out while waiting for the frame to render.";
-
- StopSending();
-
- sender_transport.StopSending();
- receiver_transport.StopSending();
-
- DestroyStreams();
-}
-
-class PliObserver : public test::RtpRtcpObserver, public VideoRenderer {
- static const int kInverseDropProbability = 16;
-
- public:
- explicit PliObserver(bool nack_enabled)
- : test::RtpRtcpObserver(kLongTimeoutMs),
- nack_enabled_(nack_enabled),
- highest_dropped_timestamp_(0),
- frames_to_drop_(0),
- received_pli_(false) {}
-
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
-
- // Drop all retransmitted packets to force a PLI.
- if (header.timestamp <= highest_dropped_timestamp_)
- return DROP_PACKET;
-
- if (frames_to_drop_ > 0) {
- highest_dropped_timestamp_ = header.timestamp;
- --frames_to_drop_;
- return DROP_PACKET;
- }
-
- return SEND_PACKET;
- }
-
- virtual Action OnReceiveRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
-
- for (RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
- packet_type != RTCPUtility::kRtcpNotValidCode;
- packet_type = parser.Iterate()) {
- if (!nack_enabled_)
- EXPECT_NE(packet_type, RTCPUtility::kRtcpRtpfbNackCode);
-
- if (packet_type == RTCPUtility::kRtcpPsfbPliCode) {
- received_pli_ = true;
- break;
- }
- }
- return SEND_PACKET;
- }
-
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int time_to_render_ms) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- if (received_pli_ && video_frame.timestamp() > highest_dropped_timestamp_) {
- observation_complete_->Set();
- }
- if (!received_pli_)
- frames_to_drop_ = kPacketsToDrop;
- }
-
- private:
- static const int kPacketsToDrop = 1;
-
- bool nack_enabled_;
- uint32_t highest_dropped_timestamp_;
- int frames_to_drop_;
- bool received_pli_;
-};
-
-void CallTest::ReceivesPliAndRecovers(int rtp_history_ms) {
- PliObserver observer(rtp_history_ms > 0);
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- send_config_.rtp.nack.rtp_history_ms = rtp_history_ms;
- receive_config_.rtp.nack.rtp_history_ms = rtp_history_ms;
- receive_config_.renderer = &observer;
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- // Wait() waits for an event triggered when Pli has been received and frames
- // have been rendered afterwards.
- EXPECT_EQ(kEventSignaled, observer.Wait());
-
- StopSending();
-
- observer.StopSending();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, ReceivesPliAndRecoversWithNack) {
- ReceivesPliAndRecovers(1000);
-}
-
-// TODO(pbos): Enable this when 2250 is resolved.
-TEST_F(CallTest, DISABLED_ReceivesPliAndRecoversWithoutNack) {
- ReceivesPliAndRecovers(0);
-}
-
-TEST_F(CallTest, UnknownRtpPacketGivesUnknownSsrcReturnCode) {
- class PacketInputObserver : public PacketReceiver {
- public:
- explicit PacketInputObserver(PacketReceiver* receiver)
- : receiver_(receiver), delivered_packet_(EventWrapper::Create()) {}
-
- EventTypeWrapper Wait() {
- return delivered_packet_->Wait(kDefaultTimeoutMs);
- }
-
- private:
- virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
- size_t length) OVERRIDE {
- if (RtpHeaderParser::IsRtcp(packet, static_cast<int>(length))) {
- return receiver_->DeliverPacket(packet, length);
- } else {
- DeliveryStatus delivery_status =
- receiver_->DeliverPacket(packet, length);
- EXPECT_EQ(DELIVERY_UNKNOWN_SSRC, delivery_status);
- delivered_packet_->Set();
- return delivery_status;
- }
- }
-
- PacketReceiver* receiver_;
- scoped_ptr<EventWrapper> delivered_packet_;
- };
-
- test::DirectTransport send_transport, receive_transport;
-
- CreateCalls(Call::Config(&send_transport), Call::Config(&receive_transport));
- PacketInputObserver input_observer(receiver_call_->Receiver());
-
- send_transport.SetReceiver(&input_observer);
- receive_transport.SetReceiver(sender_call_->Receiver());
-
- CreateTestConfigs();
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- receiver_call_->DestroyVideoReceiveStream(receive_stream_);
- receive_stream_ = NULL;
-
- // Wait() waits for a received packet.
- EXPECT_EQ(kEventSignaled, input_observer.Wait());
-
- StopSending();
-
- DestroyStreams();
-
- send_transport.StopSending();
- receive_transport.StopSending();
-}
-
-void CallTest::RespectsRtcpMode(newapi::RtcpMode rtcp_mode) {
- static const int kRtpHistoryMs = 1000;
- static const int kNumCompoundRtcpPacketsToObserve = 10;
- class RtcpModeObserver : public test::RtpRtcpObserver {
- public:
- explicit RtcpModeObserver(newapi::RtcpMode rtcp_mode)
- : test::RtpRtcpObserver(kDefaultTimeoutMs),
- rtcp_mode_(rtcp_mode),
- sent_rtp_(0),
- sent_rtcp_(0) {}
-
- private:
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- if (++sent_rtp_ % 3 == 0)
- return DROP_PACKET;
-
- return SEND_PACKET;
- }
-
- virtual Action OnReceiveRtcp(const uint8_t* packet,
- size_t length) OVERRIDE {
- ++sent_rtcp_;
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
-
- RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
- bool has_report_block = false;
- while (packet_type != RTCPUtility::kRtcpNotValidCode) {
- EXPECT_NE(RTCPUtility::kRtcpSrCode, packet_type);
- if (packet_type == RTCPUtility::kRtcpRrCode) {
- has_report_block = true;
- break;
- }
- packet_type = parser.Iterate();
- }
-
- switch (rtcp_mode_) {
- case newapi::kRtcpCompound:
- if (!has_report_block) {
- ADD_FAILURE() << "Received RTCP packet without receiver report for "
- "kRtcpCompound.";
- observation_complete_->Set();
- }
-
- if (sent_rtcp_ >= kNumCompoundRtcpPacketsToObserve)
- observation_complete_->Set();
-
- break;
- case newapi::kRtcpReducedSize:
- if (!has_report_block)
- observation_complete_->Set();
- break;
- }
-
- return SEND_PACKET;
- }
-
- newapi::RtcpMode rtcp_mode_;
- int sent_rtp_;
- int sent_rtcp_;
- } observer(rtcp_mode);
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- send_config_.rtp.nack.rtp_history_ms = kRtpHistoryMs;
- receive_config_.rtp.nack.rtp_history_ms = kRtpHistoryMs;
- receive_config_.rtp.rtcp_mode = rtcp_mode;
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << (rtcp_mode == newapi::kRtcpCompound
- ? "Timed out before observing enough compound packets."
- : "Timed out before receiving a non-compound RTCP packet.");
-
- StopSending();
- observer.StopSending();
- DestroyStreams();
-}
-
-TEST_F(CallTest, UsesRtcpCompoundMode) {
- RespectsRtcpMode(newapi::kRtcpCompound);
-}
-
-TEST_F(CallTest, UsesRtcpReducedSizeMode) {
- RespectsRtcpMode(newapi::kRtcpReducedSize);
-}
-
-// Test sets up a Call multiple senders with different resolutions and SSRCs.
-// Another is set up to receive all three of these with different renderers.
-// Each renderer verifies that it receives the expected resolution, and as soon
-// as every renderer has received a frame, the test finishes.
-TEST_F(CallTest, SendsAndReceivesMultipleStreams) {
- static const size_t kNumStreams = 3;
-
- class VideoOutputObserver : public VideoRenderer {
- public:
- VideoOutputObserver(test::FrameGeneratorCapturer** capturer,
- int width,
- int height)
- : capturer_(capturer),
- width_(width),
- height_(height),
- done_(EventWrapper::Create()) {}
-
- virtual void RenderFrame(const I420VideoFrame& video_frame,
- int time_to_render_ms) OVERRIDE {
- EXPECT_EQ(width_, video_frame.width());
- EXPECT_EQ(height_, video_frame.height());
- (*capturer_)->Stop();
- done_->Set();
- }
-
- EventTypeWrapper Wait() { return done_->Wait(kDefaultTimeoutMs); }
-
- private:
- test::FrameGeneratorCapturer** capturer_;
- int width_;
- int height_;
- scoped_ptr<EventWrapper> done_;
- };
-
- struct {
- uint32_t ssrc;
- int width;
- int height;
- } codec_settings[kNumStreams] = {{1, 640, 480}, {2, 320, 240}, {3, 240, 160}};
-
- test::DirectTransport sender_transport, receiver_transport;
- scoped_ptr<Call> sender_call(Call::Create(Call::Config(&sender_transport)));
- scoped_ptr<Call> receiver_call(
- Call::Create(Call::Config(&receiver_transport)));
- sender_transport.SetReceiver(receiver_call->Receiver());
- receiver_transport.SetReceiver(sender_call->Receiver());
-
- VideoSendStream* send_streams[kNumStreams];
- VideoReceiveStream* receive_streams[kNumStreams];
-
- VideoOutputObserver* observers[kNumStreams];
- test::FrameGeneratorCapturer* frame_generators[kNumStreams];
-
- scoped_ptr<VP8Encoder> encoders[kNumStreams];
- for (size_t i = 0; i < kNumStreams; ++i)
- encoders[i].reset(VP8Encoder::Create());
-
- for (size_t i = 0; i < kNumStreams; ++i) {
- uint32_t ssrc = codec_settings[i].ssrc;
- int width = codec_settings[i].width;
- int height = codec_settings[i].height;
- observers[i] = new VideoOutputObserver(&frame_generators[i], width, height);
-
- VideoSendStream::Config send_config = sender_call->GetDefaultSendConfig();
- send_config.rtp.ssrcs.push_back(ssrc);
- send_config.encoder_settings.encoder = encoders[i].get();
- send_config.encoder_settings.payload_name = "VP8";
- send_config.encoder_settings.payload_type = 124;
- std::vector<VideoStream> video_streams = test::CreateVideoStreams(1);
- VideoStream* stream = &video_streams[0];
- stream->width = width;
- stream->height = height;
- stream->max_framerate = 5;
- stream->min_bitrate_bps = stream->target_bitrate_bps =
- stream->max_bitrate_bps = 100000;
- send_streams[i] =
- sender_call->CreateVideoSendStream(send_config, video_streams, NULL);
- send_streams[i]->Start();
-
- VideoReceiveStream::Config receive_config =
- receiver_call->GetDefaultReceiveConfig();
- receive_config.renderer = observers[i];
- receive_config.rtp.remote_ssrc = ssrc;
- receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config.encoder_settings);
- receive_config.codecs.push_back(codec);
- receive_streams[i] =
- receiver_call->CreateVideoReceiveStream(receive_config);
- receive_streams[i]->Start();
-
- frame_generators[i] = test::FrameGeneratorCapturer::Create(
- send_streams[i]->Input(), width, height, 30, Clock::GetRealTimeClock());
- frame_generators[i]->Start();
- }
-
- for (size_t i = 0; i < kNumStreams; ++i) {
- EXPECT_EQ(kEventSignaled, observers[i]->Wait())
- << "Timed out while waiting for observer " << i << " to render.";
- }
-
- for (size_t i = 0; i < kNumStreams; ++i) {
- frame_generators[i]->Stop();
- sender_call->DestroyVideoSendStream(send_streams[i]);
- receiver_call->DestroyVideoReceiveStream(receive_streams[i]);
- delete frame_generators[i];
- delete observers[i];
- }
-
- sender_transport.StopSending();
- receiver_transport.StopSending();
-};
-
-TEST_F(CallTest, ObserversEncodedFrames) {
- class EncodedFrameTestObserver : public EncodedFrameObserver {
- public:
- EncodedFrameTestObserver()
- : length_(0),
- frame_type_(kFrameEmpty),
- called_(EventWrapper::Create()) {}
- virtual ~EncodedFrameTestObserver() {}
-
- virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) {
- frame_type_ = encoded_frame.frame_type_;
- length_ = encoded_frame.length_;
- buffer_.reset(new uint8_t[length_]);
- memcpy(buffer_.get(), encoded_frame.data_, length_);
- called_->Set();
- }
-
- EventTypeWrapper Wait() { return called_->Wait(kDefaultTimeoutMs); }
-
- void ExpectEqualFrames(const EncodedFrameTestObserver& observer) {
- ASSERT_EQ(length_, observer.length_)
- << "Observed frames are of different lengths.";
- EXPECT_EQ(frame_type_, observer.frame_type_)
- << "Observed frames have different frame types.";
- EXPECT_EQ(0, memcmp(buffer_.get(), observer.buffer_.get(), length_))
- << "Observed encoded frames have different content.";
- }
-
- private:
- scoped_ptr<uint8_t[]> buffer_;
- size_t length_;
- FrameType frame_type_;
- scoped_ptr<EventWrapper> called_;
- };
-
- EncodedFrameTestObserver post_encode_observer;
- EncodedFrameTestObserver pre_decode_observer;
-
- test::DirectTransport sender_transport, receiver_transport;
-
- CreateCalls(Call::Config(&sender_transport),
- Call::Config(&receiver_transport));
-
- sender_transport.SetReceiver(receiver_call_->Receiver());
- receiver_transport.SetReceiver(sender_call_->Receiver());
-
- CreateTestConfigs();
- send_config_.post_encode_callback = &post_encode_observer;
- receive_config_.pre_decode_callback = &pre_decode_observer;
-
- CreateStreams();
- StartSending();
-
- scoped_ptr<test::FrameGenerator> frame_generator(test::FrameGenerator::Create(
- video_streams_[0].width, video_streams_[0].height));
- send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
-
- EXPECT_EQ(kEventSignaled, post_encode_observer.Wait())
- << "Timed out while waiting for send-side encoded-frame callback.";
-
- EXPECT_EQ(kEventSignaled, pre_decode_observer.Wait())
- << "Timed out while waiting for pre-decode encoded-frame callback.";
-
- post_encode_observer.ExpectEqualFrames(pre_decode_observer);
-
- StopSending();
-
- sender_transport.StopSending();
- receiver_transport.StopSending();
-
- DestroyStreams();
-}
-
-TEST_F(CallTest, ReceiveStreamSendsRemb) {
- class RembObserver : public test::RtpRtcpObserver {
- public:
- RembObserver() : test::RtpRtcpObserver(kDefaultTimeoutMs) {}
-
- virtual Action OnReceiveRtcp(const uint8_t* packet,
- size_t length) OVERRIDE {
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
-
- bool received_psfb = false;
- bool received_remb = false;
- RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
- while (packet_type != RTCPUtility::kRtcpNotValidCode) {
- if (packet_type == RTCPUtility::kRtcpPsfbRembCode) {
- const RTCPUtility::RTCPPacket& packet = parser.Packet();
- EXPECT_EQ(packet.PSFBAPP.SenderSSRC, kReceiverLocalSsrc);
- received_psfb = true;
- } else if (packet_type == RTCPUtility::kRtcpPsfbRembItemCode) {
- const RTCPUtility::RTCPPacket& packet = parser.Packet();
- EXPECT_GT(packet.REMBItem.BitRate, 0u);
- EXPECT_EQ(packet.REMBItem.NumberOfSSRCs, 1u);
- EXPECT_EQ(packet.REMBItem.SSRCs[0], kSendSsrc);
- received_remb = true;
- }
- packet_type = parser.Iterate();
- }
- if (received_psfb && received_remb)
- observation_complete_->Set();
- return SEND_PACKET;
- }
- } observer;
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
- CreateTestConfigs();
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for a receiver RTCP REMB packet to be sent.";
-
- StopSending();
- observer.StopSending();
- DestroyStreams();
-}
-
-void CallTest::TestXrReceiverReferenceTimeReport(bool enable_rrtr) {
- static const int kNumRtcpReportPacketsToObserve = 5;
- class RtcpXrObserver : public test::RtpRtcpObserver {
- public:
- explicit RtcpXrObserver(bool enable_rrtr)
- : test::RtpRtcpObserver(kDefaultTimeoutMs),
- enable_rrtr_(enable_rrtr),
- sent_rtcp_sr_(0),
- sent_rtcp_rr_(0),
- sent_rtcp_rrtr_(0),
- sent_rtcp_dlrr_(0) {}
-
- private:
- // Receive stream should send RR packets (and RRTR packets if enabled).
- virtual Action OnReceiveRtcp(const uint8_t* packet,
- size_t length) OVERRIDE {
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
-
- RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
- while (packet_type != RTCPUtility::kRtcpNotValidCode) {
- if (packet_type == RTCPUtility::kRtcpRrCode) {
- ++sent_rtcp_rr_;
- } else if (packet_type ==
- RTCPUtility::kRtcpXrReceiverReferenceTimeCode) {
- ++sent_rtcp_rrtr_;
- }
- EXPECT_NE(packet_type, RTCPUtility::kRtcpSrCode);
- EXPECT_NE(packet_type, RTCPUtility::kRtcpXrDlrrReportBlockItemCode);
- packet_type = parser.Iterate();
- }
- return SEND_PACKET;
- }
- // Send stream should send SR packets (and DLRR packets if enabled).
- virtual Action OnSendRtcp(const uint8_t* packet, size_t length) {
- RTCPUtility::RTCPParserV2 parser(packet, length, true);
- EXPECT_TRUE(parser.IsValid());
-
- RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
- while (packet_type != RTCPUtility::kRtcpNotValidCode) {
- if (packet_type == RTCPUtility::kRtcpSrCode) {
- ++sent_rtcp_sr_;
- } else if (packet_type == RTCPUtility::kRtcpXrDlrrReportBlockItemCode) {
- ++sent_rtcp_dlrr_;
- }
- EXPECT_NE(packet_type, RTCPUtility::kRtcpXrReceiverReferenceTimeCode);
- packet_type = parser.Iterate();
- }
- if (sent_rtcp_sr_ > kNumRtcpReportPacketsToObserve &&
- sent_rtcp_rr_ > kNumRtcpReportPacketsToObserve) {
- if (enable_rrtr_) {
- EXPECT_GT(sent_rtcp_rrtr_, 0);
- EXPECT_GT(sent_rtcp_dlrr_, 0);
- } else {
- EXPECT_EQ(0, sent_rtcp_rrtr_);
- EXPECT_EQ(0, sent_rtcp_dlrr_);
- }
- observation_complete_->Set();
- }
- return SEND_PACKET;
- }
- bool enable_rrtr_;
- int sent_rtcp_sr_;
- int sent_rtcp_rr_;
- int sent_rtcp_rrtr_;
- int sent_rtcp_dlrr_;
- } observer(enable_rrtr);
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- receive_config_.rtp.rtcp_mode = newapi::kRtcpReducedSize;
- receive_config_.rtp.rtcp_xr.receiver_reference_time_report = enable_rrtr;
-
- CreateStreams();
- CreateFrameGenerator();
- StartSending();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for RTCP SR/RR packets to be sent.";
-
- StopSending();
- observer.StopSending();
- DestroyStreams();
-}
-
-class StatsObserver : public test::RtpRtcpObserver, public I420FrameCallback {
- public:
- StatsObserver()
- : test::RtpRtcpObserver(kLongTimeoutMs),
- receive_stream_(NULL),
- send_stream_(NULL),
- expected_receive_ssrc_(),
- expected_send_ssrcs_(),
- check_stats_event_(EventWrapper::Create()) {}
-
- void SetExpectedReceiveSsrc(uint32_t ssrc) { expected_receive_ssrc_ = ssrc; }
-
- void SetExpectedSendSsrcs(const std::vector<uint32_t>& ssrcs) {
- for (std::vector<uint32_t>::const_iterator it = ssrcs.begin();
- it != ssrcs.end();
- ++it) {
- expected_send_ssrcs_.insert(*it);
- }
- }
-
- void SetExpectedCName(std::string cname) { expected_cname_ = cname; }
-
- void SetReceiveStream(VideoReceiveStream* stream) {
- receive_stream_ = stream;
- }
-
- void SetSendStream(VideoSendStream* stream) { send_stream_ = stream; }
-
- void WaitForFilledStats() {
- Clock* clock = Clock::GetRealTimeClock();
- int64_t now = clock->TimeInMilliseconds();
- int64_t stop_time = now + kLongTimeoutMs;
- bool receive_ok = false;
- bool send_ok = false;
-
- while (now < stop_time) {
- if (!receive_ok)
- receive_ok = CheckReceiveStats();
- if (!send_ok)
- send_ok = CheckSendStats();
-
- if (receive_ok && send_ok)
- return;
-
- int64_t time_until_timout_ = stop_time - now;
- if (time_until_timout_ > 0)
- check_stats_event_->Wait(time_until_timout_);
- now = clock->TimeInMilliseconds();
- }
-
- ADD_FAILURE() << "Timed out waiting for filled stats.";
- for (std::map<std::string, bool>::const_iterator it =
- receive_stats_filled_.begin();
- it != receive_stats_filled_.end();
- ++it) {
- if (!it->second) {
- ADD_FAILURE() << "Missing receive stats: " << it->first;
- }
- }
-
- for (std::map<std::string, bool>::const_iterator it =
- send_stats_filled_.begin();
- it != send_stats_filled_.end();
- ++it) {
- if (!it->second) {
- ADD_FAILURE() << "Missing send stats: " << it->first;
- }
- }
- }
-
- private:
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- check_stats_event_->Set();
- return SEND_PACKET;
- }
-
- virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- check_stats_event_->Set();
- return SEND_PACKET;
- }
-
- virtual Action OnReceiveRtp(const uint8_t* packet, size_t length) OVERRIDE {
- check_stats_event_->Set();
- return SEND_PACKET;
- }
-
- virtual Action OnReceiveRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- check_stats_event_->Set();
- return SEND_PACKET;
- }
-
- virtual void FrameCallback(I420VideoFrame* video_frame) OVERRIDE {
- // Ensure that we have at least 5ms send side delay.
- int64_t render_time = video_frame->render_time_ms();
- if (render_time > 0)
- video_frame->set_render_time_ms(render_time - 5);
- }
-
- bool CheckReceiveStats() {
- assert(receive_stream_ != NULL);
- VideoReceiveStream::Stats stats = receive_stream_->GetStats();
- EXPECT_EQ(expected_receive_ssrc_, stats.ssrc);
-
- // Make sure all fields have been populated.
-
- receive_stats_filled_["IncomingRate"] |=
- stats.network_frame_rate != 0 || stats.bitrate_bps != 0;
-
- receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
-
- receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0;
-
- receive_stats_filled_["StatisticsUpdated"] |=
- stats.rtcp_stats.cumulative_lost != 0 ||
- stats.rtcp_stats.extended_max_sequence_number != 0 ||
- stats.rtcp_stats.fraction_lost != 0 || stats.rtcp_stats.jitter != 0;
-
- receive_stats_filled_["DataCountersUpdated"] |=
- stats.rtp_stats.bytes != 0 || stats.rtp_stats.fec_packets != 0 ||
- stats.rtp_stats.header_bytes != 0 || stats.rtp_stats.packets != 0 ||
- stats.rtp_stats.padding_bytes != 0 ||
- stats.rtp_stats.retransmitted_packets != 0;
-
- receive_stats_filled_["CodecStats"] |=
- stats.avg_delay_ms != 0 || stats.discarded_packets != 0 ||
- stats.key_frames != 0 || stats.delta_frames != 0;
-
- receive_stats_filled_["CName"] |= stats.c_name == expected_cname_;
-
- return AllStatsFilled(receive_stats_filled_);
- }
-
- bool CheckSendStats() {
- assert(send_stream_ != NULL);
- VideoSendStream::Stats stats = send_stream_->GetStats();
-
- send_stats_filled_["NumStreams"] |=
- stats.substreams.size() == expected_send_ssrcs_.size();
-
- send_stats_filled_["Delay"] |=
- stats.avg_delay_ms != 0 || stats.max_delay_ms != 0;
-
- receive_stats_filled_["CName"] |= stats.c_name == expected_cname_;
-
- for (std::map<uint32_t, StreamStats>::const_iterator it =
- stats.substreams.begin();
- it != stats.substreams.end();
- ++it) {
- EXPECT_TRUE(expected_send_ssrcs_.find(it->first) !=
- expected_send_ssrcs_.end());
-
- send_stats_filled_[CompoundKey("IncomingRate", it->first)] |=
- stats.input_frame_rate != 0;
-
- const StreamStats& stream_stats = it->second;
-
- send_stats_filled_[CompoundKey("StatisticsUpdated", it->first)] |=
- stream_stats.rtcp_stats.cumulative_lost != 0 ||
- stream_stats.rtcp_stats.extended_max_sequence_number != 0 ||
- stream_stats.rtcp_stats.fraction_lost != 0;
-
- send_stats_filled_[CompoundKey("DataCountersUpdated", it->first)] |=
- stream_stats.rtp_stats.fec_packets != 0 ||
- stream_stats.rtp_stats.padding_bytes != 0 ||
- stream_stats.rtp_stats.retransmitted_packets != 0 ||
- stream_stats.rtp_stats.packets != 0;
-
- send_stats_filled_[CompoundKey("BitrateStatisticsObserver", it->first)] |=
- stream_stats.bitrate_bps != 0;
-
- send_stats_filled_[CompoundKey("FrameCountObserver", it->first)] |=
- stream_stats.delta_frames != 0 || stream_stats.key_frames != 0;
-
- send_stats_filled_[CompoundKey("OutgoingRate", it->first)] |=
- stats.encode_frame_rate != 0;
- }
-
- return AllStatsFilled(send_stats_filled_);
- }
-
- std::string CompoundKey(const char* name, uint32_t ssrc) {
- std::ostringstream oss;
- oss << name << "_" << ssrc;
- return oss.str();
- }
-
- bool AllStatsFilled(const std::map<std::string, bool>& stats_map) {
- for (std::map<std::string, bool>::const_iterator it = stats_map.begin();
- it != stats_map.end();
- ++it) {
- if (!it->second)
- return false;
- }
- return true;
- }
-
- VideoReceiveStream* receive_stream_;
- std::map<std::string, bool> receive_stats_filled_;
-
- VideoSendStream* send_stream_;
- std::map<std::string, bool> send_stats_filled_;
-
- uint32_t expected_receive_ssrc_;
- std::set<uint32_t> expected_send_ssrcs_;
- std::string expected_cname_;
-
- scoped_ptr<EventWrapper> check_stats_event_;
-};
-
-TEST_F(CallTest, GetStats) {
- StatsObserver observer;
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
-
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- send_config_.pre_encode_callback = &observer; // Used to inject delay.
- send_config_.rtp.c_name = "SomeCName";
-
- observer.SetExpectedReceiveSsrc(receive_config_.rtp.local_ssrc);
- observer.SetExpectedSendSsrcs(send_config_.rtp.ssrcs);
- observer.SetExpectedCName(send_config_.rtp.c_name);
-
- CreateStreams();
- observer.SetReceiveStream(receive_stream_);
- observer.SetSendStream(send_stream_);
- CreateFrameGenerator();
- StartSending();
-
- observer.WaitForFilledStats();
-
- StopSending();
- observer.StopSending();
- DestroyStreams();
-}
-
-TEST_F(CallTest, ReceiverReferenceTimeReportEnabled) {
- TestXrReceiverReferenceTimeReport(true);
-}
-
-TEST_F(CallTest, ReceiverReferenceTimeReportDisabled) {
- TestXrReceiverReferenceTimeReport(false);
-}
-
-TEST_F(CallTest, TestReceivedRtpPacketStats) {
- static const size_t kNumRtpPacketsToSend = 5;
- class ReceivedRtpStatsObserver : public test::RtpRtcpObserver {
- public:
- ReceivedRtpStatsObserver()
- : test::RtpRtcpObserver(kDefaultTimeoutMs),
- receive_stream_(NULL),
- sent_rtp_(0) {}
-
- void SetReceiveStream(VideoReceiveStream* stream) {
- receive_stream_ = stream;
- }
-
- private:
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- if (sent_rtp_ >= kNumRtpPacketsToSend) {
- VideoReceiveStream::Stats stats = receive_stream_->GetStats();
- if (kNumRtpPacketsToSend == stats.rtp_stats.packets) {
- observation_complete_->Set();
- }
- return DROP_PACKET;
- }
- ++sent_rtp_;
- return SEND_PACKET;
- }
-
- VideoReceiveStream* receive_stream_;
- uint32_t sent_rtp_;
- } observer;
-
- CreateCalls(Call::Config(observer.SendTransport()),
- Call::Config(observer.ReceiveTransport()));
- observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
-
- CreateTestConfigs();
- CreateStreams();
- observer.SetReceiveStream(receive_stream_);
- CreateFrameGenerator();
- StartSending();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while verifying number of received RTP packets.";
-
- StopSending();
- observer.StopSending();
- DestroyStreams();
-}
-
-} // namespace webrtc
diff --git a/video/end_to_end_tests.cc b/video/end_to_end_tests.cc
new file mode 100644
index 0000000..0e87a03
--- /dev/null
+++ b/video/end_to_end_tests.cc
@@ -0,0 +1,2077 @@
+/*
+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#include <assert.h>
+
+#include <algorithm>
+#include <map>
+#include <sstream>
+#include <string>
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+#include "webrtc/call.h"
+#include "webrtc/frame_callback.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/interface/event_wrapper.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/system_wrappers/interface/sleep.h"
+#include "webrtc/test/call_test.h"
+#include "webrtc/test/direct_transport.h"
+#include "webrtc/test/encoder_settings.h"
+#include "webrtc/test/fake_audio_device.h"
+#include "webrtc/test/fake_decoder.h"
+#include "webrtc/test/fake_encoder.h"
+#include "webrtc/test/frame_generator.h"
+#include "webrtc/test/frame_generator_capturer.h"
+#include "webrtc/test/null_transport.h"
+#include "webrtc/test/rtp_rtcp_observer.h"
+#include "webrtc/test/testsupport/fileutils.h"
+#include "webrtc/test/testsupport/gtest_disable.h"
+#include "webrtc/test/testsupport/perf_test.h"
+#include "webrtc/video/transport_adapter.h"
+#include "webrtc/video_encoder.h"
+
+namespace webrtc {
+
+static const unsigned long kSilenceTimeoutMs = 2000;
+
+class EndToEndTest : public test::CallTest {
+ public:
+ EndToEndTest() {}
+
+ virtual ~EndToEndTest() {
+ EXPECT_EQ(NULL, send_stream_);
+ EXPECT_TRUE(receive_streams_.empty());
+ }
+
+ protected:
+ class UnusedTransport : public newapi::Transport {
+ private:
+ virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ ADD_FAILURE() << "Unexpected RTP sent.";
+ return false;
+ }
+
+ virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
+ ADD_FAILURE() << "Unexpected RTCP sent.";
+ return false;
+ }
+ };
+
+ void DecodesRetransmittedFrame(bool retransmit_over_rtx);
+ void ReceivesPliAndRecovers(int rtp_history_ms);
+ void RespectsRtcpMode(newapi::RtcpMode rtcp_mode);
+ void TestXrReceiverReferenceTimeReport(bool enable_rrtr);
+ void TestSendsSetSsrcs(size_t num_ssrcs, bool send_single_ssrc_first);
+ void TestRtpStatePreservation(bool use_rtx);
+};
+
+TEST_F(EndToEndTest, ReceiverCanBeStartedTwice) {
+ test::NullTransport transport;
+ CreateCalls(Call::Config(&transport), Call::Config(&transport));
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+
+ CreateStreams();
+
+ receive_streams_[0]->Start();
+ receive_streams_[0]->Start();
+
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, ReceiverCanBeStoppedTwice) {
+ test::NullTransport transport;
+ CreateCalls(Call::Config(&transport), Call::Config(&transport));
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+
+ CreateStreams();
+
+ receive_streams_[0]->Stop();
+ receive_streams_[0]->Stop();
+
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, RendersSingleDelayedFrame) {
+ static const int kWidth = 320;
+ static const int kHeight = 240;
+ // This constant is chosen to be higher than the timeout in the video_render
+ // module. This makes sure that frames aren't dropped if there are no other
+ // frames in the queue.
+ static const int kDelayRenderCallbackMs = 1000;
+
+ class Renderer : public VideoRenderer {
+ public:
+ Renderer() : event_(EventWrapper::Create()) {}
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int /*time_to_render_ms*/) OVERRIDE {
+ event_->Set();
+ }
+
+ EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
+
+ scoped_ptr<EventWrapper> event_;
+ } renderer;
+
+ class TestFrameCallback : public I420FrameCallback {
+ public:
+ TestFrameCallback() : event_(EventWrapper::Create()) {}
+
+ EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
+
+ private:
+ virtual void FrameCallback(I420VideoFrame* frame) OVERRIDE {
+ SleepMs(kDelayRenderCallbackMs);
+ event_->Set();
+ }
+
+ scoped_ptr<EventWrapper> event_;
+ };
+
+ test::DirectTransport sender_transport, receiver_transport;
+
+ CreateCalls(Call::Config(&sender_transport),
+ Call::Config(&receiver_transport));
+
+ sender_transport.SetReceiver(receiver_call_->Receiver());
+ receiver_transport.SetReceiver(sender_call_->Receiver());
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+
+ TestFrameCallback pre_render_callback;
+ receive_configs_[0].pre_render_callback = &pre_render_callback;
+ receive_configs_[0].renderer = &renderer;
+
+ CreateStreams();
+ Start();
+
+ // Create frames that are smaller than the send width/height, this is done to
+ // check that the callbacks are done after processing video.
+ scoped_ptr<test::FrameGenerator> frame_generator(
+ test::FrameGenerator::Create(kWidth, kHeight));
+ send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
+ EXPECT_EQ(kEventSignaled, pre_render_callback.Wait())
+ << "Timed out while waiting for pre-render callback.";
+ EXPECT_EQ(kEventSignaled, renderer.Wait())
+ << "Timed out while waiting for the frame to render.";
+
+ Stop();
+
+ sender_transport.StopSending();
+ receiver_transport.StopSending();
+
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, TransmitsFirstFrame) {
+ class Renderer : public VideoRenderer {
+ public:
+ Renderer() : event_(EventWrapper::Create()) {}
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int /*time_to_render_ms*/) OVERRIDE {
+ event_->Set();
+ }
+
+ EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
+
+ scoped_ptr<EventWrapper> event_;
+ } renderer;
+
+ test::DirectTransport sender_transport, receiver_transport;
+
+ CreateCalls(Call::Config(&sender_transport),
+ Call::Config(&receiver_transport));
+
+ sender_transport.SetReceiver(receiver_call_->Receiver());
+ receiver_transport.SetReceiver(sender_call_->Receiver());
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+ receive_configs_[0].renderer = &renderer;
+
+ CreateStreams();
+ Start();
+
+ scoped_ptr<test::FrameGenerator> frame_generator(test::FrameGenerator::Create(
+ encoder_config_.streams[0].width, encoder_config_.streams[0].height));
+ send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
+
+ EXPECT_EQ(kEventSignaled, renderer.Wait())
+ << "Timed out while waiting for the frame to render.";
+
+ Stop();
+
+ sender_transport.StopSending();
+ receiver_transport.StopSending();
+
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, SendsAndReceivesH264) {
+ class H264Observer : public test::EndToEndTest, public VideoRenderer {
+ public:
+ H264Observer()
+ : EndToEndTest(2 * kDefaultTimeoutMs),
+ fake_encoder_(Clock::GetRealTimeClock()),
+ frame_counter_(0) {}
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for enough frames to be decoded.";
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->encoder_settings.encoder = &fake_encoder_;
+ send_config->encoder_settings.payload_name = "H264";
+ send_config->encoder_settings.payload_type = kFakeSendPayloadType;
+ encoder_config->streams[0].min_bitrate_bps = 50000;
+ encoder_config->streams[0].target_bitrate_bps =
+ encoder_config->streams[0].max_bitrate_bps = 2000000;
+
+ (*receive_configs)[0].renderer = this;
+ VideoCodec codec =
+ test::CreateDecoderVideoCodec(send_config->encoder_settings);
+ (*receive_configs)[0].codecs.resize(1);
+ (*receive_configs)[0].codecs[0] = codec;
+ (*receive_configs)[0].external_decoders.resize(1);
+ (*receive_configs)[0].external_decoders[0].payload_type =
+ send_config->encoder_settings.payload_type;
+ (*receive_configs)[0].external_decoders[0].decoder = &fake_decoder_;
+ }
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int time_to_render_ms) OVERRIDE {
+ const int kRequiredFrames = 500;
+ if (++frame_counter_ == kRequiredFrames)
+ observation_complete_->Set();
+ }
+
+ private:
+ test::FakeH264Decoder fake_decoder_;
+ test::FakeH264Encoder fake_encoder_;
+ int frame_counter_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, ReceiverUsesLocalSsrc) {
+ class SyncRtcpObserver : public test::EndToEndTest {
+ public:
+ SyncRtcpObserver() : EndToEndTest(kDefaultTimeoutMs) {}
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+ uint32_t ssrc = 0;
+ ssrc |= static_cast<uint32_t>(packet[4]) << 24;
+ ssrc |= static_cast<uint32_t>(packet[5]) << 16;
+ ssrc |= static_cast<uint32_t>(packet[6]) << 8;
+ ssrc |= static_cast<uint32_t>(packet[7]) << 0;
+ EXPECT_EQ(kReceiverLocalSsrc, ssrc);
+ observation_complete_->Set();
+
+ return SEND_PACKET;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for a receiver RTCP packet to be sent.";
+ }
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, ReceivesAndRetransmitsNack) {
+ static const int kNumberOfNacksToObserve = 2;
+ static const int kLossBurstSize = 2;
+ static const int kPacketsBetweenLossBursts = 9;
+ class NackObserver : public test::EndToEndTest {
+ public:
+ NackObserver()
+ : EndToEndTest(kLongTimeoutMs),
+ rtp_parser_(RtpHeaderParser::Create()),
+ sent_rtp_packets_(0),
+ packets_left_to_drop_(0),
+ nacks_left_(kNumberOfNacksToObserve) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(rtp_parser_->Parse(packet, length, &header));
+
+ // Never drop retransmitted packets.
+ if (dropped_packets_.find(header.sequenceNumber) !=
+ dropped_packets_.end()) {
+ retransmitted_packets_.insert(header.sequenceNumber);
+ if (nacks_left_ == 0 &&
+ retransmitted_packets_.size() == dropped_packets_.size()) {
+ observation_complete_->Set();
+ }
+ return SEND_PACKET;
+ }
+
+ ++sent_rtp_packets_;
+
+ // Enough NACKs received, stop dropping packets.
+ if (nacks_left_ == 0)
+ return SEND_PACKET;
+
+ // Check if it's time for a new loss burst.
+ if (sent_rtp_packets_ % kPacketsBetweenLossBursts == 0)
+ packets_left_to_drop_ = kLossBurstSize;
+
+ if (packets_left_to_drop_ > 0) {
+ --packets_left_to_drop_;
+ dropped_packets_.insert(header.sequenceNumber);
+ return DROP_PACKET;
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ while (packet_type != RTCPUtility::kRtcpNotValidCode) {
+ if (packet_type == RTCPUtility::kRtcpRtpfbNackCode) {
+ --nacks_left_;
+ break;
+ }
+ packet_type = parser.Iterate();
+ }
+ return SEND_PACKET;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ (*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out waiting for packets to be NACKed, retransmitted and "
+ "rendered.";
+ }
+
+ scoped_ptr<RtpHeaderParser> rtp_parser_;
+ std::set<uint16_t> dropped_packets_;
+ std::set<uint16_t> retransmitted_packets_;
+ uint64_t sent_rtp_packets_;
+ int packets_left_to_drop_;
+ int nacks_left_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+// TODO(pbos): Flaky, webrtc:3269
+TEST_F(EndToEndTest, DISABLED_CanReceiveFec) {
+ class FecRenderObserver : public test::EndToEndTest, public VideoRenderer {
+ public:
+ FecRenderObserver()
+ : EndToEndTest(kDefaultTimeoutMs),
+ state_(kFirstPacket),
+ protected_sequence_number_(0),
+ protected_frame_timestamp_(0) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE
+ EXCLUSIVE_LOCKS_REQUIRED(crit_) {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+
+ EXPECT_EQ(kRedPayloadType, header.payloadType);
+ int encapsulated_payload_type =
+ static_cast<int>(packet[header.headerLength]);
+ if (encapsulated_payload_type != kFakeSendPayloadType)
+ EXPECT_EQ(kUlpfecPayloadType, encapsulated_payload_type);
+
+ switch (state_) {
+ case kFirstPacket:
+ state_ = kDropEveryOtherPacketUntilFec;
+ break;
+ case kDropEveryOtherPacketUntilFec:
+ if (encapsulated_payload_type == kUlpfecPayloadType) {
+ state_ = kDropNextMediaPacket;
+ return SEND_PACKET;
+ }
+ if (header.sequenceNumber % 2 == 0)
+ return DROP_PACKET;
+ break;
+ case kDropNextMediaPacket:
+ if (encapsulated_payload_type == kFakeSendPayloadType) {
+ protected_sequence_number_ = header.sequenceNumber;
+ protected_frame_timestamp_ = header.timestamp;
+ state_ = kProtectedPacketDropped;
+ return DROP_PACKET;
+ }
+ break;
+ case kProtectedPacketDropped:
+ EXPECT_NE(header.sequenceNumber, protected_sequence_number_)
+ << "Protected packet retransmitted. Should not happen with FEC.";
+ break;
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int time_to_render_ms) OVERRIDE {
+ CriticalSectionScoped lock(crit_.get());
+ // Rendering frame with timestamp associated with dropped packet -> FEC
+ // protection worked.
+ if (state_ == kProtectedPacketDropped &&
+ video_frame.timestamp() == protected_frame_timestamp_) {
+ observation_complete_->Set();
+ }
+ }
+
+ enum {
+ kFirstPacket,
+ kDropEveryOtherPacketUntilFec,
+ kDropNextMediaPacket,
+ kProtectedPacketDropped,
+ } state_;
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ // TODO(pbos): Run this test with combined NACK/FEC enabled as well.
+ // int rtp_history_ms = 1000;
+ // (*receive_configs)[0].rtp.nack.rtp_history_ms = rtp_history_ms;
+ // send_config->rtp.nack.rtp_history_ms = rtp_history_ms;
+ send_config->rtp.fec.red_payload_type = kRedPayloadType;
+ send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
+
+ (*receive_configs)[0].rtp.fec.red_payload_type = kRedPayloadType;
+ (*receive_configs)[0].rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
+ (*receive_configs)[0].renderer = this;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for retransmitted NACKed frames to be "
+ "rendered again.";
+ }
+
+ uint32_t protected_sequence_number_ GUARDED_BY(crit_);
+ uint32_t protected_frame_timestamp_ GUARDED_BY(crit_);
+ } test;
+
+ RunBaseTest(&test);
+}
+
+// This test drops second RTP packet with a marker bit set, makes sure it's
+// retransmitted and renders. Retransmission SSRCs are also checked.
+void EndToEndTest::DecodesRetransmittedFrame(bool retransmit_over_rtx) {
+ static const int kDroppedFrameNumber = 2;
+ class RetransmissionObserver : public test::EndToEndTest,
+ public I420FrameCallback {
+ public:
+ explicit RetransmissionObserver(bool expect_rtx)
+ : EndToEndTest(kDefaultTimeoutMs),
+ retransmission_ssrc_(expect_rtx ? kSendRtxSsrcs[0] : kSendSsrcs[0]),
+ retransmission_payload_type_(expect_rtx ? kSendRtxPayloadType
+ : kFakeSendPayloadType),
+ marker_bits_observed_(0),
+ retransmitted_timestamp_(0),
+ frame_retransmitted_(false) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+
+ if (header.timestamp == retransmitted_timestamp_) {
+ EXPECT_EQ(retransmission_ssrc_, header.ssrc);
+ EXPECT_EQ(retransmission_payload_type_, header.payloadType);
+ frame_retransmitted_ = true;
+ return SEND_PACKET;
+ }
+
+ EXPECT_EQ(kSendSsrcs[0], header.ssrc);
+ EXPECT_EQ(kFakeSendPayloadType, header.payloadType);
+
+ // Found the second frame's final packet, drop this and expect a
+ // retransmission.
+ if (header.markerBit && ++marker_bits_observed_ == kDroppedFrameNumber) {
+ retransmitted_timestamp_ = header.timestamp;
+ return DROP_PACKET;
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual void FrameCallback(I420VideoFrame* frame) OVERRIDE {
+ CriticalSectionScoped lock(crit_.get());
+ if (frame->timestamp() == retransmitted_timestamp_) {
+ EXPECT_TRUE(frame_retransmitted_);
+ observation_complete_->Set();
+ }
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ (*receive_configs)[0].pre_render_callback = this;
+ (*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ if (retransmission_ssrc_ == kSendRtxSsrcs[0]) {
+ send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]);
+ send_config->rtp.rtx.payload_type = kSendRtxPayloadType;
+ (*receive_configs)[0].rtp.rtx[kSendRtxPayloadType].ssrc =
+ kSendRtxSsrcs[0];
+ (*receive_configs)[0].rtp.rtx[kSendRtxPayloadType].payload_type =
+ kSendRtxPayloadType;
+ }
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for retransmission to render.";
+ }
+
+ const uint32_t retransmission_ssrc_;
+ const int retransmission_payload_type_;
+ int marker_bits_observed_;
+ uint32_t retransmitted_timestamp_;
+ bool frame_retransmitted_;
+ } test(retransmit_over_rtx);
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, DecodesRetransmittedFrame) {
+ DecodesRetransmittedFrame(false);
+}
+
+TEST_F(EndToEndTest, DecodesRetransmittedFrameOverRtx) {
+ DecodesRetransmittedFrame(true);
+}
+
+TEST_F(EndToEndTest, UsesFrameCallbacks) {
+ static const int kWidth = 320;
+ static const int kHeight = 240;
+
+ class Renderer : public VideoRenderer {
+ public:
+ Renderer() : event_(EventWrapper::Create()) {}
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int /*time_to_render_ms*/) OVERRIDE {
+ EXPECT_EQ(0, *video_frame.buffer(kYPlane))
+ << "Rendered frame should have zero luma which is applied by the "
+ "pre-render callback.";
+ event_->Set();
+ }
+
+ EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
+ scoped_ptr<EventWrapper> event_;
+ } renderer;
+
+ class TestFrameCallback : public I420FrameCallback {
+ public:
+ TestFrameCallback(int expected_luma_byte, int next_luma_byte)
+ : event_(EventWrapper::Create()),
+ expected_luma_byte_(expected_luma_byte),
+ next_luma_byte_(next_luma_byte) {}
+
+ EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
+
+ private:
+ virtual void FrameCallback(I420VideoFrame* frame) {
+ EXPECT_EQ(kWidth, frame->width())
+ << "Width not as expected, callback done before resize?";
+ EXPECT_EQ(kHeight, frame->height())
+ << "Height not as expected, callback done before resize?";
+
+ // Previous luma specified, observed luma should be fairly close.
+ if (expected_luma_byte_ != -1) {
+ EXPECT_NEAR(expected_luma_byte_, *frame->buffer(kYPlane), 10);
+ }
+
+ memset(frame->buffer(kYPlane),
+ next_luma_byte_,
+ frame->allocated_size(kYPlane));
+
+ event_->Set();
+ }
+
+ scoped_ptr<EventWrapper> event_;
+ int expected_luma_byte_;
+ int next_luma_byte_;
+ };
+
+ TestFrameCallback pre_encode_callback(-1, 255); // Changes luma to 255.
+ TestFrameCallback pre_render_callback(255, 0); // Changes luma from 255 to 0.
+
+ test::DirectTransport sender_transport, receiver_transport;
+
+ CreateCalls(Call::Config(&sender_transport),
+ Call::Config(&receiver_transport));
+
+ sender_transport.SetReceiver(receiver_call_->Receiver());
+ receiver_transport.SetReceiver(sender_call_->Receiver());
+
+ CreateSendConfig(1);
+ scoped_ptr<VideoEncoder> encoder(
+ VideoEncoder::Create(VideoEncoder::kVp8));
+ send_config_.encoder_settings.encoder = encoder.get();
+ send_config_.encoder_settings.payload_name = "VP8";
+ ASSERT_EQ(1u, encoder_config_.streams.size()) << "Test setup error.";
+ encoder_config_.streams[0].width = kWidth;
+ encoder_config_.streams[0].height = kHeight;
+ send_config_.pre_encode_callback = &pre_encode_callback;
+
+ CreateMatchingReceiveConfigs();
+ receive_configs_[0].pre_render_callback = &pre_render_callback;
+ receive_configs_[0].renderer = &renderer;
+
+ CreateStreams();
+ Start();
+
+ // Create frames that are smaller than the send width/height, this is done to
+ // check that the callbacks are done after processing video.
+ scoped_ptr<test::FrameGenerator> frame_generator(
+ test::FrameGenerator::Create(kWidth / 2, kHeight / 2));
+ send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
+
+ EXPECT_EQ(kEventSignaled, pre_encode_callback.Wait())
+ << "Timed out while waiting for pre-encode callback.";
+ EXPECT_EQ(kEventSignaled, pre_render_callback.Wait())
+ << "Timed out while waiting for pre-render callback.";
+ EXPECT_EQ(kEventSignaled, renderer.Wait())
+ << "Timed out while waiting for the frame to render.";
+
+ Stop();
+
+ sender_transport.StopSending();
+ receiver_transport.StopSending();
+
+ DestroyStreams();
+}
+
+void EndToEndTest::ReceivesPliAndRecovers(int rtp_history_ms) {
+ static const int kPacketsToDrop = 1;
+
+ class PliObserver : public test::EndToEndTest, public VideoRenderer {
+ public:
+ explicit PliObserver(int rtp_history_ms)
+ : EndToEndTest(kLongTimeoutMs),
+ rtp_history_ms_(rtp_history_ms),
+ nack_enabled_(rtp_history_ms > 0),
+ highest_dropped_timestamp_(0),
+ frames_to_drop_(0),
+ received_pli_(false) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+
+ // Drop all retransmitted packets to force a PLI.
+ if (header.timestamp <= highest_dropped_timestamp_)
+ return DROP_PACKET;
+
+ if (frames_to_drop_ > 0) {
+ highest_dropped_timestamp_ = header.timestamp;
+ --frames_to_drop_;
+ return DROP_PACKET;
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ for (RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ packet_type != RTCPUtility::kRtcpNotValidCode;
+ packet_type = parser.Iterate()) {
+ if (!nack_enabled_)
+ EXPECT_NE(packet_type, RTCPUtility::kRtcpRtpfbNackCode);
+
+ if (packet_type == RTCPUtility::kRtcpPsfbPliCode) {
+ received_pli_ = true;
+ break;
+ }
+ }
+ return SEND_PACKET;
+ }
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int time_to_render_ms) OVERRIDE {
+ CriticalSectionScoped lock(crit_.get());
+ if (received_pli_ &&
+ video_frame.timestamp() > highest_dropped_timestamp_) {
+ observation_complete_->Set();
+ }
+ if (!received_pli_)
+ frames_to_drop_ = kPacketsToDrop;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.nack.rtp_history_ms = rtp_history_ms_;
+ (*receive_configs)[0].rtp.nack.rtp_history_ms = rtp_history_ms_;
+ (*receive_configs)[0].renderer = this;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait()) << "Timed out waiting for PLI to be "
+ "received and a frame to be "
+ "rendered afterwards.";
+ }
+
+ int rtp_history_ms_;
+ bool nack_enabled_;
+ uint32_t highest_dropped_timestamp_;
+ int frames_to_drop_;
+ bool received_pli_;
+ } test(rtp_history_ms);
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, ReceivesPliAndRecoversWithNack) {
+ ReceivesPliAndRecovers(1000);
+}
+
+// TODO(pbos): Enable this when 2250 is resolved.
+TEST_F(EndToEndTest, DISABLED_ReceivesPliAndRecoversWithoutNack) {
+ ReceivesPliAndRecovers(0);
+}
+
+TEST_F(EndToEndTest, UnknownRtpPacketGivesUnknownSsrcReturnCode) {
+ class PacketInputObserver : public PacketReceiver {
+ public:
+ explicit PacketInputObserver(PacketReceiver* receiver)
+ : receiver_(receiver), delivered_packet_(EventWrapper::Create()) {}
+
+ EventTypeWrapper Wait() {
+ return delivered_packet_->Wait(kDefaultTimeoutMs);
+ }
+
+ private:
+ virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ if (RtpHeaderParser::IsRtcp(packet, length)) {
+ return receiver_->DeliverPacket(packet, length);
+ } else {
+ DeliveryStatus delivery_status =
+ receiver_->DeliverPacket(packet, length);
+ EXPECT_EQ(DELIVERY_UNKNOWN_SSRC, delivery_status);
+ delivered_packet_->Set();
+ return delivery_status;
+ }
+ }
+
+ PacketReceiver* receiver_;
+ scoped_ptr<EventWrapper> delivered_packet_;
+ };
+
+ test::DirectTransport send_transport, receive_transport;
+
+ CreateCalls(Call::Config(&send_transport), Call::Config(&receive_transport));
+ PacketInputObserver input_observer(receiver_call_->Receiver());
+
+ send_transport.SetReceiver(&input_observer);
+ receive_transport.SetReceiver(sender_call_->Receiver());
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+
+ CreateStreams();
+ CreateFrameGeneratorCapturer();
+ Start();
+
+ receiver_call_->DestroyVideoReceiveStream(receive_streams_[0]);
+ receive_streams_.clear();
+
+ // Wait() waits for a received packet.
+ EXPECT_EQ(kEventSignaled, input_observer.Wait());
+
+ Stop();
+
+ DestroyStreams();
+
+ send_transport.StopSending();
+ receive_transport.StopSending();
+}
+
+void EndToEndTest::RespectsRtcpMode(newapi::RtcpMode rtcp_mode) {
+ static const int kNumCompoundRtcpPacketsToObserve = 10;
+ class RtcpModeObserver : public test::EndToEndTest {
+ public:
+ explicit RtcpModeObserver(newapi::RtcpMode rtcp_mode)
+ : EndToEndTest(kDefaultTimeoutMs),
+ rtcp_mode_(rtcp_mode),
+ sent_rtp_(0),
+ sent_rtcp_(0) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ if (++sent_rtp_ % 3 == 0)
+ return DROP_PACKET;
+
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ ++sent_rtcp_;
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ bool has_report_block = false;
+ while (packet_type != RTCPUtility::kRtcpNotValidCode) {
+ EXPECT_NE(RTCPUtility::kRtcpSrCode, packet_type);
+ if (packet_type == RTCPUtility::kRtcpRrCode) {
+ has_report_block = true;
+ break;
+ }
+ packet_type = parser.Iterate();
+ }
+
+ switch (rtcp_mode_) {
+ case newapi::kRtcpCompound:
+ if (!has_report_block) {
+ ADD_FAILURE() << "Received RTCP packet without receiver report for "
+ "kRtcpCompound.";
+ observation_complete_->Set();
+ }
+
+ if (sent_rtcp_ >= kNumCompoundRtcpPacketsToObserve)
+ observation_complete_->Set();
+
+ break;
+ case newapi::kRtcpReducedSize:
+ if (!has_report_block)
+ observation_complete_->Set();
+ break;
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ (*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ (*receive_configs)[0].rtp.rtcp_mode = rtcp_mode_;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << (rtcp_mode_ == newapi::kRtcpCompound
+ ? "Timed out before observing enough compound packets."
+ : "Timed out before receiving a non-compound RTCP packet.");
+ }
+
+ newapi::RtcpMode rtcp_mode_;
+ int sent_rtp_;
+ int sent_rtcp_;
+ } test(rtcp_mode);
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, UsesRtcpCompoundMode) {
+ RespectsRtcpMode(newapi::kRtcpCompound);
+}
+
+TEST_F(EndToEndTest, UsesRtcpReducedSizeMode) {
+ RespectsRtcpMode(newapi::kRtcpReducedSize);
+}
+
+// Test sets up a Call multiple senders with different resolutions and SSRCs.
+// Another is set up to receive all three of these with different renderers.
+// Each renderer verifies that it receives the expected resolution, and as soon
+// as every renderer has received a frame, the test finishes.
+TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) {
+ static const size_t kNumStreams = 3;
+
+ class VideoOutputObserver : public VideoRenderer {
+ public:
+ VideoOutputObserver(test::FrameGeneratorCapturer** capturer,
+ int width,
+ int height)
+ : capturer_(capturer),
+ width_(width),
+ height_(height),
+ done_(EventWrapper::Create()) {}
+
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int time_to_render_ms) OVERRIDE {
+ EXPECT_EQ(width_, video_frame.width());
+ EXPECT_EQ(height_, video_frame.height());
+ (*capturer_)->Stop();
+ done_->Set();
+ }
+
+ EventTypeWrapper Wait() { return done_->Wait(kDefaultTimeoutMs); }
+
+ private:
+ test::FrameGeneratorCapturer** capturer_;
+ int width_;
+ int height_;
+ scoped_ptr<EventWrapper> done_;
+ };
+
+ struct {
+ uint32_t ssrc;
+ int width;
+ int height;
+ } codec_settings[kNumStreams] = {{1, 640, 480}, {2, 320, 240}, {3, 240, 160}};
+
+ test::DirectTransport sender_transport, receiver_transport;
+ scoped_ptr<Call> sender_call(Call::Create(Call::Config(&sender_transport)));
+ scoped_ptr<Call> receiver_call(
+ Call::Create(Call::Config(&receiver_transport)));
+ sender_transport.SetReceiver(receiver_call->Receiver());
+ receiver_transport.SetReceiver(sender_call->Receiver());
+
+ VideoSendStream* send_streams[kNumStreams];
+ VideoReceiveStream* receive_streams[kNumStreams];
+
+ VideoOutputObserver* observers[kNumStreams];
+ test::FrameGeneratorCapturer* frame_generators[kNumStreams];
+
+ scoped_ptr<VideoEncoder> encoders[kNumStreams];
+ for (size_t i = 0; i < kNumStreams; ++i)
+ encoders[i].reset(VideoEncoder::Create(VideoEncoder::kVp8));
+
+ for (size_t i = 0; i < kNumStreams; ++i) {
+ uint32_t ssrc = codec_settings[i].ssrc;
+ int width = codec_settings[i].width;
+ int height = codec_settings[i].height;
+ observers[i] = new VideoOutputObserver(&frame_generators[i], width, height);
+
+ VideoSendStream::Config send_config;
+ send_config.rtp.ssrcs.push_back(ssrc);
+ send_config.encoder_settings.encoder = encoders[i].get();
+ send_config.encoder_settings.payload_name = "VP8";
+ send_config.encoder_settings.payload_type = 124;
+ VideoEncoderConfig encoder_config;
+ encoder_config.streams = test::CreateVideoStreams(1);
+ VideoStream* stream = &encoder_config.streams[0];
+ stream->width = width;
+ stream->height = height;
+ stream->max_framerate = 5;
+ stream->min_bitrate_bps = stream->target_bitrate_bps =
+ stream->max_bitrate_bps = 100000;
+ send_streams[i] =
+ sender_call->CreateVideoSendStream(send_config, encoder_config);
+ send_streams[i]->Start();
+
+ VideoReceiveStream::Config receive_config;
+ receive_config.renderer = observers[i];
+ receive_config.rtp.remote_ssrc = ssrc;
+ receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
+ VideoCodec codec =
+ test::CreateDecoderVideoCodec(send_config.encoder_settings);
+ receive_config.codecs.push_back(codec);
+ receive_streams[i] =
+ receiver_call->CreateVideoReceiveStream(receive_config);
+ receive_streams[i]->Start();
+
+ frame_generators[i] = test::FrameGeneratorCapturer::Create(
+ send_streams[i]->Input(), width, height, 30, Clock::GetRealTimeClock());
+ frame_generators[i]->Start();
+ }
+
+ for (size_t i = 0; i < kNumStreams; ++i) {
+ EXPECT_EQ(kEventSignaled, observers[i]->Wait())
+ << "Timed out while waiting for observer " << i << " to render.";
+ }
+
+ for (size_t i = 0; i < kNumStreams; ++i) {
+ frame_generators[i]->Stop();
+ sender_call->DestroyVideoSendStream(send_streams[i]);
+ receiver_call->DestroyVideoReceiveStream(receive_streams[i]);
+ delete frame_generators[i];
+ delete observers[i];
+ }
+
+ sender_transport.StopSending();
+ receiver_transport.StopSending();
+}
+
+TEST_F(EndToEndTest, ObserversEncodedFrames) {
+ class EncodedFrameTestObserver : public EncodedFrameObserver {
+ public:
+ EncodedFrameTestObserver()
+ : length_(0),
+ frame_type_(kFrameEmpty),
+ called_(EventWrapper::Create()) {}
+ virtual ~EncodedFrameTestObserver() {}
+
+ virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) {
+ frame_type_ = encoded_frame.frame_type_;
+ length_ = encoded_frame.length_;
+ buffer_.reset(new uint8_t[length_]);
+ memcpy(buffer_.get(), encoded_frame.data_, length_);
+ called_->Set();
+ }
+
+ EventTypeWrapper Wait() { return called_->Wait(kDefaultTimeoutMs); }
+
+ void ExpectEqualFrames(const EncodedFrameTestObserver& observer) {
+ ASSERT_EQ(length_, observer.length_)
+ << "Observed frames are of different lengths.";
+ EXPECT_EQ(frame_type_, observer.frame_type_)
+ << "Observed frames have different frame types.";
+ EXPECT_EQ(0, memcmp(buffer_.get(), observer.buffer_.get(), length_))
+ << "Observed encoded frames have different content.";
+ }
+
+ private:
+ scoped_ptr<uint8_t[]> buffer_;
+ size_t length_;
+ FrameType frame_type_;
+ scoped_ptr<EventWrapper> called_;
+ };
+
+ EncodedFrameTestObserver post_encode_observer;
+ EncodedFrameTestObserver pre_decode_observer;
+
+ test::DirectTransport sender_transport, receiver_transport;
+
+ CreateCalls(Call::Config(&sender_transport),
+ Call::Config(&receiver_transport));
+
+ sender_transport.SetReceiver(receiver_call_->Receiver());
+ receiver_transport.SetReceiver(sender_call_->Receiver());
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+ send_config_.post_encode_callback = &post_encode_observer;
+ receive_configs_[0].pre_decode_callback = &pre_decode_observer;
+
+ CreateStreams();
+ Start();
+
+ scoped_ptr<test::FrameGenerator> frame_generator(test::FrameGenerator::Create(
+ encoder_config_.streams[0].width, encoder_config_.streams[0].height));
+ send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
+
+ EXPECT_EQ(kEventSignaled, post_encode_observer.Wait())
+ << "Timed out while waiting for send-side encoded-frame callback.";
+
+ EXPECT_EQ(kEventSignaled, pre_decode_observer.Wait())
+ << "Timed out while waiting for pre-decode encoded-frame callback.";
+
+ post_encode_observer.ExpectEqualFrames(pre_decode_observer);
+
+ Stop();
+
+ sender_transport.StopSending();
+ receiver_transport.StopSending();
+
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, ReceiveStreamSendsRemb) {
+ class RembObserver : public test::EndToEndTest {
+ public:
+ RembObserver() : EndToEndTest(kDefaultTimeoutMs) {}
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ bool received_psfb = false;
+ bool received_remb = false;
+ RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ while (packet_type != RTCPUtility::kRtcpNotValidCode) {
+ if (packet_type == RTCPUtility::kRtcpPsfbRembCode) {
+ const RTCPUtility::RTCPPacket& packet = parser.Packet();
+ EXPECT_EQ(packet.PSFBAPP.SenderSSRC, kReceiverLocalSsrc);
+ received_psfb = true;
+ } else if (packet_type == RTCPUtility::kRtcpPsfbRembItemCode) {
+ const RTCPUtility::RTCPPacket& packet = parser.Packet();
+ EXPECT_GT(packet.REMBItem.BitRate, 0u);
+ EXPECT_EQ(packet.REMBItem.NumberOfSSRCs, 1u);
+ EXPECT_EQ(packet.REMBItem.SSRCs[0], kSendSsrcs[0]);
+ received_remb = true;
+ }
+ packet_type = parser.Iterate();
+ }
+ if (received_psfb && received_remb)
+ observation_complete_->Set();
+ return SEND_PACKET;
+ }
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait()) << "Timed out while waiting for a "
+ "receiver RTCP REMB packet to be "
+ "sent.";
+ }
+ } test;
+
+ RunBaseTest(&test);
+}
+
+void EndToEndTest::TestXrReceiverReferenceTimeReport(bool enable_rrtr) {
+ static const int kNumRtcpReportPacketsToObserve = 5;
+ class RtcpXrObserver : public test::EndToEndTest {
+ public:
+ explicit RtcpXrObserver(bool enable_rrtr)
+ : EndToEndTest(kDefaultTimeoutMs),
+ enable_rrtr_(enable_rrtr),
+ sent_rtcp_sr_(0),
+ sent_rtcp_rr_(0),
+ sent_rtcp_rrtr_(0),
+ sent_rtcp_dlrr_(0) {}
+
+ private:
+ // Receive stream should send RR packets (and RRTR packets if enabled).
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ while (packet_type != RTCPUtility::kRtcpNotValidCode) {
+ if (packet_type == RTCPUtility::kRtcpRrCode) {
+ ++sent_rtcp_rr_;
+ } else if (packet_type ==
+ RTCPUtility::kRtcpXrReceiverReferenceTimeCode) {
+ ++sent_rtcp_rrtr_;
+ }
+ EXPECT_NE(packet_type, RTCPUtility::kRtcpSrCode);
+ EXPECT_NE(packet_type, RTCPUtility::kRtcpXrDlrrReportBlockItemCode);
+ packet_type = parser.Iterate();
+ }
+ return SEND_PACKET;
+ }
+ // Send stream should send SR packets (and DLRR packets if enabled).
+ virtual Action OnSendRtcp(const uint8_t* packet, size_t length) {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ while (packet_type != RTCPUtility::kRtcpNotValidCode) {
+ if (packet_type == RTCPUtility::kRtcpSrCode) {
+ ++sent_rtcp_sr_;
+ } else if (packet_type == RTCPUtility::kRtcpXrDlrrReportBlockItemCode) {
+ ++sent_rtcp_dlrr_;
+ }
+ EXPECT_NE(packet_type, RTCPUtility::kRtcpXrReceiverReferenceTimeCode);
+ packet_type = parser.Iterate();
+ }
+ if (sent_rtcp_sr_ > kNumRtcpReportPacketsToObserve &&
+ sent_rtcp_rr_ > kNumRtcpReportPacketsToObserve) {
+ if (enable_rrtr_) {
+ EXPECT_GT(sent_rtcp_rrtr_, 0);
+ EXPECT_GT(sent_rtcp_dlrr_, 0);
+ } else {
+ EXPECT_EQ(0, sent_rtcp_rrtr_);
+ EXPECT_EQ(0, sent_rtcp_dlrr_);
+ }
+ observation_complete_->Set();
+ }
+ return SEND_PACKET;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ (*receive_configs)[0].rtp.rtcp_mode = newapi::kRtcpReducedSize;
+ (*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report =
+ enable_rrtr_;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for RTCP SR/RR packets to be sent.";
+ }
+
+ bool enable_rrtr_;
+ int sent_rtcp_sr_;
+ int sent_rtcp_rr_;
+ int sent_rtcp_rrtr_;
+ int sent_rtcp_dlrr_;
+ } test(enable_rrtr);
+
+ RunBaseTest(&test);
+}
+
+void EndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs,
+ bool send_single_ssrc_first) {
+ class SendsSetSsrcs : public test::EndToEndTest {
+ public:
+ SendsSetSsrcs(const uint32_t* ssrcs,
+ size_t num_ssrcs,
+ bool send_single_ssrc_first)
+ : EndToEndTest(kDefaultTimeoutMs),
+ num_ssrcs_(num_ssrcs),
+ send_single_ssrc_first_(send_single_ssrc_first),
+ ssrcs_to_observe_(num_ssrcs),
+ expect_single_ssrc_(send_single_ssrc_first) {
+ for (size_t i = 0; i < num_ssrcs; ++i)
+ valid_ssrcs_[ssrcs[i]] = true;
+ }
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+
+ EXPECT_TRUE(valid_ssrcs_[header.ssrc])
+ << "Received unknown SSRC: " << header.ssrc;
+
+ if (!valid_ssrcs_[header.ssrc])
+ observation_complete_->Set();
+
+ if (!is_observed_[header.ssrc]) {
+ is_observed_[header.ssrc] = true;
+ --ssrcs_to_observe_;
+ if (expect_single_ssrc_) {
+ expect_single_ssrc_ = false;
+ observation_complete_->Set();
+ }
+ }
+
+ if (ssrcs_to_observe_ == 0)
+ observation_complete_->Set();
+
+ return SEND_PACKET;
+ }
+
+ virtual size_t GetNumStreams() const OVERRIDE { return num_ssrcs_; }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ if (num_ssrcs_ > 1) {
+ // Set low simulcast bitrates to not have to wait for bandwidth ramp-up.
+ for (size_t i = 0; i < encoder_config->streams.size(); ++i) {
+ encoder_config->streams[i].min_bitrate_bps = 10000;
+ encoder_config->streams[i].target_bitrate_bps = 15000;
+ encoder_config->streams[i].max_bitrate_bps = 20000;
+ }
+ }
+
+ encoder_config_all_streams_ = *encoder_config;
+ if (send_single_ssrc_first_)
+ encoder_config->streams.resize(1);
+ }
+
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ send_stream_ = send_stream;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for "
+ << (send_single_ssrc_first_ ? "first SSRC." : "SSRCs.");
+
+ if (send_single_ssrc_first_) {
+ // Set full simulcast and continue with the rest of the SSRCs.
+ send_stream_->ReconfigureVideoEncoder(encoder_config_all_streams_);
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting on additional SSRCs.";
+ }
+ }
+
+ private:
+ std::map<uint32_t, bool> valid_ssrcs_;
+ std::map<uint32_t, bool> is_observed_;
+
+ const size_t num_ssrcs_;
+ const bool send_single_ssrc_first_;
+
+ size_t ssrcs_to_observe_;
+ bool expect_single_ssrc_;
+
+ VideoSendStream* send_stream_;
+ VideoEncoderConfig encoder_config_all_streams_;
+ } test(kSendSsrcs, num_ssrcs, send_single_ssrc_first);
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, GetStats) {
+ class StatsObserver : public test::EndToEndTest, public I420FrameCallback {
+ public:
+ StatsObserver()
+ : EndToEndTest(kLongTimeoutMs),
+ receive_stream_(NULL),
+ send_stream_(NULL),
+ expected_receive_ssrc_(),
+ expected_send_ssrcs_(),
+ check_stats_event_(EventWrapper::Create()) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ check_stats_event_->Set();
+ return SEND_PACKET;
+ }
+
+ virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
+ check_stats_event_->Set();
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ check_stats_event_->Set();
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ check_stats_event_->Set();
+ return SEND_PACKET;
+ }
+
+ virtual void FrameCallback(I420VideoFrame* video_frame) OVERRIDE {
+ // Ensure that we have at least 5ms send side delay.
+ int64_t render_time = video_frame->render_time_ms();
+ if (render_time > 0)
+ video_frame->set_render_time_ms(render_time - 5);
+ }
+
+ bool CheckReceiveStats() {
+ assert(receive_stream_ != NULL);
+ VideoReceiveStream::Stats stats = receive_stream_->GetStats();
+ EXPECT_EQ(expected_receive_ssrc_, stats.ssrc);
+
+ // Make sure all fields have been populated.
+
+ receive_stats_filled_["IncomingRate"] |=
+ stats.network_frame_rate != 0 || stats.bitrate_bps != 0;
+
+ receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
+
+ receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0;
+
+ receive_stats_filled_["StatisticsUpdated"] |=
+ stats.rtcp_stats.cumulative_lost != 0 ||
+ stats.rtcp_stats.extended_max_sequence_number != 0 ||
+ stats.rtcp_stats.fraction_lost != 0 || stats.rtcp_stats.jitter != 0;
+
+ receive_stats_filled_["DataCountersUpdated"] |=
+ stats.rtp_stats.bytes != 0 || stats.rtp_stats.fec_packets != 0 ||
+ stats.rtp_stats.header_bytes != 0 || stats.rtp_stats.packets != 0 ||
+ stats.rtp_stats.padding_bytes != 0 ||
+ stats.rtp_stats.retransmitted_packets != 0;
+
+ receive_stats_filled_["CodecStats"] |=
+ stats.avg_delay_ms != 0 || stats.discarded_packets != 0 ||
+ stats.key_frames != 0 || stats.delta_frames != 0;
+
+ return AllStatsFilled(receive_stats_filled_);
+ }
+
+ bool CheckSendStats() {
+ assert(send_stream_ != NULL);
+ VideoSendStream::Stats stats = send_stream_->GetStats();
+
+ send_stats_filled_["NumStreams"] |=
+ stats.substreams.size() == expected_send_ssrcs_.size();
+
+ for (std::map<uint32_t, StreamStats>::const_iterator it =
+ stats.substreams.begin();
+ it != stats.substreams.end();
+ ++it) {
+ EXPECT_TRUE(expected_send_ssrcs_.find(it->first) !=
+ expected_send_ssrcs_.end());
+
+ send_stats_filled_[CompoundKey("IncomingRate", it->first)] |=
+ stats.input_frame_rate != 0;
+
+ const StreamStats& stream_stats = it->second;
+
+ send_stats_filled_[CompoundKey("StatisticsUpdated", it->first)] |=
+ stream_stats.rtcp_stats.cumulative_lost != 0 ||
+ stream_stats.rtcp_stats.extended_max_sequence_number != 0 ||
+ stream_stats.rtcp_stats.fraction_lost != 0;
+
+ send_stats_filled_[CompoundKey("DataCountersUpdated", it->first)] |=
+ stream_stats.rtp_stats.fec_packets != 0 ||
+ stream_stats.rtp_stats.padding_bytes != 0 ||
+ stream_stats.rtp_stats.retransmitted_packets != 0 ||
+ stream_stats.rtp_stats.packets != 0;
+
+ send_stats_filled_[CompoundKey("BitrateStatisticsObserver",
+ it->first)] |=
+ stream_stats.bitrate_bps != 0;
+
+ send_stats_filled_[CompoundKey("FrameCountObserver", it->first)] |=
+ stream_stats.delta_frames != 0 || stream_stats.key_frames != 0;
+
+ send_stats_filled_[CompoundKey("OutgoingRate", it->first)] |=
+ stats.encode_frame_rate != 0;
+
+ send_stats_filled_[CompoundKey("Delay", it->first)] |=
+ stream_stats.avg_delay_ms != 0 || stream_stats.max_delay_ms != 0;
+ }
+
+ return AllStatsFilled(send_stats_filled_);
+ }
+
+ std::string CompoundKey(const char* name, uint32_t ssrc) {
+ std::ostringstream oss;
+ oss << name << "_" << ssrc;
+ return oss.str();
+ }
+
+ bool AllStatsFilled(const std::map<std::string, bool>& stats_map) {
+ for (std::map<std::string, bool>::const_iterator it = stats_map.begin();
+ it != stats_map.end();
+ ++it) {
+ if (!it->second)
+ return false;
+ }
+ return true;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->pre_encode_callback = this; // Used to inject delay.
+ send_config->rtp.c_name = "SomeCName";
+
+ expected_receive_ssrc_ = (*receive_configs)[0].rtp.local_ssrc;
+ const std::vector<uint32_t>& ssrcs = send_config->rtp.ssrcs;
+ for (size_t i = 0; i < ssrcs.size(); ++i)
+ expected_send_ssrcs_.insert(ssrcs[i]);
+
+ expected_cname_ = send_config->rtp.c_name;
+ }
+
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ send_stream_ = send_stream;
+ receive_stream_ = receive_streams[0];
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ Clock* clock = Clock::GetRealTimeClock();
+ int64_t now = clock->TimeInMilliseconds();
+ int64_t stop_time = now + test::CallTest::kLongTimeoutMs;
+ bool receive_ok = false;
+ bool send_ok = false;
+
+ while (now < stop_time) {
+ if (!receive_ok)
+ receive_ok = CheckReceiveStats();
+ if (!send_ok)
+ send_ok = CheckSendStats();
+
+ if (receive_ok && send_ok)
+ return;
+
+ int64_t time_until_timout_ = stop_time - now;
+ if (time_until_timout_ > 0)
+ check_stats_event_->Wait(time_until_timout_);
+ now = clock->TimeInMilliseconds();
+ }
+
+ ADD_FAILURE() << "Timed out waiting for filled stats.";
+ for (std::map<std::string, bool>::const_iterator it =
+ receive_stats_filled_.begin();
+ it != receive_stats_filled_.end();
+ ++it) {
+ if (!it->second) {
+ ADD_FAILURE() << "Missing receive stats: " << it->first;
+ }
+ }
+
+ for (std::map<std::string, bool>::const_iterator it =
+ send_stats_filled_.begin();
+ it != send_stats_filled_.end();
+ ++it) {
+ if (!it->second) {
+ ADD_FAILURE() << "Missing send stats: " << it->first;
+ }
+ }
+ }
+
+ VideoReceiveStream* receive_stream_;
+ std::map<std::string, bool> receive_stats_filled_;
+
+ VideoSendStream* send_stream_;
+ std::map<std::string, bool> send_stats_filled_;
+
+ uint32_t expected_receive_ssrc_;
+ std::set<uint32_t> expected_send_ssrcs_;
+ std::string expected_cname_;
+
+ scoped_ptr<EventWrapper> check_stats_event_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, ReceiverReferenceTimeReportEnabled) {
+ TestXrReceiverReferenceTimeReport(true);
+}
+
+TEST_F(EndToEndTest, ReceiverReferenceTimeReportDisabled) {
+ TestXrReceiverReferenceTimeReport(false);
+}
+
+TEST_F(EndToEndTest, TestReceivedRtpPacketStats) {
+ static const size_t kNumRtpPacketsToSend = 5;
+ class ReceivedRtpStatsObserver : public test::EndToEndTest {
+ public:
+ ReceivedRtpStatsObserver()
+ : EndToEndTest(kDefaultTimeoutMs),
+ receive_stream_(NULL),
+ sent_rtp_(0) {}
+
+ private:
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ receive_stream_ = receive_streams[0];
+ }
+
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ if (sent_rtp_ >= kNumRtpPacketsToSend) {
+ VideoReceiveStream::Stats stats = receive_stream_->GetStats();
+ if (kNumRtpPacketsToSend == stats.rtp_stats.packets) {
+ observation_complete_->Set();
+ }
+ return DROP_PACKET;
+ }
+ ++sent_rtp_;
+ return SEND_PACKET;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while verifying number of received RTP packets.";
+ }
+
+ VideoReceiveStream* receive_stream_;
+ uint32_t sent_rtp_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, SendsSetSsrc) { TestSendsSetSsrcs(1, false); }
+
+TEST_F(EndToEndTest, SendsSetSimulcastSsrcs) {
+ TestSendsSetSsrcs(kNumSsrcs, false);
+}
+
+TEST_F(EndToEndTest, CanSwitchToUseAllSsrcs) {
+ TestSendsSetSsrcs(kNumSsrcs, true);
+}
+
+TEST_F(EndToEndTest, DISABLED_RedundantPayloadsTransmittedOnAllSsrcs) {
+ class ObserveRedundantPayloads: public test::EndToEndTest {
+ public:
+ ObserveRedundantPayloads()
+ : EndToEndTest(kDefaultTimeoutMs), ssrcs_to_observe_(kNumSsrcs) {
+ for (size_t i = 0; i < kNumSsrcs; ++i) {
+ registered_rtx_ssrc_[kSendRtxSsrcs[i]] = true;
+ }
+ }
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+
+ if (!registered_rtx_ssrc_[header.ssrc])
+ return SEND_PACKET;
+
+ EXPECT_LE(static_cast<size_t>(header.headerLength + header.paddingLength),
+ length);
+ const bool packet_is_redundant_payload =
+ static_cast<size_t>(header.headerLength + header.paddingLength) <
+ length;
+
+ if (!packet_is_redundant_payload)
+ return SEND_PACKET;
+
+ if (!observed_redundant_retransmission_[header.ssrc]) {
+ observed_redundant_retransmission_[header.ssrc] = true;
+ if (--ssrcs_to_observe_ == 0)
+ observation_complete_->Set();
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual size_t GetNumStreams() const OVERRIDE { return kNumSsrcs; }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ // Set low simulcast bitrates to not have to wait for bandwidth ramp-up.
+ for (size_t i = 0; i < encoder_config->streams.size(); ++i) {
+ encoder_config->streams[i].min_bitrate_bps = 10000;
+ encoder_config->streams[i].target_bitrate_bps = 15000;
+ encoder_config->streams[i].max_bitrate_bps = 20000;
+ }
+ // Significantly higher than max bitrates for all video streams -> forcing
+ // padding to trigger redundant padding on all RTX SSRCs.
+ send_config->rtp.min_transmit_bitrate_bps = 100000;
+
+ send_config->rtp.rtx.payload_type = kSendRtxPayloadType;
+ send_config->rtp.rtx.pad_with_redundant_payloads = true;
+
+ for (size_t i = 0; i < kNumSsrcs; ++i)
+ send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]);
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for redundant payloads on all SSRCs.";
+ }
+
+ private:
+ size_t ssrcs_to_observe_;
+ std::map<uint32_t, bool> observed_redundant_retransmission_;
+ std::map<uint32_t, bool> registered_rtx_ssrc_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+void EndToEndTest::TestRtpStatePreservation(bool use_rtx) {
+ static const uint32_t kMaxSequenceNumberGap = 100;
+ static const uint64_t kMaxTimestampGap = kDefaultTimeoutMs * 90;
+ class RtpSequenceObserver : public test::RtpRtcpObserver {
+ public:
+ explicit RtpSequenceObserver(bool use_rtx)
+ : test::RtpRtcpObserver(kDefaultTimeoutMs),
+ crit_(CriticalSectionWrapper::CreateCriticalSection()),
+ ssrcs_to_observe_(kNumSsrcs) {
+ for (size_t i = 0; i < kNumSsrcs; ++i) {
+ configured_ssrcs_[kSendSsrcs[i]] = true;
+ if (use_rtx)
+ configured_ssrcs_[kSendRtxSsrcs[i]] = true;
+ }
+ }
+
+ void ResetExpectedSsrcs(size_t num_expected_ssrcs) {
+ CriticalSectionScoped lock(crit_.get());
+ ssrc_observed_.clear();
+ ssrcs_to_observe_ = num_expected_ssrcs;
+ }
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+ const uint32_t ssrc = header.ssrc;
+ const uint16_t sequence_number = header.sequenceNumber;
+ const uint32_t timestamp = header.timestamp;
+ const bool only_padding =
+ static_cast<size_t>(header.headerLength + header.paddingLength) ==
+ length;
+
+ EXPECT_TRUE(configured_ssrcs_[ssrc])
+ << "Received SSRC that wasn't configured: " << ssrc;
+
+ std::map<uint32_t, uint16_t>::iterator it =
+ last_observed_sequence_number_.find(header.ssrc);
+ if (it == last_observed_sequence_number_.end()) {
+ last_observed_sequence_number_[ssrc] = sequence_number;
+ last_observed_timestamp_[ssrc] = timestamp;
+ } else {
+ // Verify sequence numbers are reasonably close.
+ uint32_t extended_sequence_number = sequence_number;
+ // Check for roll-over.
+ if (sequence_number < last_observed_sequence_number_[ssrc])
+ extended_sequence_number += 0xFFFFu + 1;
+ EXPECT_LE(
+ extended_sequence_number - last_observed_sequence_number_[ssrc],
+ kMaxSequenceNumberGap)
+ << "Gap in sequence numbers ("
+ << last_observed_sequence_number_[ssrc] << " -> " << sequence_number
+ << ") too large for SSRC: " << ssrc << ".";
+ last_observed_sequence_number_[ssrc] = sequence_number;
+
+ // TODO(pbos): Remove this check if we ever have monotonically
+ // increasing timestamps. Right now padding packets add a delta which
+ // can cause reordering between padding packets and regular packets,
+ // hence we drop padding-only packets to not flake.
+ if (only_padding) {
+ // Verify that timestamps are reasonably close.
+ uint64_t extended_timestamp = timestamp;
+ // Check for roll-over.
+ if (timestamp < last_observed_timestamp_[ssrc])
+ extended_timestamp += static_cast<uint64_t>(0xFFFFFFFFu) + 1;
+ EXPECT_LE(extended_timestamp - last_observed_timestamp_[ssrc],
+ kMaxTimestampGap)
+ << "Gap in timestamps (" << last_observed_timestamp_[ssrc]
+ << " -> " << timestamp << ") too large for SSRC: " << ssrc << ".";
+ }
+ last_observed_timestamp_[ssrc] = timestamp;
+ }
+
+ CriticalSectionScoped lock(crit_.get());
+ // Wait for media packets on all ssrcs.
+ if (!ssrc_observed_[ssrc] && !only_padding) {
+ ssrc_observed_[ssrc] = true;
+ if (--ssrcs_to_observe_ == 0)
+ observation_complete_->Set();
+ }
+
+ return SEND_PACKET;
+ }
+
+ std::map<uint32_t, uint16_t> last_observed_sequence_number_;
+ std::map<uint32_t, uint32_t> last_observed_timestamp_;
+ std::map<uint32_t, bool> configured_ssrcs_;
+
+ scoped_ptr<CriticalSectionWrapper> crit_;
+ size_t ssrcs_to_observe_ GUARDED_BY(crit_);
+ std::map<uint32_t, bool> ssrc_observed_ GUARDED_BY(crit_);
+ } observer(use_rtx);
+
+ CreateCalls(Call::Config(observer.SendTransport()),
+ Call::Config(observer.ReceiveTransport()));
+ observer.SetReceivers(sender_call_->Receiver(), NULL);
+
+ CreateSendConfig(kNumSsrcs);
+
+ if (use_rtx) {
+ for (size_t i = 0; i < kNumSsrcs; ++i) {
+ send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]);
+ }
+ send_config_.rtp.rtx.payload_type = kSendRtxPayloadType;
+ }
+
+ // Lower bitrates so that all streams send initially.
+ for (size_t i = 0; i < encoder_config_.streams.size(); ++i) {
+ encoder_config_.streams[i].min_bitrate_bps = 10000;
+ encoder_config_.streams[i].target_bitrate_bps = 15000;
+ encoder_config_.streams[i].max_bitrate_bps = 20000;
+ }
+
+ CreateMatchingReceiveConfigs();
+
+ CreateStreams();
+ CreateFrameGeneratorCapturer();
+
+ Start();
+ EXPECT_EQ(kEventSignaled, observer.Wait())
+ << "Timed out waiting for all SSRCs to send packets.";
+
+ // Test stream resetting more than once to make sure that the state doesn't
+ // get set once (this could be due to using std::map::insert for instance).
+ for (size_t i = 0; i < 3; ++i) {
+ frame_generator_capturer_->Stop();
+ sender_call_->DestroyVideoSendStream(send_stream_);
+
+ // Re-create VideoSendStream with only one stream.
+ VideoEncoderConfig one_stream = encoder_config_;
+ one_stream.streams.resize(1);
+ send_stream_ =
+ sender_call_->CreateVideoSendStream(send_config_, one_stream);
+ send_stream_->Start();
+ CreateFrameGeneratorCapturer();
+ frame_generator_capturer_->Start();
+
+ observer.ResetExpectedSsrcs(1);
+ EXPECT_EQ(kEventSignaled, observer.Wait())
+ << "Timed out waiting for single RTP packet.";
+
+ // Reconfigure back to use all streams.
+ send_stream_->ReconfigureVideoEncoder(encoder_config_);
+ observer.ResetExpectedSsrcs(kNumSsrcs);
+ EXPECT_EQ(kEventSignaled, observer.Wait())
+ << "Timed out waiting for all SSRCs to send packets.";
+
+ // Reconfigure down to one stream.
+ send_stream_->ReconfigureVideoEncoder(one_stream);
+ observer.ResetExpectedSsrcs(1);
+ EXPECT_EQ(kEventSignaled, observer.Wait())
+ << "Timed out waiting for single RTP packet.";
+
+ // Reconfigure back to use all streams.
+ send_stream_->ReconfigureVideoEncoder(encoder_config_);
+ observer.ResetExpectedSsrcs(kNumSsrcs);
+ EXPECT_EQ(kEventSignaled, observer.Wait())
+ << "Timed out waiting for all SSRCs to send packets.";
+ }
+
+ observer.StopSending();
+
+ Stop();
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, DISABLED_RestartingSendStreamPreservesRtpState) {
+ TestRtpStatePreservation(false);
+}
+
+TEST_F(EndToEndTest, RestartingSendStreamPreservesRtpStatesWithRtx) {
+ TestRtpStatePreservation(true);
+}
+
+TEST_F(EndToEndTest, RespectsNetworkState) {
+ // TODO(pbos): Remove accepted downtime packets etc. when signaling network
+ // down blocks until no more packets will be sent.
+
+ // Pacer will send from its packet list and then send required padding before
+ // checking paused_ again. This should be enough for one round of pacing,
+ // otherwise increase.
+ static const int kNumAcceptedDowntimeRtp = 5;
+ // A single RTCP may be in the pipeline.
+ static const int kNumAcceptedDowntimeRtcp = 1;
+ class NetworkStateTest : public test::EndToEndTest, public test::FakeEncoder {
+ public:
+ NetworkStateTest()
+ : EndToEndTest(kDefaultTimeoutMs),
+ FakeEncoder(Clock::GetRealTimeClock()),
+ test_crit_(CriticalSectionWrapper::CreateCriticalSection()),
+ encoded_frames_(EventWrapper::Create()),
+ sender_packets_(EventWrapper::Create()),
+ receiver_packets_(EventWrapper::Create()),
+ sender_state_(Call::kNetworkUp),
+ down_sender_rtp_(0),
+ down_sender_rtcp_(0),
+ receiver_state_(Call::kNetworkUp),
+ down_receiver_rtcp_(0),
+ down_frames_(0) {}
+
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ CriticalSectionScoped lock(test_crit_.get());
+ if (sender_state_ == Call::kNetworkDown) {
+ ++down_sender_rtp_;
+ EXPECT_LE(down_sender_rtp_, kNumAcceptedDowntimeRtp)
+ << "RTP sent during sender-side downtime.";
+ if (down_sender_rtp_> kNumAcceptedDowntimeRtp)
+ sender_packets_->Set();
+ } else {
+ sender_packets_->Set();
+ }
+ return SEND_PACKET;
+ }
+
+ virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
+ CriticalSectionScoped lock(test_crit_.get());
+ if (sender_state_ == Call::kNetworkDown) {
+ ++down_sender_rtcp_;
+ EXPECT_LE(down_sender_rtcp_, kNumAcceptedDowntimeRtcp)
+ << "RTCP sent during sender-side downtime.";
+ if (down_sender_rtcp_ > kNumAcceptedDowntimeRtcp)
+ sender_packets_->Set();
+ } else {
+ sender_packets_->Set();
+ }
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ ADD_FAILURE() << "Unexpected receiver RTP, should not be sending.";
+ return SEND_PACKET;
+ }
+
+ virtual Action OnReceiveRtcp(const uint8_t* packet,
+ size_t length) OVERRIDE {
+ CriticalSectionScoped lock(test_crit_.get());
+ if (receiver_state_ == Call::kNetworkDown) {
+ ++down_receiver_rtcp_;
+ EXPECT_LE(down_receiver_rtcp_, kNumAcceptedDowntimeRtcp)
+ << "RTCP sent during receiver-side downtime.";
+ if (down_receiver_rtcp_ > kNumAcceptedDowntimeRtcp)
+ receiver_packets_->Set();
+ } else {
+ receiver_packets_->Set();
+ }
+ return SEND_PACKET;
+ }
+
+ virtual void OnCallsCreated(Call* sender_call,
+ Call* receiver_call) OVERRIDE {
+ sender_call_ = sender_call;
+ receiver_call_ = receiver_call;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->encoder_settings.encoder = this;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, encoded_frames_->Wait(kDefaultTimeoutMs))
+ << "No frames received by the encoder.";
+ EXPECT_EQ(kEventSignaled, sender_packets_->Wait(kDefaultTimeoutMs))
+ << "Timed out waiting for send-side packets.";
+ EXPECT_EQ(kEventSignaled, receiver_packets_->Wait(kDefaultTimeoutMs))
+ << "Timed out waiting for receiver-side packets.";
+
+ // Sender-side network down.
+ sender_call_->SignalNetworkState(Call::kNetworkDown);
+ {
+ CriticalSectionScoped lock(test_crit_.get());
+ sender_packets_->Reset(); // Earlier packets should not count.
+ sender_state_ = Call::kNetworkDown;
+ }
+ EXPECT_EQ(kEventTimeout, sender_packets_->Wait(kSilenceTimeoutMs))
+ << "Packets sent during sender-network downtime.";
+ EXPECT_EQ(kEventSignaled, receiver_packets_->Wait(kDefaultTimeoutMs))
+ << "Timed out waiting for receiver-side packets.";
+ // Receiver-side network down.
+ receiver_call_->SignalNetworkState(Call::kNetworkDown);
+ {
+ CriticalSectionScoped lock(test_crit_.get());
+ receiver_packets_->Reset(); // Earlier packets should not count.
+ receiver_state_ = Call::kNetworkDown;
+ }
+ EXPECT_EQ(kEventTimeout, receiver_packets_->Wait(kSilenceTimeoutMs))
+ << "Packets sent during receiver-network downtime.";
+
+ // Network back up again for both.
+ {
+ CriticalSectionScoped lock(test_crit_.get());
+ sender_packets_->Reset(); // Earlier packets should not count.
+ receiver_packets_->Reset(); // Earlier packets should not count.
+ sender_state_ = receiver_state_ = Call::kNetworkUp;
+ }
+ sender_call_->SignalNetworkState(Call::kNetworkUp);
+ receiver_call_->SignalNetworkState(Call::kNetworkUp);
+ EXPECT_EQ(kEventSignaled, sender_packets_->Wait(kDefaultTimeoutMs))
+ << "Timed out waiting for send-side packets.";
+ EXPECT_EQ(kEventSignaled, receiver_packets_->Wait(kDefaultTimeoutMs))
+ << "Timed out waiting for receiver-side packets.";
+ }
+
+ virtual int32_t Encode(const I420VideoFrame& input_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const std::vector<VideoFrameType>* frame_types)
+ OVERRIDE {
+ {
+ CriticalSectionScoped lock(test_crit_.get());
+ if (sender_state_ == Call::kNetworkDown) {
+ ++down_frames_;
+ EXPECT_LE(down_frames_, 1)
+ << "Encoding more than one frame while network is down.";
+ if (down_frames_ > 1)
+ encoded_frames_->Set();
+ } else {
+ encoded_frames_->Set();
+ }
+ }
+ return test::FakeEncoder::Encode(
+ input_image, codec_specific_info, frame_types);
+ }
+
+ private:
+ const scoped_ptr<CriticalSectionWrapper> test_crit_;
+ scoped_ptr<EventWrapper> encoded_frames_;
+ scoped_ptr<EventWrapper> sender_packets_;
+ scoped_ptr<EventWrapper> receiver_packets_;
+ Call* sender_call_;
+ Call* receiver_call_;
+ Call::NetworkState sender_state_ GUARDED_BY(test_crit_);
+ int down_sender_rtp_ GUARDED_BY(test_crit_);
+ int down_sender_rtcp_ GUARDED_BY(test_crit_);
+ Call::NetworkState receiver_state_ GUARDED_BY(test_crit_);
+ int down_receiver_rtcp_ GUARDED_BY(test_crit_);
+ int down_frames_ GUARDED_BY(test_crit_);
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(EndToEndTest, NewSendStreamsRespectNetworkDown) {
+ class UnusedEncoder : public test::FakeEncoder {
+ public:
+ UnusedEncoder() : FakeEncoder(Clock::GetRealTimeClock()) {}
+ virtual int32_t Encode(const I420VideoFrame& input_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const std::vector<VideoFrameType>* frame_types)
+ OVERRIDE {
+ ADD_FAILURE() << "Unexpected frame encode.";
+ return test::FakeEncoder::Encode(
+ input_image, codec_specific_info, frame_types);
+ }
+ };
+
+ UnusedTransport transport;
+ CreateSenderCall(Call::Config(&transport));
+ sender_call_->SignalNetworkState(Call::kNetworkDown);
+
+ CreateSendConfig(1);
+ UnusedEncoder unused_encoder;
+ send_config_.encoder_settings.encoder = &unused_encoder;
+ CreateStreams();
+ CreateFrameGeneratorCapturer();
+
+ Start();
+ SleepMs(kSilenceTimeoutMs);
+ Stop();
+
+ DestroyStreams();
+}
+
+TEST_F(EndToEndTest, NewReceiveStreamsRespectNetworkDown) {
+ test::DirectTransport sender_transport;
+ CreateSenderCall(Call::Config(&sender_transport));
+ UnusedTransport transport;
+ CreateReceiverCall(Call::Config(&transport));
+ sender_transport.SetReceiver(receiver_call_->Receiver());
+
+ receiver_call_->SignalNetworkState(Call::kNetworkDown);
+
+ CreateSendConfig(1);
+ CreateMatchingReceiveConfigs();
+ CreateStreams();
+ CreateFrameGeneratorCapturer();
+
+ Start();
+ SleepMs(kSilenceTimeoutMs);
+ Stop();
+
+ sender_transport.StopSending();
+
+ DestroyStreams();
+}
+} // namespace webrtc
diff --git a/video/full_stack.cc b/video/full_stack.cc
index 6b21cbe..f2d71a9 100644
--- a/video/full_stack.cc
+++ b/video/full_stack.cc
@@ -14,16 +14,16 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/call.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
-#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/event_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/system_wrappers/interface/sleep.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
+#include "webrtc/test/call_test.h"
#include "webrtc/test/direct_transport.h"
#include "webrtc/test/encoder_settings.h"
#include "webrtc/test/fake_encoder.h"
@@ -34,8 +34,7 @@
namespace webrtc {
-static const uint32_t kSendSsrc = 0x654321;
-static const int kFullStackTestDurationSecs = 10;
+static const int kFullStackTestDurationSecs = 60;
struct FullStackTestParams {
const char* test_label;
@@ -44,25 +43,17 @@
size_t width, height;
int fps;
} clip;
- unsigned int bitrate;
+ int min_bitrate_bps;
+ int target_bitrate_bps;
+ int max_bitrate_bps;
double avg_psnr_threshold;
double avg_ssim_threshold;
+ FakeNetworkPipe::Config link;
};
-FullStackTestParams paris_qcif = {
- "net_delay_0_0_plr_0", {"paris_qcif", 176, 144, 30}, 300, 36.0, 0.96};
-
-// TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
-FullStackTestParams foreman_cif = {
- "foreman_cif_net_delay_0_0_plr_0",
- {"foreman_cif", 352, 288, 30},
- 700,
- 0.0,
- 0.0};
-
-class FullStackTest : public ::testing::TestWithParam<FullStackTestParams> {
+class FullStackTest : public test::CallTest {
protected:
- std::map<uint32_t, bool> reserved_ssrcs_;
+ void RunTest(const FullStackTestParams& params);
};
class VideoAnalyzer : public PacketReceiver,
@@ -115,7 +106,7 @@
size_t length) OVERRIDE {
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
RTPHeader header;
- parser->Parse(packet, static_cast<int>(length), &header);
+ parser->Parse(packet, length, &header);
{
CriticalSectionScoped lock(crit_.get());
recv_times_[header.timestamp - rtp_timestamp_delta_] =
@@ -154,7 +145,7 @@
virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE {
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
RTPHeader header;
- parser->Parse(packet, static_cast<int>(length), &header);
+ parser->Parse(packet, length, &header);
{
CriticalSectionScoped lock(crit_.get());
@@ -200,7 +191,9 @@
last_rendered_frame_.CopyFrame(video_frame);
}
- void Wait() { done_->Wait(120 * 1000); }
+ void Wait() {
+ EXPECT_EQ(kEventSignaled, done_->Wait(FullStackTest::kLongTimeoutMs));
+ }
VideoSendStreamInput* input_;
Transport* transport_;
@@ -376,44 +369,45 @@
const scoped_ptr<EventWrapper> done_;
};
-TEST_P(FullStackTest, NoPacketLoss) {
- static const uint32_t kReceiverLocalSsrc = 0x123456;
- FullStackTestParams params = GetParam();
-
- test::DirectTransport transport;
+void FullStackTest::RunTest(const FullStackTestParams& params) {
+ test::DirectTransport send_transport(params.link);
+ test::DirectTransport recv_transport(params.link);
VideoAnalyzer analyzer(NULL,
- &transport,
+ &send_transport,
params.test_label,
params.avg_psnr_threshold,
params.avg_ssim_threshold,
kFullStackTestDurationSecs * params.clip.fps);
- Call::Config call_config(&analyzer);
+ CreateCalls(Call::Config(&analyzer), Call::Config(&recv_transport));
- scoped_ptr<Call> call(Call::Create(call_config));
- analyzer.SetReceiver(call->Receiver());
- transport.SetReceiver(&analyzer);
+ analyzer.SetReceiver(receiver_call_->Receiver());
+ send_transport.SetReceiver(&analyzer);
+ recv_transport.SetReceiver(sender_call_->Receiver());
- VideoSendStream::Config send_config = call->GetDefaultSendConfig();
- send_config.rtp.ssrcs.push_back(kSendSsrc);
+ CreateSendConfig(1);
- scoped_ptr<VP8Encoder> encoder(VP8Encoder::Create());
- send_config.encoder_settings.encoder = encoder.get();
- send_config.encoder_settings.payload_name = "VP8";
- send_config.encoder_settings.payload_type = 124;
- std::vector<VideoStream> video_streams = test::CreateVideoStreams(1);
- VideoStream* stream = &video_streams[0];
+ scoped_ptr<VideoEncoder> encoder(
+ VideoEncoder::Create(VideoEncoder::kVp8));
+ send_config_.encoder_settings.encoder = encoder.get();
+ send_config_.encoder_settings.payload_name = "VP8";
+ send_config_.encoder_settings.payload_type = 124;
+
+ VideoStream* stream = &encoder_config_.streams[0];
stream->width = params.clip.width;
stream->height = params.clip.height;
- stream->min_bitrate_bps = stream->target_bitrate_bps =
- stream->max_bitrate_bps = params.bitrate * 1000;
+ stream->min_bitrate_bps = params.min_bitrate_bps;
+ stream->target_bitrate_bps = params.target_bitrate_bps;
+ stream->max_bitrate_bps = params.max_bitrate_bps;
stream->max_framerate = params.clip.fps;
- VideoSendStream* send_stream =
- call->CreateVideoSendStream(send_config, video_streams, NULL);
- analyzer.input_ = send_stream->Input();
+ CreateMatchingReceiveConfigs();
+ receive_configs_[0].renderer = &analyzer;
- scoped_ptr<test::FrameGeneratorCapturer> file_capturer(
+ CreateStreams();
+ analyzer.input_ = send_stream_->Input();
+
+ frame_generator_capturer_.reset(
test::FrameGeneratorCapturer::CreateFromYuvFile(
&analyzer,
test::ResourcePath(params.clip.name, "yuv").c_str(),
@@ -421,39 +415,120 @@
params.clip.height,
params.clip.fps,
Clock::GetRealTimeClock()));
- ASSERT_TRUE(file_capturer.get() != NULL)
+
+ ASSERT_TRUE(frame_generator_capturer_.get() != NULL)
<< "Could not create capturer for " << params.clip.name
<< ".yuv. Is this resource file present?";
- VideoReceiveStream::Config receive_config = call->GetDefaultReceiveConfig();
- VideoCodec codec =
- test::CreateDecoderVideoCodec(send_config.encoder_settings);
- receive_config.codecs.push_back(codec);
- receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
- receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
- receive_config.renderer = &analyzer;
-
- VideoReceiveStream* receive_stream =
- call->CreateVideoReceiveStream(receive_config);
-
- receive_stream->Start();
- send_stream->Start();
- file_capturer->Start();
+ Start();
analyzer.Wait();
- file_capturer->Stop();
- send_stream->Stop();
- receive_stream->Stop();
+ send_transport.StopSending();
+ recv_transport.StopSending();
- call->DestroyVideoReceiveStream(receive_stream);
- call->DestroyVideoSendStream(send_stream);
+ Stop();
- transport.StopSending();
+ DestroyStreams();
}
-INSTANTIATE_TEST_CASE_P(FullStack,
- FullStackTest,
- ::testing::Values(paris_qcif, foreman_cif));
+TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) {
+ FullStackTestParams paris_qcif = {"net_delay_0_0_plr_0",
+ {"paris_qcif", 176, 144, 30},
+ 300000,
+ 300000,
+ 300000,
+ 36.0,
+ 0.96
+ };
+ RunTest(paris_qcif);
+}
+TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) {
+ // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
+ FullStackTestParams foreman_cif = {"foreman_cif_net_delay_0_0_plr_0",
+ {"foreman_cif", 352, 288, 30},
+ 700000,
+ 700000,
+ 700000,
+ 0.0,
+ 0.0
+ };
+ RunTest(foreman_cif);
+}
+
+TEST_F(FullStackTest, ForemanCif500kbps) {
+ FullStackTestParams foreman_cif = {"foreman_cif_500kbps",
+ {"foreman_cif", 352, 288, 30},
+ 30000,
+ 500000,
+ 2000000,
+ 0.0,
+ 0.0
+ };
+ foreman_cif.link.queue_length_packets = 0;
+ foreman_cif.link.queue_delay_ms = 0;
+ foreman_cif.link.link_capacity_kbps = 500;
+ RunTest(foreman_cif);
+}
+
+TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) {
+ FullStackTestParams foreman_cif = {"foreman_cif_500kbps_32pkts_queue",
+ {"foreman_cif", 352, 288, 30},
+ 30000,
+ 500000,
+ 2000000,
+ 0.0,
+ 0.0
+ };
+ foreman_cif.link.queue_length_packets = 32;
+ foreman_cif.link.queue_delay_ms = 0;
+ foreman_cif.link.link_capacity_kbps = 500;
+ RunTest(foreman_cif);
+}
+
+TEST_F(FullStackTest, ForemanCif500kbps100ms) {
+ FullStackTestParams foreman_cif = {"foreman_cif_500kbps_100ms",
+ {"foreman_cif", 352, 288, 30},
+ 30000,
+ 500000,
+ 2000000,
+ 0.0,
+ 0.0
+ };
+ foreman_cif.link.queue_length_packets = 0;
+ foreman_cif.link.queue_delay_ms = 100;
+ foreman_cif.link.link_capacity_kbps = 500;
+ RunTest(foreman_cif);
+}
+
+TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
+ FullStackTestParams foreman_cif = {"foreman_cif_500kbps_100ms_32pkts_queue",
+ {"foreman_cif", 352, 288, 30},
+ 30000,
+ 500000,
+ 2000000,
+ 0.0,
+ 0.0
+ };
+ foreman_cif.link.queue_length_packets = 32;
+ foreman_cif.link.queue_delay_ms = 100;
+ foreman_cif.link.link_capacity_kbps = 500;
+ RunTest(foreman_cif);
+}
+
+TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
+ FullStackTestParams foreman_cif = {"foreman_cif_1000kbps_100ms_32pkts_queue",
+ {"foreman_cif", 352, 288, 30},
+ 30000,
+ 2000000,
+ 2000000,
+ 0.0,
+ 0.0
+ };
+ foreman_cif.link.queue_length_packets = 32;
+ foreman_cif.link.queue_delay_ms = 100;
+ foreman_cif.link.link_capacity_kbps = 1000;
+ RunTest(foreman_cif);
+}
} // namespace webrtc
diff --git a/video/loopback.cc b/video/loopback.cc
index ea65ebb..488adf4 100644
--- a/video/loopback.cc
+++ b/video/loopback.cc
@@ -48,18 +48,61 @@
DEFINE_int32(max_bitrate, 800, "Maximum video bitrate.");
size_t MaxBitrate() { return static_cast<size_t>(FLAGS_max_bitrate); }
+
+DEFINE_string(codec, "VP8", "Video codec to use.");
+std::string Codec() { return static_cast<std::string>(FLAGS_codec); }
+
+DEFINE_int32(loss_percent, 0, "Percentage of packets randomly lost.");
+int LossPercent() {
+ return static_cast<int>(FLAGS_loss_percent);
+}
+
+DEFINE_int32(link_capacity,
+ 0,
+ "Capacity (kbps) of the fake link. 0 means infinite.");
+int LinkCapacity() {
+ return static_cast<int>(FLAGS_link_capacity);
+}
+
+DEFINE_int32(queue_size, 0, "Size of the bottleneck link queue in packets.");
+int QueueSize() {
+ return static_cast<int>(FLAGS_queue_size);
+}
+
+DEFINE_int32(avg_propagation_delay_ms,
+ 0,
+ "Average link propagation delay in ms.");
+int AvgPropagationDelayMs() {
+ return static_cast<int>(FLAGS_avg_propagation_delay_ms);
+}
+
+DEFINE_int32(std_propagation_delay_ms,
+ 0,
+ "Link propagation delay standard deviation in ms.");
+int StdPropagationDelayMs() {
+ return static_cast<int>(FLAGS_std_propagation_delay_ms);
+}
} // namespace flags
static const uint32_t kSendSsrc = 0x654321;
+static const uint32_t kSendRtxSsrc = 0x654322;
static const uint32_t kReceiverLocalSsrc = 0x123456;
+static const uint8_t kRtxPayloadType = 96;
+
void Loopback() {
scoped_ptr<test::VideoRenderer> local_preview(test::VideoRenderer::Create(
"Local Preview", flags::Width(), flags::Height()));
scoped_ptr<test::VideoRenderer> loopback_video(test::VideoRenderer::Create(
"Loopback Video", flags::Width(), flags::Height()));
- test::DirectTransport transport;
+ FakeNetworkPipe::Config pipe_config;
+ pipe_config.loss_percent = flags::LossPercent();
+ pipe_config.link_capacity_kbps = flags::LinkCapacity();
+ pipe_config.queue_length_packets = flags::QueueSize();
+ pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs();
+ pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs();
+ test::DirectTransport transport(pipe_config);
Call::Config call_config(&transport);
call_config.start_bitrate_bps =
static_cast<int>(flags::StartBitrate()) * 1000;
@@ -68,17 +111,27 @@
// Loopback, call sends to itself.
transport.SetReceiver(call->Receiver());
- VideoSendStream::Config send_config = call->GetDefaultSendConfig();
+ VideoSendStream::Config send_config;
send_config.rtp.ssrcs.push_back(kSendSsrc);
+ send_config.rtp.rtx.ssrcs.push_back(kSendRtxSsrc);
+ send_config.rtp.rtx.payload_type = kRtxPayloadType;
+ send_config.rtp.nack.rtp_history_ms = 1000;
send_config.local_renderer = local_preview.get();
-
- scoped_ptr<VP8Encoder> encoder(VP8Encoder::Create());
+ scoped_ptr<VideoEncoder> encoder;
+ if (flags::Codec() == "VP8") {
+ encoder.reset(VideoEncoder::Create(VideoEncoder::kVp8));
+ } else {
+ // Codec not supported.
+ assert(false && "Codec not supported!");
+ return;
+ }
send_config.encoder_settings.encoder = encoder.get();
- send_config.encoder_settings.payload_name = "VP8";
+ send_config.encoder_settings.payload_name = flags::Codec();
send_config.encoder_settings.payload_type = 124;
- std::vector<VideoStream> video_streams = test::CreateVideoStreams(1);
- VideoStream* stream = &video_streams[0];
+ VideoEncoderConfig encoder_config;
+ encoder_config.streams = test::CreateVideoStreams(1);
+ VideoStream* stream = &encoder_config.streams[0];
stream->width = flags::Width();
stream->height = flags::Height();
stream->min_bitrate_bps = static_cast<int>(flags::MinBitrate()) * 1000;
@@ -88,7 +141,7 @@
stream->max_qp = 56;
VideoSendStream* send_stream =
- call->CreateVideoSendStream(send_config, video_streams, NULL);
+ call->CreateVideoSendStream(send_config, encoder_config);
Clock* test_clock = Clock::GetRealTimeClock();
@@ -99,9 +152,12 @@
flags::Fps(),
test_clock));
- VideoReceiveStream::Config receive_config = call->GetDefaultReceiveConfig();
+ VideoReceiveStream::Config receive_config;
receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
+ receive_config.rtp.nack.rtp_history_ms = 1000;
+ receive_config.rtp.rtx[kRtxPayloadType].ssrc = kSendRtxSsrc;
+ receive_config.rtp.rtx[kRtxPayloadType].payload_type = kRtxPayloadType;
receive_config.renderer = loopback_video.get();
VideoCodec codec =
test::CreateDecoderVideoCodec(send_config.encoder_settings);
diff --git a/video/rampup_tests.cc b/video/rampup_tests.cc
index 94f1c19..10bcb7f 100644
--- a/video/rampup_tests.cc
+++ b/video/rampup_tests.cc
@@ -7,600 +7,495 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <assert.h>
-
-#include <map>
-#include <string>
-#include <vector>
#include "testing/gtest/include/gtest/gtest.h"
-
-#include "webrtc/call.h"
-#include "webrtc/common.h"
-#include "webrtc/experiments.h"
-#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/test/direct_transport.h"
-#include "webrtc/test/encoder_settings.h"
-#include "webrtc/test/fake_decoder.h"
-#include "webrtc/test/fake_encoder.h"
-#include "webrtc/test/frame_generator_capturer.h"
#include "webrtc/test/testsupport/perf_test.h"
-#include "webrtc/video/transport_adapter.h"
+#include "webrtc/video/rampup_tests.h"
namespace webrtc {
-
namespace {
-static const int kTransmissionTimeOffsetExtensionId = 6;
+
static const int kMaxPacketSize = 1500;
-static const unsigned int kSingleStreamTargetBps = 1000000;
-class StreamObserver : public newapi::Transport, public RemoteBitrateObserver {
- public:
- typedef std::map<uint32_t, int> BytesSentMap;
- typedef std::map<uint32_t, uint32_t> SsrcMap;
- StreamObserver(const SsrcMap& rtx_media_ssrcs,
- newapi::Transport* feedback_transport,
- Clock* clock)
- : clock_(clock),
- test_done_(EventWrapper::Create()),
- rtp_parser_(RtpHeaderParser::Create()),
- feedback_transport_(feedback_transport),
- receive_stats_(ReceiveStatistics::Create(clock)),
- payload_registry_(
- new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(false))),
- crit_(CriticalSectionWrapper::CreateCriticalSection()),
- expected_bitrate_bps_(0),
- start_bitrate_bps_(0),
- rtx_media_ssrcs_(rtx_media_ssrcs),
- total_sent_(0),
- padding_sent_(0),
- rtx_media_sent_(0),
- total_packets_sent_(0),
- padding_packets_sent_(0),
- rtx_media_packets_sent_(0) {
- // Ideally we would only have to instantiate an RtcpSender, an
- // RtpHeaderParser and a RemoteBitrateEstimator here, but due to the current
- // state of the RTP module we need a full module and receive statistics to
- // be able to produce an RTCP with REMB.
- RtpRtcp::Configuration config;
- config.receive_statistics = receive_stats_.get();
- feedback_transport_.Enable();
- config.outgoing_transport = &feedback_transport_;
- rtp_rtcp_.reset(RtpRtcp::CreateRtpRtcp(config));
- rtp_rtcp_->SetREMBStatus(true);
- rtp_rtcp_->SetRTCPStatus(kRtcpNonCompound);
- rtp_parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset,
- kTransmissionTimeOffsetExtensionId);
- AbsoluteSendTimeRemoteBitrateEstimatorFactory rbe_factory;
- const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000;
- remote_bitrate_estimator_.reset(
- rbe_factory.Create(this, clock, kMimdControl,
- kRemoteBitrateEstimatorMinBitrateBps));
- }
-
- void set_expected_bitrate_bps(unsigned int expected_bitrate_bps) {
- CriticalSectionScoped lock(crit_.get());
- expected_bitrate_bps_ = expected_bitrate_bps;
- }
-
- void set_start_bitrate_bps(unsigned int start_bitrate_bps) {
- CriticalSectionScoped lock(crit_.get());
- start_bitrate_bps_ = start_bitrate_bps;
- }
-
- virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
- unsigned int bitrate) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- assert(expected_bitrate_bps_ > 0);
- if (start_bitrate_bps_ != 0) {
- // For tests with an explicitly set start bitrate, verify the first
- // bitrate estimate is close to the start bitrate and lower than the
- // test target bitrate. This is to verify a call respects the configured
- // start bitrate, but due to the BWE implementation we can't guarantee the
- // first estimate really is as high as the start bitrate.
- EXPECT_GT(bitrate, 0.9 * start_bitrate_bps_);
- EXPECT_LT(bitrate, expected_bitrate_bps_);
- start_bitrate_bps_ = 0;
- }
- if (bitrate >= expected_bitrate_bps_) {
- // Just trigger if there was any rtx padding packet.
- if (rtx_media_ssrcs_.empty() || rtx_media_sent_ > 0) {
- TriggerTestDone();
- }
- }
- rtp_rtcp_->SetREMBData(
- bitrate, static_cast<uint8_t>(ssrcs.size()), &ssrcs[0]);
- rtp_rtcp_->Process();
- }
-
- virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- RTPHeader header;
- EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast<int>(length), &header));
- receive_stats_->IncomingPacket(header, length, false);
- payload_registry_->SetIncomingPayloadType(header);
- remote_bitrate_estimator_->IncomingPacket(
- clock_->TimeInMilliseconds(), static_cast<int>(length - 12), header);
- if (remote_bitrate_estimator_->TimeUntilNextProcess() <= 0) {
- remote_bitrate_estimator_->Process();
- }
- total_sent_ += length;
- padding_sent_ += header.paddingLength;
- ++total_packets_sent_;
- if (header.paddingLength > 0)
- ++padding_packets_sent_;
- if (rtx_media_ssrcs_.find(header.ssrc) != rtx_media_ssrcs_.end()) {
- rtx_media_sent_ += length - header.headerLength - header.paddingLength;
- if (header.paddingLength == 0)
- ++rtx_media_packets_sent_;
- uint8_t restored_packet[kMaxPacketSize];
- uint8_t* restored_packet_ptr = restored_packet;
- int restored_length = static_cast<int>(length);
- payload_registry_->RestoreOriginalPacket(&restored_packet_ptr,
- packet,
- &restored_length,
- rtx_media_ssrcs_[header.ssrc],
- header);
- length = restored_length;
- EXPECT_TRUE(rtp_parser_->Parse(
- restored_packet, static_cast<int>(length), &header));
- } else {
- rtp_rtcp_->SetRemoteSSRC(header.ssrc);
- }
- return true;
- }
-
- virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- return true;
- }
-
- EventTypeWrapper Wait() { return test_done_->Wait(120 * 1000); }
-
- private:
- void ReportResult(const std::string& measurement,
- size_t value,
- const std::string& units) {
- webrtc::test::PrintResult(
- measurement, "",
- ::testing::UnitTest::GetInstance()->current_test_info()->name(),
- value, units, false);
- }
-
- void TriggerTestDone() EXCLUSIVE_LOCKS_REQUIRED(crit_) {
- ReportResult("total-sent", total_sent_, "bytes");
- ReportResult("padding-sent", padding_sent_, "bytes");
- ReportResult("rtx-media-sent", rtx_media_sent_, "bytes");
- ReportResult("total-packets-sent", total_packets_sent_, "packets");
- ReportResult("padding-packets-sent", padding_packets_sent_, "packets");
- ReportResult("rtx-packets-sent", rtx_media_packets_sent_, "packets");
- test_done_->Set();
- }
-
- Clock* const clock_;
- const scoped_ptr<EventWrapper> test_done_;
- const scoped_ptr<RtpHeaderParser> rtp_parser_;
- scoped_ptr<RtpRtcp> rtp_rtcp_;
- internal::TransportAdapter feedback_transport_;
- const scoped_ptr<ReceiveStatistics> receive_stats_;
- const scoped_ptr<RTPPayloadRegistry> payload_registry_;
- scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
-
- const scoped_ptr<CriticalSectionWrapper> crit_;
- unsigned int expected_bitrate_bps_ GUARDED_BY(crit_);
- unsigned int start_bitrate_bps_ GUARDED_BY(crit_);
- SsrcMap rtx_media_ssrcs_ GUARDED_BY(crit_);
- size_t total_sent_ GUARDED_BY(crit_);
- size_t padding_sent_ GUARDED_BY(crit_);
- size_t rtx_media_sent_ GUARDED_BY(crit_);
- int total_packets_sent_ GUARDED_BY(crit_);
- int padding_packets_sent_ GUARDED_BY(crit_);
- int rtx_media_packets_sent_ GUARDED_BY(crit_);
-};
-
-class LowRateStreamObserver : public test::DirectTransport,
- public RemoteBitrateObserver,
- public PacketReceiver {
- public:
- LowRateStreamObserver(newapi::Transport* feedback_transport,
- Clock* clock,
- size_t number_of_streams,
- bool rtx_used)
- : clock_(clock),
- number_of_streams_(number_of_streams),
- rtx_used_(rtx_used),
- test_done_(EventWrapper::Create()),
- rtp_parser_(RtpHeaderParser::Create()),
- feedback_transport_(feedback_transport),
- receive_stats_(ReceiveStatistics::Create(clock)),
- crit_(CriticalSectionWrapper::CreateCriticalSection()),
- send_stream_(NULL),
- test_state_(kFirstRampup),
- state_start_ms_(clock_->TimeInMilliseconds()),
- interval_start_ms_(state_start_ms_),
- last_remb_bps_(0),
- sent_bytes_(0),
- total_overuse_bytes_(0),
- suspended_in_stats_(false) {
- RtpRtcp::Configuration config;
- config.receive_statistics = receive_stats_.get();
- feedback_transport_.Enable();
- config.outgoing_transport = &feedback_transport_;
- rtp_rtcp_.reset(RtpRtcp::CreateRtpRtcp(config));
- rtp_rtcp_->SetREMBStatus(true);
- rtp_rtcp_->SetRTCPStatus(kRtcpNonCompound);
- rtp_parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset,
- kTransmissionTimeOffsetExtensionId);
- AbsoluteSendTimeRemoteBitrateEstimatorFactory rbe_factory;
- const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 10000;
- remote_bitrate_estimator_.reset(
- rbe_factory.Create(this, clock, kMimdControl,
- kRemoteBitrateEstimatorMinBitrateBps));
- forward_transport_config_.link_capacity_kbps =
- kHighBandwidthLimitBps / 1000;
- forward_transport_config_.queue_length = 100; // Something large.
- test::DirectTransport::SetConfig(forward_transport_config_);
- test::DirectTransport::SetReceiver(this);
- }
-
- virtual void SetSendStream(const VideoSendStream* send_stream) {
- CriticalSectionScoped lock(crit_.get());
- send_stream_ = send_stream;
- }
-
- virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
- unsigned int bitrate) {
- CriticalSectionScoped lock(crit_.get());
- rtp_rtcp_->SetREMBData(
- bitrate, static_cast<uint8_t>(ssrcs.size()), &ssrcs[0]);
- rtp_rtcp_->Process();
- last_remb_bps_ = bitrate;
- }
-
- virtual bool SendRtp(const uint8_t* data, size_t length) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- sent_bytes_ += length;
- int64_t now_ms = clock_->TimeInMilliseconds();
- if (now_ms > interval_start_ms_ + 1000) { // Let at least 1 second pass.
- // Verify that the send rate was about right.
- unsigned int average_rate_bps = static_cast<unsigned int>(sent_bytes_) *
- 8 * 1000 / (now_ms - interval_start_ms_);
- // TODO(holmer): Why is this failing?
- // EXPECT_LT(average_rate_bps, last_remb_bps_ * 1.1);
- if (average_rate_bps > last_remb_bps_ * 1.1) {
- total_overuse_bytes_ +=
- sent_bytes_ -
- last_remb_bps_ / 8 * (now_ms - interval_start_ms_) / 1000;
- }
- EvolveTestState(average_rate_bps);
- interval_start_ms_ = now_ms;
- sent_bytes_ = 0;
- }
- return test::DirectTransport::SendRtp(data, length);
- }
-
- virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
- size_t length) OVERRIDE {
- CriticalSectionScoped lock(crit_.get());
- RTPHeader header;
- EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast<int>(length), &header));
- receive_stats_->IncomingPacket(header, length, false);
- remote_bitrate_estimator_->IncomingPacket(
- clock_->TimeInMilliseconds(), static_cast<int>(length - 12), header);
- if (remote_bitrate_estimator_->TimeUntilNextProcess() <= 0) {
- remote_bitrate_estimator_->Process();
- }
- suspended_in_stats_ = send_stream_->GetStats().suspended;
- return DELIVERY_OK;
- }
-
- virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
- return true;
- }
-
- // Produces a string similar to "1stream_nortx", depending on the values of
- // number_of_streams_ and rtx_used_;
- std::string GetModifierString() {
- std::string str("_");
- char temp_str[5];
- sprintf(temp_str, "%i", static_cast<int>(number_of_streams_));
- str += std::string(temp_str);
- str += "stream";
- str += (number_of_streams_ > 1 ? "s" : "");
- str += "_";
- str += (rtx_used_ ? "" : "no");
- str += "rtx";
- return str;
- }
-
- // This method defines the state machine for the ramp up-down-up test.
- void EvolveTestState(unsigned int bitrate_bps) {
- int64_t now = clock_->TimeInMilliseconds();
- CriticalSectionScoped lock(crit_.get());
- assert(send_stream_ != NULL);
- switch (test_state_) {
- case kFirstRampup: {
- EXPECT_FALSE(suspended_in_stats_);
- if (bitrate_bps > kExpectedHighBitrateBps) {
- // The first ramp-up has reached the target bitrate. Change the
- // channel limit, and move to the next test state.
- forward_transport_config_.link_capacity_kbps =
- kLowBandwidthLimitBps / 1000;
- test::DirectTransport::SetConfig(forward_transport_config_);
- test_state_ = kLowRate;
- webrtc::test::PrintResult("ramp_up_down_up",
- GetModifierString(),
- "first_rampup",
- now - state_start_ms_,
- "ms",
- false);
- state_start_ms_ = now;
- interval_start_ms_ = now;
- sent_bytes_ = 0;
- }
- break;
- }
- case kLowRate: {
- if (bitrate_bps < kExpectedLowBitrateBps && suspended_in_stats_) {
- // The ramp-down was successful. Change the channel limit back to a
- // high value, and move to the next test state.
- forward_transport_config_.link_capacity_kbps =
- kHighBandwidthLimitBps / 1000;
- test::DirectTransport::SetConfig(forward_transport_config_);
- test_state_ = kSecondRampup;
- webrtc::test::PrintResult("ramp_up_down_up",
- GetModifierString(),
- "rampdown",
- now - state_start_ms_,
- "ms",
- false);
- state_start_ms_ = now;
- interval_start_ms_ = now;
- sent_bytes_ = 0;
- }
- break;
- }
- case kSecondRampup: {
- if (bitrate_bps > kExpectedHighBitrateBps && !suspended_in_stats_) {
- webrtc::test::PrintResult("ramp_up_down_up",
- GetModifierString(),
- "second_rampup",
- now - state_start_ms_,
- "ms",
- false);
- webrtc::test::PrintResult("ramp_up_down_up",
- GetModifierString(),
- "total_overuse",
- total_overuse_bytes_,
- "bytes",
- false);
- test_done_->Set();
- }
- break;
- }
- }
- }
-
- EventTypeWrapper Wait() { return test_done_->Wait(120 * 1000); }
-
- private:
- static const unsigned int kHighBandwidthLimitBps = 80000;
- static const unsigned int kExpectedHighBitrateBps = 60000;
- static const unsigned int kLowBandwidthLimitBps = 20000;
- static const unsigned int kExpectedLowBitrateBps = 20000;
- enum TestStates { kFirstRampup, kLowRate, kSecondRampup };
-
- Clock* const clock_;
- const size_t number_of_streams_;
- const bool rtx_used_;
- const scoped_ptr<EventWrapper> test_done_;
- const scoped_ptr<RtpHeaderParser> rtp_parser_;
- scoped_ptr<RtpRtcp> rtp_rtcp_;
- internal::TransportAdapter feedback_transport_;
- const scoped_ptr<ReceiveStatistics> receive_stats_;
- scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
-
- scoped_ptr<CriticalSectionWrapper> crit_;
- const VideoSendStream* send_stream_ GUARDED_BY(crit_);
- FakeNetworkPipe::Config forward_transport_config_ GUARDED_BY(crit_);
- TestStates test_state_ GUARDED_BY(crit_);
- int64_t state_start_ms_ GUARDED_BY(crit_);
- int64_t interval_start_ms_ GUARDED_BY(crit_);
- unsigned int last_remb_bps_ GUARDED_BY(crit_);
- size_t sent_bytes_ GUARDED_BY(crit_);
- size_t total_overuse_bytes_ GUARDED_BY(crit_);
- bool suspended_in_stats_ GUARDED_BY(crit_);
-};
+std::vector<uint32_t> GenerateSsrcs(size_t num_streams,
+ uint32_t ssrc_offset) {
+ std::vector<uint32_t> ssrcs;
+ for (size_t i = 0; i != num_streams; ++i)
+ ssrcs.push_back(static_cast<uint32_t>(ssrc_offset + i));
+ return ssrcs;
+}
} // namespace
-class RampUpTest : public ::testing::Test {
- public:
- virtual void SetUp() { reserved_ssrcs_.clear(); }
+StreamObserver::StreamObserver(const SsrcMap& rtx_media_ssrcs,
+ newapi::Transport* feedback_transport,
+ Clock* clock,
+ RemoteBitrateEstimatorFactory* rbe_factory,
+ RateControlType control_type)
+ : clock_(clock),
+ test_done_(EventWrapper::Create()),
+ rtp_parser_(RtpHeaderParser::Create()),
+ feedback_transport_(feedback_transport),
+ receive_stats_(ReceiveStatistics::Create(clock)),
+ payload_registry_(
+ new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(false))),
+ crit_(CriticalSectionWrapper::CreateCriticalSection()),
+ expected_bitrate_bps_(0),
+ start_bitrate_bps_(0),
+ rtx_media_ssrcs_(rtx_media_ssrcs),
+ total_sent_(0),
+ padding_sent_(0),
+ rtx_media_sent_(0),
+ total_packets_sent_(0),
+ padding_packets_sent_(0),
+ rtx_media_packets_sent_(0),
+ test_start_ms_(clock_->TimeInMilliseconds()),
+ ramp_up_finished_ms_(0) {
+ // Ideally we would only have to instantiate an RtcpSender, an
+ // RtpHeaderParser and a RemoteBitrateEstimator here, but due to the current
+ // state of the RTP module we need a full module and receive statistics to
+ // be able to produce an RTCP with REMB.
+ RtpRtcp::Configuration config;
+ config.receive_statistics = receive_stats_.get();
+ feedback_transport_.Enable();
+ config.outgoing_transport = &feedback_transport_;
+ rtp_rtcp_.reset(RtpRtcp::CreateRtpRtcp(config));
+ rtp_rtcp_->SetREMBStatus(true);
+ rtp_rtcp_->SetRTCPStatus(kRtcpNonCompound);
+ rtp_parser_->RegisterRtpHeaderExtension(kRtpExtensionAbsoluteSendTime,
+ kAbsSendTimeExtensionId);
+ rtp_parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset,
+ kTransmissionTimeOffsetExtensionId);
+ const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000;
+ remote_bitrate_estimator_.reset(
+ rbe_factory->Create(this, clock, control_type,
+ kRemoteBitrateEstimatorMinBitrateBps));
+}
- protected:
- void RunRampUpTest(bool rtx,
- size_t num_streams,
- unsigned int start_bitrate_bps) {
- std::vector<uint32_t> ssrcs(GenerateSsrcs(num_streams, 100));
- std::vector<uint32_t> rtx_ssrcs(GenerateSsrcs(num_streams, 200));
- StreamObserver::SsrcMap rtx_ssrc_map;
- if (rtx) {
- for (size_t i = 0; i < ssrcs.size(); ++i)
- rtx_ssrc_map[rtx_ssrcs[i]] = ssrcs[i];
+void StreamObserver::set_expected_bitrate_bps(
+ unsigned int expected_bitrate_bps) {
+ CriticalSectionScoped lock(crit_.get());
+ expected_bitrate_bps_ = expected_bitrate_bps;
+}
+
+void StreamObserver::set_start_bitrate_bps(unsigned int start_bitrate_bps) {
+ CriticalSectionScoped lock(crit_.get());
+ start_bitrate_bps_ = start_bitrate_bps;
+}
+
+void StreamObserver::OnReceiveBitrateChanged(
+ const std::vector<unsigned int>& ssrcs, unsigned int bitrate) {
+ CriticalSectionScoped lock(crit_.get());
+ assert(expected_bitrate_bps_ > 0);
+ if (start_bitrate_bps_ != 0) {
+ // For tests with an explicitly set start bitrate, verify the first
+ // bitrate estimate is close to the start bitrate and lower than the
+ // test target bitrate. This is to verify a call respects the configured
+ // start bitrate, but due to the BWE implementation we can't guarantee the
+ // first estimate really is as high as the start bitrate.
+ EXPECT_GT(bitrate, 0.9 * start_bitrate_bps_);
+ start_bitrate_bps_ = 0;
+ }
+ if (bitrate >= expected_bitrate_bps_) {
+ ramp_up_finished_ms_ = clock_->TimeInMilliseconds();
+ // Just trigger if there was any rtx padding packet.
+ if (rtx_media_ssrcs_.empty() || rtx_media_sent_ > 0) {
+ TriggerTestDone();
}
- test::DirectTransport receiver_transport;
- StreamObserver stream_observer(rtx_ssrc_map,
- &receiver_transport,
- Clock::GetRealTimeClock());
+ }
+ rtp_rtcp_->SetREMBData(
+ bitrate, static_cast<uint8_t>(ssrcs.size()), &ssrcs[0]);
+ rtp_rtcp_->Process();
+}
- Call::Config call_config(&stream_observer);
- if (start_bitrate_bps != 0) {
- call_config.start_bitrate_bps = start_bitrate_bps;
- stream_observer.set_start_bitrate_bps(start_bitrate_bps);
+bool StreamObserver::SendRtp(const uint8_t* packet, size_t length) {
+ CriticalSectionScoped lock(crit_.get());
+ RTPHeader header;
+ EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast<int>(length), &header));
+ receive_stats_->IncomingPacket(header, length, false);
+ payload_registry_->SetIncomingPayloadType(header);
+ remote_bitrate_estimator_->IncomingPacket(
+ clock_->TimeInMilliseconds(), static_cast<int>(length - 12), header);
+ if (remote_bitrate_estimator_->TimeUntilNextProcess() <= 0) {
+ remote_bitrate_estimator_->Process();
+ }
+ total_sent_ += length;
+ padding_sent_ += header.paddingLength;
+ ++total_packets_sent_;
+ if (header.paddingLength > 0)
+ ++padding_packets_sent_;
+ if (rtx_media_ssrcs_.find(header.ssrc) != rtx_media_ssrcs_.end()) {
+ rtx_media_sent_ += length - header.headerLength - header.paddingLength;
+ if (header.paddingLength == 0)
+ ++rtx_media_packets_sent_;
+ uint8_t restored_packet[kMaxPacketSize];
+ uint8_t* restored_packet_ptr = restored_packet;
+ int restored_length = static_cast<int>(length);
+ payload_registry_->RestoreOriginalPacket(&restored_packet_ptr,
+ packet,
+ &restored_length,
+ rtx_media_ssrcs_[header.ssrc],
+ header);
+ length = restored_length;
+ EXPECT_TRUE(rtp_parser_->Parse(
+ restored_packet, static_cast<int>(length), &header));
+ } else {
+ rtp_rtcp_->SetRemoteSSRC(header.ssrc);
+ }
+ return true;
+}
+
+bool StreamObserver::SendRtcp(const uint8_t* packet, size_t length) {
+ return true;
+}
+
+EventTypeWrapper StreamObserver::Wait() { return test_done_->Wait(120 * 1000); }
+
+void StreamObserver::ReportResult(const std::string& measurement,
+ size_t value,
+ const std::string& units) {
+ webrtc::test::PrintResult(
+ measurement, "",
+ ::testing::UnitTest::GetInstance()->current_test_info()->name(),
+ value, units, false);
+}
+
+void StreamObserver::TriggerTestDone() EXCLUSIVE_LOCKS_REQUIRED(crit_) {
+ ReportResult("ramp-up-total-sent", total_sent_, "bytes");
+ ReportResult("ramp-up-padding-sent", padding_sent_, "bytes");
+ ReportResult("ramp-up-rtx-media-sent", rtx_media_sent_, "bytes");
+ ReportResult("ramp-up-total-packets-sent", total_packets_sent_, "packets");
+ ReportResult("ramp-up-padding-packets-sent",
+ padding_packets_sent_,
+ "packets");
+ ReportResult("ramp-up-rtx-packets-sent",
+ rtx_media_packets_sent_,
+ "packets");
+ ReportResult("ramp-up-time",
+ ramp_up_finished_ms_ - test_start_ms_,
+ "milliseconds");
+ test_done_->Set();
+}
+
+LowRateStreamObserver::LowRateStreamObserver(
+ newapi::Transport* feedback_transport,
+ Clock* clock,
+ size_t number_of_streams,
+ bool rtx_used)
+ : clock_(clock),
+ number_of_streams_(number_of_streams),
+ rtx_used_(rtx_used),
+ test_done_(EventWrapper::Create()),
+ rtp_parser_(RtpHeaderParser::Create()),
+ feedback_transport_(feedback_transport),
+ receive_stats_(ReceiveStatistics::Create(clock)),
+ crit_(CriticalSectionWrapper::CreateCriticalSection()),
+ send_stream_(NULL),
+ test_state_(kFirstRampup),
+ state_start_ms_(clock_->TimeInMilliseconds()),
+ interval_start_ms_(state_start_ms_),
+ last_remb_bps_(0),
+ sent_bytes_(0),
+ total_overuse_bytes_(0),
+ suspended_in_stats_(false) {
+ RtpRtcp::Configuration config;
+ config.receive_statistics = receive_stats_.get();
+ feedback_transport_.Enable();
+ config.outgoing_transport = &feedback_transport_;
+ rtp_rtcp_.reset(RtpRtcp::CreateRtpRtcp(config));
+ rtp_rtcp_->SetREMBStatus(true);
+ rtp_rtcp_->SetRTCPStatus(kRtcpNonCompound);
+ rtp_parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset,
+ kTransmissionTimeOffsetExtensionId);
+ AbsoluteSendTimeRemoteBitrateEstimatorFactory rbe_factory;
+ const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 10000;
+ remote_bitrate_estimator_.reset(
+ rbe_factory.Create(this, clock, kMimdControl,
+ kRemoteBitrateEstimatorMinBitrateBps));
+ forward_transport_config_.link_capacity_kbps =
+ kHighBandwidthLimitBps / 1000;
+ forward_transport_config_.queue_length_packets = 100; // Something large.
+ test::DirectTransport::SetConfig(forward_transport_config_);
+ test::DirectTransport::SetReceiver(this);
+}
+
+void LowRateStreamObserver::SetSendStream(const VideoSendStream* send_stream) {
+ CriticalSectionScoped lock(crit_.get());
+ send_stream_ = send_stream;
+}
+
+void LowRateStreamObserver::OnReceiveBitrateChanged(
+ const std::vector<unsigned int>& ssrcs,
+ unsigned int bitrate) {
+ CriticalSectionScoped lock(crit_.get());
+ rtp_rtcp_->SetREMBData(
+ bitrate, static_cast<uint8_t>(ssrcs.size()), &ssrcs[0]);
+ rtp_rtcp_->Process();
+ last_remb_bps_ = bitrate;
+}
+
+bool LowRateStreamObserver::SendRtp(const uint8_t* data, size_t length) {
+ CriticalSectionScoped lock(crit_.get());
+ sent_bytes_ += length;
+ int64_t now_ms = clock_->TimeInMilliseconds();
+ if (now_ms > interval_start_ms_ + 1000) { // Let at least 1 second pass.
+ // Verify that the send rate was about right.
+ unsigned int average_rate_bps = static_cast<unsigned int>(sent_bytes_) *
+ 8 * 1000 / (now_ms - interval_start_ms_);
+ // TODO(holmer): Why is this failing?
+ // EXPECT_LT(average_rate_bps, last_remb_bps_ * 1.1);
+ if (average_rate_bps > last_remb_bps_ * 1.1) {
+ total_overuse_bytes_ +=
+ sent_bytes_ -
+ last_remb_bps_ / 8 * (now_ms - interval_start_ms_) / 1000;
}
- scoped_ptr<Call> call(Call::Create(call_config));
- VideoSendStream::Config send_config = call->GetDefaultSendConfig();
+ EvolveTestState(average_rate_bps);
+ interval_start_ms_ = now_ms;
+ sent_bytes_ = 0;
+ }
+ return test::DirectTransport::SendRtp(data, length);
+}
- receiver_transport.SetReceiver(call->Receiver());
+PacketReceiver::DeliveryStatus LowRateStreamObserver::DeliverPacket(
+ const uint8_t* packet, size_t length) {
+ CriticalSectionScoped lock(crit_.get());
+ RTPHeader header;
+ EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast<int>(length), &header));
+ receive_stats_->IncomingPacket(header, length, false);
+ remote_bitrate_estimator_->IncomingPacket(
+ clock_->TimeInMilliseconds(), static_cast<int>(length - 12), header);
+ if (remote_bitrate_estimator_->TimeUntilNextProcess() <= 0) {
+ remote_bitrate_estimator_->Process();
+ }
+ suspended_in_stats_ = send_stream_->GetStats().suspended;
+ return DELIVERY_OK;
+}
- test::FakeEncoder encoder(Clock::GetRealTimeClock());
- send_config.encoder_settings.encoder = &encoder;
- send_config.encoder_settings.payload_type = 125;
- send_config.encoder_settings.payload_name = "FAKE";
- std::vector<VideoStream> video_streams =
- test::CreateVideoStreams(num_streams);
+bool LowRateStreamObserver::SendRtcp(const uint8_t* packet, size_t length) {
+ return true;
+}
- if (num_streams == 1) {
- video_streams[0].target_bitrate_bps = 2000000;
- video_streams[0].max_bitrate_bps = 2000000;
- }
+std::string LowRateStreamObserver::GetModifierString() {
+ std::string str("_");
+ char temp_str[5];
+ sprintf(temp_str, "%i",
+ static_cast<int>(number_of_streams_));
+ str += std::string(temp_str);
+ str += "stream";
+ str += (number_of_streams_ > 1 ? "s" : "");
+ str += "_";
+ str += (rtx_used_ ? "" : "no");
+ str += "rtx";
+ return str;
+}
- send_config.rtp.nack.rtp_history_ms = 1000;
- send_config.rtp.ssrcs = ssrcs;
- if (rtx) {
- send_config.rtp.rtx.payload_type = 96;
- send_config.rtp.rtx.ssrcs = rtx_ssrcs;
- send_config.rtp.rtx.pad_with_redundant_payloads = true;
- }
- send_config.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kTOffset,
- kTransmissionTimeOffsetExtensionId));
-
- if (num_streams == 1) {
- // For single stream rampup until 1mbps
- stream_observer.set_expected_bitrate_bps(kSingleStreamTargetBps);
- } else {
- // For multi stream rampup until all streams are being sent. That means
- // enough birate to send all the target streams plus the min bitrate of
- // the last one.
- int expected_bitrate_bps = video_streams.back().min_bitrate_bps;
- for (size_t i = 0; i < video_streams.size() - 1; ++i) {
- expected_bitrate_bps += video_streams[i].target_bitrate_bps;
+void LowRateStreamObserver::EvolveTestState(unsigned int bitrate_bps) {
+ int64_t now = clock_->TimeInMilliseconds();
+ CriticalSectionScoped lock(crit_.get());
+ assert(send_stream_ != NULL);
+ switch (test_state_) {
+ case kFirstRampup: {
+ EXPECT_FALSE(suspended_in_stats_);
+ if (bitrate_bps > kExpectedHighBitrateBps) {
+ // The first ramp-up has reached the target bitrate. Change the
+ // channel limit, and move to the next test state.
+ forward_transport_config_.link_capacity_kbps =
+ kLowBandwidthLimitBps / 1000;
+ test::DirectTransport::SetConfig(forward_transport_config_);
+ test_state_ = kLowRate;
+ webrtc::test::PrintResult("ramp_up_down_up",
+ GetModifierString(),
+ "first_rampup",
+ now - state_start_ms_,
+ "ms",
+ false);
+ state_start_ms_ = now;
+ interval_start_ms_ = now;
+ sent_bytes_ = 0;
}
- stream_observer.set_expected_bitrate_bps(expected_bitrate_bps);
+ break;
}
-
- VideoSendStream* send_stream =
- call->CreateVideoSendStream(send_config, video_streams, NULL);
-
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(send_stream->Input(),
- video_streams.back().width,
- video_streams.back().height,
- video_streams.back().max_framerate,
- Clock::GetRealTimeClock()));
-
- send_stream->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, stream_observer.Wait());
-
- frame_generator_capturer->Stop();
- send_stream->Stop();
-
- call->DestroyVideoSendStream(send_stream);
- }
-
- void RunRampUpDownUpTest(size_t number_of_streams, bool rtx) {
- std::vector<uint32_t> ssrcs;
- for (size_t i = 0; i < number_of_streams; ++i)
- ssrcs.push_back(static_cast<uint32_t>(i + 1));
- test::DirectTransport receiver_transport;
- LowRateStreamObserver stream_observer(
- &receiver_transport, Clock::GetRealTimeClock(), number_of_streams, rtx);
-
- Call::Config call_config(&stream_observer);
- webrtc::Config webrtc_config;
- call_config.webrtc_config = &webrtc_config;
- webrtc_config.Set<PaddingStrategy>(new PaddingStrategy(rtx));
- scoped_ptr<Call> call(Call::Create(call_config));
- VideoSendStream::Config send_config = call->GetDefaultSendConfig();
-
- receiver_transport.SetReceiver(call->Receiver());
-
- test::FakeEncoder encoder(Clock::GetRealTimeClock());
- send_config.encoder_settings.encoder = &encoder;
- send_config.encoder_settings.payload_type = 125;
- send_config.encoder_settings.payload_name = "FAKE";
- std::vector<VideoStream> video_streams =
- test::CreateVideoStreams(number_of_streams);
-
- send_config.rtp.nack.rtp_history_ms = 1000;
- send_config.rtp.ssrcs.insert(
- send_config.rtp.ssrcs.begin(), ssrcs.begin(), ssrcs.end());
- send_config.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kTOffset,
- kTransmissionTimeOffsetExtensionId));
- send_config.suspend_below_min_bitrate = true;
-
- VideoSendStream* send_stream =
- call->CreateVideoSendStream(send_config, video_streams, NULL);
- stream_observer.SetSendStream(send_stream);
-
- size_t width = 0;
- size_t height = 0;
- for (size_t i = 0; i < video_streams.size(); ++i) {
- size_t stream_width = video_streams[i].width;
- size_t stream_height = video_streams[i].height;
- if (stream_width > width)
- width = stream_width;
- if (stream_height > height)
- height = stream_height;
+ case kLowRate: {
+ if (bitrate_bps < kExpectedLowBitrateBps && suspended_in_stats_) {
+ // The ramp-down was successful. Change the channel limit back to a
+ // high value, and move to the next test state.
+ forward_transport_config_.link_capacity_kbps =
+ kHighBandwidthLimitBps / 1000;
+ test::DirectTransport::SetConfig(forward_transport_config_);
+ test_state_ = kSecondRampup;
+ webrtc::test::PrintResult("ramp_up_down_up",
+ GetModifierString(),
+ "rampdown",
+ now - state_start_ms_,
+ "ms",
+ false);
+ state_start_ms_ = now;
+ interval_start_ms_ = now;
+ sent_bytes_ = 0;
+ }
+ break;
}
+ case kSecondRampup: {
+ if (bitrate_bps > kExpectedHighBitrateBps && !suspended_in_stats_) {
+ webrtc::test::PrintResult("ramp_up_down_up",
+ GetModifierString(),
+ "second_rampup",
+ now - state_start_ms_,
+ "ms",
+ false);
+ webrtc::test::PrintResult("ramp_up_down_up",
+ GetModifierString(),
+ "total_overuse",
+ total_overuse_bytes_,
+ "bytes",
+ false);
+ test_done_->Set();
+ }
+ break;
+ }
+ }
+}
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(send_stream->Input(),
- width,
- height,
- 30,
- Clock::GetRealTimeClock()));
+EventTypeWrapper LowRateStreamObserver::Wait() {
+ return test_done_->Wait(test::CallTest::kLongTimeoutMs);
+}
- send_stream->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, stream_observer.Wait());
-
- stream_observer.StopSending();
- receiver_transport.StopSending();
- frame_generator_capturer->Stop();
- send_stream->Stop();
-
- call->DestroyVideoSendStream(send_stream);
+void RampUpTest::RunRampUpTest(bool rtx,
+ size_t num_streams,
+ unsigned int start_bitrate_bps,
+ const std::string& extension_type) {
+ std::vector<uint32_t> ssrcs(GenerateSsrcs(num_streams, 100));
+ std::vector<uint32_t> rtx_ssrcs(GenerateSsrcs(num_streams, 200));
+ StreamObserver::SsrcMap rtx_ssrc_map;
+ if (rtx) {
+ for (size_t i = 0; i < ssrcs.size(); ++i)
+ rtx_ssrc_map[rtx_ssrcs[i]] = ssrcs[i];
}
- private:
- std::vector<uint32_t> GenerateSsrcs(size_t num_streams,
- uint32_t ssrc_offset) {
- std::vector<uint32_t> ssrcs;
- for (size_t i = 0; i != num_streams; ++i)
- ssrcs.push_back(static_cast<uint32_t>(ssrc_offset + i));
- return ssrcs;
+ CreateSendConfig(num_streams);
+
+ scoped_ptr<RemoteBitrateEstimatorFactory> rbe_factory;
+ RateControlType control_type;
+ if (extension_type == RtpExtension::kAbsSendTime) {
+ control_type = kAimdControl;
+ rbe_factory.reset(new AbsoluteSendTimeRemoteBitrateEstimatorFactory);
+ send_config_.rtp.extensions.push_back(RtpExtension(
+ extension_type.c_str(), kAbsSendTimeExtensionId));
+ } else {
+ control_type = kMimdControl;
+ rbe_factory.reset(new RemoteBitrateEstimatorFactory);
+ send_config_.rtp.extensions.push_back(RtpExtension(
+ extension_type.c_str(), kTransmissionTimeOffsetExtensionId));
}
- std::map<uint32_t, bool> reserved_ssrcs_;
-};
+ test::DirectTransport receiver_transport;
+ StreamObserver stream_observer(rtx_ssrc_map,
+ &receiver_transport,
+ Clock::GetRealTimeClock(),
+ rbe_factory.get(),
+ control_type);
+
+ Call::Config call_config(&stream_observer);
+ if (start_bitrate_bps != 0) {
+ call_config.start_bitrate_bps = start_bitrate_bps;
+ stream_observer.set_start_bitrate_bps(start_bitrate_bps);
+ }
+
+ CreateSenderCall(call_config);
+
+ receiver_transport.SetReceiver(sender_call_->Receiver());
+
+ if (num_streams == 1) {
+ encoder_config_.streams[0].target_bitrate_bps = 2000000;
+ encoder_config_.streams[0].max_bitrate_bps = 2000000;
+ }
+
+ send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ send_config_.rtp.ssrcs = ssrcs;
+ if (rtx) {
+ send_config_.rtp.rtx.payload_type = kSendRtxPayloadType;
+ send_config_.rtp.rtx.ssrcs = rtx_ssrcs;
+ send_config_.rtp.rtx.pad_with_redundant_payloads = true;
+ }
+
+ if (num_streams == 1) {
+ // For single stream rampup until 1mbps
+ stream_observer.set_expected_bitrate_bps(kSingleStreamTargetBps);
+ } else {
+ // For multi stream rampup until all streams are being sent. That means
+ // enough birate to send all the target streams plus the min bitrate of
+ // the last one.
+ int expected_bitrate_bps = encoder_config_.streams.back().min_bitrate_bps;
+ for (size_t i = 0; i < encoder_config_.streams.size() - 1; ++i) {
+ expected_bitrate_bps += encoder_config_.streams[i].target_bitrate_bps;
+ }
+ stream_observer.set_expected_bitrate_bps(expected_bitrate_bps);
+ }
+
+ CreateStreams();
+ CreateFrameGeneratorCapturer();
+
+ Start();
+
+ EXPECT_EQ(kEventSignaled, stream_observer.Wait());
+
+ Stop();
+ DestroyStreams();
+}
+
+void RampUpTest::RunRampUpDownUpTest(size_t number_of_streams, bool rtx) {
+ test::DirectTransport receiver_transport;
+ LowRateStreamObserver stream_observer(
+ &receiver_transport, Clock::GetRealTimeClock(), number_of_streams, rtx);
+
+ Call::Config call_config(&stream_observer);
+ CreateSenderCall(call_config);
+ receiver_transport.SetReceiver(sender_call_->Receiver());
+
+ CreateSendConfig(number_of_streams);
+
+ send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ send_config_.rtp.extensions.push_back(RtpExtension(
+ RtpExtension::kTOffset, kTransmissionTimeOffsetExtensionId));
+ send_config_.suspend_below_min_bitrate = true;
+ if (rtx) {
+ send_config_.rtp.rtx.payload_type = kSendRtxPayloadType;
+ send_config_.rtp.rtx.ssrcs = GenerateSsrcs(number_of_streams, 200);
+ send_config_.rtp.rtx.pad_with_redundant_payloads = true;
+ }
+
+ CreateStreams();
+ stream_observer.SetSendStream(send_stream_);
+
+ CreateFrameGeneratorCapturer();
+
+ Start();
+
+ EXPECT_EQ(kEventSignaled, stream_observer.Wait());
+
+ Stop();
+ DestroyStreams();
+}
TEST_F(RampUpTest, SingleStream) {
- RunRampUpTest(false, 1, 0);
+ RunRampUpTest(false, 1, 0, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, Simulcast) {
- RunRampUpTest(false, 3, 0);
+ RunRampUpTest(false, 3, 0, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, SimulcastWithRtx) {
- RunRampUpTest(true, 3, 0);
+ RunRampUpTest(true, 3, 0, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, SingleStreamWithHighStartBitrate) {
- RunRampUpTest(false, 1, 0.9 * kSingleStreamTargetBps);
+ RunRampUpTest(false, 1, 0.9 * kSingleStreamTargetBps, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, UpDownUpOneStream) { RunRampUpDownUpTest(1, false); }
diff --git a/video/rampup_tests.h b/video/rampup_tests.h
new file mode 100644
index 0000000..69399b4
--- /dev/null
+++ b/video/rampup_tests.h
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_VIDEO_RAMPUP_TESTS_H_
+#define WEBRTC_VIDEO_RAMPUP_TESTS_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "webrtc/call.h"
+#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
+#include "webrtc/system_wrappers/interface/event_wrapper.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/test/call_test.h"
+#include "webrtc/video/transport_adapter.h"
+
+namespace webrtc {
+
+static const int kTransmissionTimeOffsetExtensionId = 6;
+static const int kAbsSendTimeExtensionId = 7;
+static const unsigned int kSingleStreamTargetBps = 1000000;
+
+class Clock;
+class CriticalSectionWrapper;
+class ReceiveStatistics;
+class RtpHeaderParser;
+class RTPPayloadRegistry;
+class RtpRtcp;
+
+class StreamObserver : public newapi::Transport, public RemoteBitrateObserver {
+ public:
+ typedef std::map<uint32_t, int> BytesSentMap;
+ typedef std::map<uint32_t, uint32_t> SsrcMap;
+ StreamObserver(const SsrcMap& rtx_media_ssrcs,
+ newapi::Transport* feedback_transport,
+ Clock* clock,
+ RemoteBitrateEstimatorFactory* rbe_factory,
+ RateControlType control_type);
+
+ void set_expected_bitrate_bps(unsigned int expected_bitrate_bps);
+
+ void set_start_bitrate_bps(unsigned int start_bitrate_bps);
+
+ virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
+ unsigned int bitrate) OVERRIDE;
+
+ virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE;
+
+ virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE;
+
+ EventTypeWrapper Wait();
+
+ private:
+ void ReportResult(const std::string& measurement,
+ size_t value,
+ const std::string& units);
+ void TriggerTestDone() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
+ Clock* const clock_;
+ const scoped_ptr<EventWrapper> test_done_;
+ const scoped_ptr<RtpHeaderParser> rtp_parser_;
+ scoped_ptr<RtpRtcp> rtp_rtcp_;
+ internal::TransportAdapter feedback_transport_;
+ const scoped_ptr<ReceiveStatistics> receive_stats_;
+ const scoped_ptr<RTPPayloadRegistry> payload_registry_;
+ scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+
+ const scoped_ptr<CriticalSectionWrapper> crit_;
+ unsigned int expected_bitrate_bps_ GUARDED_BY(crit_);
+ unsigned int start_bitrate_bps_ GUARDED_BY(crit_);
+ SsrcMap rtx_media_ssrcs_ GUARDED_BY(crit_);
+ size_t total_sent_ GUARDED_BY(crit_);
+ size_t padding_sent_ GUARDED_BY(crit_);
+ size_t rtx_media_sent_ GUARDED_BY(crit_);
+ int total_packets_sent_ GUARDED_BY(crit_);
+ int padding_packets_sent_ GUARDED_BY(crit_);
+ int rtx_media_packets_sent_ GUARDED_BY(crit_);
+ int64_t test_start_ms_ GUARDED_BY(crit_);
+ int64_t ramp_up_finished_ms_ GUARDED_BY(crit_);
+};
+
+class LowRateStreamObserver : public test::DirectTransport,
+ public RemoteBitrateObserver,
+ public PacketReceiver {
+ public:
+ LowRateStreamObserver(newapi::Transport* feedback_transport,
+ Clock* clock,
+ size_t number_of_streams,
+ bool rtx_used);
+
+ virtual void SetSendStream(const VideoSendStream* send_stream);
+
+ virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
+ unsigned int bitrate);
+
+ virtual bool SendRtp(const uint8_t* data, size_t length) OVERRIDE;
+
+ virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
+ size_t length) OVERRIDE;
+
+ virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE;
+
+ // Produces a string similar to "1stream_nortx", depending on the values of
+ // number_of_streams_ and rtx_used_;
+ std::string GetModifierString();
+
+ // This method defines the state machine for the ramp up-down-up test.
+ void EvolveTestState(unsigned int bitrate_bps);
+
+ EventTypeWrapper Wait();
+
+ private:
+ static const unsigned int kHighBandwidthLimitBps = 80000;
+ static const unsigned int kExpectedHighBitrateBps = 60000;
+ static const unsigned int kLowBandwidthLimitBps = 20000;
+ static const unsigned int kExpectedLowBitrateBps = 20000;
+ enum TestStates { kFirstRampup, kLowRate, kSecondRampup };
+
+ Clock* const clock_;
+ const size_t number_of_streams_;
+ const bool rtx_used_;
+ const scoped_ptr<EventWrapper> test_done_;
+ const scoped_ptr<RtpHeaderParser> rtp_parser_;
+ scoped_ptr<RtpRtcp> rtp_rtcp_;
+ internal::TransportAdapter feedback_transport_;
+ const scoped_ptr<ReceiveStatistics> receive_stats_;
+ scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+
+ scoped_ptr<CriticalSectionWrapper> crit_;
+ const VideoSendStream* send_stream_ GUARDED_BY(crit_);
+ FakeNetworkPipe::Config forward_transport_config_ GUARDED_BY(crit_);
+ TestStates test_state_ GUARDED_BY(crit_);
+ int64_t state_start_ms_ GUARDED_BY(crit_);
+ int64_t interval_start_ms_ GUARDED_BY(crit_);
+ unsigned int last_remb_bps_ GUARDED_BY(crit_);
+ size_t sent_bytes_ GUARDED_BY(crit_);
+ size_t total_overuse_bytes_ GUARDED_BY(crit_);
+ bool suspended_in_stats_ GUARDED_BY(crit_);
+};
+
+class RampUpTest : public test::CallTest {
+ protected:
+ void RunRampUpTest(bool rtx,
+ size_t num_streams,
+ unsigned int start_bitrate_bps,
+ const std::string& extension_type);
+
+ void RunRampUpDownUpTest(size_t number_of_streams, bool rtx);
+};
+} // namespace webrtc
+#endif // WEBRTC_VIDEO_RAMPUP_TESTS_H_
diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc
index 6004281..3826283 100644
--- a/video/receive_statistics_proxy.cc
+++ b/video/receive_statistics_proxy.cc
@@ -42,7 +42,7 @@
}
stats.c_name = GetCName();
codec_->GetReceiveSideDelay(channel_, &stats.avg_delay_ms);
- stats.discarded_packets = codec_->GetDiscardedPackets(channel_);
+ stats.discarded_packets = codec_->GetNumDiscardedPackets(channel_);
codec_->GetReceiveCodecStastistics(
channel_, stats.key_frames, stats.delta_frames);
diff --git a/video/receive_statistics_proxy.h b/video/receive_statistics_proxy.h
index 35e5cc3..b5fbf86 100644
--- a/video/receive_statistics_proxy.h
+++ b/video/receive_statistics_proxy.h
@@ -13,10 +13,10 @@
#include <string>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
#include "webrtc/frame_callback.h"
#include "webrtc/modules/remote_bitrate_estimator/rate_statistics.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/video_engine/include/vie_codec.h"
#include "webrtc/video_engine/include/vie_rtp_rtcp.h"
#include "webrtc/video_receive_stream.h"
diff --git a/video/replay.cc b/video/replay.cc
new file mode 100644
index 0000000..3d2689e
--- /dev/null
+++ b/video/replay.cc
@@ -0,0 +1,283 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <stdio.h>
+
+#include <map>
+#include <sstream>
+
+#include "gflags/gflags.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+#include "webrtc/call.h"
+#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
+#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/system_wrappers/interface/sleep.h"
+#include "webrtc/test/encoder_settings.h"
+#include "webrtc/test/null_transport.h"
+#include "webrtc/test/rtp_file_reader.h"
+#include "webrtc/test/run_loop.h"
+#include "webrtc/test/run_test.h"
+#include "webrtc/test/video_capturer.h"
+#include "webrtc/test/video_renderer.h"
+#include "webrtc/typedefs.h"
+
+namespace webrtc {
+namespace flags {
+
+// TODO(pbos): Multiple receivers.
+
+// Flag for payload type.
+static bool ValidatePayloadType(const char* flagname, int32_t payload_type) {
+ return payload_type > 0 && payload_type <= 127;
+}
+DEFINE_int32(payload_type, 0, "Payload type");
+static int PayloadType() { return static_cast<int>(FLAGS_payload_type); }
+static const bool payload_dummy =
+ google::RegisterFlagValidator(&FLAGS_payload_type, &ValidatePayloadType);
+
+// Flag for SSRC.
+static bool ValidateSsrc(const char* flagname, uint64_t ssrc) {
+ return ssrc > 0 && ssrc <= 0xFFFFFFFFu;
+}
+
+DEFINE_uint64(ssrc, 0, "Incoming SSRC");
+static uint32_t Ssrc() { return static_cast<uint32_t>(FLAGS_ssrc); }
+static const bool ssrc_dummy =
+ google::RegisterFlagValidator(&FLAGS_ssrc, &ValidateSsrc);
+
+static bool ValidateOptionalPayloadType(const char* flagname,
+ int32_t payload_type) {
+ return payload_type == -1 || ValidatePayloadType(flagname, payload_type);
+}
+
+// Flag for RED payload type.
+DEFINE_int32(red_payload_type, -1, "RED payload type");
+static int RedPayloadType() {
+ return static_cast<int>(FLAGS_red_payload_type);
+}
+static const bool red_dummy =
+ google::RegisterFlagValidator(&FLAGS_red_payload_type,
+ &ValidateOptionalPayloadType);
+
+// Flag for ULPFEC payload type.
+DEFINE_int32(fec_payload_type, -1, "ULPFEC payload type");
+static int FecPayloadType() {
+ return static_cast<int>(FLAGS_fec_payload_type);
+}
+static const bool fec_dummy =
+ google::RegisterFlagValidator(&FLAGS_fec_payload_type,
+ &ValidateOptionalPayloadType);
+
+// Flag for abs-send-time id.
+static bool ValidateRtpHeaderExtensionId(const char* flagname,
+ int32_t extension_id) {
+ return extension_id >= -1 || extension_id < 15;
+}
+DEFINE_int32(abs_send_time_id, -1, "RTP extension ID for abs-send-time");
+static int AbsSendTimeId() { return static_cast<int>(FLAGS_abs_send_time_id); }
+static const bool abs_send_time_dummy =
+ google::RegisterFlagValidator(&FLAGS_abs_send_time_id,
+ &ValidateRtpHeaderExtensionId);
+
+// Flag for transmission-offset id.
+DEFINE_int32(transmission_offset_id,
+ -1,
+ "RTP extension ID for transmission-offset");
+static int TransmissionOffsetId() {
+ return static_cast<int>(FLAGS_transmission_offset_id);
+}
+static const bool timestamp_offset_dummy =
+ google::RegisterFlagValidator(&FLAGS_transmission_offset_id,
+ &ValidateRtpHeaderExtensionId);
+
+// Flag for rtpdump input file.
+bool ValidateInputFilenameNotEmpty(const char* flagname,
+ const std::string& string) {
+ return string != "";
+}
+DEFINE_string(input_file, "", "input file");
+static std::string InputFile() {
+ return static_cast<std::string>(FLAGS_input_file);
+}
+static const bool input_file_dummy =
+ google::RegisterFlagValidator(&FLAGS_input_file,
+ &ValidateInputFilenameNotEmpty);
+
+// Flag for raw output files.
+DEFINE_string(out_base, "", "Basename (excluding .yuv) for raw output");
+static std::string OutBase() {
+ return static_cast<std::string>(FLAGS_out_base);
+}
+
+// Flag for video codec.
+DEFINE_string(codec, "VP8", "Video codec");
+static std::string Codec() { return static_cast<std::string>(FLAGS_codec); }
+
+} // namespace flags
+
+static const uint32_t kReceiverLocalSsrc = 0x123456;
+
+class FileRenderPassthrough : public VideoRenderer {
+ public:
+ FileRenderPassthrough(const std::string& basename, VideoRenderer* renderer)
+ : basename_(basename),
+ renderer_(renderer),
+ file_(NULL),
+ count_(0),
+ last_width_(0),
+ last_height_(0) {}
+
+ ~FileRenderPassthrough() {
+ if (file_ != NULL)
+ fclose(file_);
+ }
+
+ private:
+ virtual void RenderFrame(const I420VideoFrame& video_frame,
+ int time_to_render_ms) OVERRIDE {
+ if (renderer_ != NULL)
+ renderer_->RenderFrame(video_frame, time_to_render_ms);
+ if (basename_ == "")
+ return;
+ if (last_width_ != video_frame.width() ||
+ last_height_ != video_frame.height()) {
+ if (file_ != NULL)
+ fclose(file_);
+ std::stringstream filename;
+ filename << basename_;
+ if (++count_ > 1)
+ filename << '-' << count_;
+ filename << '_' << video_frame.width() << 'x' << video_frame.height()
+ << ".yuv";
+ file_ = fopen(filename.str().c_str(), "wb");
+ if (file_ == NULL) {
+ fprintf(stderr,
+ "Couldn't open file for writing: %s\n",
+ filename.str().c_str());
+ }
+ }
+ last_width_ = video_frame.width();
+ last_height_ = video_frame.height();
+ if (file_ == NULL)
+ return;
+ PrintI420VideoFrame(video_frame, file_);
+ }
+
+ const std::string basename_;
+ VideoRenderer* const renderer_;
+ FILE* file_;
+ size_t count_;
+ int last_width_;
+ int last_height_;
+};
+
+void RtpReplay() {
+ scoped_ptr<test::VideoRenderer> playback_video(test::VideoRenderer::Create(
+ "Playback Video", 640, 480));
+ FileRenderPassthrough file_passthrough(flags::OutBase(),
+ playback_video.get());
+
+ // TODO(pbos): Might be good to have a transport that prints keyframe requests
+ // etc.
+ test::NullTransport transport;
+ Call::Config call_config(&transport);
+ scoped_ptr<Call> call(Call::Create(call_config));
+
+ VideoReceiveStream::Config receive_config;
+ receive_config.rtp.remote_ssrc = flags::Ssrc();
+ receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
+ receive_config.rtp.fec.ulpfec_payload_type = flags::FecPayloadType();
+ receive_config.rtp.fec.red_payload_type = flags::RedPayloadType();
+ receive_config.rtp.nack.rtp_history_ms = 1000;
+ if (flags::TransmissionOffsetId() != -1) {
+ receive_config.rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kTOffset, flags::TransmissionOffsetId()));
+ }
+ if (flags::AbsSendTimeId() != -1) {
+ receive_config.rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kAbsSendTime, flags::AbsSendTimeId()));
+ }
+ receive_config.renderer = &file_passthrough;
+
+ VideoSendStream::Config::EncoderSettings encoder_settings;
+ encoder_settings.payload_name = flags::Codec();
+ encoder_settings.payload_type = flags::PayloadType();
+ VideoCodec codec = test::CreateDecoderVideoCodec(encoder_settings);
+ receive_config.codecs.push_back(codec);
+
+ VideoReceiveStream* receive_stream =
+ call->CreateVideoReceiveStream(receive_config);
+
+ scoped_ptr<test::RtpFileReader> rtp_reader(test::RtpFileReader::Create(
+ test::RtpFileReader::kRtpDump, flags::InputFile()));
+ if (rtp_reader.get() == NULL) {
+ rtp_reader.reset(test::RtpFileReader::Create(test::RtpFileReader::kPcap,
+ flags::InputFile()));
+ if (rtp_reader.get() == NULL) {
+ fprintf(stderr,
+ "Couldn't open input file as either a rtpdump or .pcap. Note "
+ "that .pcapng is not supported.\n");
+ return;
+ }
+ }
+ receive_stream->Start();
+
+ uint32_t last_time_ms = 0;
+ int num_packets = 0;
+ std::map<uint32_t, int> unknown_packets;
+ while (true) {
+ test::RtpFileReader::Packet packet;
+ if (!rtp_reader->NextPacket(&packet))
+ break;
+ ++num_packets;
+ switch (call->Receiver()->DeliverPacket(packet.data, packet.length)) {
+ case PacketReceiver::DELIVERY_OK:
+ break;
+ case PacketReceiver::DELIVERY_UNKNOWN_SSRC: {
+ RTPHeader header;
+ scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+ parser->Parse(packet.data, packet.length, &header);
+ if (unknown_packets[header.ssrc] == 0)
+ fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc);
+ ++unknown_packets[header.ssrc];
+ break;
+ }
+ case PacketReceiver::DELIVERY_PACKET_ERROR:
+ fprintf(stderr, "Packet error, corrupt packets or incorrect setup?\n");
+ break;
+ }
+ if (last_time_ms != 0 && last_time_ms != packet.time_ms) {
+ SleepMs(packet.time_ms - last_time_ms);
+ }
+ last_time_ms = packet.time_ms;
+ }
+ fprintf(stderr, "num_packets: %d\n", num_packets);
+
+ for (std::map<uint32_t, int>::const_iterator it = unknown_packets.begin();
+ it != unknown_packets.end();
+ ++it) {
+ fprintf(
+ stderr, "Packets for unknown ssrc '%u': %d\n", it->first, it->second);
+ }
+
+ call->DestroyVideoReceiveStream(receive_stream);
+}
+} // namespace webrtc
+
+int main(int argc, char* argv[]) {
+ ::testing::InitGoogleTest(&argc, argv);
+ google::ParseCommandLineFlags(&argc, &argv, true);
+
+ webrtc::test::RunTest(webrtc::RtpReplay);
+ return 0;
+}
diff --git a/video/send_statistics_proxy.cc b/video/send_statistics_proxy.cc
index c9bd05c..1b6081d 100644
--- a/video/send_statistics_proxy.cc
+++ b/video/send_statistics_proxy.cc
@@ -17,10 +17,8 @@
namespace webrtc {
SendStatisticsProxy::SendStatisticsProxy(
- const VideoSendStream::Config& config,
- SendStatisticsProxy::StatsProvider* stats_provider)
+ const VideoSendStream::Config& config)
: config_(config),
- stats_provider_(stats_provider),
crit_(CriticalSectionWrapper::CreateCriticalSection()) {
}
@@ -45,14 +43,8 @@
}
VideoSendStream::Stats SendStatisticsProxy::GetStats() const {
- VideoSendStream::Stats stats;
- {
- CriticalSectionScoped lock(crit_.get());
- stats = stats_;
- }
- stats_provider_->GetSendSideDelay(&stats);
- stats.c_name = stats_provider_->GetCName();
- return stats;
+ CriticalSectionScoped lock(crit_.get());
+ return stats_;
}
StreamStats* SendStatisticsProxy::GetStatsEntry(uint32_t ssrc) {
@@ -61,8 +53,12 @@
return &it->second;
if (std::find(config_.rtp.ssrcs.begin(), config_.rtp.ssrcs.end(), ssrc) ==
- config_.rtp.ssrcs.end())
+ config_.rtp.ssrcs.end() &&
+ std::find(config_.rtp.rtx.ssrcs.begin(),
+ config_.rtp.rtx.ssrcs.end(),
+ ssrc) == config_.rtp.rtx.ssrcs.end()) {
return NULL;
+ }
return &stats_.substreams[ssrc]; // Insert new entry and return ptr.
}
@@ -120,4 +116,15 @@
}
}
+void SendStatisticsProxy::SendSideDelayUpdated(int avg_delay_ms,
+ int max_delay_ms,
+ uint32_t ssrc) {
+ CriticalSectionScoped lock(crit_.get());
+ StreamStats* stats = GetStatsEntry(ssrc);
+ if (stats == NULL)
+ return;
+ stats->avg_delay_ms = avg_delay_ms;
+ stats->max_delay_ms = max_delay_ms;
+}
+
} // namespace webrtc
diff --git a/video/send_statistics_proxy.h b/video/send_statistics_proxy.h
index a1ff14c..ef459da 100644
--- a/video/send_statistics_proxy.h
+++ b/video/send_statistics_proxy.h
@@ -13,12 +13,12 @@
#include <string>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
#include "webrtc/video_engine/include/vie_codec.h"
#include "webrtc/video_engine/include/vie_capture.h"
#include "webrtc/video_send_stream.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
namespace webrtc {
@@ -29,20 +29,10 @@
public BitrateStatisticsObserver,
public FrameCountObserver,
public ViEEncoderObserver,
- public ViECaptureObserver {
+ public ViECaptureObserver,
+ public SendSideDelayObserver {
public:
- class StatsProvider {
- protected:
- StatsProvider() {}
- virtual ~StatsProvider() {}
-
- public:
- virtual bool GetSendSideDelay(VideoSendStream::Stats* stats) = 0;
- virtual std::string GetCName() = 0;
- };
-
- SendStatisticsProxy(const VideoSendStream::Config& config,
- StatsProvider* stats_provider);
+ explicit SendStatisticsProxy(const VideoSendStream::Config& config);
virtual ~SendStatisticsProxy();
VideoSendStream::Stats GetStats() const;
@@ -80,11 +70,14 @@
virtual void NoPictureAlarm(const int capture_id,
const CaptureAlarm alarm) OVERRIDE {}
+ virtual void SendSideDelayUpdated(int avg_delay_ms,
+ int max_delay_ms,
+ uint32_t ssrc) OVERRIDE;
+
private:
StreamStats* GetStatsEntry(uint32_t ssrc) EXCLUSIVE_LOCKS_REQUIRED(crit_);
const VideoSendStream::Config config_;
- StatsProvider* const stats_provider_;
scoped_ptr<CriticalSectionWrapper> crit_;
VideoSendStream::Stats stats_ GUARDED_BY(crit_);
};
diff --git a/video/send_statistics_proxy_unittest.cc b/video/send_statistics_proxy_unittest.cc
index 8f35ee4..f768452 100644
--- a/video/send_statistics_proxy_unittest.cc
+++ b/video/send_statistics_proxy_unittest.cc
@@ -19,8 +19,7 @@
namespace webrtc {
-class SendStatisticsProxyTest : public ::testing::Test,
- protected SendStatisticsProxy::StatsProvider {
+class SendStatisticsProxyTest : public ::testing::Test {
public:
SendStatisticsProxyTest() : avg_delay_ms_(0), max_delay_ms_(0) {}
virtual ~SendStatisticsProxyTest() {}
@@ -28,7 +27,7 @@
protected:
virtual void SetUp() {
statistics_proxy_.reset(
- new SendStatisticsProxy(GetTestConfig(), this));
+ new SendStatisticsProxy(GetTestConfig()));
config_ = GetTestConfig();
expected_ = VideoSendStream::Stats();
}
@@ -37,25 +36,15 @@
VideoSendStream::Config config;
config.rtp.ssrcs.push_back(17);
config.rtp.ssrcs.push_back(42);
+ config.rtp.rtx.ssrcs.push_back(18);
+ config.rtp.rtx.ssrcs.push_back(43);
return config;
}
- virtual bool GetSendSideDelay(VideoSendStream::Stats* stats) OVERRIDE {
- stats->avg_delay_ms = avg_delay_ms_;
- stats->max_delay_ms = max_delay_ms_;
- return true;
- }
-
- virtual std::string GetCName() { return cname_; }
-
void ExpectEqual(VideoSendStream::Stats one, VideoSendStream::Stats other) {
- EXPECT_EQ(one.avg_delay_ms, other.avg_delay_ms);
EXPECT_EQ(one.input_frame_rate, other.input_frame_rate);
EXPECT_EQ(one.encode_frame_rate, other.encode_frame_rate);
- EXPECT_EQ(one.avg_delay_ms, other.avg_delay_ms);
- EXPECT_EQ(one.max_delay_ms, other.max_delay_ms);
EXPECT_EQ(one.suspended, other.suspended);
- EXPECT_EQ(one.c_name, other.c_name);
EXPECT_EQ(one.substreams.size(), other.substreams.size());
for (std::map<uint32_t, StreamStats>::const_iterator it =
@@ -71,6 +60,8 @@
EXPECT_EQ(a.key_frames, b.key_frames);
EXPECT_EQ(a.delta_frames, b.delta_frames);
EXPECT_EQ(a.bitrate_bps, b.bitrate_bps);
+ EXPECT_EQ(a.avg_delay_ms, b.avg_delay_ms);
+ EXPECT_EQ(a.max_delay_ms, b.max_delay_ms);
EXPECT_EQ(a.rtp_stats.bytes, b.rtp_stats.bytes);
EXPECT_EQ(a.rtp_stats.header_bytes, b.rtp_stats.header_bytes);
@@ -92,7 +83,6 @@
VideoSendStream::Config config_;
int avg_delay_ms_;
int max_delay_ms_;
- std::string cname_;
VideoSendStream::Stats expected_;
typedef std::map<uint32_t, StreamStats>::const_iterator StreamIterator;
};
@@ -113,7 +103,20 @@
ssrc_stats.rtcp_stats.jitter = offset + 3;
callback->StatisticsUpdated(ssrc_stats.rtcp_stats, ssrc);
}
+ for (std::vector<uint32_t>::const_iterator it = config_.rtp.rtx.ssrcs.begin();
+ it != config_.rtp.rtx.ssrcs.end();
+ ++it) {
+ const uint32_t ssrc = *it;
+ StreamStats& ssrc_stats = expected_.substreams[ssrc];
+ // Add statistics with some arbitrary, but unique, numbers.
+ uint32_t offset = ssrc * sizeof(RtcpStatistics);
+ ssrc_stats.rtcp_stats.cumulative_lost = offset;
+ ssrc_stats.rtcp_stats.extended_max_sequence_number = offset + 1;
+ ssrc_stats.rtcp_stats.fraction_lost = offset + 2;
+ ssrc_stats.rtcp_stats.jitter = offset + 3;
+ callback->StatisticsUpdated(ssrc_stats.rtcp_stats, ssrc);
+ }
VideoSendStream::Stats stats = statistics_proxy_->GetStats();
ExpectEqual(expected_, stats);
}
@@ -160,6 +163,18 @@
observer->FrameCountUpdated(kVideoFrameKey, stats.key_frames, ssrc);
observer->FrameCountUpdated(kVideoFrameDelta, stats.delta_frames, ssrc);
}
+ for (std::vector<uint32_t>::const_iterator it = config_.rtp.rtx.ssrcs.begin();
+ it != config_.rtp.rtx.ssrcs.end();
+ ++it) {
+ const uint32_t ssrc = *it;
+ // Add statistics with some arbitrary, but unique, numbers.
+ StreamStats& stats = expected_.substreams[ssrc];
+ uint32_t offset = ssrc * sizeof(StreamStats);
+ stats.key_frames = offset;
+ stats.delta_frames = offset + 1;
+ observer->FrameCountUpdated(kVideoFrameKey, stats.key_frames, ssrc);
+ observer->FrameCountUpdated(kVideoFrameDelta, stats.delta_frames, ssrc);
+ }
VideoSendStream::Stats stats = statistics_proxy_->GetStats();
ExpectEqual(expected_, stats);
@@ -182,6 +197,21 @@
counters.packets = offset + 5;
callback->DataCountersUpdated(counters, ssrc);
}
+ for (std::vector<uint32_t>::const_iterator it = config_.rtp.rtx.ssrcs.begin();
+ it != config_.rtp.rtx.ssrcs.end();
+ ++it) {
+ const uint32_t ssrc = *it;
+ StreamDataCounters& counters = expected_.substreams[ssrc].rtp_stats;
+ // Add statistics with some arbitrary, but unique, numbers.
+ uint32_t offset = ssrc * sizeof(StreamDataCounters);
+ counters.bytes = offset;
+ counters.header_bytes = offset + 1;
+ counters.fec_packets = offset + 2;
+ counters.padding_bytes = offset + 3;
+ counters.retransmitted_packets = offset + 4;
+ counters.packets = offset + 5;
+ callback->DataCountersUpdated(counters, ssrc);
+ }
VideoSendStream::Stats stats = statistics_proxy_->GetStats();
ExpectEqual(expected_, stats);
@@ -194,6 +224,17 @@
++it) {
const uint32_t ssrc = *it;
BitrateStatistics bitrate;
+ // Use ssrc as bitrate_bps to get a unique value for each stream.
+ bitrate.bitrate_bps = ssrc;
+ observer->Notify(bitrate, ssrc);
+ expected_.substreams[ssrc].bitrate_bps = ssrc;
+ }
+ for (std::vector<uint32_t>::const_iterator it = config_.rtp.rtx.ssrcs.begin();
+ it != config_.rtp.rtx.ssrcs.end();
+ ++it) {
+ const uint32_t ssrc = *it;
+ BitrateStatistics bitrate;
+ // Use ssrc as bitrate_bps to get a unique value for each stream.
bitrate.bitrate_bps = ssrc;
observer->Notify(bitrate, ssrc);
expected_.substreams[ssrc].bitrate_bps = ssrc;
@@ -203,21 +244,43 @@
ExpectEqual(expected_, stats);
}
-TEST_F(SendStatisticsProxyTest, StreamStats) {
- avg_delay_ms_ = 1;
- max_delay_ms_ = 2;
- cname_ = "qwertyuiop";
-
+TEST_F(SendStatisticsProxyTest, SendSideDelay) {
+ SendSideDelayObserver* observer = statistics_proxy_.get();
+ for (std::vector<uint32_t>::const_iterator it = config_.rtp.ssrcs.begin();
+ it != config_.rtp.ssrcs.end();
+ ++it) {
+ const uint32_t ssrc = *it;
+ // Use ssrc as avg_delay_ms and max_delay_ms to get a unique value for each
+ // stream.
+ int avg_delay_ms = ssrc;
+ int max_delay_ms = ssrc + 1;
+ observer->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc);
+ expected_.substreams[ssrc].avg_delay_ms = avg_delay_ms;
+ expected_.substreams[ssrc].max_delay_ms = max_delay_ms;
+ }
+ for (std::vector<uint32_t>::const_iterator it = config_.rtp.rtx.ssrcs.begin();
+ it != config_.rtp.rtx.ssrcs.end();
+ ++it) {
+ const uint32_t ssrc = *it;
+ // Use ssrc as avg_delay_ms and max_delay_ms to get a unique value for each
+ // stream.
+ int avg_delay_ms = ssrc;
+ int max_delay_ms = ssrc + 1;
+ observer->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc);
+ expected_.substreams[ssrc].avg_delay_ms = avg_delay_ms;
+ expected_.substreams[ssrc].max_delay_ms = max_delay_ms;
+ }
VideoSendStream::Stats stats = statistics_proxy_->GetStats();
-
- EXPECT_EQ(avg_delay_ms_, stats.avg_delay_ms);
- EXPECT_EQ(max_delay_ms_, stats.max_delay_ms);
- EXPECT_EQ(cname_, stats.c_name);
+ ExpectEqual(expected_, stats);
}
TEST_F(SendStatisticsProxyTest, NoSubstreams) {
uint32_t exluded_ssrc =
- *std::max_element(config_.rtp.ssrcs.begin(), config_.rtp.ssrcs.end()) + 1;
+ std::max(
+ *std::max_element(config_.rtp.ssrcs.begin(), config_.rtp.ssrcs.end()),
+ *std::max_element(config_.rtp.rtx.ssrcs.begin(),
+ config_.rtp.rtx.ssrcs.end())) +
+ 1;
// From RtcpStatisticsCallback.
RtcpStatistics rtcp_stats;
RtcpStatisticsCallback* rtcp_callback = statistics_proxy_.get();
diff --git a/video/transport_adapter.h b/video/transport_adapter.h
index 79f995b..f7cba1d 100644
--- a/video/transport_adapter.h
+++ b/video/transport_adapter.h
@@ -7,8 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_
-#define WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_
+#ifndef WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_
+#define WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_
#include "webrtc/common_types.h"
#include "webrtc/system_wrappers/interface/atomic32.h"
@@ -36,4 +36,4 @@
} // namespace internal
} // namespace webrtc
-#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_
+#endif // WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
index 9c3298c..41a800f 100644
--- a/video/video_receive_stream.cc
+++ b/video/video_receive_stream.cc
@@ -52,14 +52,7 @@
// TODO(pbos): This is not fine grained enough...
rtp_rtcp_->SetNACKStatus(channel_, config_.rtp.nack.rtp_history_ms > 0);
rtp_rtcp_->SetKeyFrameRequestMethod(channel_, kViEKeyFrameRequestPliRtcp);
- switch (config_.rtp.rtcp_mode) {
- case newapi::kRtcpCompound:
- rtp_rtcp_->SetRTCPStatus(channel_, kRtcpCompound_RFC4585);
- break;
- case newapi::kRtcpReducedSize:
- rtp_rtcp_->SetRTCPStatus(channel_, kRtcpNonCompound_RFC5506);
- break;
- }
+ SetRtcpMode(config_.rtp.rtcp_mode);
assert(config_.rtp.remote_ssrc != 0);
// TODO(pbos): What's an appropriate local_ssrc for receive-only streams?
@@ -264,5 +257,24 @@
return 0;
}
+
+void VideoReceiveStream::SignalNetworkState(Call::NetworkState state) {
+ if (state == Call::kNetworkUp)
+ SetRtcpMode(config_.rtp.rtcp_mode);
+ network_->SetNetworkTransmissionState(channel_, state == Call::kNetworkUp);
+ if (state == Call::kNetworkDown)
+ rtp_rtcp_->SetRTCPStatus(channel_, kRtcpNone);
+}
+
+void VideoReceiveStream::SetRtcpMode(newapi::RtcpMode mode) {
+ switch (mode) {
+ case newapi::kRtcpCompound:
+ rtp_rtcp_->SetRTCPStatus(channel_, kRtcpCompound_RFC4585);
+ break;
+ case newapi::kRtcpReducedSize:
+ rtp_rtcp_->SetRTCPStatus(channel_, kRtcpNonCompound_RFC5506);
+ break;
+ }
+}
} // namespace internal
} // namespace webrtc
diff --git a/video/video_receive_stream.h b/video/video_receive_stream.h
index 2a3c6df..6894828 100644
--- a/video/video_receive_stream.h
+++ b/video/video_receive_stream.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "webrtc/call.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/video_render/include/video_render_defines.h"
#include "webrtc/system_wrappers/interface/clock.h"
@@ -40,7 +41,6 @@
class VideoReceiveStream : public webrtc::VideoReceiveStream,
public I420FrameCallback,
public VideoRenderCallback {
-
public:
VideoReceiveStream(webrtc::VideoEngine* video_engine,
const VideoReceiveStream::Config& config,
@@ -62,11 +62,14 @@
virtual int32_t RenderFrame(const uint32_t stream_id,
I420VideoFrame& video_frame) OVERRIDE;
- public:
+ void SignalNetworkState(Call::NetworkState state);
+
virtual bool DeliverRtcp(const uint8_t* packet, size_t length);
virtual bool DeliverRtp(const uint8_t* packet, size_t length);
private:
+ void SetRtcpMode(newapi::RtcpMode mode);
+
TransportAdapter transport_adapter_;
EncodedFrameCallbackAdapter encoded_frame_proxy_;
const VideoReceiveStream::Config config_;
diff --git a/video/video_send_stream.cc b/video/video_send_stream.cc
index f9bbd57..6e8f238 100644
--- a/video/video_send_stream.cc
+++ b/video/video_send_stream.cc
@@ -10,6 +10,7 @@
#include "webrtc/video/video_send_stream.h"
+#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
@@ -108,21 +109,23 @@
}
namespace internal {
-VideoSendStream::VideoSendStream(newapi::Transport* transport,
- CpuOveruseObserver* overuse_observer,
- webrtc::VideoEngine* video_engine,
- const VideoSendStream::Config& config,
- const std::vector<VideoStream> video_streams,
- const void* encoder_settings,
- int base_channel,
- int start_bitrate_bps)
+VideoSendStream::VideoSendStream(
+ newapi::Transport* transport,
+ CpuOveruseObserver* overuse_observer,
+ webrtc::VideoEngine* video_engine,
+ const VideoSendStream::Config& config,
+ const VideoEncoderConfig& encoder_config,
+ const std::map<uint32_t, RtpState>& suspended_ssrcs,
+ int base_channel,
+ int start_bitrate_bps)
: transport_adapter_(transport),
encoded_frame_proxy_(config.post_encode_callback),
config_(config),
start_bitrate_bps_(start_bitrate_bps),
+ suspended_ssrcs_(suspended_ssrcs),
external_codec_(NULL),
channel_(-1),
- stats_proxy_(new SendStatisticsProxy(config, this)) {
+ stats_proxy_(config) {
video_engine_base_ = ViEBase::GetInterface(video_engine);
video_engine_base_->CreateChannel(channel_, base_channel);
assert(channel_ != -1);
@@ -173,6 +176,8 @@
rtp_rtcp_->SetNACKStatus(channel_, config_.rtp.nack.rtp_history_ms > 0);
}
+ ConfigureSsrcs();
+
char rtcp_cname[ViERTP_RTCP::KMaxRTCPCNameLength];
assert(config_.rtp.c_name.length() < ViERTP_RTCP::KMaxRTCPCNameLength);
strncpy(rtcp_cname, config_.rtp.c_name.c_str(), sizeof(rtcp_cname) - 1);
@@ -205,12 +210,14 @@
}
codec_ = ViECodec::GetInterface(video_engine);
- if (!ReconfigureVideoEncoder(video_streams, encoder_settings))
+ if (!ReconfigureVideoEncoder(encoder_config))
abort();
if (overuse_observer)
video_engine_base_->RegisterCpuOveruseObserver(channel_, overuse_observer);
+ video_engine_base_->RegisterSendSideDelayObserver(channel_, &stats_proxy_);
+
image_process_ = ViEImageProcess::GetInterface(video_engine);
image_process_->RegisterPreEncodeCallback(channel_,
config_.pre_encode_callback);
@@ -223,26 +230,26 @@
codec_->SuspendBelowMinBitrate(channel_);
rtp_rtcp_->RegisterSendChannelRtcpStatisticsCallback(channel_,
- stats_proxy_.get());
+ &stats_proxy_);
rtp_rtcp_->RegisterSendChannelRtpStatisticsCallback(channel_,
- stats_proxy_.get());
- rtp_rtcp_->RegisterSendBitrateObserver(channel_, stats_proxy_.get());
- rtp_rtcp_->RegisterSendFrameCountObserver(channel_, stats_proxy_.get());
+ &stats_proxy_);
+ rtp_rtcp_->RegisterSendBitrateObserver(channel_, &stats_proxy_);
+ rtp_rtcp_->RegisterSendFrameCountObserver(channel_, &stats_proxy_);
- codec_->RegisterEncoderObserver(channel_, *stats_proxy_);
- capture_->RegisterObserver(capture_id_, *stats_proxy_);
+ codec_->RegisterEncoderObserver(channel_, stats_proxy_);
+ capture_->RegisterObserver(capture_id_, stats_proxy_);
}
VideoSendStream::~VideoSendStream() {
capture_->DeregisterObserver(capture_id_);
codec_->DeregisterEncoderObserver(channel_);
- rtp_rtcp_->DeregisterSendFrameCountObserver(channel_, stats_proxy_.get());
- rtp_rtcp_->DeregisterSendBitrateObserver(channel_, stats_proxy_.get());
+ rtp_rtcp_->DeregisterSendFrameCountObserver(channel_, &stats_proxy_);
+ rtp_rtcp_->DeregisterSendBitrateObserver(channel_, &stats_proxy_);
rtp_rtcp_->DeregisterSendChannelRtpStatisticsCallback(channel_,
- stats_proxy_.get());
+ &stats_proxy_);
rtp_rtcp_->DeregisterSendChannelRtcpStatisticsCallback(channel_,
- stats_proxy_.get());
+ &stats_proxy_);
image_process_->DeRegisterPreEncodeCallback(channel_);
@@ -289,27 +296,45 @@
}
bool VideoSendStream::ReconfigureVideoEncoder(
- const std::vector<VideoStream>& streams,
- const void* encoder_settings) {
+ const VideoEncoderConfig& config) {
+ const std::vector<VideoStream>& streams = config.streams;
assert(!streams.empty());
assert(config_.rtp.ssrcs.size() >= streams.size());
- // TODO(pbos): Wire encoder_settings.
- assert(encoder_settings == NULL);
VideoCodec video_codec;
memset(&video_codec, 0, sizeof(video_codec));
- video_codec.codecType =
- (config_.encoder_settings.payload_name == "VP8" ? kVideoCodecVP8
- : kVideoCodecGeneric);
+ if (config_.encoder_settings.payload_name == "VP8") {
+ video_codec.codecType = kVideoCodecVP8;
+ } else if (config_.encoder_settings.payload_name == "H264") {
+ video_codec.codecType = kVideoCodecH264;
+ } else {
+ video_codec.codecType = kVideoCodecGeneric;
+ }
+ switch (config.content_type) {
+ case VideoEncoderConfig::kRealtimeVideo:
+ video_codec.mode = kRealtimeVideo;
+ break;
+ case VideoEncoderConfig::kScreenshare:
+ video_codec.mode = kScreensharing;
+ break;
+ }
if (video_codec.codecType == kVideoCodecVP8) {
- video_codec.codecSpecific.VP8.resilience = kResilientStream;
- video_codec.codecSpecific.VP8.numberOfTemporalLayers = 1;
- video_codec.codecSpecific.VP8.denoisingOn = true;
- video_codec.codecSpecific.VP8.errorConcealmentOn = false;
- video_codec.codecSpecific.VP8.automaticResizeOn = false;
- video_codec.codecSpecific.VP8.frameDroppingOn = true;
- video_codec.codecSpecific.VP8.keyFrameInterval = 3000;
+ video_codec.codecSpecific.VP8 = VideoEncoder::GetDefaultVp8Settings();
+ } else if (video_codec.codecType == kVideoCodecH264) {
+ video_codec.codecSpecific.H264 = VideoEncoder::GetDefaultH264Settings();
+ }
+
+ if (video_codec.codecType == kVideoCodecVP8) {
+ if (config.encoder_specific_settings != NULL) {
+ video_codec.codecSpecific.VP8 = *reinterpret_cast<const VideoCodecVP8*>(
+ config.encoder_specific_settings);
+ }
+ video_codec.codecSpecific.VP8.numberOfTemporalLayers =
+ static_cast<unsigned char>(streams.back().temporal_layers.size());
+ } else {
+ // TODO(pbos): Support encoder_settings codec-agnostically.
+ assert(config.encoder_specific_settings == NULL);
}
strncpy(video_codec.plName,
@@ -339,8 +364,8 @@
sim_stream->targetBitrate = streams[i].target_bitrate_bps / 1000;
sim_stream->maxBitrate = streams[i].max_bitrate_bps / 1000;
sim_stream->qpMax = streams[i].max_qp;
- // TODO(pbos): Implement mapping for temporal layers.
- assert(streams[i].temporal_layers.empty());
+ sim_stream->numberOfTemporalLayers =
+ static_cast<unsigned char>(streams[i].temporal_layers.size());
video_codec.width = std::max(video_codec.width,
static_cast<unsigned short>(streams[i].width));
@@ -373,38 +398,7 @@
assert(streams[0].max_framerate > 0);
video_codec.maxFramerate = streams[0].max_framerate;
- if (codec_->SetSendCodec(channel_, video_codec) != 0)
- return false;
-
- for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) {
- rtp_rtcp_->SetLocalSSRC(channel_,
- config_.rtp.ssrcs[i],
- kViEStreamTypeNormal,
- static_cast<unsigned char>(i));
- }
-
- if (config_.rtp.rtx.ssrcs.empty()) {
- assert(!config_.rtp.rtx.pad_with_redundant_payloads);
- return true;
- }
-
- // Set up RTX.
- assert(config_.rtp.rtx.ssrcs.size() == config_.rtp.ssrcs.size());
- for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) {
- rtp_rtcp_->SetLocalSSRC(channel_,
- config_.rtp.rtx.ssrcs[i],
- kViEStreamTypeRtx,
- static_cast<unsigned char>(i));
- }
-
- if (config_.rtp.rtx.pad_with_redundant_payloads) {
- rtp_rtcp_->SetPadWithRedundantPayloads(channel_, true);
- }
-
- assert(config_.rtp.rtx.payload_type >= 0);
- rtp_rtcp_->SetRtxSendPayloadType(channel_, config_.rtp.rtx.payload_type);
-
- return true;
+ return codec_->SetSendCodec(channel_, video_codec) == 0;
}
bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
@@ -413,18 +407,69 @@
}
VideoSendStream::Stats VideoSendStream::GetStats() const {
- return stats_proxy_->GetStats();
+ return stats_proxy_.GetStats();
}
-bool VideoSendStream::GetSendSideDelay(VideoSendStream::Stats* stats) {
- return codec_->GetSendSideDelay(
- channel_, &stats->avg_delay_ms, &stats->max_delay_ms);
+void VideoSendStream::ConfigureSsrcs() {
+ for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) {
+ uint32_t ssrc = config_.rtp.ssrcs[i];
+ rtp_rtcp_->SetLocalSSRC(
+ channel_, ssrc, kViEStreamTypeNormal, static_cast<unsigned char>(i));
+ RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc);
+ if (it != suspended_ssrcs_.end())
+ rtp_rtcp_->SetRtpStateForSsrc(channel_, ssrc, it->second);
+ }
+
+ if (config_.rtp.rtx.ssrcs.empty()) {
+ assert(!config_.rtp.rtx.pad_with_redundant_payloads);
+ return;
+ }
+
+ // Set up RTX.
+ assert(config_.rtp.rtx.ssrcs.size() == config_.rtp.ssrcs.size());
+ for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) {
+ uint32_t ssrc = config_.rtp.rtx.ssrcs[i];
+ rtp_rtcp_->SetLocalSSRC(channel_,
+ config_.rtp.rtx.ssrcs[i],
+ kViEStreamTypeRtx,
+ static_cast<unsigned char>(i));
+ RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc);
+ if (it != suspended_ssrcs_.end())
+ rtp_rtcp_->SetRtpStateForSsrc(channel_, ssrc, it->second);
+ }
+
+ if (config_.rtp.rtx.pad_with_redundant_payloads) {
+ rtp_rtcp_->SetPadWithRedundantPayloads(channel_, true);
+ }
+
+ assert(config_.rtp.rtx.payload_type >= 0);
+ rtp_rtcp_->SetRtxSendPayloadType(channel_, config_.rtp.rtx.payload_type);
}
-std::string VideoSendStream::GetCName() {
- char rtcp_cname[ViERTP_RTCP::KMaxRTCPCNameLength];
- rtp_rtcp_->GetRTCPCName(channel_, rtcp_cname);
- return rtcp_cname;
+std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const {
+ std::map<uint32_t, RtpState> rtp_states;
+ for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) {
+ uint32_t ssrc = config_.rtp.ssrcs[i];
+ rtp_states[ssrc] = rtp_rtcp_->GetRtpStateForSsrc(channel_, ssrc);
+ }
+
+ for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) {
+ uint32_t ssrc = config_.rtp.rtx.ssrcs[i];
+ rtp_states[ssrc] = rtp_rtcp_->GetRtpStateForSsrc(channel_, ssrc);
+ }
+
+ return rtp_states;
+}
+
+void VideoSendStream::SignalNetworkState(Call::NetworkState state) {
+ // When network goes up, enable RTCP status before setting transmission state.
+ // When it goes down, disable RTCP afterwards. This ensures that any packets
+ // sent due to the network state changed will not be dropped.
+ if (state == Call::kNetworkUp)
+ rtp_rtcp_->SetRTCPStatus(channel_, kRtcpCompound_RFC4585);
+ network_->SetNetworkTransmissionState(channel_, state == Call::kNetworkUp);
+ if (state == Call::kNetworkDown)
+ rtp_rtcp_->SetRTCPStatus(channel_, kRtcpNone);
}
} // namespace internal
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index ed77665..8a77852 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -11,7 +11,12 @@
#ifndef WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_
#define WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_
+#include <map>
+#include <vector>
+
+#include "webrtc/call.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
+#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/video/encoded_frame_callback_adapter.h"
#include "webrtc/video/send_statistics_proxy.h"
#include "webrtc/video/transport_adapter.h"
@@ -35,15 +40,14 @@
namespace internal {
class VideoSendStream : public webrtc::VideoSendStream,
- public VideoSendStreamInput,
- public SendStatisticsProxy::StatsProvider {
+ public VideoSendStreamInput {
public:
VideoSendStream(newapi::Transport* transport,
CpuOveruseObserver* overuse_observer,
webrtc::VideoEngine* video_engine,
const VideoSendStream::Config& config,
- const std::vector<VideoStream> video_streams,
- const void* encoder_settings,
+ const VideoEncoderConfig& encoder_config,
+ const std::map<uint32_t, RtpState>& suspended_ssrcs,
int base_channel,
int start_bitrate);
@@ -52,8 +56,8 @@
virtual void Start() OVERRIDE;
virtual void Stop() OVERRIDE;
- virtual bool ReconfigureVideoEncoder(const std::vector<VideoStream>& streams,
- const void* encoder_settings) OVERRIDE;
+ virtual bool ReconfigureVideoEncoder(
+ const VideoEncoderConfig& config) OVERRIDE;
virtual Stats GetStats() const OVERRIDE;
@@ -65,16 +69,18 @@
// From webrtc::VideoSendStream.
virtual VideoSendStreamInput* Input() OVERRIDE;
- protected:
- // From SendStatisticsProxy::StreamStatsProvider.
- virtual bool GetSendSideDelay(VideoSendStream::Stats* stats) OVERRIDE;
- virtual std::string GetCName() OVERRIDE;
+ typedef std::map<uint32_t, RtpState> RtpStateMap;
+ RtpStateMap GetRtpStates() const;
+
+ void SignalNetworkState(Call::NetworkState state);
private:
+ void ConfigureSsrcs();
TransportAdapter transport_adapter_;
EncodedFrameCallbackAdapter encoded_frame_proxy_;
const VideoSendStream::Config config_;
const int start_bitrate_bps_;
+ std::map<uint32_t, RtpState> suspended_ssrcs_;
ViEBase* video_engine_base_;
ViECapture* capture_;
@@ -88,7 +94,7 @@
int channel_;
int capture_id_;
- const scoped_ptr<SendStatisticsProxy> stats_proxy_;
+ SendStatisticsProxy stats_proxy_;
};
} // namespace internal
} // namespace webrtc
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index dcbcfe1..6c2fa39 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -13,6 +13,8 @@
#include "webrtc/call.h"
#include "webrtc/common_video/interface/i420_video_frame.h"
+#include "webrtc/common_video/interface/native_handle.h"
+#include "webrtc/common_video/interface/texture_video_frame.h"
#include "webrtc/frame_callback.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
@@ -20,16 +22,15 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/event_wrapper.h"
+#include "webrtc/system_wrappers/interface/ref_count.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/system_wrappers/interface/scoped_vector.h"
#include "webrtc/system_wrappers/interface/sleep.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
-#include "webrtc/test/direct_transport.h"
+#include "webrtc/system_wrappers/interface/logging.h"
+#include "webrtc/test/call_test.h"
#include "webrtc/test/configurable_frame_size_encoder.h"
-#include "webrtc/test/encoder_settings.h"
-#include "webrtc/test/fake_encoder.h"
-#include "webrtc/test/frame_generator_capturer.h"
#include "webrtc/test/null_transport.h"
-#include "webrtc/test/rtp_rtcp_observer.h"
#include "webrtc/test/testsupport/perf_test.h"
#include "webrtc/video/transport_adapter.h"
#include "webrtc/video_send_stream.h"
@@ -38,208 +39,61 @@
enum VideoFormat { kGeneric, kVP8, };
-class VideoSendStreamTest : public ::testing::Test {
+void ExpectEqualFrames(const I420VideoFrame& frame1,
+ const I420VideoFrame& frame2);
+void ExpectEqualTextureFrames(const I420VideoFrame& frame1,
+ const I420VideoFrame& frame2);
+void ExpectEqualBufferFrames(const I420VideoFrame& frame1,
+ const I420VideoFrame& frame2);
+void ExpectEqualFramesVector(const std::vector<I420VideoFrame*>& frames1,
+ const std::vector<I420VideoFrame*>& frames2);
+I420VideoFrame* CreateI420VideoFrame(int width, int height, uint8_t data);
+
+class FakeNativeHandle : public NativeHandle {
public:
- VideoSendStreamTest()
- : send_stream_(NULL), fake_encoder_(Clock::GetRealTimeClock()) {}
-
- protected:
- void RunSendTest(Call* call,
- test::RtpRtcpObserver* observer) {
- send_stream_ =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(
- send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
- send_stream_->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, observer->Wait());
-
- observer->StopSending();
- frame_generator_capturer->Stop();
- send_stream_->Stop();
- call->DestroyVideoSendStream(send_stream_);
- }
-
- void CreateTestConfig(Call* call, size_t num_streams) {
- assert(num_streams <= kNumSendSsrcs);
- send_config_ = call->GetDefaultSendConfig();
- send_config_.encoder_settings.encoder = &fake_encoder_;
- send_config_.encoder_settings.payload_name = "FAKE";
- send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
- video_streams_ = test::CreateVideoStreams(num_streams);
- send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
- for (size_t i = 0; i < num_streams; ++i)
- send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]);
- }
-
- void TestNackRetransmission(uint32_t retransmit_ssrc,
- uint8_t retransmit_payload_type);
-
- void TestPacketFragmentationSize(VideoFormat format, bool with_fec);
-
- void SendsSetSsrcs(size_t num_ssrcs, bool send_single_ssrc_first);
-
- enum { kNumSendSsrcs = 3 };
- static const uint8_t kSendPayloadType;
- static const uint8_t kSendRtxPayloadType;
- static const uint8_t kFakeSendPayloadType;
- static const uint32_t kSendSsrc;
- static const uint32_t kSendRtxSsrc;
- static const uint32_t kSendSsrcs[kNumSendSsrcs];
-
- VideoSendStream::Config send_config_;
- std::vector<VideoStream> video_streams_;
- VideoSendStream* send_stream_;
- test::FakeEncoder fake_encoder_;
+ FakeNativeHandle() {}
+ virtual ~FakeNativeHandle() {}
+ virtual void* GetHandle() { return NULL; }
};
-const uint8_t VideoSendStreamTest::kSendPayloadType = 100;
-const uint8_t VideoSendStreamTest::kFakeSendPayloadType = 125;
-const uint8_t VideoSendStreamTest::kSendRtxPayloadType = 98;
-const uint32_t VideoSendStreamTest::kSendRtxSsrc = 0xBADCAFE;
-const uint32_t VideoSendStreamTest::kSendSsrcs[kNumSendSsrcs] = {
- 0xC0FFED, 0xC0FFEE, 0xC0FFEF};
-const uint32_t VideoSendStreamTest::kSendSsrc =
- VideoSendStreamTest::kSendSsrcs[0];
-
-void VideoSendStreamTest::SendsSetSsrcs(size_t num_ssrcs,
- bool send_single_ssrc_first) {
- class SendSsrcObserver : public test::RtpRtcpObserver {
- public:
- SendSsrcObserver(const uint32_t* ssrcs,
- size_t num_ssrcs,
- bool send_single_ssrc_first)
- : RtpRtcpObserver(30 * 1000),
- ssrcs_to_observe_(num_ssrcs),
- expect_single_ssrc_(send_single_ssrc_first) {
- for (size_t i = 0; i < num_ssrcs; ++i)
- valid_ssrcs_[ssrcs[i]] = true;
- }
-
- virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
- RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
-
- // TODO(pbos): Reenable this part of the test when #1695 is resolved and
- // all SSRCs are allocated on startup. This test was observed
- // to fail on TSan as the codec gets set before the SSRCs are
- // set up and some frames are sent on a random-generated SSRC
- // before the correct SSRC gets set.
- // EXPECT_TRUE(valid_ssrcs_[header.ssrc])
- // << "Received unknown SSRC: " << header.ssrc;
- //
- // if (!valid_ssrcs_[header.ssrc])
- // observation_complete_->Set();
-
- if (!is_observed_[header.ssrc]) {
- is_observed_[header.ssrc] = true;
- --ssrcs_to_observe_;
- if (expect_single_ssrc_) {
- expect_single_ssrc_ = false;
- observation_complete_->Set();
- }
- }
-
- if (ssrcs_to_observe_ == 0)
- observation_complete_->Set();
-
- return SEND_PACKET;
- }
-
- private:
- std::map<uint32_t, bool> valid_ssrcs_;
- std::map<uint32_t, bool> is_observed_;
- size_t ssrcs_to_observe_;
- bool expect_single_ssrc_;
- } observer(kSendSsrcs, num_ssrcs, send_single_ssrc_first);
-
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
-
- CreateTestConfig(call.get(), num_ssrcs);
-
- if (num_ssrcs > 1) {
- // Set low simulcast bitrates to not have to wait for bandwidth ramp-up.
- for (size_t i = 0; i < video_streams_.size(); ++i) {
- video_streams_[i].min_bitrate_bps = 10000;
- video_streams_[i].target_bitrate_bps = 10000;
- video_streams_[i].max_bitrate_bps = 10000;
- }
- }
-
- std::vector<VideoStream> all_streams = video_streams_;
- if (send_single_ssrc_first)
- video_streams_.resize(1);
-
- send_stream_ =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(
- send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
- send_stream_->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for "
- << (send_single_ssrc_first ? "first SSRC." : "SSRCs.");
-
- if (send_single_ssrc_first) {
- // Set full simulcast and continue with the rest of the SSRCs.
- send_stream_->ReconfigureVideoEncoder(all_streams, NULL);
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting on additional SSRCs.";
- }
-
- observer.StopSending();
- frame_generator_capturer->Stop();
- send_stream_->Stop();
- call->DestroyVideoSendStream(send_stream_);
-}
+class VideoSendStreamTest : public test::CallTest {
+ protected:
+ void TestNackRetransmission(uint32_t retransmit_ssrc,
+ uint8_t retransmit_payload_type);
+ void TestPacketFragmentationSize(VideoFormat format, bool with_fec);
+};
TEST_F(VideoSendStreamTest, CanStartStartedStream) {
test::NullTransport transport;
Call::Config call_config(&transport);
- scoped_ptr<Call> call(Call::Create(call_config));
+ CreateSenderCall(call_config);
- CreateTestConfig(call.get(), 1);
- VideoSendStream* stream =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- stream->Start();
- stream->Start();
- call->DestroyVideoSendStream(stream);
+ CreateSendConfig(1);
+ CreateStreams();
+ send_stream_->Start();
+ send_stream_->Start();
+ DestroyStreams();
}
TEST_F(VideoSendStreamTest, CanStopStoppedStream) {
test::NullTransport transport;
Call::Config call_config(&transport);
- scoped_ptr<Call> call(Call::Create(call_config));
+ CreateSenderCall(call_config);
- CreateTestConfig(call.get(), 1);
- VideoSendStream* stream =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- stream->Stop();
- stream->Stop();
- call->DestroyVideoSendStream(stream);
-}
-
-TEST_F(VideoSendStreamTest, SendsSetSsrc) { SendsSetSsrcs(1, false); }
-
-TEST_F(VideoSendStreamTest, DISABLED_SendsSetSimulcastSsrcs) {
- SendsSetSsrcs(kNumSendSsrcs, false);
-}
-
-TEST_F(VideoSendStreamTest, DISABLED_CanSwitchToUseAllSsrcs) {
- SendsSetSsrcs(kNumSendSsrcs, true);
+ CreateSendConfig(1);
+ CreateStreams();
+ send_stream_->Stop();
+ send_stream_->Stop();
+ DestroyStreams();
}
TEST_F(VideoSendStreamTest, SupportsCName) {
static std::string kCName = "PjQatC14dGfbVwGPUOA9IH7RlsFDbWl4AhXEiDsBizo=";
- class CNameObserver : public test::RtpRtcpObserver {
+ class CNameObserver : public test::SendTest {
public:
- CNameObserver() : RtpRtcpObserver(30 * 1000) {}
+ CNameObserver() : SendTest(kDefaultTimeoutMs) {}
+ private:
virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
RTCPUtility::RTCPParserV2 parser(packet, length, true);
EXPECT_TRUE(parser.IsValid());
@@ -256,29 +110,35 @@
return SEND_PACKET;
}
- } observer;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.c_name = kCName;
+ }
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.c_name = kCName;
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for RTCP with CNAME.";
+ }
+ } test;
- RunSendTest(call.get(), &observer);
+ RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
static const uint8_t kAbsSendTimeExtensionId = 13;
- class AbsoluteSendTimeObserver : public test::RtpRtcpObserver {
+ class AbsoluteSendTimeObserver : public test::SendTest {
public:
- AbsoluteSendTimeObserver() : RtpRtcpObserver(30 * 1000) {
+ AbsoluteSendTimeObserver() : SendTest(kDefaultTimeoutMs) {
EXPECT_TRUE(parser_->RegisterRtpHeaderExtension(
kRtpExtensionAbsoluteSendTime, kAbsSendTimeExtensionId));
}
virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
EXPECT_FALSE(header.extension.hasTransmissionTimeOffset);
EXPECT_TRUE(header.extension.hasAbsoluteSendTime);
@@ -288,44 +148,38 @@
return SEND_PACKET;
}
- } observer;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
+ }
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for single RTP packet.";
+ }
+ } test;
- RunSendTest(call.get(), &observer);
+ RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, SupportsTransmissionTimeOffset) {
static const uint8_t kTOffsetExtensionId = 13;
- class DelayedEncoder : public test::FakeEncoder {
+ class TransmissionTimeOffsetObserver : public test::SendTest {
public:
- explicit DelayedEncoder(Clock* clock) : test::FakeEncoder(clock) {}
- virtual int32_t Encode(const I420VideoFrame& input_image,
- const CodecSpecificInfo* codec_specific_info,
- const std::vector<VideoFrameType>* frame_types)
- OVERRIDE {
- // A delay needs to be introduced to assure that we get a timestamp
- // offset.
- SleepMs(5);
- return FakeEncoder::Encode(input_image, codec_specific_info, frame_types);
- }
- } encoder(Clock::GetRealTimeClock());
-
- class TransmissionTimeOffsetObserver : public test::RtpRtcpObserver {
- public:
- TransmissionTimeOffsetObserver() : RtpRtcpObserver(30 * 1000) {
+ TransmissionTimeOffsetObserver()
+ : SendTest(kDefaultTimeoutMs), encoder_(Clock::GetRealTimeClock()) {
EXPECT_TRUE(parser_->RegisterRtpHeaderExtension(
kRtpExtensionTransmissionTimeOffset, kTOffsetExtensionId));
}
+ private:
virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
EXPECT_TRUE(header.extension.hasTransmissionTimeOffset);
EXPECT_FALSE(header.extension.hasAbsoluteSendTime);
@@ -335,17 +189,40 @@
return SEND_PACKET;
}
- } observer;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->encoder_settings.encoder = &encoder_;
+ send_config->rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kTOffset, kTOffsetExtensionId));
+ }
- CreateTestConfig(call.get(), 1);
- send_config_.encoder_settings.encoder = &encoder;
- send_config_.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kTOffset, kTOffsetExtensionId));
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting single RTP packet.";
+ }
- RunSendTest(call.get(), &observer);
+ class DelayedEncoder : public test::FakeEncoder {
+ public:
+ explicit DelayedEncoder(Clock* clock) : test::FakeEncoder(clock) {}
+ virtual int32_t Encode(
+ const I420VideoFrame& input_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const std::vector<VideoFrameType>* frame_types) OVERRIDE {
+ // A delay needs to be introduced to assure that we get a timestamp
+ // offset.
+ SleepMs(5);
+ return FakeEncoder::Encode(
+ input_image, codec_specific_info, frame_types);
+ }
+ };
+
+ DelayedEncoder encoder_;
+ } test;
+
+ RunBaseTest(&test);
}
class FakeReceiveStatistics : public NullReceiveStatistics {
@@ -412,32 +289,29 @@
test::NullTransport transport;
Call::Config call_config(&transport);
- scoped_ptr<Call> call(Call::Create(call_config));
+ CreateSenderCall(call_config);
- CreateTestConfig(call.get(), 1);
- VideoSendStream* video_send_stream =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- video_send_stream->Start();
+ CreateSendConfig(1);
+ CreateStreams();
+ send_stream_->Start();
I420VideoFrame frame;
frame.CreateEmptyFrame(
kWidth, kHeight, kWidth, (kWidth + 1) / 2, (kWidth + 1) / 2);
uint8_t* old_y_buffer = frame.buffer(kYPlane);
- video_send_stream->Input()->SwapFrame(&frame);
+ send_stream_->Input()->SwapFrame(&frame);
EXPECT_NE(frame.buffer(kYPlane), old_y_buffer);
- call->DestroyVideoSendStream(video_send_stream);
+ DestroyStreams();
}
TEST_F(VideoSendStreamTest, SupportsFec) {
- static const int kRedPayloadType = 118;
- static const int kUlpfecPayloadType = 119;
- class FecObserver : public test::RtpRtcpObserver {
+ class FecObserver : public test::SendTest {
public:
FecObserver()
- : RtpRtcpObserver(30 * 1000),
+ : SendTest(kDefaultTimeoutMs),
transport_adapter_(SendTransport()),
send_count_(0),
received_media_(false),
@@ -445,21 +319,22 @@
transport_adapter_.Enable();
}
+ private:
virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
// Send lossy receive reports to trigger FEC enabling.
if (send_count_++ % 2 != 0) {
// Receive statistics reporting having lost 50% of the packets.
FakeReceiveStatistics lossy_receive_stats(
- kSendSsrc, header.sequenceNumber, send_count_ / 2, 127);
+ kSendSsrcs[0], header.sequenceNumber, send_count_ / 2, 127);
RTCPSender rtcp_sender(
0, false, Clock::GetRealTimeClock(), &lossy_receive_stats);
EXPECT_EQ(0, rtcp_sender.RegisterSendTransport(&transport_adapter_));
rtcp_sender.SetRTCPStatus(kRtcpNonCompound);
- rtcp_sender.SetRemoteSSRC(kSendSsrc);
+ rtcp_sender.SetRemoteSSRC(kSendSsrcs[0]);
RTCPSender::FeedbackState feedback_state;
@@ -482,33 +357,35 @@
return SEND_PACKET;
}
- private:
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.fec.red_payload_type = kRedPayloadType;
+ send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_TRUE(Wait()) << "Timed out waiting for FEC and media packets.";
+ }
+
internal::TransportAdapter transport_adapter_;
int send_count_;
bool received_media_;
bool received_fec_;
- } observer;
+ } test;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
-
- observer.SetReceivers(call->Receiver(), NULL);
-
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.fec.red_payload_type = kRedPayloadType;
- send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
-
- RunSendTest(call.get(), &observer);
+ RunBaseTest(&test);
}
void VideoSendStreamTest::TestNackRetransmission(
uint32_t retransmit_ssrc,
uint8_t retransmit_payload_type) {
- class NackObserver : public test::RtpRtcpObserver {
+ class NackObserver : public test::SendTest {
public:
explicit NackObserver(uint32_t retransmit_ssrc,
uint8_t retransmit_payload_type)
- : RtpRtcpObserver(30 * 1000),
+ : SendTest(kDefaultTimeoutMs),
transport_adapter_(SendTransport()),
send_count_(0),
retransmit_ssrc_(retransmit_ssrc),
@@ -517,9 +394,10 @@
transport_adapter_.Enable();
}
+ private:
virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
// Nack second packet after receiving the third one.
if (++send_count_ == 3) {
@@ -531,7 +409,7 @@
EXPECT_EQ(0, rtcp_sender.RegisterSendTransport(&transport_adapter_));
rtcp_sender.SetRTCPStatus(kRtcpNonCompound);
- rtcp_sender.SetRemoteSSRC(kSendSsrc);
+ rtcp_sender.SetRemoteSSRC(kSendSsrcs[0]);
RTCPSender::FeedbackState feedback_state;
@@ -542,8 +420,10 @@
uint16_t sequence_number = header.sequenceNumber;
- if (header.ssrc == retransmit_ssrc_ && retransmit_ssrc_ != kSendSsrc) {
- // Not kSendSsrc, assume correct RTX packet. Extract sequence number.
+ if (header.ssrc == retransmit_ssrc_ &&
+ retransmit_ssrc_ != kSendSsrcs[0]) {
+ // Not kSendSsrcs[0], assume correct RTX packet. Extract sequence
+ // number.
const uint8_t* rtx_header = packet + header.headerLength;
sequence_number = (rtx_header[0] << 8) + rtx_header[1];
}
@@ -557,55 +437,63 @@
return SEND_PACKET;
}
- private:
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ send_config->rtp.rtx.payload_type = retransmit_payload_type_;
+ if (retransmit_ssrc_ != kSendSsrcs[0])
+ send_config->rtp.rtx.ssrcs.push_back(retransmit_ssrc_);
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for NACK retransmission.";
+ }
+
internal::TransportAdapter transport_adapter_;
int send_count_;
uint32_t retransmit_ssrc_;
uint8_t retransmit_payload_type_;
int nacked_sequence_number_;
- } observer(retransmit_ssrc, retransmit_payload_type);
+ } test(retransmit_ssrc, retransmit_payload_type);
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
- observer.SetReceivers(call->Receiver(), NULL);
-
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.nack.rtp_history_ms = 1000;
- send_config_.rtp.rtx.payload_type = retransmit_payload_type;
- if (retransmit_ssrc != kSendSsrc)
- send_config_.rtp.rtx.ssrcs.push_back(retransmit_ssrc);
-
- RunSendTest(call.get(), &observer);
+ RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, RetransmitsNack) {
// Normal NACKs should use the send SSRC.
- TestNackRetransmission(kSendSsrc, kFakeSendPayloadType);
+ TestNackRetransmission(kSendSsrcs[0], kFakeSendPayloadType);
}
TEST_F(VideoSendStreamTest, RetransmitsNackOverRtx) {
// NACKs over RTX should use a separate SSRC.
- TestNackRetransmission(kSendRtxSsrc, kSendRtxPayloadType);
+ TestNackRetransmission(kSendRtxSsrcs[0], kSendRtxPayloadType);
}
void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
bool with_fec) {
- static const int kRedPayloadType = 118;
- static const int kUlpfecPayloadType = 119;
+ // Use a fake encoder to output a frame of every size in the range [90, 290],
+ // for each size making sure that the exact number of payload bytes received
+ // is correct and that packets are fragmented to respect max packet size.
+ static const uint32_t kMaxPacketSize = 128;
+ static const uint32_t start = 90;
+ static const uint32_t stop = 290;
+
// Observer that verifies that the expected number of packets and bytes
// arrive for each frame size, from start_size to stop_size.
- class FrameFragmentationObserver : public test::RtpRtcpObserver,
- public EncodedFrameObserver {
+ class FrameFragmentationTest : public test::SendTest,
+ public EncodedFrameObserver {
public:
- FrameFragmentationObserver(uint32_t max_packet_size,
- uint32_t start_size,
- uint32_t stop_size,
- test::ConfigurableFrameSizeEncoder* encoder,
- bool test_generic_packetization,
- bool use_fec)
- : RtpRtcpObserver(120 * 1000), // Timeout after two minutes.
+ FrameFragmentationTest(uint32_t max_packet_size,
+ uint32_t start_size,
+ uint32_t stop_size,
+ bool test_generic_packetization,
+ bool use_fec)
+ : SendTest(kLongTimeoutMs),
transport_adapter_(SendTransport()),
- encoder_(encoder),
+ encoder_(stop),
max_packet_size_(max_packet_size),
stop_size_(stop_size),
test_generic_packetization_(test_generic_packetization),
@@ -617,10 +505,12 @@
current_size_rtp_(start_size),
current_size_frame_(start_size) {
// Fragmentation required, this test doesn't make sense without it.
+ encoder_.SetFrameSize(start);
assert(stop_size > max_packet_size);
transport_adapter_.Enable();
}
+ private:
virtual Action OnSendRtp(const uint8_t* packet, size_t size) OVERRIDE {
uint32_t length = static_cast<int>(size);
RTPHeader header;
@@ -696,13 +586,13 @@
if (packet_count_++ % 2 != 0) {
// Receive statistics reporting having lost 50% of the packets.
FakeReceiveStatistics lossy_receive_stats(
- kSendSsrc, header.sequenceNumber, packet_count_ / 2, 127);
+ kSendSsrcs[0], header.sequenceNumber, packet_count_ / 2, 127);
RTCPSender rtcp_sender(
0, false, Clock::GetRealTimeClock(), &lossy_receive_stats);
EXPECT_EQ(0, rtcp_sender.RegisterSendTransport(&transport_adapter_));
rtcp_sender.SetRTCPStatus(kRtcpNonCompound);
- rtcp_sender.SetRemoteSSRC(kSendSsrc);
+ rtcp_sender.SetRemoteSSRC(kSendSsrcs[0]);
RTCPSender::FeedbackState feedback_state;
@@ -717,12 +607,39 @@
current_size_frame_.Value() < static_cast<int32_t>(stop_size_)) {
++current_size_frame_;
}
- encoder_->SetFrameSize(current_size_frame_.Value());
+ encoder_.SetFrameSize(current_size_frame_.Value());
}
- private:
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ if (use_fec_) {
+ send_config->rtp.fec.red_payload_type = kRedPayloadType;
+ send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
+ }
+
+ if (!test_generic_packetization_)
+ send_config->encoder_settings.payload_name = "VP8";
+
+ send_config->encoder_settings.encoder = &encoder_;
+ send_config->rtp.max_packet_size = kMaxPacketSize;
+ send_config->post_encode_callback = this;
+
+ // Add an extension header, to make the RTP header larger than the base
+ // length of 12 bytes.
+ static const uint8_t kAbsSendTimeExtensionId = 13;
+ send_config->rtp.extensions.push_back(
+ RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while observing incoming RTP packets.";
+ }
+
internal::TransportAdapter transport_adapter_;
- test::ConfigurableFrameSizeEncoder* const encoder_;
+ test::ConfigurableFrameSizeEncoder encoder_;
const uint32_t max_packet_size_;
const uint32_t stop_size_;
@@ -738,45 +655,12 @@
Atomic32 current_size_frame_;
};
- // Use a fake encoder to output a frame of every size in the range [90, 290],
- // for each size making sure that the exact number of payload bytes received
- // is correct and that packets are fragmented to respect max packet size.
- static const uint32_t kMaxPacketSize = 128;
- static const uint32_t start = 90;
- static const uint32_t stop = 290;
-
// Don't auto increment if FEC is used; continue sending frame size until
// a FEC packet has been received.
- test::ConfigurableFrameSizeEncoder encoder(stop);
- encoder.SetFrameSize(start);
+ FrameFragmentationTest test(
+ kMaxPacketSize, start, stop, format == kGeneric, with_fec);
- FrameFragmentationObserver observer(
- kMaxPacketSize, start, stop, &encoder, format == kGeneric, with_fec);
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
-
- observer.SetReceivers(call->Receiver(), NULL);
-
- CreateTestConfig(call.get(), 1);
- if (with_fec) {
- send_config_.rtp.fec.red_payload_type = kRedPayloadType;
- send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
- }
-
- if (format == kVP8)
- send_config_.encoder_settings.payload_name = "VP8";
-
- send_config_.encoder_settings.encoder = &encoder;
- send_config_.rtp.max_packet_size = kMaxPacketSize;
- send_config_.post_encode_callback = &observer;
-
- // Add an extension header, to make the RTP header larger than the base
- // length of 12 bytes.
- static const uint8_t kAbsSendTimeExtensionId = 13;
- send_config_.rtp.extensions.push_back(
- RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
-
- RunSendTest(call.get(), &observer);
+ RunBaseTest(&test);
}
// TODO(sprang): Is there any way of speeding up these tests?
@@ -808,13 +692,12 @@
TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
static const int kSuspendTimeFrames = 60; // Suspend for 2 seconds @ 30 fps.
- class RembObserver : public test::RtpRtcpObserver, public I420FrameCallback {
+ class RembObserver : public test::SendTest, public I420FrameCallback {
public:
- RembObserver(VideoSendStream** send_stream_ptr)
- : RtpRtcpObserver(30 * 1000), // Timeout after 30 seconds.
+ RembObserver()
+ : SendTest(kDefaultTimeoutMs),
transport_adapter_(&transport_),
clock_(Clock::GetRealTimeClock()),
- send_stream_ptr_(send_stream_ptr),
crit_(CriticalSectionWrapper::CreateCriticalSection()),
test_state_(kBeforeSuspend),
rtp_count_(0),
@@ -825,10 +708,7 @@
transport_adapter_.Enable();
}
- void SetReceiver(PacketReceiver* receiver) {
- transport_.SetReceiver(receiver);
- }
-
+ private:
virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
// Receive statistics reporting having lost 0% of the packets.
// This is needed for the send-side bitrate controller to work properly.
@@ -841,7 +721,7 @@
CriticalSectionScoped lock(crit_.get());
++rtp_count_;
RTPHeader header;
- EXPECT_TRUE(parser_->Parse(packet, static_cast<int>(length), &header));
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
last_sequence_number_ = header.sequenceNumber;
if (test_state_ == kBeforeSuspend) {
@@ -861,8 +741,7 @@
test_state_ = kWaitingForStats;
}
} else if (test_state_ == kWaitingForStats) {
- assert(*send_stream_ptr_);
- VideoSendStream::Stats stats = (*send_stream_ptr_)->GetStats();
+ VideoSendStream::Stats stats = stream_->GetStats();
if (stats.suspended == false) {
// Stats flipped to false. Test is complete.
observation_complete_->Set();
@@ -877,8 +756,7 @@
CriticalSectionScoped lock(crit_.get());
if (test_state_ == kDuringSuspend &&
++suspended_frame_count_ > kSuspendTimeFrames) {
- assert(*send_stream_ptr_);
- VideoSendStream::Stats stats = (*send_stream_ptr_)->GetStats();
+ VideoSendStream::Stats stats = stream_->GetStats();
EXPECT_TRUE(stats.suspended);
SendRtcpFeedback(high_remb_bps_);
test_state_ = kWaitingForPacket;
@@ -895,9 +773,39 @@
high_remb_bps_ = value;
}
- void Stop() { transport_.StopSending(); }
+ virtual void SetReceivers(
+ PacketReceiver* send_transport_receiver,
+ PacketReceiver* receive_transport_receiver) OVERRIDE {
+ transport_.SetReceiver(send_transport_receiver);
+ }
- private:
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ stream_ = send_stream;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
+ send_config->pre_encode_callback = this;
+ send_config->suspend_below_min_bitrate = true;
+ int min_bitrate_bps = encoder_config->streams[0].min_bitrate_bps;
+ set_low_remb_bps(min_bitrate_bps - 10000);
+ int threshold_window = std::max(min_bitrate_bps / 10, 10000);
+ ASSERT_GT(encoder_config->streams[0].max_bitrate_bps,
+ min_bitrate_bps + threshold_window + 5000);
+ set_high_remb_bps(min_bitrate_bps + threshold_window + 5000);
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out during suspend-below-min-bitrate test.";
+ transport_.StopSending();
+ }
+
enum TestState {
kBeforeSuspend,
kDuringSuspend,
@@ -908,12 +816,12 @@
virtual void SendRtcpFeedback(int remb_value)
EXCLUSIVE_LOCKS_REQUIRED(crit_) {
FakeReceiveStatistics receive_stats(
- kSendSsrc, last_sequence_number_, rtp_count_, 0);
+ kSendSsrcs[0], last_sequence_number_, rtp_count_, 0);
RTCPSender rtcp_sender(0, false, clock_, &receive_stats);
EXPECT_EQ(0, rtcp_sender.RegisterSendTransport(&transport_adapter_));
rtcp_sender.SetRTCPStatus(kRtcpNonCompound);
- rtcp_sender.SetRemoteSSRC(kSendSsrc);
+ rtcp_sender.SetRemoteSSRC(kSendSsrcs[0]);
if (remb_value > 0) {
rtcp_sender.SetREMBStatus(true);
rtcp_sender.SetREMBData(remb_value, 0, NULL);
@@ -925,7 +833,7 @@
internal::TransportAdapter transport_adapter_;
test::DirectTransport transport_;
Clock* const clock_;
- VideoSendStream** const send_stream_ptr_;
+ VideoSendStream* stream_;
const scoped_ptr<CriticalSectionWrapper> crit_;
TestState test_state_ GUARDED_BY(crit_);
@@ -934,34 +842,16 @@
int suspended_frame_count_ GUARDED_BY(crit_);
int low_remb_bps_ GUARDED_BY(crit_);
int high_remb_bps_ GUARDED_BY(crit_);
- } observer(&send_stream_);
- // Note that |send_stream_| is created in RunSendTest(), called below. This
- // is why a pointer to |send_stream_| must be provided here.
+ } test;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
- observer.SetReceiver(call->Receiver());
-
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.nack.rtp_history_ms = 1000;
- send_config_.pre_encode_callback = &observer;
- send_config_.suspend_below_min_bitrate = true;
- int min_bitrate_bps = video_streams_[0].min_bitrate_bps;
- observer.set_low_remb_bps(min_bitrate_bps - 10000);
- int threshold_window = std::max(min_bitrate_bps / 10, 10000);
- ASSERT_GT(video_streams_[0].max_bitrate_bps,
- min_bitrate_bps + threshold_window + 5000);
- observer.set_high_remb_bps(min_bitrate_bps + threshold_window + 5000);
-
- RunSendTest(call.get(), &observer);
- observer.Stop();
+ RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
- class PacketObserver : public test::RtpRtcpObserver {
+ class NoPaddingWhenVideoIsMuted : public test::SendTest {
public:
- PacketObserver()
- : RtpRtcpObserver(30 * 1000), // Timeout after 30 seconds.
+ NoPaddingWhenVideoIsMuted()
+ : SendTest(kDefaultTimeoutMs),
clock_(Clock::GetRealTimeClock()),
transport_adapter_(ReceiveTransport()),
crit_(CriticalSectionWrapper::CreateCriticalSection()),
@@ -970,11 +860,7 @@
transport_adapter_.Enable();
}
- void SetCapturer(test::FrameGeneratorCapturer* capturer) {
- CriticalSectionScoped lock(crit_.get());
- capturer_ = capturer;
- }
-
+ private:
virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
CriticalSectionScoped lock(crit_.get());
last_packet_time_ms_ = clock_->TimeInMilliseconds();
@@ -1004,46 +890,41 @@
return SEND_PACKET;
}
- private:
+ virtual void SetReceivers(
+ PacketReceiver* send_transport_receiver,
+ PacketReceiver* receive_transport_receiver) OVERRIDE {
+ RtpRtcpObserver::SetReceivers(send_transport_receiver,
+ send_transport_receiver);
+ }
+
+ virtual size_t GetNumStreams() const OVERRIDE { return 3; }
+
+ virtual void OnFrameGeneratorCapturerCreated(
+ test::FrameGeneratorCapturer* frame_generator_capturer) {
+ CriticalSectionScoped lock(crit_.get());
+ capturer_ = frame_generator_capturer;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for RTP packets to stop being sent.";
+ }
+
Clock* const clock_;
internal::TransportAdapter transport_adapter_;
const scoped_ptr<CriticalSectionWrapper> crit_;
int64_t last_packet_time_ms_ GUARDED_BY(crit_);
test::FrameGeneratorCapturer* capturer_ GUARDED_BY(crit_);
- } observer;
+ } test;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
- observer.SetReceivers(call->Receiver(), call->Receiver());
-
- CreateTestConfig(call.get(), 3);
-
- send_stream_ =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(
- send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
- observer.SetCapturer(frame_generator_capturer.get());
- send_stream_->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timed out while waiting for RTP packets to stop being sent.";
-
- observer.StopSending();
- frame_generator_capturer->Stop();
- send_stream_->Stop();
- call->DestroyVideoSendStream(send_stream_);
+ RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, ProducesStats) {
- static const std::string kCName =
- "PjQatC14dGfbVwGPUOA9IH7RlsFDbWl4AhXEiDsBizo=";
- static const uint32_t kTimeoutMs = 30 * 1000;
- class StatsObserver : public test::RtpRtcpObserver {
+ class ProducesStats : public test::SendTest {
public:
- StatsObserver()
- : RtpRtcpObserver(kTimeoutMs),
+ ProducesStats()
+ : SendTest(kDefaultTimeoutMs),
stream_(NULL),
event_(EventWrapper::Create()) {}
@@ -1053,10 +934,11 @@
return SEND_PACKET;
}
+ private:
bool WaitForFilledStats() {
Clock* clock = Clock::GetRealTimeClock();
int64_t now = clock->TimeInMilliseconds();
- int64_t stop_time = now + kTimeoutMs;
+ int64_t stop_time = now + kDefaultTimeoutMs;
while (now < stop_time) {
int64_t time_left = stop_time - now;
if (time_left > 0 && event_->Wait(time_left) == kEventSignaled &&
@@ -1071,9 +953,8 @@
bool CheckStats() {
VideoSendStream::Stats stats = stream_->GetStats();
// Check that all applicable data sources have been used.
- if (stats.input_frame_rate > 0 && stats.encode_frame_rate > 0 &&
- stats.avg_delay_ms > 0 && stats.c_name == kCName &&
- !stats.substreams.empty()) {
+ if (stats.input_frame_rate > 0 && stats.encode_frame_rate > 0
+ && !stats.substreams.empty()) {
uint32_t ssrc = stats.substreams.begin()->first;
EXPECT_NE(
config_.rtp.ssrcs.end(),
@@ -1083,7 +964,8 @@
// data is received from remote side. Tested in call tests instead.
const StreamStats& entry = stats.substreams[ssrc];
if (entry.key_frames > 0u && entry.bitrate_bps > 0 &&
- entry.rtp_stats.packets > 0u) {
+ entry.rtp_stats.packets > 0u && entry.avg_delay_ms > 0 &&
+ entry.max_delay_ms > 0) {
return true;
}
}
@@ -1092,36 +974,30 @@
void SetConfig(const VideoSendStream::Config& config) { config_ = config; }
- void SetSendStream(VideoSendStream* stream) { stream_ = stream; }
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ SetConfig(*send_config);
+ }
+
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ stream_ = send_stream;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_TRUE(WaitForFilledStats())
+ << "Timed out waiting for filled statistics.";
+ }
VideoSendStream* stream_;
VideoSendStream::Config config_;
scoped_ptr<EventWrapper> event_;
- } observer;
+ } test;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
-
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.c_name = kCName;
- observer.SetConfig(send_config_);
-
- send_stream_ =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- observer.SetSendStream(send_stream_);
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(
- send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
- send_stream_->Start();
- frame_generator_capturer->Start();
-
- EXPECT_TRUE(observer.WaitForFilledStats())
- << "Timed out waiting for filled statistics.";
-
- observer.StopSending();
- frame_generator_capturer->Stop();
- send_stream_->Stop();
- call->DestroyVideoSendStream(send_stream_);
+ RunBaseTest(&test);
}
// This test first observes "high" bitrate use at which point it sends a REMB to
@@ -1136,12 +1012,11 @@
static const int kHighBitrateBps = 150000;
static const int kRembBitrateBps = 80000;
static const int kRembRespectedBitrateBps = 100000;
- class BitrateObserver: public test::RtpRtcpObserver, public PacketReceiver {
+ class BitrateObserver : public test::SendTest, public PacketReceiver {
public:
BitrateObserver()
- : RtpRtcpObserver(30 * 1000),
+ : SendTest(kDefaultTimeoutMs),
feedback_transport_(ReceiveTransport()),
- send_stream_(NULL),
bitrate_capped_(false) {
RtpRtcp::Configuration config;
feedback_transport_.Enable();
@@ -1151,21 +1026,23 @@
rtp_rtcp_->SetRTCPStatus(kRtcpNonCompound);
}
- void SetSendStream(VideoSendStream* send_stream) {
- send_stream_ = send_stream;
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ stream_ = send_stream;
}
private:
virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
size_t length) OVERRIDE {
- if (RtpHeaderParser::IsRtcp(packet, static_cast<int>(length)))
+ if (RtpHeaderParser::IsRtcp(packet, length))
return DELIVERY_OK;
RTPHeader header;
- if (!parser_->Parse(packet, static_cast<int>(length), &header))
+ if (!parser_->Parse(packet, length, &header))
return DELIVERY_PACKET_ERROR;
- assert(send_stream_ != NULL);
- VideoSendStream::Stats stats = send_stream_->GetStats();
+ assert(stream_ != NULL);
+ VideoSendStream::Stats stats = stream_->GetStats();
if (!stats.substreams.empty()) {
EXPECT_EQ(1u, stats.substreams.size());
int bitrate_bps = stats.substreams.begin()->second.bitrate_bps;
@@ -1188,35 +1065,489 @@
return DELIVERY_OK;
}
+ virtual void SetReceivers(
+ PacketReceiver* send_transport_receiver,
+ PacketReceiver* receive_transport_receiver) OVERRIDE {
+ RtpRtcpObserver::SetReceivers(this, send_transport_receiver);
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->rtp.min_transmit_bitrate_bps = kMinTransmitBitrateBps;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timeout while waiting for low bitrate stats after REMB.";
+ }
+
scoped_ptr<RtpRtcp> rtp_rtcp_;
internal::TransportAdapter feedback_transport_;
- VideoSendStream* send_stream_;
+ VideoSendStream* stream_;
bool bitrate_capped_;
- } observer;
+ } test;
- Call::Config call_config(observer.SendTransport());
- scoped_ptr<Call> call(Call::Create(call_config));
- observer.SetReceivers(&observer, call->Receiver());
+ RunBaseTest(&test);
+}
- CreateTestConfig(call.get(), 1);
- send_config_.rtp.min_transmit_bitrate_bps = kMinTransmitBitrateBps;
- send_stream_ =
- call->CreateVideoSendStream(send_config_, video_streams_, NULL);
- observer.SetSendStream(send_stream_);
+TEST_F(VideoSendStreamTest, CapturesTextureAndI420VideoFrames) {
+ class FrameObserver : public I420FrameCallback {
+ public:
+ FrameObserver() : output_frame_event_(EventWrapper::Create()) {}
- scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
- test::FrameGeneratorCapturer::Create(
- send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
+ void FrameCallback(I420VideoFrame* video_frame) OVERRIDE {
+ // Clone the frame because the caller owns it.
+ output_frames_.push_back(video_frame->CloneFrame());
+ output_frame_event_->Set();
+ }
+
+ void WaitOutputFrame() {
+ const unsigned long kWaitFrameTimeoutMs = 3000;
+ EXPECT_EQ(kEventSignaled, output_frame_event_->Wait(kWaitFrameTimeoutMs))
+ << "Timeout while waiting for output frames.";
+ }
+
+ const std::vector<I420VideoFrame*>& output_frames() const {
+ return output_frames_.get();
+ }
+
+ private:
+ // Delivered output frames.
+ ScopedVector<I420VideoFrame> output_frames_;
+
+ // Indicate an output frame has arrived.
+ scoped_ptr<EventWrapper> output_frame_event_;
+ };
+
+ // Initialize send stream.
+ test::NullTransport transport;
+ CreateSenderCall(Call::Config(&transport));
+
+ CreateSendConfig(1);
+ FrameObserver observer;
+ send_config_.pre_encode_callback = &observer;
+ CreateStreams();
+
+ // Prepare five input frames. Send I420VideoFrame and TextureVideoFrame
+ // alternatively.
+ ScopedVector<I420VideoFrame> input_frames;
+ int width = static_cast<int>(encoder_config_.streams[0].width);
+ int height = static_cast<int>(encoder_config_.streams[0].height);
+ webrtc::RefCountImpl<FakeNativeHandle>* handle1 =
+ new webrtc::RefCountImpl<FakeNativeHandle>();
+ webrtc::RefCountImpl<FakeNativeHandle>* handle2 =
+ new webrtc::RefCountImpl<FakeNativeHandle>();
+ webrtc::RefCountImpl<FakeNativeHandle>* handle3 =
+ new webrtc::RefCountImpl<FakeNativeHandle>();
+ input_frames.push_back(new TextureVideoFrame(handle1, width, height, 1, 1));
+ input_frames.push_back(new TextureVideoFrame(handle2, width, height, 2, 2));
+ input_frames.push_back(CreateI420VideoFrame(width, height, 1));
+ input_frames.push_back(CreateI420VideoFrame(width, height, 2));
+ input_frames.push_back(new TextureVideoFrame(handle3, width, height, 3, 3));
+
send_stream_->Start();
- frame_generator_capturer->Start();
-
- EXPECT_EQ(kEventSignaled, observer.Wait())
- << "Timeout while waiting for low bitrate stats after REMB.";
-
- observer.StopSending();
- frame_generator_capturer->Stop();
+ for (size_t i = 0; i < input_frames.size(); i++) {
+ // Make a copy of the input frame because the buffer will be swapped.
+ scoped_ptr<I420VideoFrame> frame(input_frames[i]->CloneFrame());
+ send_stream_->Input()->SwapFrame(frame.get());
+ // Do not send the next frame too fast, so the frame dropper won't drop it.
+ if (i < input_frames.size() - 1)
+ SleepMs(1000 / encoder_config_.streams[0].max_framerate);
+ // Wait until the output frame is received before sending the next input
+ // frame. Or the previous input frame may be replaced without delivering.
+ observer.WaitOutputFrame();
+ }
send_stream_->Stop();
- call->DestroyVideoSendStream(send_stream_);
+
+ // Test if the input and output frames are the same. render_time_ms and
+ // timestamp are not compared because capturer sets those values.
+ ExpectEqualFramesVector(input_frames.get(), observer.output_frames());
+
+ DestroyStreams();
+}
+
+void ExpectEqualFrames(const I420VideoFrame& frame1,
+ const I420VideoFrame& frame2) {
+ if (frame1.native_handle() != NULL || frame2.native_handle() != NULL)
+ ExpectEqualTextureFrames(frame1, frame2);
+ else
+ ExpectEqualBufferFrames(frame1, frame2);
+}
+
+void ExpectEqualTextureFrames(const I420VideoFrame& frame1,
+ const I420VideoFrame& frame2) {
+ EXPECT_EQ(frame1.native_handle(), frame2.native_handle());
+ EXPECT_EQ(frame1.width(), frame2.width());
+ EXPECT_EQ(frame1.height(), frame2.height());
+}
+
+void ExpectEqualBufferFrames(const I420VideoFrame& frame1,
+ const I420VideoFrame& frame2) {
+ EXPECT_EQ(frame1.width(), frame2.width());
+ EXPECT_EQ(frame1.height(), frame2.height());
+ EXPECT_EQ(frame1.stride(kYPlane), frame2.stride(kYPlane));
+ EXPECT_EQ(frame1.stride(kUPlane), frame2.stride(kUPlane));
+ EXPECT_EQ(frame1.stride(kVPlane), frame2.stride(kVPlane));
+ EXPECT_EQ(frame1.ntp_time_ms(), frame2.ntp_time_ms());
+ ASSERT_EQ(frame1.allocated_size(kYPlane), frame2.allocated_size(kYPlane));
+ EXPECT_EQ(0,
+ memcmp(frame1.buffer(kYPlane),
+ frame2.buffer(kYPlane),
+ frame1.allocated_size(kYPlane)));
+ ASSERT_EQ(frame1.allocated_size(kUPlane), frame2.allocated_size(kUPlane));
+ EXPECT_EQ(0,
+ memcmp(frame1.buffer(kUPlane),
+ frame2.buffer(kUPlane),
+ frame1.allocated_size(kUPlane)));
+ ASSERT_EQ(frame1.allocated_size(kVPlane), frame2.allocated_size(kVPlane));
+ EXPECT_EQ(0,
+ memcmp(frame1.buffer(kVPlane),
+ frame2.buffer(kVPlane),
+ frame1.allocated_size(kVPlane)));
+}
+
+void ExpectEqualFramesVector(const std::vector<I420VideoFrame*>& frames1,
+ const std::vector<I420VideoFrame*>& frames2) {
+ EXPECT_EQ(frames1.size(), frames2.size());
+ for (size_t i = 0; i < std::min(frames1.size(), frames2.size()); ++i)
+ ExpectEqualFrames(*frames1[i], *frames2[i]);
+}
+
+I420VideoFrame* CreateI420VideoFrame(int width, int height, uint8_t data) {
+ I420VideoFrame* frame = new I420VideoFrame();
+ const int kSizeY = width * height * 2;
+ const int kSizeUV = width * height;
+ scoped_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]);
+ memset(buffer.get(), data, kSizeY);
+ frame->CreateFrame(kSizeY,
+ buffer.get(),
+ kSizeUV,
+ buffer.get(),
+ kSizeUV,
+ buffer.get(),
+ width,
+ height,
+ width,
+ width / 2,
+ width / 2);
+ frame->set_timestamp(data);
+ frame->set_ntp_time_ms(data);
+ frame->set_render_time_ms(data);
+ return frame;
+}
+
+TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
+ class EncoderStateObserver : public test::SendTest, public VideoEncoder {
+ public:
+ EncoderStateObserver()
+ : SendTest(kDefaultTimeoutMs),
+ crit_(CriticalSectionWrapper::CreateCriticalSection()),
+ initialized_(false),
+ callback_registered_(false),
+ num_releases_(0),
+ released_(false) {}
+
+ bool IsReleased() {
+ CriticalSectionScoped lock(crit_.get());
+ return released_;
+ }
+
+ bool IsReadyForEncode() {
+ CriticalSectionScoped lock(crit_.get());
+ return initialized_ && callback_registered_;
+ }
+
+ size_t num_releases() {
+ CriticalSectionScoped lock(crit_.get());
+ return num_releases_;
+ }
+
+ private:
+ virtual int32_t InitEncode(const VideoCodec* codecSettings,
+ int32_t numberOfCores,
+ uint32_t maxPayloadSize) OVERRIDE {
+ CriticalSectionScoped lock(crit_.get());
+ EXPECT_FALSE(initialized_);
+ initialized_ = true;
+ released_ = false;
+ return 0;
+ }
+
+ virtual int32_t Encode(
+ const I420VideoFrame& inputImage,
+ const CodecSpecificInfo* codecSpecificInfo,
+ const std::vector<VideoFrameType>* frame_types) OVERRIDE {
+ EXPECT_TRUE(IsReadyForEncode());
+
+ observation_complete_->Set();
+ return 0;
+ }
+
+ virtual int32_t RegisterEncodeCompleteCallback(
+ EncodedImageCallback* callback) OVERRIDE {
+ CriticalSectionScoped lock(crit_.get());
+ EXPECT_TRUE(initialized_);
+ callback_registered_ = true;
+ return 0;
+ }
+
+ virtual int32_t Release() OVERRIDE {
+ CriticalSectionScoped lock(crit_.get());
+ EXPECT_TRUE(IsReadyForEncode());
+ EXPECT_FALSE(released_);
+ initialized_ = false;
+ callback_registered_ = false;
+ released_ = true;
+ ++num_releases_;
+ return 0;
+ }
+
+ virtual int32_t SetChannelParameters(uint32_t packetLoss,
+ int rtt) OVERRIDE {
+ EXPECT_TRUE(IsReadyForEncode());
+ return 0;
+ }
+
+ virtual int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) OVERRIDE {
+ EXPECT_TRUE(IsReadyForEncode());
+ return 0;
+ }
+
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ // Encoder initialization should be done in stream construction before
+ // starting.
+ EXPECT_TRUE(IsReadyForEncode());
+ stream_ = send_stream;
+ }
+
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->encoder_settings.encoder = this;
+ encoder_config_ = *encoder_config;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for Encode.";
+ EXPECT_EQ(0u, num_releases());
+ stream_->ReconfigureVideoEncoder(encoder_config_);
+ EXPECT_EQ(0u, num_releases());
+ stream_->Stop();
+ // Encoder should not be released before destroying the VideoSendStream.
+ EXPECT_FALSE(IsReleased());
+ EXPECT_TRUE(IsReadyForEncode());
+ stream_->Start();
+ // Sanity check, make sure we still encode frames with this encoder.
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for Encode.";
+ }
+
+ scoped_ptr<CriticalSectionWrapper> crit_;
+ VideoSendStream* stream_;
+ bool initialized_ GUARDED_BY(crit_);
+ bool callback_registered_ GUARDED_BY(crit_);
+ size_t num_releases_ GUARDED_BY(crit_);
+ bool released_ GUARDED_BY(crit_);
+ VideoEncoderConfig encoder_config_;
+ } test_encoder;
+
+ RunBaseTest(&test_encoder);
+
+ EXPECT_TRUE(test_encoder.IsReleased());
+ EXPECT_EQ(1u, test_encoder.num_releases());
+}
+
+TEST_F(VideoSendStreamTest, EncoderSetupPropagatesCommonEncoderConfigValues) {
+ class VideoCodecConfigObserver : public test::SendTest,
+ public test::FakeEncoder {
+ public:
+ VideoCodecConfigObserver()
+ : SendTest(kDefaultTimeoutMs),
+ FakeEncoder(Clock::GetRealTimeClock()),
+ num_initializations_(0) {}
+
+ private:
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->encoder_settings.encoder = this;
+ encoder_config_ = *encoder_config;
+ }
+
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ stream_ = send_stream;
+ }
+
+ virtual int32_t InitEncode(const VideoCodec* config,
+ int32_t number_of_cores,
+ uint32_t max_payload_size) OVERRIDE {
+ if (num_initializations_ == 0) {
+ // Verify default values.
+ EXPECT_EQ(kRealtimeVideo, config->mode);
+ } else {
+ // Verify that changed values are propagated.
+ EXPECT_EQ(kScreensharing, config->mode);
+ }
+ ++num_initializations_;
+ return FakeEncoder::InitEncode(config, number_of_cores, max_payload_size);
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(1u, num_initializations_) << "VideoEncoder not initialized.";
+
+ encoder_config_.content_type = VideoEncoderConfig::kScreenshare;
+ stream_->ReconfigureVideoEncoder(encoder_config_);
+ EXPECT_EQ(2u, num_initializations_)
+ << "ReconfigureVideoEncoder did not reinitialize the encoder with "
+ "new encoder settings.";
+ }
+
+ size_t num_initializations_;
+ VideoSendStream* stream_;
+ VideoEncoderConfig encoder_config_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(VideoSendStreamTest, EncoderSetupPropagatesVp8Config) {
+ static const size_t kNumberOfTemporalLayers = 4;
+ class VideoCodecConfigObserver : public test::SendTest,
+ public test::FakeEncoder {
+ public:
+ VideoCodecConfigObserver()
+ : SendTest(kDefaultTimeoutMs),
+ FakeEncoder(Clock::GetRealTimeClock()),
+ num_initializations_(0) {
+ memset(&vp8_settings_, 0, sizeof(vp8_settings_));
+ }
+
+ private:
+ virtual void ModifyConfigs(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) OVERRIDE {
+ send_config->encoder_settings.encoder = this;
+ send_config->encoder_settings.payload_name = "VP8";
+
+ for (size_t i = 0; i < encoder_config->streams.size(); ++i) {
+ encoder_config->streams[i].temporal_layers.resize(
+ kNumberOfTemporalLayers);
+ }
+
+ encoder_config->encoder_specific_settings = &vp8_settings_;
+ encoder_config_ = *encoder_config;
+ }
+
+ virtual void OnStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) OVERRIDE {
+ stream_ = send_stream;
+ }
+
+ virtual int32_t InitEncode(const VideoCodec* config,
+ int32_t number_of_cores,
+ uint32_t max_payload_size) OVERRIDE {
+ EXPECT_EQ(kVideoCodecVP8, config->codecType);
+
+ // Check that the number of temporal layers has propagated properly to
+ // VideoCodec.
+ EXPECT_EQ(kNumberOfTemporalLayers,
+ config->codecSpecific.VP8.numberOfTemporalLayers);
+
+ for (unsigned char i = 0; i < config->numberOfSimulcastStreams; ++i) {
+ EXPECT_EQ(kNumberOfTemporalLayers,
+ config->simulcastStream[i].numberOfTemporalLayers);
+ }
+
+ // Set expected temporal layers as they should have been set when
+ // reconfiguring the encoder and not match the set config.
+ vp8_settings_.numberOfTemporalLayers = kNumberOfTemporalLayers;
+ EXPECT_EQ(0,
+ memcmp(&config->codecSpecific.VP8,
+ &vp8_settings_,
+ sizeof(vp8_settings_)));
+ ++num_initializations_;
+ return FakeEncoder::InitEncode(config, number_of_cores, max_payload_size);
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(1u, num_initializations_) << "VideoEncoder not initialized.";
+
+ vp8_settings_.denoisingOn = true;
+ stream_->ReconfigureVideoEncoder(encoder_config_);
+ EXPECT_EQ(2u, num_initializations_)
+ << "ReconfigureVideoEncoder did not reinitialize the encoder with "
+ "new encoder settings.";
+ }
+
+ int32_t Encode(const I420VideoFrame& input_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const std::vector<VideoFrameType>* frame_types) OVERRIDE {
+ // Silently skip the encode, FakeEncoder::Encode doesn't produce VP8.
+ return 0;
+ }
+
+ VideoCodecVP8 vp8_settings_;
+ size_t num_initializations_;
+ VideoSendStream* stream_;
+ VideoEncoderConfig encoder_config_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
+TEST_F(VideoSendStreamTest, RtcpSenderReportContainsMediaBytesSent) {
+ class RtcpByeTest : public test::SendTest {
+ public:
+ RtcpByeTest() : SendTest(kDefaultTimeoutMs), media_bytes_sent_(0) {}
+
+ private:
+ virtual Action OnSendRtp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTPHeader header;
+ EXPECT_TRUE(parser_->Parse(packet, length, &header));
+ media_bytes_sent_ += length - header.headerLength - header.paddingLength;
+ return SEND_PACKET;
+ }
+
+ virtual Action OnSendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
+ RTCPUtility::RTCPParserV2 parser(packet, length, true);
+ EXPECT_TRUE(parser.IsValid());
+
+ RTCPUtility::RTCPPacketTypes packet_type = parser.Begin();
+ uint32_t sender_octet_count = 0;
+ while (packet_type != RTCPUtility::kRtcpNotValidCode) {
+ if (packet_type == RTCPUtility::kRtcpSrCode) {
+ sender_octet_count = parser.Packet().SR.SenderOctetCount;
+ EXPECT_EQ(sender_octet_count, media_bytes_sent_);
+ if (sender_octet_count > 0)
+ observation_complete_->Set();
+ }
+
+ packet_type = parser.Iterate();
+ }
+
+ return SEND_PACKET;
+ }
+
+ virtual void PerformTest() OVERRIDE {
+ EXPECT_EQ(kEventSignaled, Wait())
+ << "Timed out while waiting for RTCP sender report.";
+ }
+
+ size_t media_bytes_sent_;
+ } test;
+
+ RunBaseTest(&test);
}
} // namespace webrtc
diff --git a/video_encoder.h b/video_encoder.h
new file mode 100644
index 0000000..cbdf1ef
--- /dev/null
+++ b/video_encoder.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_VIDEO_ENCODER_H_
+#define WEBRTC_VIDEO_ENCODER_H_
+
+#include <vector>
+
+#include "webrtc/common_types.h"
+#include "webrtc/typedefs.h"
+#include "webrtc/video_frame.h"
+
+namespace webrtc {
+
+class RTPFragmentationHeader;
+// TODO(pbos): Expose these through a public (root) header or change these APIs.
+struct CodecSpecificInfo;
+struct VideoCodec;
+
+class EncodedImageCallback {
+ public:
+ virtual ~EncodedImageCallback() {}
+
+ // Callback function which is called when an image has been encoded.
+ // TODO(pbos): Make encoded_image const or pointer. Remove default arguments.
+ virtual int32_t Encoded(
+ EncodedImage& encoded_image,
+ const CodecSpecificInfo* codec_specific_info = NULL,
+ const RTPFragmentationHeader* fragmentation = NULL) = 0;
+};
+
+class VideoEncoder {
+ public:
+ enum EncoderType {
+ kVp8,
+ };
+
+ static VideoEncoder* Create(EncoderType codec_type);
+
+ static VideoCodecVP8 GetDefaultVp8Settings();
+ static VideoCodecH264 GetDefaultH264Settings();
+
+ virtual ~VideoEncoder() {}
+
+ virtual int32_t InitEncode(const VideoCodec* codec_settings,
+ int32_t number_of_cores,
+ uint32_t max_payload_size) = 0;
+ virtual int32_t RegisterEncodeCompleteCallback(
+ EncodedImageCallback* callback) = 0;
+ virtual int32_t Release() = 0;
+
+
+ virtual int32_t Encode(const I420VideoFrame& frame,
+ const CodecSpecificInfo* codec_specific_info,
+ const std::vector<VideoFrameType>* frame_types) = 0;
+
+ virtual int32_t SetChannelParameters(uint32_t packet_loss, int rtt) = 0;
+ virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0;
+
+ virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; }
+ virtual int32_t CodecConfigParameters(uint8_t* /*buffer*/, int32_t /*size*/) {
+ return -1;
+ }
+};
+
+} // namespace webrtc
+#endif // WEBRTC_VIDEO_ENCODER_H_
diff --git a/video_engine/Android.mk b/video_engine/Android.mk
deleted file mode 100644
index 74866cc..0000000
--- a/video_engine/Android.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc_vie_core
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- vie_base_impl.cc \
- vie_capture_impl.cc \
- vie_codec_impl.cc \
- vie_external_codec_impl.cc \
- vie_file_impl.cc \
- vie_image_process_impl.cc \
- vie_impl.cc \
- vie_network_impl.cc \
- vie_ref_count.cc \
- vie_render_impl.cc \
- vie_rtp_rtcp_impl.cc \
- vie_shared_data.cc \
- vie_capturer.cc \
- vie_channel.cc \
- vie_channel_group.cc \
- vie_channel_manager.cc \
- vie_encoder.cc \
- vie_file_image.cc \
- vie_file_player.cc \
- vie_file_recorder.cc \
- vie_frame_provider_base.cc \
- vie_input_manager.cc \
- vie_manager_base.cc \
- vie_performance_monitor.cc \
- vie_receiver.cc \
- vie_remb.cc \
- vie_renderer.cc \
- vie_render_manager.cc \
- vie_sender.cc \
- vie_sync_module.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include\
- $(LOCAL_PATH)/.. \
- $(LOCAL_PATH)/../common_video/interface \
- $(LOCAL_PATH)/../common_video/jpeg/main/interface \
- $(LOCAL_PATH)/../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../modules/interface \
- $(LOCAL_PATH)/../modules/audio_coding/main/interface \
- $(LOCAL_PATH)/../modules/rtp_rtcp/interface \
- $(LOCAL_PATH)/../modules/udp_transport/interface \
- $(LOCAL_PATH)/../modules/utility/interface \
- $(LOCAL_PATH)/../modules/video_capture/main/interface \
- $(LOCAL_PATH)/../modules/video_capture/main/source \
- $(LOCAL_PATH)/../modules/video_capture/main/source/Android \
- $(LOCAL_PATH)/../modules/video_coding/codecs/interface \
- $(LOCAL_PATH)/../modules/video_coding/main/interface \
- $(LOCAL_PATH)/../modules/video_mixer/main/interface \
- $(LOCAL_PATH)/../modules/video_processing/main/interface \
- $(LOCAL_PATH)/../modules/video_render/main/interface \
- $(LOCAL_PATH)/../system_wrappers/interface \
- $(LOCAL_PATH)/../voice_engine/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
-LOCAL_LDLIBS += -ldl -lpthread
-endif
-
-ifneq ($(TARGET_SIMULATOR),true)
-LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/video_engine/BUILD.gn b/video_engine/BUILD.gn
new file mode 100644
index 0000000..1b76776
--- /dev/null
+++ b/video_engine/BUILD.gn
@@ -0,0 +1,114 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../build/webrtc.gni")
+
+source_set("video_engine") {
+ deps = [ ":video_engine_core" ]
+}
+
+source_set("video_engine_core") {
+ sources = [
+ "include/vie_base.h",
+ "include/vie_capture.h",
+ "include/vie_codec.h",
+ "include/vie_errors.h",
+ "include/vie_external_codec.h",
+ "include/vie_image_process.h",
+ "include/vie_network.h",
+ "include/vie_render.h",
+ "include/vie_rtp_rtcp.h",
+ "call_stats.cc",
+ "call_stats.h",
+ "encoder_state_feedback.cc",
+ "encoder_state_feedback.h",
+ "overuse_frame_detector.cc",
+ "overuse_frame_detector.h",
+ "stream_synchronization.cc",
+ "stream_synchronization.h",
+ "vie_base_impl.cc",
+ "vie_base_impl.h",
+ "vie_capture_impl.cc",
+ "vie_capture_impl.h",
+ "vie_capturer.cc",
+ "vie_capturer.h",
+ "vie_channel.cc",
+ "vie_channel_group.cc",
+ "vie_channel_group.h",
+ "vie_channel.h",
+ "vie_channel_manager.cc",
+ "vie_channel_manager.h",
+ "vie_codec_impl.cc",
+ "vie_codec_impl.h",
+ "vie_defines.h",
+ "vie_encoder.cc",
+ "vie_encoder.h",
+ "vie_external_codec_impl.cc",
+ "vie_external_codec_impl.h",
+ "vie_file_image.cc",
+ "vie_file_image.h",
+ "vie_frame_provider_base.cc",
+ "vie_frame_provider_base.h",
+ "vie_image_process_impl.cc",
+ "vie_image_process_impl.h",
+ "vie_impl.cc",
+ "vie_impl.h",
+ "vie_input_manager.cc",
+ "vie_input_manager.h",
+ "vie_manager_base.cc",
+ "vie_manager_base.h",
+ "vie_network_impl.cc",
+ "vie_network_impl.h",
+ "vie_receiver.cc",
+ "vie_receiver.h",
+ "vie_ref_count.cc",
+ "vie_ref_count.h",
+ "vie_remb.cc",
+ "vie_remb.h",
+ "vie_renderer.cc",
+ "vie_renderer.h",
+ "vie_render_impl.cc",
+ "vie_render_impl.h",
+ "vie_render_manager.cc",
+ "vie_render_manager.h",
+ "vie_rtp_rtcp_impl.cc",
+ "vie_rtp_rtcp_impl.h",
+ "vie_sender.cc",
+ "vie_sender.h",
+ "vie_shared_data.cc",
+ "vie_shared_data.h",
+ "vie_sync_module.cc",
+ "vie_sync_module.h",
+ ]
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ if (is_win) {
+ cflags = [
+ # TODO(jschuh): Bug 1348: fix size_t to int truncations.
+ "/wd4267", # size_t to int truncation.
+ ]
+ }
+
+ deps = [
+ "../common_video",
+ "../modules/bitrate_controller",
+ "../modules/rtp_rtcp",
+ "../modules/utility",
+ "../modules/video_capture",
+ "../modules/video_coding",
+ "../modules/video_processing",
+ "../modules/video_render",
+ "../voice_engine",
+ "../system_wrappers",
+ ]
+}
diff --git a/video_engine/OWNERS b/video_engine/OWNERS
index 14bb8f3..7c5d371 100644
--- a/video_engine/OWNERS
+++ b/video_engine/OWNERS
@@ -1,6 +1,5 @@
mflodman@webrtc.org
stefan@webrtc.org
-wu@webrtc.org
mallinath@webrtc.org
per-file *.isolate=kjellander@webrtc.org
@@ -9,3 +8,6 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
+
diff --git a/video_engine/call_stats.h b/video_engine/call_stats.h
index 5eb3335..95f4fee 100644
--- a/video_engine/call_stats.h
+++ b/video_engine/call_stats.h
@@ -32,8 +32,8 @@
~CallStats();
// Implements Module, to use the process thread.
- virtual int32_t TimeUntilNextProcess();
- virtual int32_t Process();
+ virtual int32_t TimeUntilNextProcess() OVERRIDE;
+ virtual int32_t Process() OVERRIDE;
// Returns a RtcpRttStats to register at a statistics provider. The object
// has the same lifetime as the CallStats instance.
diff --git a/video_engine/include/vie_base.h b/video_engine/include/vie_base.h
index 0a528cb..4e619e5 100644
--- a/video_engine/include/vie_base.h
+++ b/video_engine/include/vie_base.h
@@ -21,10 +21,6 @@
#include "webrtc/common_types.h"
-#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
-#include <jni.h>
-#endif
-
namespace webrtc {
class Config;
@@ -43,29 +39,11 @@
virtual ~CpuOveruseObserver() {}
};
-// Limits on standard deviation for under/overuse.
-#ifdef WEBRTC_ANDROID
-const float kOveruseStdDevMs = 32.0f;
-const float kNormalUseStdDevMs = 27.0f;
-#elif WEBRTC_LINUX
-const float kOveruseStdDevMs = 20.0f;
-const float kNormalUseStdDevMs = 14.0f;
-#elif WEBRTC_MAC
-const float kOveruseStdDevMs = 27.0f;
-const float kNormalUseStdDevMs = 21.0f;
-#elif WEBRTC_WIN
-const float kOveruseStdDevMs = 20.0f;
-const float kNormalUseStdDevMs = 14.0f;
-#else
-const float kOveruseStdDevMs = 30.0f;
-const float kNormalUseStdDevMs = 20.0f;
-#endif
-
struct CpuOveruseOptions {
CpuOveruseOptions()
: enable_capture_jitter_method(true),
- low_capture_jitter_threshold_ms(kNormalUseStdDevMs),
- high_capture_jitter_threshold_ms(kOveruseStdDevMs),
+ low_capture_jitter_threshold_ms(20.0f),
+ high_capture_jitter_threshold_ms(30.0f),
enable_encode_usage_method(false),
low_encode_usage_threshold_percent(60),
high_encode_usage_threshold_percent(90),
@@ -160,11 +138,6 @@
// user receives callbacks for generated trace messages.
static int SetTraceCallback(TraceCallback* callback);
-#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
- // Android specific.
- static int SetAndroidObjects(JavaVM* java_vm, jobject context);
-#endif
-
protected:
VideoEngine() {}
virtual ~VideoEngine() {}
@@ -216,26 +189,18 @@
CpuOveruseObserver* observer) = 0;
// Sets options for cpu overuse detector.
- // TODO(asapersson): Remove default implementation.
virtual int SetCpuOveruseOptions(int channel,
- const CpuOveruseOptions& options) {
- return -1;
- }
+ const CpuOveruseOptions& options) = 0;
// Gets cpu overuse measures.
- // TODO(asapersson): Remove default implementation.
- virtual int GetCpuOveruseMetrics(int channel,
- CpuOveruseMetrics* metrics) {
- return -1;
- }
- // TODO(asapersson): Remove this function when libjingle has been updated.
- virtual int CpuOveruseMeasures(int channel,
- int* capture_jitter_ms,
- int* avg_encode_time_ms,
- int* encode_usage_percent,
- int* capture_queue_delay_ms_per_s) {
- return -1;
- }
+ virtual int GetCpuOveruseMetrics(int channel, CpuOveruseMetrics* metrics) = 0;
+
+ // Registers a callback which is called when send-side delay statistics has
+ // been updated.
+ // TODO(holmer): Remove the default implementation when fakevideoengine.h has
+ // been updated.
+ virtual void RegisterSendSideDelayObserver(
+ int channel, SendSideDelayObserver* observer) {}
// Specifies the VoiceEngine and VideoEngine channel pair to use for
// audio/video synchronization.
diff --git a/video_engine/include/vie_codec.h b/video_engine/include/vie_codec.h
index f658aaa..c6354d3 100644
--- a/video_engine/include/vie_codec.h
+++ b/video_engine/include/vie_codec.h
@@ -150,7 +150,13 @@
// Gets the number of packets discarded by the jitter buffer because they
// arrived too late.
- virtual unsigned int GetDiscardedPackets(const int video_channel) const = 0;
+ // TODO(asapersson): Remove default implementation.
+ virtual int GetNumDiscardedPackets(int video_channel) const { return -1; }
+
+ // TODO(asapersson): Remove once the api has been removed from
+ // fakewebrtcvideoengine.h.
+ virtual unsigned int GetDiscardedPackets(
+ const int video_channel) const { return 0; }
// Enables key frame request callback in ViEDecoderObserver.
virtual int SetKeyFrameRequestCallbackStatus(const int video_channel,
diff --git a/video_engine/include/vie_errors.h b/video_engine/include/vie_errors.h
index 1e9be1d..24aa098 100644
--- a/video_engine/include/vie_errors.h
+++ b/video_engine/include/vie_errors.h
@@ -103,8 +103,8 @@
kViEImageProcessInvalidCaptureId, // No capture device exist with the provided capture id.
kViEImageProcessFilterExists, // RegisterCaptureEffectFilter,RegisterSendEffectFilter,RegisterRenderEffectFilter - Effect filter already registered.
kViEImageProcessFilterDoesNotExist, // DeRegisterCaptureEffectFilter,DeRegisterSendEffectFilter,DeRegisterRenderEffectFilter - Effect filter not registered.
- kViEImageProcessAlreadyEnabled, // EnableDeflickering,EnableDenoising,EnableColorEnhancement- Function already enabled.
- kViEImageProcessAlreadyDisabled, // EnableDeflickering,EnableDenoising,EnableColorEnhancement- Function already disabled.
+ kViEImageProcessAlreadyEnabled, // EnableDeflickering,EnableColorEnhancement- Function already enabled.
+ kViEImageProcessAlreadyDisabled, // EnableDeflickering,EnableColorEnhancement- Function already disabled.
kViEImageProcessUnknownError // An unknown error has occurred. Check the log file.
};
diff --git a/video_engine/include/vie_image_process.h b/video_engine/include/vie_image_process.h
index e24e98f..8bb895f 100644
--- a/video_engine/include/vie_image_process.h
+++ b/video_engine/include/vie_image_process.h
@@ -11,7 +11,6 @@
// This sub-API supports the following functionalities:
// - Effect filters
// - Deflickering
-// - Denoising
// - Color enhancement
#ifndef WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_IMAGE_PROCESS_H_
@@ -85,9 +84,10 @@
// not all of them succeed. Enabling this function will remove the flicker.
virtual int EnableDeflickering(const int capture_id, const bool enable) = 0;
- // Some cameras produce very noisy captured images, especially in low‐light
- // conditions. This functionality will reduce the camera noise.
- virtual int EnableDenoising(const int capture_id, const bool enable) = 0;
+ // TODO(pbos): Remove this function when removed from fakewebrtcvideoengine.h.
+ virtual int EnableDenoising(const int capture_id, const bool enable) {
+ return -1;
+ }
// This function enhances the colors on the decoded video stream, enabled by
// default.
diff --git a/video_engine/include/vie_rtp_rtcp.h b/video_engine/include/vie_rtp_rtcp.h
index 972ca58..8771ea8 100644
--- a/video_engine/include/vie_rtp_rtcp.h
+++ b/video_engine/include/vie_rtp_rtcp.h
@@ -23,6 +23,7 @@
#define WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_RTP_RTCP_H_
#include "webrtc/common_types.h"
+#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
namespace webrtc {
@@ -151,6 +152,17 @@
virtual int SetStartSequenceNumber(const int video_channel,
unsigned short sequence_number) = 0;
+ // TODO(pbos): Remove default implementation once this has been implemented
+ // in libjingle.
+ virtual void SetRtpStateForSsrc(int video_channel,
+ uint32_t ssrc,
+ const RtpState& rtp_state) {}
+ // TODO(pbos): Remove default implementation once this has been implemented
+ // in libjingle.
+ virtual RtpState GetRtpStateForSsrc(int video_channel, uint32_t ssrc) {
+ return RtpState();
+ }
+
// This function sets the RTCP status for the specified channel.
// Default mode is kRtcpCompound_RFC4585.
virtual int SetRTCPStatus(const int video_channel,
@@ -165,10 +177,12 @@
virtual int SetRTCPCName(const int video_channel,
const char rtcp_cname[KMaxRTCPCNameLength]) = 0;
- // This function gets the RTCP canonical name (CNAME) for the RTCP reports
- // sent the specified channel.
+ // TODO(holmer): Remove this API once it has been removed from
+ // fakewebrtcvideoengine.h.
virtual int GetRTCPCName(const int video_channel,
- char rtcp_cname[KMaxRTCPCNameLength]) const = 0;
+ char rtcp_cname[KMaxRTCPCNameLength]) const {
+ return -1;
+ }
// This function gets the RTCP canonical name (CNAME) for the RTCP reports
// received on the specified channel.
@@ -261,8 +275,7 @@
// Enables/disables RTCP Receiver Reference Time Report Block extension/
// DLRR Report Block extension (RFC 3611).
- // TODO(asapersson): Remove default implementation.
- virtual int SetRtcpXrRrtrStatus(int video_channel, bool enable) { return -1; }
+ virtual int SetRtcpXrRrtrStatus(int video_channel, bool enable) = 0;
// Enables transmission smoothening, i.e. packets belonging to the same frame
// will be sent over a longer period of time instead of sending them
@@ -292,8 +305,11 @@
RtcpStatistics& basic_stats,
int& rtt_ms) const = 0;
- // This function returns statistics reported by the remote client in a RTCP
- // packet.
+ // This function returns statistics reported by the remote client in RTCP
+ // report blocks. If several streams are reported, the statistics will be
+ // aggregated.
+ // If statistics are aggregated, extended_max_sequence_number is not reported,
+ // and will always be set to 0.
virtual int GetSendChannelRtcpStatistics(const int video_channel,
RtcpStatistics& basic_stats,
int& rtt_ms) const = 0;
diff --git a/video_engine/overuse_frame_detector.cc b/video_engine/overuse_frame_detector.cc
index 764c258..93375a7 100644
--- a/video_engine/overuse_frame_detector.cc
+++ b/video_engine/overuse_frame_detector.cc
@@ -17,7 +17,7 @@
#include <list>
#include <map>
-#include "webrtc/modules/video_coding/utility/include/exp_filter.h"
+#include "webrtc/base/exp_filter.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logging.h"
@@ -37,13 +37,13 @@
// Delay between consecutive rampups. (Used for quick recovery.)
const int kQuickRampUpDelayMs = 10 * 1000;
// Delay between rampup attempts. Initially uses standard, scales up to max.
-const int kStandardRampUpDelayMs = 30 * 1000;
+const int kStandardRampUpDelayMs = 40 * 1000;
const int kMaxRampUpDelayMs = 240 * 1000;
// Expontential back-off factor, to prevent annoying up-down behaviour.
const double kRampUpBackoffFactor = 2.0;
// Max number of overuses detected before always applying the rampup delay.
-const int kMaxOverusesBeforeApplyRampupDelay = 7;
+const int kMaxOverusesBeforeApplyRampupDelay = 4;
// The maximum exponent to use in VCMExpFilter.
const float kSampleDiffMs = 33.0f;
@@ -54,8 +54,8 @@
Statistics::Statistics() :
sum_(0.0),
count_(0),
- filtered_samples_(new VCMExpFilter(kWeightFactorMean)),
- filtered_variance_(new VCMExpFilter(kWeightFactor)) {
+ filtered_samples_(new rtc::ExpFilter(kWeightFactorMean)),
+ filtered_variance_(new rtc::ExpFilter(kWeightFactor)) {
Reset();
}
@@ -84,8 +84,8 @@
float exp = sample_ms / kSampleDiffMs;
exp = std::min(exp, kMaxExp);
filtered_samples_->Apply(exp, sample_ms);
- filtered_variance_->Apply(exp, (sample_ms - filtered_samples_->Value()) *
- (sample_ms - filtered_samples_->Value()));
+ filtered_variance_->Apply(exp, (sample_ms - filtered_samples_->filtered()) *
+ (sample_ms - filtered_samples_->filtered()));
}
float Statistics::InitialMean() const {
@@ -101,10 +101,10 @@
return average_stddev * average_stddev;
}
-float Statistics::Mean() const { return filtered_samples_->Value(); }
+float Statistics::Mean() const { return filtered_samples_->filtered(); }
float Statistics::StdDev() const {
- return sqrt(std::max(filtered_variance_->Value(), 0.0f));
+ return sqrt(std::max(filtered_variance_->filtered(), 0.0f));
}
uint64_t Statistics::Count() const { return count_; }
@@ -116,7 +116,7 @@
EncodeTimeAvg()
: kWeightFactor(0.5f),
kInitialAvgEncodeTimeMs(5.0f),
- filtered_encode_time_ms_(new VCMExpFilter(kWeightFactor)) {
+ filtered_encode_time_ms_(new rtc::ExpFilter(kWeightFactor)) {
filtered_encode_time_ms_->Apply(1.0f, kInitialAvgEncodeTimeMs);
}
~EncodeTimeAvg() {}
@@ -128,13 +128,13 @@
}
int Value() const {
- return static_cast<int>(filtered_encode_time_ms_->Value() + 0.5);
+ return static_cast<int>(filtered_encode_time_ms_->filtered() + 0.5);
}
private:
const float kWeightFactor;
const float kInitialAvgEncodeTimeMs;
- scoped_ptr<VCMExpFilter> filtered_encode_time_ms_;
+ scoped_ptr<rtc::ExpFilter> filtered_encode_time_ms_;
};
// Class for calculating the encode usage.
@@ -146,8 +146,8 @@
kInitialSampleDiffMs(40.0f),
kMaxSampleDiffMs(45.0f),
count_(0),
- filtered_encode_time_ms_(new VCMExpFilter(kWeightFactorEncodeTime)),
- filtered_frame_diff_ms_(new VCMExpFilter(kWeightFactorFrameDiff)) {
+ filtered_encode_time_ms_(new rtc::ExpFilter(kWeightFactorEncodeTime)),
+ filtered_frame_diff_ms_(new rtc::ExpFilter(kWeightFactorFrameDiff)) {
Reset();
}
~EncodeUsage() {}
@@ -181,10 +181,10 @@
if (count_ < static_cast<uint32_t>(options_.min_frame_samples)) {
return static_cast<int>(InitialUsageInPercent() + 0.5f);
}
- float frame_diff_ms = std::max(filtered_frame_diff_ms_->Value(), 1.0f);
+ float frame_diff_ms = std::max(filtered_frame_diff_ms_->filtered(), 1.0f);
frame_diff_ms = std::min(frame_diff_ms, kMaxSampleDiffMs);
float encode_usage_percent =
- 100.0f * filtered_encode_time_ms_->Value() / frame_diff_ms;
+ 100.0f * filtered_encode_time_ms_->filtered() / frame_diff_ms;
return static_cast<int>(encode_usage_percent + 0.5);
}
@@ -205,8 +205,8 @@
const float kMaxSampleDiffMs;
uint64_t count_;
CpuOveruseOptions options_;
- scoped_ptr<VCMExpFilter> filtered_encode_time_ms_;
- scoped_ptr<VCMExpFilter> filtered_frame_diff_ms_;
+ scoped_ptr<rtc::ExpFilter> filtered_encode_time_ms_;
+ scoped_ptr<rtc::ExpFilter> filtered_frame_diff_ms_;
};
// Class for calculating the relative standard deviation of encode times.
@@ -215,7 +215,7 @@
EncodeTimeRsd(Clock* clock)
: kWeightFactor(0.6f),
count_(0),
- filtered_rsd_(new VCMExpFilter(kWeightFactor)),
+ filtered_rsd_(new rtc::ExpFilter(kWeightFactor)),
hist_samples_(0),
hist_sum_(0.0f),
last_process_time_ms_(clock->TimeInMilliseconds()) {
@@ -294,7 +294,7 @@
}
int Value() const {
- return static_cast<int>(filtered_rsd_->Value() + 0.5);
+ return static_cast<int>(filtered_rsd_->filtered() + 0.5);
}
private:
@@ -307,7 +307,7 @@
const float kWeightFactor;
uint32_t count_; // Number of encode samples since last reset.
CpuOveruseOptions options_;
- scoped_ptr<VCMExpFilter> filtered_rsd_;
+ scoped_ptr<rtc::ExpFilter> filtered_rsd_;
int hist_samples_;
float hist_sum_;
std::map<int,int> hist_; // Histogram of encode time of frames.
@@ -320,7 +320,7 @@
CaptureQueueDelay()
: kWeightFactor(0.5f),
delay_ms_(0),
- filtered_delay_ms_per_s_(new VCMExpFilter(kWeightFactor)) {
+ filtered_delay_ms_per_s_(new rtc::ExpFilter(kWeightFactor)) {
filtered_delay_ms_per_s_->Apply(1.0f, 0.0f);
}
~CaptureQueueDelay() {}
@@ -361,14 +361,14 @@
}
int Value() const {
- return static_cast<int>(filtered_delay_ms_per_s_->Value() + 0.5);
+ return static_cast<int>(filtered_delay_ms_per_s_->filtered() + 0.5);
}
private:
const float kWeightFactor;
std::list<int64_t> frames_;
int delay_ms_;
- scoped_ptr<VCMExpFilter> filtered_delay_ms_per_s_;
+ scoped_ptr<rtc::ExpFilter> filtered_delay_ms_per_s_;
};
OveruseFrameDetector::OveruseFrameDetector(Clock* clock)
diff --git a/video_engine/overuse_frame_detector.h b/video_engine/overuse_frame_detector.h
index efd23dc..df3c1a0 100644
--- a/video_engine/overuse_frame_detector.h
+++ b/video_engine/overuse_frame_detector.h
@@ -12,6 +12,7 @@
#define WEBRTC_VIDEO_ENGINE_OVERUSE_FRAME_DETECTOR_H_
#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/exp_filter.h"
#include "webrtc/modules/interface/module.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/video_engine/include/vie_base.h"
@@ -21,7 +22,6 @@
class Clock;
class CpuOveruseObserver;
class CriticalSectionWrapper;
-class VCMExpFilter;
// TODO(pbos): Move this somewhere appropriate.
class Statistics {
@@ -43,8 +43,8 @@
float sum_;
uint64_t count_;
CpuOveruseOptions options_;
- scoped_ptr<VCMExpFilter> filtered_samples_;
- scoped_ptr<VCMExpFilter> filtered_variance_;
+ scoped_ptr<rtc::ExpFilter> filtered_samples_;
+ scoped_ptr<rtc::ExpFilter> filtered_variance_;
};
// Use to detect system overuse based on jitter in incoming frames.
diff --git a/video_engine/overuse_frame_detector_unittest.cc b/video_engine/overuse_frame_detector_unittest.cc
index 4e5d4bd..a1c7f49 100644
--- a/video_engine/overuse_frame_detector_unittest.cc
+++ b/video_engine/overuse_frame_detector_unittest.cc
@@ -130,9 +130,12 @@
}
void TriggerNormalUsageWithEncodeTime() {
- const int kEncodeTimeMs = 5;
+ const int kEncodeTimeMs1 = 5;
+ const int kEncodeTimeMs2 = 6;
InsertAndEncodeFramesWithInterval(
- 1000, kFrameInterval33ms, kWidth, kHeight, kEncodeTimeMs);
+ 1300, kFrameInterval33ms, kWidth, kHeight, kEncodeTimeMs1);
+ InsertAndEncodeFramesWithInterval(
+ 1, kFrameInterval33ms, kWidth, kHeight, kEncodeTimeMs2);
overuse_detector_->Process();
}
@@ -215,7 +218,7 @@
overuse_detector_->SetObserver(&overuse_observer_);
options_.min_process_count = 1;
overuse_detector_->SetOptions(options_);
- InsertFramesWithInterval(900, kFrameInterval33ms, kWidth, kHeight);
+ InsertFramesWithInterval(1200, kFrameInterval33ms, kWidth, kHeight);
overuse_detector_->Process();
EXPECT_EQ(0, overuse_observer_.normaluse_);
clock_->AdvanceTimeMilliseconds(kProcessIntervalMs);
@@ -444,7 +447,7 @@
TEST_F(OveruseFrameDetectorTest, OveruseAndRecoverWithEncodeRsd) {
options_.enable_capture_jitter_method = false;
options_.enable_encode_usage_method = true;
- options_.low_encode_time_rsd_threshold = 20;
+ options_.low_encode_time_rsd_threshold = 25;
options_.high_encode_time_rsd_threshold = 80;
overuse_detector_->SetOptions(options_);
// rsd > high, usage < high => overuse
@@ -460,7 +463,7 @@
options_.enable_capture_jitter_method = false;
options_.enable_encode_usage_method = true;
options_.low_encode_usage_threshold_percent = 1;
- options_.low_encode_time_rsd_threshold = 20;
+ options_.low_encode_time_rsd_threshold = 25;
options_.high_encode_time_rsd_threshold = 90;
overuse_detector_->SetOptions(options_);
// rsd < low, usage > low => no underuse
diff --git a/video_engine/test/auto_test/android/Android.mk b/video_engine/test/auto_test/android/Android.mk
deleted file mode 100644
index 5f8d548..0000000
--- a/video_engine/test/auto_test/android/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-MY_CAPTURE_FOLDER := ../../../../modules/video_capture/main/source
-MY_CAPTURE_JAVA_FOLDER := Android/java/org/webrtc/videoengine
-MY_CAPTURE_PATH := $(MY_CAPTURE_FOLDER)/$(MY_CAPTURE_JAVA_FOLDER)
-
-MY_RENDER_FOLDER := ../../../../modules/video_render/main/source
-MY_RENDER_JAVA_FOLDER := Android/java/org/webrtc/videoengine
-MY_RENDER_PATH := $(MY_RENDER_FOLDER)/$(MY_RENDER_JAVA_FOLDER)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := \
- src/org/webrtc/vieautotest/ViEAutotest.java \
- $(MY_CAPTURE_PATH)/VideoCaptureAndroid.java \
- $(MY_CAPTURE_PATH)/VideoCaptureDeviceInfoAndroid.java \
- $(MY_RENDER_PATH)/ViEAndroidGLES20.java \
- $(MY_RENDER_PATH)/ViERenderer.java \
- $(MY_RENDER_PATH)/ViESurfaceRenderer.java
-
-LOCAL_PACKAGE_NAME := webrtc-video-autotest
-LOCAL_CERTIFICATE := platform
-
-LOCAL_JNI_SHARED_LIBRARIES := libwebrtc-video-autotest-jni
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/video_engine/test/auto_test/android/jni/Android.mk b/video_engine/test/auto_test/android/jni/Android.mk
deleted file mode 100644
index 284ecab..0000000
--- a/video_engine/test/auto_test/android/jni/Android.mk
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-# the follow two lines are for NDK build
-INTERFACES_PATH := $(LOCAL_PATH)/../../../../../../build/interface
-LIBS_PATH := $(LOCAL_PATH)/../../../../../../build/libraries
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := libwebrtc-video-autotest-jni
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- vie_autotest_jni.cc \
- ../../source/vie_autotest_android.cc \
- ../../source/vie_autotest.cc \
- ../../source/vie_autotest_base.cc \
- ../../source/vie_autotest_capture.cc \
- ../../source/vie_autotest_codec.cc \
- ../../source/vie_autotest_file.cc \
- ../../source/vie_autotest_image_process.cc \
- ../../source/vie_autotest_loopback.cc \
- ../../source/vie_autotest_network.cc \
- ../../source/vie_autotest_render.cc \
- ../../source/vie_autotest_rtp_rtcp.cc \
- ../../source/tb_I420_codec.cc \
- ../../source/tb_capture_device.cc \
- ../../source/tb_external_transport.cc \
- ../../source/tb_interfaces.cc \
- ../../source/tb_video_channel.cc
-
-LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES'
-
-LOCAL_C_INCLUDES := \
- external/gtest/include \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../../.. \
- $(LOCAL_PATH)/../../../../../common_video/interface \
- $(LOCAL_PATH)/../../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../../modules/interface \
- $(LOCAL_PATH)/../../../../../modules/video_capture/main/interface \
- $(LOCAL_PATH)/../../../../../modules/video_capture/main/source \
- $(LOCAL_PATH)/../../../../../modules/video_coding/codecs/interface \
- $(LOCAL_PATH)/../../../../../modules/video_render/main/interface \
- $(LOCAL_PATH)/../../../../../voice_engine/include \
- $(LOCAL_PATH)/../../../../../system_wrappers/interface
-
-LOCAL_PRELINK_MODULE := false
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libstlport \
- libandroid \
- libwebrtc \
- libGLESv2
-
-# the following line is for NDK build
-LOCAL_LDLIBS := $(LIBS_PATH)/VideoEngine_android_gcc.a -llog -lgcc
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_SHARED_LIBRARY)
diff --git a/video_engine/test/auto_test/automated/vie_network_test.cc b/video_engine/test/auto_test/automated/vie_network_test.cc
index 1e46b3d..a2d060e 100644
--- a/video_engine/test/auto_test/automated/vie_network_test.cc
+++ b/video_engine/test/auto_test/automated/vie_network_test.cc
@@ -31,7 +31,7 @@
}
virtual int SendRTCPPacket(int channel, const void* data, int len) {
const uint8_t* buf = static_cast<const uint8_t*>(data);
- webrtc::ModuleRTPUtility::RTPHeaderParser parser(buf, len);
+ webrtc::RtpUtility::RtpHeaderParser parser(buf, len);
if (parser.RTCP()) {
Packet p;
p.channel = channel;
diff --git a/video_engine/test/auto_test/source/Android.mk b/video_engine/test/auto_test/source/Android.mk
deleted file mode 100644
index ffe113b..0000000
--- a/video_engine/test/auto_test/source/Android.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH:= $(call my-dir)
-
-# voice engine test app
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= \
- vie_autotest.cc \
- vie_autotest_android.cc \
- vie_autotest_base.cc \
- vie_autotest_capture.cc \
- vie_autotest_codec.cc \
- vie_autotest_file.cc \
- vie_autotest_image_process.cc \
- vie_autotest_loopback.cc \
- vie_autotest_network.cc \
- vie_autotest_render.cc \
- vie_autotest_rtp_rtcp.cc \
- vie_comparison_tests.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../helpers \
- $(LOCAL_PATH)/../primitives \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../include \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../../modules/video_coding/codecs/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface \
- $(LOCAL_PATH)/../../../../modules/video_render/main/interface \
- $(LOCAL_PATH)/../../../../modules/interface \
- $(LOCAL_PATH)/../../../../modules/video_capture/main/interface \
- $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../voice_engine/include
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libstlport \
- libwebrtc
-
-LOCAL_MODULE:= webrtc_video_test
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_EXECUTABLE)
diff --git a/video_engine/test/auto_test/source/vie_autotest.cc b/video_engine/test/auto_test/source/vie_autotest.cc
index 188567c..fb1a46f 100644
--- a/video_engine/test/auto_test/source/vie_autotest.cc
+++ b/video_engine/test/auto_test/source/vie_autotest.cc
@@ -101,6 +101,9 @@
case webrtc::kVideoCodecI420:
ViETest::Log("\tcodecType: I420");
break;
+ case webrtc::kVideoCodecH264:
+ ViETest::Log("\tcodecType: H264");
+ break;
case webrtc::kVideoCodecRED:
ViETest::Log("\tcodecType: RED");
break;
diff --git a/video_engine/test/auto_test/source/vie_autotest_android.cc b/video_engine/test/auto_test/source/vie_autotest_android.cc
index ac0dd17..ced235f 100644
--- a/video_engine/test/auto_test/source/vie_autotest_android.cc
+++ b/video_engine/test/auto_test/source/vie_autotest_android.cc
@@ -13,15 +13,18 @@
#include <android/log.h>
#include <stdio.h>
-#include "webrtc/video_engine/test/auto_test/interface/vie_autotest.h"
+#include "webrtc/modules/video_capture/video_capture_internal.h"
+#include "webrtc/modules/video_render/video_render_internal.h"
#include "webrtc/video_engine/test/auto_test/interface/vie_autotest_defines.h"
+#include "webrtc/video_engine/test/auto_test/interface/vie_autotest.h"
int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
void* window1, void* window2,
JavaVM* javaVM, void* env, void* context) {
ViEAutoTest vieAutoTest(window1, window2);
ViETest::Log("RunAutoTest(%d, %d)", testSelection, subTestSelection);
- webrtc::VideoEngine::SetAndroidObjects(javaVM, static_cast<jobject>(context));
+ webrtc::SetCaptureAndroidVM(javaVM, static_cast<jobject>(context));
+ webrtc::SetRenderAndroidVM(javaVM);
#ifndef WEBRTC_ANDROID_OPENSLES
// voice engine calls into ADM directly
webrtc::VoiceEngine::SetAndroidObjects(javaVM, env, context);
diff --git a/video_engine/test/auto_test/source/vie_autotest_custom_call.cc b/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
index f9a5c22..b22e367 100644
--- a/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
+++ b/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
@@ -1651,7 +1651,7 @@
void PrintGetDiscardedPackets(webrtc::ViECodec* vie_codec, int video_channel) {
std::cout << "Discarded Packets" << std::endl;
int discarded_packets = 0;
- discarded_packets = vie_codec->GetDiscardedPackets(video_channel);
+ discarded_packets = vie_codec->GetNumDiscardedPackets(video_channel);
std::cout << "\tNumber of discarded packets: "
<< discarded_packets << std::endl;
}
diff --git a/video_engine/test/auto_test/source/vie_autotest_image_process.cc b/video_engine/test/auto_test/source/vie_autotest_image_process.cc
index 5424e92..c6f0a05 100644
--- a/video_engine/test/auto_test/source/vie_autotest_image_process.cc
+++ b/video_engine/test/auto_test/source/vie_autotest_image_process.cc
@@ -198,20 +198,6 @@
tbCapture.captureId, effectFilter));
//
- // Denoising
- //
- EXPECT_EQ(0, ViE.image_process->EnableDenoising(tbCapture.captureId, true));
- // If the denoising is already enabled, it will just reuturn 0.
- EXPECT_EQ(0, ViE.image_process->EnableDenoising(tbCapture.captureId, true));
- EXPECT_EQ(0, ViE.image_process->EnableDenoising(
- tbCapture.captureId, false));
- // If the denoising is already disabled, it will just reuturn 0.
- EXPECT_EQ(0, ViE.image_process->EnableDenoising(
- tbCapture.captureId, false));
- EXPECT_NE(0, ViE.image_process->EnableDenoising(
- tbChannel.videoChannel, true));
-
- //
// Deflickering
//
EXPECT_EQ(0, ViE.image_process->EnableDeflickering(
diff --git a/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc b/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc
index 671e727..b7d0215 100644
--- a/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc
+++ b/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc
@@ -52,7 +52,7 @@
ViERtcpObserver() :
_channel(-1),
_subType(0),
- _name(-1),
+ _name(0),
_data(NULL),
_dataLength(0)
{
diff --git a/video_engine/test/auto_test/vie_auto_test.gypi b/video_engine/test/auto_test/vie_auto_test.gypi
index 9629166..a415b3b 100644
--- a/video_engine/test/auto_test/vie_auto_test.gypi
+++ b/video_engine/test/auto_test/vie_auto_test.gypi
@@ -14,8 +14,8 @@
'dependencies': [
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
- '<(webrtc_root)/modules/modules.gyp:video_render_module',
- '<(webrtc_root)/modules/modules.gyp:video_capture_module',
+ '<(webrtc_root)/modules/modules.gyp:video_capture_module_internal_impl',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_internal_impl',
'<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
diff --git a/video_engine/test/libvietest/include/tb_I420_codec.h b/video_engine/test/libvietest/include/tb_I420_codec.h
index 50559b2..2037ba9 100644
--- a/video_engine/test/libvietest/include/tb_I420_codec.h
+++ b/video_engine/test/libvietest/include/tb_I420_codec.h
@@ -24,33 +24,28 @@
TbI420Encoder();
virtual ~TbI420Encoder();
- static int32_t VersionStatic(char* version, int32_t length);
- virtual int32_t Version(char* version, int32_t length) const;
-
virtual int32_t InitEncode(const webrtc::VideoCodec* codecSettings,
int32_t numberOfCores,
- uint32_t maxPayloadSize);
+ uint32_t maxPayloadSize) OVERRIDE;
virtual int32_t Encode(
const webrtc::I420VideoFrame& inputImage,
const webrtc::CodecSpecificInfo* codecSpecificInfo,
- const std::vector<webrtc::VideoFrameType>* frameTypes);
+ const std::vector<webrtc::VideoFrameType>* frameTypes) OVERRIDE;
virtual int32_t RegisterEncodeCompleteCallback(
- webrtc::EncodedImageCallback* callback);
+ webrtc::EncodedImageCallback* callback) OVERRIDE;
- virtual int32_t Release();
+ virtual int32_t Release() OVERRIDE;
- virtual int32_t Reset();
+ virtual int32_t SetChannelParameters(uint32_t packetLoss, int rtt) OVERRIDE;
- virtual int32_t SetChannelParameters(uint32_t packetLoss, int rtt);
+ virtual int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) OVERRIDE;
- virtual int32_t SetRates(uint32_t newBitRate, uint32_t frameRate);
-
- virtual int32_t SetPeriodicKeyFrames(bool enable);
+ virtual int32_t SetPeriodicKeyFrames(bool enable) OVERRIDE;
virtual int32_t CodecConfigParameters(uint8_t* /*buffer*/,
- int32_t /*size*/);
+ int32_t /*size*/) OVERRIDE;
struct FunctionCalls
{
@@ -87,18 +82,18 @@
virtual ~TbI420Decoder();
virtual int32_t InitDecode(const webrtc::VideoCodec* inst,
- int32_t numberOfCores);
+ int32_t numberOfCores) OVERRIDE;
virtual int32_t Decode(
const webrtc::EncodedImage& inputImage,
bool missingFrames,
const webrtc::RTPFragmentationHeader* fragmentation,
const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL,
- int64_t renderTimeMs = -1);
+ int64_t renderTimeMs = -1) OVERRIDE;
- virtual int32_t
- RegisterDecodeCompleteCallback(webrtc::DecodedImageCallback* callback);
- virtual int32_t Release();
- virtual int32_t Reset();
+ virtual int32_t RegisterDecodeCompleteCallback(
+ webrtc::DecodedImageCallback* callback) OVERRIDE;
+ virtual int32_t Release() OVERRIDE;
+ virtual int32_t Reset() OVERRIDE;
struct FunctionCalls
{
diff --git a/video_engine/test/libvietest/testbed/tb_I420_codec.cc b/video_engine/test/libvietest/testbed/tb_I420_codec.cc
index 5ed5e46..f807fd5 100644
--- a/video_engine/test/libvietest/testbed/tb_I420_codec.cc
+++ b/video_engine/test/libvietest/testbed/tb_I420_codec.cc
@@ -12,7 +12,6 @@
#include <assert.h>
#include <stdio.h>
-#include <string.h>
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
@@ -33,23 +32,6 @@
}
}
-int32_t TbI420Encoder::VersionStatic(char* version, int32_t length)
-{
- const char* str = "I420 version 1.0.0\n";
- int32_t verLen = (int32_t) strlen(str);
- if (verLen > length)
- {
- return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
- }
- strncpy(version, str, length);
- return verLen;
-}
-
-int32_t TbI420Encoder::Version(char* version, int32_t length) const
-{
- return VersionStatic(version, length);
-}
-
int32_t TbI420Encoder::Release()
{
_functionCalls.Release++;
@@ -64,17 +46,6 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-int32_t TbI420Encoder::Reset()
-{
- _functionCalls.Reset++;
- if (!_inited)
- {
- return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
- }
- return WEBRTC_VIDEO_CODEC_OK;
-
-}
-
int32_t TbI420Encoder::SetChannelParameters(uint32_t packetLoss, int rtt) {
_functionCalls.SetChannelParameters++;
return WEBRTC_VIDEO_CODEC_OK;
diff --git a/video_engine/video_engine_core.gypi b/video_engine/video_engine_core.gypi
index ce9d536..fd61043 100644
--- a/video_engine/video_engine_core.gypi
+++ b/video_engine/video_engine_core.gypi
@@ -122,6 +122,8 @@
'type': '<(gtest_target_type)',
'dependencies': [
'video_engine_core',
+ '<(webrtc_root)/modules/modules.gyp:video_capture_module_internal_impl',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_internal_impl',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(webrtc_root)/test/test.gyp:test_support_main',
@@ -136,9 +138,7 @@
'vie_remb_unittest.cc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -147,9 +147,7 @@
},
], # targets
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'video_engine_core_unittests_apk_target',
diff --git a/video_engine/video_engine_core.target.darwin-arm.mk b/video_engine/video_engine_core.target.darwin-arm.mk
index ebd3291..19e9654 100644
--- a/video_engine/video_engine_core.target.darwin-arm.mk
+++ b/video_engine/video_engine_core.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -61,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +94,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,7 +102,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -120,12 +118,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -166,23 +167,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,13 +198,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -224,7 +226,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -241,12 +242,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -288,68 +292,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.darwin-arm64.mk b/video_engine/video_engine_core.target.darwin-arm64.mk
index 174cedf..4ab9a5d 100644
--- a/video_engine/video_engine_core.target.darwin-arm64.mk
+++ b/video_engine/video_engine_core.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -86,13 +84,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -109,12 +107,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -152,21 +153,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -215,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -259,59 +263,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.darwin-mips.mk b/video_engine/video_engine_core.target.darwin-mips.mk
index 39364e8..bd3e688 100644
--- a/video_engine/video_engine_core.target.darwin-mips.mk
+++ b/video_engine/video_engine_core.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -61,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +68,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +86,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +94,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,17 +110,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -160,23 +156,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,13 +182,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -213,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -230,17 +223,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -276,64 +270,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.darwin-mips64.mk b/video_engine/video_engine_core.target.darwin-mips64.mk
new file mode 100644
index 0000000..bd3e688
--- /dev/null
+++ b/video_engine/video_engine_core.target.darwin-mips64.mk
@@ -0,0 +1,304 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/video_engine/call_stats.cc \
+ third_party/webrtc/video_engine/encoder_state_feedback.cc \
+ third_party/webrtc/video_engine/overuse_frame_detector.cc \
+ third_party/webrtc/video_engine/stream_synchronization.cc \
+ third_party/webrtc/video_engine/vie_base_impl.cc \
+ third_party/webrtc/video_engine/vie_capture_impl.cc \
+ third_party/webrtc/video_engine/vie_codec_impl.cc \
+ third_party/webrtc/video_engine/vie_external_codec_impl.cc \
+ third_party/webrtc/video_engine/vie_image_process_impl.cc \
+ third_party/webrtc/video_engine/vie_impl.cc \
+ third_party/webrtc/video_engine/vie_network_impl.cc \
+ third_party/webrtc/video_engine/vie_ref_count.cc \
+ third_party/webrtc/video_engine/vie_render_impl.cc \
+ third_party/webrtc/video_engine/vie_rtp_rtcp_impl.cc \
+ third_party/webrtc/video_engine/vie_shared_data.cc \
+ third_party/webrtc/video_engine/vie_capturer.cc \
+ third_party/webrtc/video_engine/vie_channel.cc \
+ third_party/webrtc/video_engine/vie_channel_group.cc \
+ third_party/webrtc/video_engine/vie_channel_manager.cc \
+ third_party/webrtc/video_engine/vie_encoder.cc \
+ third_party/webrtc/video_engine/vie_file_image.cc \
+ third_party/webrtc/video_engine/vie_frame_provider_base.cc \
+ third_party/webrtc/video_engine/vie_input_manager.cc \
+ third_party/webrtc/video_engine/vie_manager_base.cc \
+ third_party/webrtc/video_engine/vie_receiver.cc \
+ third_party/webrtc/video_engine/vie_remb.cc \
+ third_party/webrtc/video_engine/vie_renderer.cc \
+ third_party/webrtc/video_engine/vie_render_manager.cc \
+ third_party/webrtc/video_engine/vie_sender.cc \
+ third_party/webrtc/video_engine/vie_sync_module.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_video_engine_video_engine_core_gyp
+
+# Alias gyp target name.
+.PHONY: video_engine_core
+video_engine_core: third_party_webrtc_video_engine_video_engine_core_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/video_engine/video_engine_core.target.darwin-x86.mk b/video_engine/video_engine_core.target.darwin-x86.mk
index d8d7e32..b362bbf 100644
--- a/video_engine/video_engine_core.target.darwin-x86.mk
+++ b/video_engine/video_engine_core.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -158,21 +159,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -210,7 +212,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -227,12 +228,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -271,63 +275,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.darwin-x86_64.mk b/video_engine/video_engine_core.target.darwin-x86_64.mk
index b0b6ef7..c43757c 100644
--- a/video_engine/video_engine_core.target.darwin-x86_64.mk
+++ b/video_engine/video_engine_core.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -61,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +112,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -157,22 +158,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -208,7 +210,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -225,12 +226,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,63 +273,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.linux-arm.mk b/video_engine/video_engine_core.target.linux-arm.mk
index ebd3291..19e9654 100644
--- a/video_engine/video_engine_core.target.linux-arm.mk
+++ b/video_engine/video_engine_core.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -61,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +94,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,7 +102,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -120,12 +118,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -166,23 +167,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,13 +198,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -224,7 +226,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -241,12 +242,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -288,68 +292,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.linux-arm64.mk b/video_engine/video_engine_core.target.linux-arm64.mk
index 174cedf..4ab9a5d 100644
--- a/video_engine/video_engine_core.target.linux-arm64.mk
+++ b/video_engine/video_engine_core.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -86,13 +84,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -109,12 +107,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -152,21 +153,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -215,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -259,59 +263,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.linux-mips.mk b/video_engine/video_engine_core.target.linux-mips.mk
index 39364e8..bd3e688 100644
--- a/video_engine/video_engine_core.target.linux-mips.mk
+++ b/video_engine/video_engine_core.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -61,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +68,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +86,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +94,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,17 +110,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -160,23 +156,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,13 +182,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -213,7 +207,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -230,17 +223,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -276,64 +270,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.linux-mips64.mk b/video_engine/video_engine_core.target.linux-mips64.mk
new file mode 100644
index 0000000..bd3e688
--- /dev/null
+++ b/video_engine/video_engine_core.target.linux-mips64.mk
@@ -0,0 +1,304 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/video_engine/call_stats.cc \
+ third_party/webrtc/video_engine/encoder_state_feedback.cc \
+ third_party/webrtc/video_engine/overuse_frame_detector.cc \
+ third_party/webrtc/video_engine/stream_synchronization.cc \
+ third_party/webrtc/video_engine/vie_base_impl.cc \
+ third_party/webrtc/video_engine/vie_capture_impl.cc \
+ third_party/webrtc/video_engine/vie_codec_impl.cc \
+ third_party/webrtc/video_engine/vie_external_codec_impl.cc \
+ third_party/webrtc/video_engine/vie_image_process_impl.cc \
+ third_party/webrtc/video_engine/vie_impl.cc \
+ third_party/webrtc/video_engine/vie_network_impl.cc \
+ third_party/webrtc/video_engine/vie_ref_count.cc \
+ third_party/webrtc/video_engine/vie_render_impl.cc \
+ third_party/webrtc/video_engine/vie_rtp_rtcp_impl.cc \
+ third_party/webrtc/video_engine/vie_shared_data.cc \
+ third_party/webrtc/video_engine/vie_capturer.cc \
+ third_party/webrtc/video_engine/vie_channel.cc \
+ third_party/webrtc/video_engine/vie_channel_group.cc \
+ third_party/webrtc/video_engine/vie_channel_manager.cc \
+ third_party/webrtc/video_engine/vie_encoder.cc \
+ third_party/webrtc/video_engine/vie_file_image.cc \
+ third_party/webrtc/video_engine/vie_frame_provider_base.cc \
+ third_party/webrtc/video_engine/vie_input_manager.cc \
+ third_party/webrtc/video_engine/vie_manager_base.cc \
+ third_party/webrtc/video_engine/vie_receiver.cc \
+ third_party/webrtc/video_engine/vie_remb.cc \
+ third_party/webrtc/video_engine/vie_renderer.cc \
+ third_party/webrtc/video_engine/vie_render_manager.cc \
+ third_party/webrtc/video_engine/vie_sender.cc \
+ third_party/webrtc/video_engine/vie_sync_module.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/interface \
+ $(LOCAL_PATH)/third_party/webrtc/common_video/libyuv/include \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_video_engine_video_engine_core_gyp
+
+# Alias gyp target name.
+.PHONY: video_engine_core
+video_engine_core: third_party_webrtc_video_engine_video_engine_core_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/video_engine/video_engine_core.target.linux-x86.mk b/video_engine/video_engine_core.target.linux-x86.mk
index d8d7e32..b362bbf 100644
--- a/video_engine/video_engine_core.target.linux-x86.mk
+++ b/video_engine/video_engine_core.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -60,7 +59,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -115,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -158,21 +159,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -210,7 +212,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -227,12 +228,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -271,63 +275,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/video_engine_core.target.linux-x86_64.mk b/video_engine/video_engine_core.target.linux-x86_64.mk
index b0b6ef7..c43757c 100644
--- a/video_engine/video_engine_core.target.linux-x86_64.mk
+++ b/video_engine/video_engine_core.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_video_engine_video_engine_core_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -61,7 +60,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +96,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +112,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -157,22 +158,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -208,7 +210,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -225,12 +226,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -269,63 +273,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/video_engine/vie_base_impl.cc b/video_engine/vie_base_impl.cc
index 29fbe7f..e05a5cb 100644
--- a/video_engine/vie_base_impl.cc
+++ b/video_engine/vie_base_impl.cc
@@ -121,37 +121,6 @@
return -1;
}
-int ViEBaseImpl::CpuOveruseMeasures(int video_channel,
- int* capture_jitter_ms,
- int* avg_encode_time_ms,
- int* encode_usage_percent,
- int* capture_queue_delay_ms_per_s) {
- ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
- ViEChannel* vie_channel = cs.Channel(video_channel);
- if (!vie_channel) {
- shared_data_.SetLastError(kViEBaseInvalidChannelId);
- return -1;
- }
- ViEEncoder* vie_encoder = cs.Encoder(video_channel);
- assert(vie_encoder);
-
- ViEInputManagerScoped is(*(shared_data_.input_manager()));
- ViEFrameProviderBase* provider = is.FrameProvider(vie_encoder);
- if (provider) {
- ViECapturer* capturer = is.Capture(provider->Id());
- if (capturer) {
- CpuOveruseMetrics metrics;
- capturer->GetCpuOveruseMetrics(&metrics);
- *capture_jitter_ms = metrics.capture_jitter_ms;
- *avg_encode_time_ms = metrics.avg_encode_time_ms;
- *encode_usage_percent = metrics.encode_usage_percent;
- *capture_queue_delay_ms_per_s = metrics.capture_queue_delay_ms_per_s;
- return 0;
- }
- }
- return -1;
-}
-
int ViEBaseImpl::GetCpuOveruseMetrics(int video_channel,
CpuOveruseMetrics* metrics) {
ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
@@ -175,6 +144,14 @@
return -1;
}
+void ViEBaseImpl::RegisterSendSideDelayObserver(
+ int channel, SendSideDelayObserver* observer) {
+ ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
+ ViEChannel* vie_channel = cs.Channel(channel);
+ assert(vie_channel);
+ vie_channel->RegisterSendSideDelayObserver(observer);
+}
+
int ViEBaseImpl::CreateChannel(int& video_channel) { // NOLINT
return CreateChannel(video_channel, static_cast<const Config*>(NULL));
}
@@ -360,7 +337,7 @@
// Add WebRTC Version.
std::stringstream version_stream;
- version_stream << "VideoEngine 3.54.0" << std::endl;
+ version_stream << "VideoEngine 38" << std::endl;
// Add build info.
version_stream << "Build: " << BUILDINFO << std::endl;
diff --git a/video_engine/vie_base_impl.h b/video_engine/vie_base_impl.h
index d6a046e..20fd615 100644
--- a/video_engine/vie_base_impl.h
+++ b/video_engine/vie_base_impl.h
@@ -37,11 +37,8 @@
const CpuOveruseOptions& options);
virtual int GetCpuOveruseMetrics(int channel,
CpuOveruseMetrics* metrics);
- virtual int CpuOveruseMeasures(int channel,
- int* capture_jitter_ms,
- int* avg_encode_time_ms,
- int* encode_usage_percent,
- int* capture_queue_delay_ms_per_s);
+ virtual void RegisterSendSideDelayObserver(int channel,
+ SendSideDelayObserver* observer) OVERRIDE;
virtual int CreateChannel(int& video_channel); // NOLINT
virtual int CreateChannel(int& video_channel, // NOLINT
const Config* config);
diff --git a/video_engine/vie_capturer.cc b/video_engine/vie_capturer.cc
index 30d6633..231dcfb 100644
--- a/video_engine/vie_capturer.cc
+++ b/video_engine/vie_capturer.cc
@@ -56,7 +56,6 @@
brightness_frame_stats_(NULL),
current_brightness_level_(Normal),
reported_brightness_level_(Normal),
- denoising_enabled_(false),
observer_cs_(CriticalSectionWrapper::CreateCriticalSection()),
observer_(NULL),
overuse_detector_(new OveruseFrameDetector(Clock::GetRealTimeClock())) {
@@ -404,28 +403,6 @@
return 0;
}
-int32_t ViECapturer::EnableDenoising(bool enable) {
- CriticalSectionScoped cs(deliver_cs_.get());
- if (enable) {
- if (denoising_enabled_) {
- // Already enabled, nothing need to be done.
- return 0;
- }
- denoising_enabled_ = true;
- if (IncImageProcRefCount() != 0) {
- return -1;
- }
- } else {
- if (denoising_enabled_ == false) {
- // Already disabled, nothing need to be done.
- return 0;
- }
- denoising_enabled_ = false;
- DecImageProcRefCount();
- }
- return 0;
-}
-
int32_t ViECapturer::EnableDeflickering(bool enable) {
CriticalSectionScoped cs(deliver_cs_.get());
if (enable) {
@@ -516,9 +493,6 @@
LOG_F(LS_ERROR) << "Could not get frame stats.";
}
}
- if (denoising_enabled_) {
- image_proc_module_->Denoising(video_frame);
- }
if (brightness_frame_stats_) {
if (image_proc_module_->GetFrameStats(brightness_frame_stats_,
*video_frame) == 0) {
diff --git a/video_engine/vie_capturer.h b/video_engine/vie_capturer.h
index 8e89357..fdee5d8 100644
--- a/video_engine/vie_capturer.h
+++ b/video_engine/vie_capturer.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/video_capture/include/video_capture.h"
@@ -20,7 +21,6 @@
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
#include "webrtc/modules/video_processing/main/interface/video_processing.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
#include "webrtc/video_engine/include/vie_base.h"
#include "webrtc/video_engine/include/vie_capture.h"
@@ -94,7 +94,6 @@
// Effect filter.
int32_t RegisterEffectFilter(ViEEffectFilter* effect_filter);
- int32_t EnableDenoising(bool enable);
int32_t EnableDeflickering(bool enable);
int32_t EnableBrightnessAlarm(bool enable);
@@ -180,7 +179,6 @@
VideoProcessingModule::FrameStats* brightness_frame_stats_;
Brightness current_brightness_level_;
Brightness reported_brightness_level_;
- bool denoising_enabled_;
// Statistics observer.
scoped_ptr<CriticalSectionWrapper> observer_cs_;
diff --git a/video_engine/vie_channel.cc b/video_engine/vie_channel.cc
index 62bb095..bbcb602 100644
--- a/video_engine/vie_channel.cc
+++ b/video_engine/vie_channel.cc
@@ -41,6 +41,50 @@
static const int kMaxTargetDelayMs = 10000;
static const float kMaxIncompleteTimeMultiplier = 3.5f;
+namespace {
+
+RTCPReportBlock AggregateReportBlocks(
+ const std::vector<RTCPReportBlock>& report_blocks,
+ std::map<uint32_t, RTCPReportBlock>* prev_report_blocks) {
+ int fraction_lost_sum = 0;
+ int fl_seq_num_sum = 0;
+ int jitter_sum = 0;
+ int number_of_report_blocks = 0;
+ RTCPReportBlock aggregate;
+ std::vector<RTCPReportBlock>::const_iterator report_block =
+ report_blocks.begin();
+ for (; report_block != report_blocks.end(); ++report_block) {
+ aggregate.cumulativeLost += report_block->cumulativeLost;
+ std::map<uint32_t, RTCPReportBlock>::iterator prev_report_block =
+ prev_report_blocks->find(report_block->sourceSSRC);
+ if (prev_report_block != prev_report_blocks->end()) {
+ // Skip the first report block since we won't be able to get a correct
+ // weight for it.
+ int seq_num_diff = report_block->extendedHighSeqNum -
+ prev_report_block->second.extendedHighSeqNum;
+ if (seq_num_diff > 0) {
+ fraction_lost_sum += report_block->fractionLost * seq_num_diff;
+ fl_seq_num_sum += seq_num_diff;
+ }
+ }
+ jitter_sum += report_block->jitter;
+ ++number_of_report_blocks;
+ (*prev_report_blocks)[report_block->sourceSSRC] = *report_block;
+ }
+ if (fl_seq_num_sum > 0) {
+ aggregate.fractionLost =
+ (fraction_lost_sum + fl_seq_num_sum / 2) / fl_seq_num_sum;
+ }
+ if (number_of_report_blocks > 0) {
+ aggregate.jitter =
+ (jitter_sum + number_of_report_blocks / 2) / number_of_report_blocks;
+ }
+ // Not well defined for aggregated report blocks.
+ aggregate.extendedHighSeqNum = 0;
+ return aggregate;
+}
+} // namespace
+
// Helper class receiving statistics callbacks.
class ChannelStatsObserver : public CallStatsObserver {
public:
@@ -116,6 +160,9 @@
configuration.remote_bitrate_estimator = remote_bitrate_estimator;
configuration.paced_sender = paced_sender;
configuration.receive_statistics = vie_receiver_.GetReceiveStatistics();
+ configuration.send_bitrate_observer = &send_bitrate_observer_;
+ configuration.send_frame_count_observer = &send_frame_count_observer_;
+ configuration.send_side_delay_observer = &send_side_delay_observer_;
rtp_rtcp_.reset(RtpRtcp::CreateRtpRtcp(configuration));
vie_receiver_.SetRtpRtcpModule(rtp_rtcp_.get());
@@ -244,31 +291,25 @@
num_modules_to_add = 0;
}
- while (removed_rtp_rtcp_.size() > 0 && num_modules_to_add > 0) {
- RtpRtcp* rtp_rtcp = removed_rtp_rtcp_.front();
+ // Add back removed rtp modules. Order is important (allocate from front of
+ // removed modules) to preserve RTP settings such as SSRCs for simulcast
+ // streams.
+ std::list<RtpRtcp*> new_rtp_modules;
+ for (; removed_rtp_rtcp_.size() > 0 && num_modules_to_add > 0;
+ --num_modules_to_add) {
+ new_rtp_modules.push_back(removed_rtp_rtcp_.front());
removed_rtp_rtcp_.pop_front();
- simulcast_rtp_rtcp_.push_back(rtp_rtcp);
- rtp_rtcp->SetSendingStatus(rtp_rtcp_->Sending());
- rtp_rtcp->SetSendingMediaStatus(rtp_rtcp_->SendingMedia());
- module_process_thread_.RegisterModule(rtp_rtcp);
- --num_modules_to_add;
}
- for (int i = 0; i < num_modules_to_add; ++i) {
- RtpRtcp::Configuration configuration;
- configuration.id = ViEModuleId(engine_id_, channel_id_);
- configuration.audio = false; // Video.
- configuration.default_module = default_rtp_rtcp_;
- configuration.outgoing_transport = &vie_sender_;
- configuration.intra_frame_callback = intra_frame_observer_;
- configuration.bandwidth_callback = bandwidth_observer_.get();
- configuration.rtt_stats = rtt_stats_;
- configuration.paced_sender = paced_sender_;
+ for (int i = 0; i < num_modules_to_add; ++i)
+ new_rtp_modules.push_back(CreateRtpRtcpModule());
- RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration);
+ // Initialize newly added modules.
+ for (std::list<RtpRtcp*>::iterator it = new_rtp_modules.begin();
+ it != new_rtp_modules.end();
+ ++it) {
+ RtpRtcp* rtp_rtcp = *it;
- // Silently ignore error.
- module_process_thread_.RegisterModule(rtp_rtcp);
rtp_rtcp->SetRTCPStatus(rtp_rtcp_->RTCP());
if (rtp_rtcp_->StorePackets()) {
@@ -278,13 +319,23 @@
}
if (fec_enabled) {
- rtp_rtcp->SetGenericFECStatus(fec_enabled, payload_type_red,
- payload_type_fec);
+ rtp_rtcp->SetGenericFECStatus(
+ fec_enabled, payload_type_red, payload_type_fec);
}
rtp_rtcp->SetSendingStatus(rtp_rtcp_->Sending());
rtp_rtcp->SetSendingMediaStatus(rtp_rtcp_->SendingMedia());
+
+ int mode;
+ uint32_t ssrc;
+ int payload_type;
+ rtp_rtcp_->RTXSendStatus(&mode, &ssrc, &payload_type);
+ rtp_rtcp->SetRTXSendStatus(mode);
simulcast_rtp_rtcp_.push_back(rtp_rtcp);
+
+ // Silently ignore error.
+ module_process_thread_.RegisterModule(rtp_rtcp);
}
+
// Remove last in list if we have too many.
for (int j = simulcast_rtp_rtcp_.size();
j > (video_codec.numberOfSimulcastStreams - 1);
@@ -293,10 +344,8 @@
module_process_thread_.DeRegisterModule(rtp_rtcp);
rtp_rtcp->SetSendingStatus(false);
rtp_rtcp->SetSendingMediaStatus(false);
- rtp_rtcp->RegisterSendFrameCountObserver(NULL);
rtp_rtcp->RegisterSendChannelRtcpStatisticsCallback(NULL);
rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(NULL);
- rtp_rtcp->RegisterVideoBitrateObserver(NULL);
simulcast_rtp_rtcp_.pop_back();
removed_rtp_rtcp_.push_front(rtp_rtcp);
}
@@ -342,14 +391,10 @@
rtp_rtcp->DeregisterSendRtpHeaderExtension(
kRtpExtensionAbsoluteSendTime);
}
- rtp_rtcp->RegisterSendFrameCountObserver(
- rtp_rtcp_->GetSendFrameCountObserver());
rtp_rtcp->RegisterSendChannelRtcpStatisticsCallback(
rtp_rtcp_->GetSendChannelRtcpStatisticsCallback());
rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(
rtp_rtcp_->GetSendChannelRtpStatisticsCallback());
- rtp_rtcp->RegisterVideoBitrateObserver(
- rtp_rtcp_->GetVideoBitrateObserver());
}
// |RegisterSimulcastRtpRtcpModules| resets all old weak pointers and old
// modules can be deleted after this step.
@@ -360,28 +405,14 @@
module_process_thread_.DeRegisterModule(rtp_rtcp);
rtp_rtcp->SetSendingStatus(false);
rtp_rtcp->SetSendingMediaStatus(false);
- rtp_rtcp->RegisterSendFrameCountObserver(NULL);
rtp_rtcp->RegisterSendChannelRtcpStatisticsCallback(NULL);
rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(NULL);
- rtp_rtcp->RegisterVideoBitrateObserver(NULL);
simulcast_rtp_rtcp_.pop_back();
removed_rtp_rtcp_.push_front(rtp_rtcp);
}
// Clear any previous modules.
vie_receiver_.RegisterSimulcastRtpRtcpModules(simulcast_rtp_rtcp_);
}
- // Enable this if H264 is available.
- // This sets the wanted packetization mode.
- // if (video_codec.plType == kVideoCodecH264) {
- // if (video_codec.codecSpecific.H264.packetization == kH264SingleMode) {
- // rtp_rtcp_->SetH264PacketizationMode(H264_SINGLE_NAL_MODE);
- // } else {
- // rtp_rtcp_->SetH264PacketizationMode(H264_NON_INTERLEAVED_MODE);
- // }
- // if (video_codec.codecSpecific.H264.configParametersSize > 0) {
- // rtp_rtcp_->SetH264SendModeNALU_PPS_SPS(true);
- // }
- // }
// Don't log this error, no way to check in advance if this pl_type is
// registered or not...
@@ -792,29 +823,15 @@
int32_t ViEChannel::SetSSRC(const uint32_t SSRC,
const StreamType usage,
const uint8_t simulcast_idx) {
- if (simulcast_idx == 0) {
- if (usage == kViEStreamTypeRtx) {
- rtp_rtcp_->SetRtxSsrc(SSRC);
- } else {
- rtp_rtcp_->SetSSRC(SSRC);
- }
- return 0;
- }
CriticalSectionScoped cs(rtp_rtcp_cs_.get());
- if (simulcast_idx > simulcast_rtp_rtcp_.size()) {
- return -1;
- }
- std::list<RtpRtcp*>::const_iterator it = simulcast_rtp_rtcp_.begin();
- for (int i = 1; i < simulcast_idx; ++i, ++it) {
- if (it == simulcast_rtp_rtcp_.end()) {
- return -1;
- }
- }
- RtpRtcp* rtp_rtcp_module = *it;
+ ReserveRtpRtcpModules(simulcast_idx + 1);
+ RtpRtcp* rtp_rtcp = GetRtpRtcpModule(simulcast_idx);
+ if (rtp_rtcp == NULL)
+ return -1;
if (usage == kViEStreamTypeRtx) {
- rtp_rtcp_module->SetRtxSsrc(SSRC);
+ rtp_rtcp->SetRtxSsrc(SSRC);
} else {
- rtp_rtcp_module->SetSSRC(SSRC);
+ rtp_rtcp->SetSSRC(SSRC);
}
return 0;
}
@@ -826,21 +843,11 @@
}
int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) {
- if (idx == 0) {
- *ssrc = rtp_rtcp_->SSRC();
- return 0;
- }
CriticalSectionScoped cs(rtp_rtcp_cs_.get());
- if (idx > simulcast_rtp_rtcp_.size()) {
+ RtpRtcp* rtp_rtcp = GetRtpRtcpModule(idx);
+ if (rtp_rtcp == NULL)
return -1;
- }
- std::list<RtpRtcp*>::const_iterator it = simulcast_rtp_rtcp_.begin();
- for (int i = 1; i < idx; ++i, ++it) {
- if (it == simulcast_rtp_rtcp_.end()) {
- return -1;
- }
- }
- *ssrc = (*it)->SSRC();
+ *ssrc = rtp_rtcp->SSRC();
return 0;
}
@@ -913,6 +920,21 @@
return rtp_rtcp_->SetSequenceNumber(sequence_number);
}
+void ViEChannel::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) {
+ assert(!rtp_rtcp_->Sending());
+ default_rtp_rtcp_->SetRtpStateForSsrc(ssrc, rtp_state);
+}
+
+RtpState ViEChannel::GetRtpStateForSsrc(uint32_t ssrc) {
+ assert(!rtp_rtcp_->Sending());
+
+ RtpState rtp_state;
+ if (!default_rtp_rtcp_->GetRtpStateForSsrc(ssrc, &rtp_state)) {
+ LOG(LS_ERROR) << "Couldn't get RTP state for ssrc: " << ssrc;
+ }
+ return rtp_state;
+}
+
int32_t ViEChannel::SetRTCPCName(const char rtcp_cname[]) {
if (rtp_rtcp_->Sending()) {
return -1;
@@ -920,10 +942,6 @@
return rtp_rtcp_->SetCNAME(rtcp_cname);
}
-int32_t ViEChannel::GetRTCPCName(char rtcp_cname[]) {
- return rtp_rtcp_->CNAME(rtcp_cname);
-}
-
int32_t ViEChannel::GetRemoteRTCPCName(char rtcp_cname[]) {
uint32_t remoteSSRC = vie_receiver_.GetRemoteSsrc();
return rtp_rtcp_->RemoteCNAME(remoteSSRC, rtcp_cname);
@@ -991,44 +1009,46 @@
uint32_t* extended_max,
uint32_t* jitter_samples,
int32_t* rtt_ms) {
- // TODO(pwestin) how do we do this for simulcast ? average for all
- // except cumulative_lost that is the sum ?
- // CriticalSectionScoped cs(rtp_rtcp_cs_.get());
-
- // for (std::list<RtpRtcp*>::const_iterator it = simulcast_rtp_rtcp_.begin();
- // it != simulcast_rtp_rtcp_.end();
- // it++) {
- // RtpRtcp* rtp_rtcp = *it;
- // }
- uint32_t remote_ssrc = vie_receiver_.GetRemoteSsrc();
-
- // Get all RTCP receiver report blocks that have been received on this
- // channel. If we receive RTP packets from a remote source we know the
- // remote SSRC and use the report block from him.
- // Otherwise use the first report block.
- std::vector<RTCPReportBlock> remote_stats;
- if (rtp_rtcp_->RemoteRTCPStat(&remote_stats) != 0 || remote_stats.empty()) {
- return -1;
+ // Aggregate the report blocks associated with streams sent on this channel.
+ std::vector<RTCPReportBlock> report_blocks;
+ rtp_rtcp_->RemoteRTCPStat(&report_blocks);
+ {
+ CriticalSectionScoped lock(rtp_rtcp_cs_.get());
+ for (std::list<RtpRtcp*>::iterator it = simulcast_rtp_rtcp_.begin();
+ it != simulcast_rtp_rtcp_.end();
+ ++it) {
+ (*it)->RemoteRTCPStat(&report_blocks);
+ }
}
- std::vector<RTCPReportBlock>::const_iterator statistics =
- remote_stats.begin();
- for (; statistics != remote_stats.end(); ++statistics) {
- if (statistics->remoteSSRC == remote_ssrc)
+
+ if (report_blocks.empty())
+ return -1;
+
+ uint32_t remote_ssrc = vie_receiver_.GetRemoteSsrc();
+ std::vector<RTCPReportBlock>::const_iterator it = report_blocks.begin();
+ for (; it != report_blocks.end(); ++it) {
+ if (it->remoteSSRC == remote_ssrc)
break;
}
-
- if (statistics == remote_stats.end()) {
- // If we have not received any RTCP packets from this SSRC it probably means
- // we have not received any RTP packets.
- // Use the first received report block instead.
- statistics = remote_stats.begin();
- remote_ssrc = statistics->remoteSSRC;
+ if (it == report_blocks.end()) {
+ // We have not received packets with an SSRC matching the report blocks. To
+ // have a chance of calculating an RTT we will try with the SSRC of the
+ // first report block received.
+ // This is very important for send-only channels where we don't know the
+ // SSRC of the other end.
+ remote_ssrc = report_blocks[0].remoteSSRC;
}
- *fraction_lost = statistics->fractionLost;
- *cumulative_lost = statistics->cumulativeLost;
- *extended_max = statistics->extendedHighSeqNum;
- *jitter_samples = statistics->jitter;
+ RTCPReportBlock report;
+ if (report_blocks.size() > 1)
+ report = AggregateReportBlocks(report_blocks, &prev_report_blocks_);
+ else
+ report = report_blocks[0];
+
+ *fraction_lost = report.fractionLost;
+ *cumulative_lost = report.cumulativeLost;
+ *extended_max = report.extendedHighSeqNum;
+ *jitter_samples = report.jitter;
uint16_t dummy;
uint16_t rtt = 0;
@@ -1215,15 +1235,14 @@
return valid_estimate;
}
+void ViEChannel::RegisterSendSideDelayObserver(
+ SendSideDelayObserver* observer) {
+ send_side_delay_observer_.Set(observer);
+}
+
void ViEChannel::RegisterSendBitrateObserver(
BitrateStatisticsObserver* observer) {
- rtp_rtcp_->RegisterVideoBitrateObserver(observer);
- CriticalSectionScoped cs(rtp_rtcp_cs_.get());
- for (std::list<RtpRtcp*>::const_iterator it = simulcast_rtp_rtcp_.begin();
- it != simulcast_rtp_rtcp_.end();
- it++) {
- (*it)->RegisterVideoBitrateObserver(observer);
- }
+ send_bitrate_observer_.Set(observer);
}
void ViEChannel::GetReceiveBandwidthEstimatorStats(
@@ -1530,6 +1549,60 @@
vcm_->SetReceiveChannelParameters(rtt);
}
+void ViEChannel::ReserveRtpRtcpModules(size_t num_modules) {
+ for (size_t total_modules =
+ 1 + simulcast_rtp_rtcp_.size() + removed_rtp_rtcp_.size();
+ total_modules < num_modules;
+ ++total_modules) {
+ RtpRtcp* rtp_rtcp = CreateRtpRtcpModule();
+ rtp_rtcp->SetSendingStatus(false);
+ rtp_rtcp->SetSendingMediaStatus(false);
+ rtp_rtcp->RegisterSendChannelRtcpStatisticsCallback(NULL);
+ rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(NULL);
+ removed_rtp_rtcp_.push_back(rtp_rtcp);
+ }
+}
+
+RtpRtcp* ViEChannel::GetRtpRtcpModule(size_t index) const {
+ if (index == 0)
+ return rtp_rtcp_.get();
+ if (index <= simulcast_rtp_rtcp_.size()) {
+ std::list<RtpRtcp*>::const_iterator it = simulcast_rtp_rtcp_.begin();
+ for (size_t i = 1; i < index; ++i) {
+ ++it;
+ }
+ return *it;
+ }
+
+ // If the requested module exists it must be in the removed list. Index
+ // translation to this list must remove the default module as well as all
+ // active simulcast modules.
+ size_t removed_idx = index - simulcast_rtp_rtcp_.size() - 1;
+ if (removed_idx >= removed_rtp_rtcp_.size())
+ return NULL;
+
+ std::list<RtpRtcp*>::const_iterator it = removed_rtp_rtcp_.begin();
+ while (removed_idx-- > 0)
+ ++it;
+
+ return *it;
+}
+
+RtpRtcp* ViEChannel::CreateRtpRtcpModule() {
+ RtpRtcp::Configuration configuration;
+ configuration.id = ViEModuleId(engine_id_, channel_id_);
+ configuration.audio = false; // Video.
+ configuration.default_module = default_rtp_rtcp_;
+ configuration.outgoing_transport = &vie_sender_;
+ configuration.intra_frame_callback = intra_frame_observer_;
+ configuration.bandwidth_callback = bandwidth_observer_.get();
+ configuration.rtt_stats = rtt_stats_;
+ configuration.paced_sender = paced_sender_;
+ configuration.send_side_delay_observer = &send_side_delay_observer_;
+
+ return RtpRtcp::CreateRtpRtcp(configuration);
+}
+
int32_t ViEChannel::StartDecodeThread() {
// Start the decode thread
if (decode_thread_) {
@@ -1674,13 +1747,7 @@
void ViEChannel::RegisterSendFrameCountObserver(
FrameCountObserver* observer) {
- rtp_rtcp_->RegisterSendFrameCountObserver(observer);
- CriticalSectionScoped cs(rtp_rtcp_cs_.get());
- for (std::list<RtpRtcp*>::iterator it = simulcast_rtp_rtcp_.begin();
- it != simulcast_rtp_rtcp_.end();
- it++) {
- (*it)->RegisterSendFrameCountObserver(observer);
- }
+ send_frame_count_observer_.Set(observer);
}
void ViEChannel::ReceivedBWEPacket(int64_t arrival_time_ms,
diff --git a/video_engine/vie_channel.h b/video_engine/vie_channel.h
index 23b7e5e..e55ade7 100644
--- a/video_engine/vie_channel.h
+++ b/video_engine/vie_channel.h
@@ -16,6 +16,7 @@
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
#include "webrtc/typedefs.h"
@@ -152,12 +153,12 @@
// Sets the starting sequence number, must be called before StartSend.
int32_t SetStartSequenceNumber(uint16_t sequence_number);
+ void SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state);
+ RtpState GetRtpStateForSsrc(uint32_t ssrc);
+
// Sets the CName for the outgoing stream on the channel.
int32_t SetRTCPCName(const char rtcp_cname[]);
- // Gets the CName for the outgoing stream on the channel.
- int32_t GetRTCPCName(char rtcp_cname[]);
-
// Gets the CName of the incoming stream.
int32_t GetRemoteRTCPCName(char rtcp_cname[]);
int32_t RegisterRtpObserver(ViERTPObserver* observer);
@@ -211,7 +212,10 @@
uint32_t* video_bitrate_sent,
uint32_t* fec_bitrate_sent,
uint32_t* nackBitrateSent) const;
+ // TODO(holmer): Deprecated. We should use the SendSideDelayObserver instead
+ // to avoid deadlocks.
bool GetSendSideDelay(int* avg_send_delay, int* max_send_delay) const;
+ void RegisterSendSideDelayObserver(SendSideDelayObserver* observer);
void GetReceiveBandwidthEstimatorStats(
ReceiveBandwidthEstimatorStats* output) const;
@@ -362,6 +366,11 @@
void OnRttUpdate(uint32_t rtt);
private:
+ void ReserveRtpRtcpModules(size_t total_modules)
+ EXCLUSIVE_LOCKS_REQUIRED(rtp_rtcp_cs_);
+ RtpRtcp* GetRtpRtcpModule(size_t simulcast_idx) const
+ EXCLUSIVE_LOCKS_REQUIRED(rtp_rtcp_cs_);
+ RtpRtcp* CreateRtpRtcpModule();
// Assumed to be protected.
int32_t StartDecodeThread();
int32_t StopDecodeThread();
@@ -374,6 +383,66 @@
int GetRequiredNackListSize(int target_delay_ms);
void SetRtxSendStatus(bool enable);
+ // ViEChannel exposes methods that allow to modify observers and callbacks
+ // to be modified. Such an API-style is cumbersome to implement and maintain
+ // at all the levels when comparing to only setting them at construction. As
+ // so this class instantiates its children with a wrapper that can be modified
+ // at a later time.
+ template <class T>
+ class RegisterableCallback : public T {
+ public:
+ RegisterableCallback()
+ : critsect_(CriticalSectionWrapper::CreateCriticalSection()),
+ callback_(NULL) {}
+
+ void Set(T* callback) {
+ CriticalSectionScoped cs(critsect_.get());
+ callback_ = callback;
+ }
+
+ protected:
+ // Note: this should be implemented with a RW-lock to allow simultaneous
+ // calls into the callback. However that doesn't seem to be needed for the
+ // current type of callbacks covered by this class.
+ scoped_ptr<CriticalSectionWrapper> critsect_;
+ T* callback_ GUARDED_BY(critsect_);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RegisterableCallback);
+ };
+
+ class RegisterableBitrateStatisticsObserver:
+ public RegisterableCallback<BitrateStatisticsObserver> {
+ virtual void Notify(const BitrateStatistics& stats, uint32_t ssrc) {
+ CriticalSectionScoped cs(critsect_.get());
+ if (callback_)
+ callback_->Notify(stats, ssrc);
+ }
+ }
+ send_bitrate_observer_;
+
+ class RegisterableFrameCountObserver
+ : public RegisterableCallback<FrameCountObserver> {
+ virtual void FrameCountUpdated(FrameType frame_type,
+ uint32_t frame_count,
+ const unsigned int ssrc) {
+ CriticalSectionScoped cs(critsect_.get());
+ if (callback_)
+ callback_->FrameCountUpdated(frame_type, frame_count, ssrc);
+ }
+ } send_frame_count_observer_;
+
+ class RegisterableSendSideDelayObserver :
+ public RegisterableCallback<SendSideDelayObserver> {
+ virtual void SendSideDelayUpdated(int avg_delay_ms,
+ int max_delay_ms,
+ uint32_t ssrc) OVERRIDE {
+ CriticalSectionScoped cs(critsect_.get());
+ if (callback_)
+ callback_->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc);
+ }
+ } send_side_delay_observer_;
+
int32_t channel_id_;
int32_t engine_id_;
uint32_t number_of_cores_;
@@ -430,6 +499,8 @@
int nack_history_size_sender_;
int max_nack_reordering_threshold_;
I420FrameCallback* pre_render_callback_;
+
+ std::map<uint32_t, RTCPReportBlock> prev_report_blocks_;
};
} // namespace webrtc
diff --git a/video_engine/vie_channel_group.cc b/video_engine/vie_channel_group.cc
index 35df3bb..c6b3f74 100644
--- a/video_engine/vie_channel_group.cc
+++ b/video_engine/vie_channel_group.cc
@@ -10,6 +10,7 @@
#include "webrtc/video_engine/vie_channel_group.h"
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common.h"
#include "webrtc/experiments.h"
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
@@ -18,7 +19,6 @@
#include "webrtc/modules/utility/interface/process_thread.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/video_engine/call_stats.h"
#include "webrtc/video_engine/encoder_state_feedback.h"
#include "webrtc/video_engine/vie_channel.h"
@@ -32,12 +32,12 @@
class WrappingBitrateEstimator : public RemoteBitrateEstimator {
public:
- WrappingBitrateEstimator(int engine_id, RemoteBitrateObserver* observer,
- Clock* clock, ProcessThread* process_thread,
+ WrappingBitrateEstimator(int engine_id,
+ RemoteBitrateObserver* observer,
+ Clock* clock,
const Config& config)
: observer_(observer),
clock_(clock),
- process_thread_(process_thread),
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
engine_id_(engine_id),
min_bitrate_bps_(config.Get<RemoteBitrateEstimatorMinRate>().min_rate),
@@ -48,48 +48,45 @@
min_bitrate_bps_)),
using_absolute_send_time_(false),
packets_since_absolute_send_time_(0) {
- assert(process_thread_ != NULL);
- process_thread_->RegisterModule(rbe_.get());
}
- virtual ~WrappingBitrateEstimator() {
- process_thread_->DeRegisterModule(rbe_.get());
- }
+
+ virtual ~WrappingBitrateEstimator() {}
virtual void IncomingPacket(int64_t arrival_time_ms,
int payload_size,
- const RTPHeader& header) {
+ const RTPHeader& header) OVERRIDE {
CriticalSectionScoped cs(crit_sect_.get());
PickEstimatorFromHeader(header);
rbe_->IncomingPacket(arrival_time_ms, payload_size, header);
}
- virtual int32_t Process() {
- assert(false && "Not supposed to register the WrappingBitrateEstimator!");
- return 0;
+ virtual int32_t Process() OVERRIDE {
+ CriticalSectionScoped cs(crit_sect_.get());
+ return rbe_->Process();
}
- virtual int32_t TimeUntilNextProcess() {
- assert(false && "Not supposed to register the WrappingBitrateEstimator!");
- return 0;
+ virtual int32_t TimeUntilNextProcess() OVERRIDE {
+ CriticalSectionScoped cs(crit_sect_.get());
+ return rbe_->TimeUntilNextProcess();
}
- virtual void OnRttUpdate(uint32_t rtt) {
+ virtual void OnRttUpdate(uint32_t rtt) OVERRIDE {
CriticalSectionScoped cs(crit_sect_.get());
rbe_->OnRttUpdate(rtt);
}
- virtual void RemoveStream(unsigned int ssrc) {
+ virtual void RemoveStream(unsigned int ssrc) OVERRIDE {
CriticalSectionScoped cs(crit_sect_.get());
rbe_->RemoveStream(ssrc);
}
virtual bool LatestEstimate(std::vector<unsigned int>* ssrcs,
- unsigned int* bitrate_bps) const {
+ unsigned int* bitrate_bps) const OVERRIDE {
CriticalSectionScoped cs(crit_sect_.get());
return rbe_->LatestEstimate(ssrcs, bitrate_bps);
}
- virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const {
+ virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const OVERRIDE {
CriticalSectionScoped cs(crit_sect_.get());
return rbe_->GetStats(output);
}
@@ -133,7 +130,6 @@
// Instantiate RBE for Time Offset or Absolute Send Time extensions.
void PickEstimator() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) {
- process_thread_->DeRegisterModule(rbe_.get());
if (using_absolute_send_time_) {
rbe_.reset(AbsoluteSendTimeRemoteBitrateEstimatorFactory().Create(
observer_, clock_, rate_control_type_, min_bitrate_bps_));
@@ -141,12 +137,10 @@
rbe_.reset(RemoteBitrateEstimatorFactory().Create(
observer_, clock_, rate_control_type_, min_bitrate_bps_));
}
- process_thread_->RegisterModule(rbe_.get());
}
RemoteBitrateObserver* observer_;
Clock* clock_;
- ProcessThread* process_thread_;
scoped_ptr<CriticalSectionWrapper> crit_sect_;
const int engine_id_;
const uint32_t min_bitrate_bps_;
@@ -176,14 +170,16 @@
config_ = own_config_.get();
}
assert(config_); // Must have a valid config pointer here.
+
remote_bitrate_estimator_.reset(
new WrappingBitrateEstimator(engine_id,
remb_.get(),
Clock::GetRealTimeClock(),
- process_thread,
- *config_)),
- call_stats_->RegisterStatsObserver(remote_bitrate_estimator_.get());
+ *config_));
+ call_stats_->RegisterStatsObserver(remote_bitrate_estimator_.get());
+
+ process_thread->RegisterModule(remote_bitrate_estimator_.get());
process_thread->RegisterModule(call_stats_.get());
process_thread->RegisterModule(bitrate_controller_.get());
}
@@ -191,6 +187,7 @@
ChannelGroup::~ChannelGroup() {
process_thread_->DeRegisterModule(bitrate_controller_.get());
process_thread_->DeRegisterModule(call_stats_.get());
+ process_thread_->DeRegisterModule(remote_bitrate_estimator_.get());
call_stats_->DeregisterStatsObserver(remote_bitrate_estimator_.get());
assert(channels_.empty());
assert(!remb_->InUse());
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index 3ba56de..f939a66 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -69,6 +69,18 @@
<< ", qp max "
<< codec.simulcastStream[idx].qpMax;
}
+ } else if (codec.codecType == kVideoCodecH264) {
+ LOG(LS_INFO) << "H264 specific settings";
+ LOG(LS_INFO) << "profile: "
+ << codec.codecSpecific.H264.profile
+ << ", framedropping: "
+ << codec.codecSpecific.H264.frameDroppingOn
+ << ", keyFrameInterval: "
+ << codec.codecSpecific.H264.keyFrameInterval
+ << ", spslen: "
+ << codec.codecSpecific.H264.spsLen
+ << ", ppslen: "
+ << codec.codecSpecific.H264.ppsLen;
}
}
@@ -404,20 +416,20 @@
return vie_encoder->CodecTargetBitrate(static_cast<uint32_t*>(bitrate));
}
-unsigned int ViECodecImpl::GetDiscardedPackets(const int video_channel) const {
+int ViECodecImpl::GetNumDiscardedPackets(int video_channel) const {
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
shared_data_->SetLastError(kViECodecInvalidChannelId);
return -1;
}
- return vie_channel->DiscardedPackets();
+ return static_cast<int>(vie_channel->DiscardedPackets());
}
int ViECodecImpl::SetKeyFrameRequestCallbackStatus(const int video_channel,
const bool enable) {
LOG(LS_INFO) << "SetKeyFrameRequestCallbackStatus for " << video_channel
- << ", enacle " << enable;
+ << ", enable " << enable;
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
@@ -629,7 +641,9 @@
} else if ((video_codec.codecType == kVideoCodecVP8 &&
strncmp(video_codec.plName, "VP8", 4) == 0) ||
(video_codec.codecType == kVideoCodecI420 &&
- strncmp(video_codec.plName, "I420", 4) == 0)) {
+ strncmp(video_codec.plName, "I420", 4) == 0) ||
+ (video_codec.codecType == kVideoCodecH264 &&
+ strncmp(video_codec.plName, "H264", 4) == 0)) {
// OK.
} else if (video_codec.codecType != kVideoCodecGeneric) {
LOG(LS_ERROR) << "Codec type and name mismatch.";
diff --git a/video_engine/vie_codec_impl.h b/video_engine/vie_codec_impl.h
index cee3ed2..ed8bf8a 100644
--- a/video_engine/vie_codec_impl.h
+++ b/video_engine/vie_codec_impl.h
@@ -53,7 +53,7 @@
int* delay_ms) const;
virtual int GetCodecTargetBitrate(const int video_channel,
unsigned int* bitrate) const;
- virtual unsigned int GetDiscardedPackets(const int video_channel) const;
+ virtual int GetNumDiscardedPackets(int video_channel) const;
virtual int SetKeyFrameRequestCallbackStatus(const int video_channel,
const bool enable);
virtual int SetSignalKeyPacketLossStatus(const int video_channel,
diff --git a/video_engine/vie_defines.h b/video_engine/vie_defines.h
index eb499fa..7bfed46 100644
--- a/video_engine/vie_defines.h
+++ b/video_engine/vie_defines.h
@@ -120,14 +120,6 @@
#if defined(_WIN32)
#define RENDER_MODULE_TYPE kRenderWindows
- // Warning pragmas.
- // new behavior: elements of array 'XXX' will be default initialized.
- #pragma warning(disable: 4351)
- // 'this' : used in base member initializer list.
- #pragma warning(disable: 4355)
- // Frame pointer register 'ebp' modified by inline assembly code.
- #pragma warning(disable: 4731)
-
// Include libraries.
#pragma comment(lib, "winmm.lib")
diff --git a/video_engine/vie_encoder.cc b/video_engine/vie_encoder.cc
index 40a61de..0955066 100644
--- a/video_engine/vie_encoder.cc
+++ b/video_engine/vie_encoder.cc
@@ -23,6 +23,7 @@
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
#include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
#include "webrtc/modules/video_coding/main/source/encoded_frame.h"
+#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
@@ -34,16 +35,6 @@
namespace webrtc {
-// Pace in kbits/s until we receive first estimate.
-static const int kInitialPace = 2000;
-
-// Pacing-rate relative to our target send rate.
-// Multiplicative factor that is applied to the target bitrate to calculate the
-// number of bytes that can be transmitted per interval.
-// Increasing this factor will result in lower delays in cases of bitrate
-// overshoots from the encoder.
-static const float kPaceMultiplier = 2.5f;
-
// Margin on when we pause the encoder when the pacing buffer overflows relative
// to the configured buffer delay.
static const float kEncoderPausePacerMargin = 2.0f;
@@ -172,7 +163,8 @@
bitrate_observer_.reset(new ViEBitrateObserver(this));
pacing_callback_.reset(new ViEPacedSenderCallback(this));
paced_sender_.reset(
- new PacedSender(pacing_callback_.get(), kInitialPace, kPaceMultiplier));
+ new PacedSender(Clock::GetRealTimeClock(), pacing_callback_.get(),
+ PacedSender::kDefaultInitialPaceKbps, 0));
}
bool ViEEncoder::Init() {
@@ -195,8 +187,13 @@
qm_callback_ = new QMVideoSettingsCallback(&vpm_);
#ifdef VIDEOCODEC_VP8
+ VideoCodecType codec_type = webrtc::kVideoCodecVP8;
+#else
+ VideoCodecType codec_type = webrtc::kVideoCodecI420;
+#endif
+
VideoCodec video_codec;
- if (vcm_.Codec(webrtc::kVideoCodecVP8, &video_codec) != VCM_OK) {
+ if (vcm_.Codec(codec_type, &video_codec) != VCM_OK) {
return false;
}
{
@@ -210,21 +207,6 @@
if (default_rtp_rtcp_->RegisterSendPayload(video_codec) != 0) {
return false;
}
-#else
- VideoCodec video_codec;
- if (vcm_.Codec(webrtc::kVideoCodecI420, &video_codec) == VCM_OK) {
- {
- CriticalSectionScoped cs(data_cs_.get());
- send_padding_ = video_codec.numberOfSimulcastStreams > 1;
- }
- vcm_.RegisterSendCodec(&video_codec, number_of_cores_,
- default_rtp_rtcp_->MaxDataPayloadLength());
- default_rtp_rtcp_->RegisterSendPayload(video_codec);
- } else {
- return false;
- }
-#endif
-
if (vcm_.RegisterTransportCallback(this) != 0) {
return false;
}
@@ -330,7 +312,10 @@
current_send_codec.extra_options = NULL;
if (vcm_.RegisterSendCodec(¤t_send_codec, number_of_cores_,
max_data_payload_length) != VCM_OK) {
- return -1;
+ LOG(LS_INFO) << "De-registered the currently used external encoder ("
+ << static_cast<int>(pl_type) << ") and therefore tried to "
+ << "register the corresponding internal encoder, but none "
+ << "was supported.";
}
}
return 0;
@@ -367,11 +352,10 @@
// Set this module as sending right away, let the slave module in the channel
// start and stop sending.
- if (default_rtp_rtcp_->Sending() == false) {
- if (default_rtp_rtcp_->SetSendingStatus(true) != 0) {
- return -1;
- }
+ if (default_rtp_rtcp_->SetSendingStatus(true) != 0) {
+ return -1;
}
+
bitrate_controller_->SetBitrateObserver(bitrate_observer_.get(),
video_codec.startBitrate * 1000,
video_codec.minBitrate * 1000,
@@ -383,8 +367,9 @@
if (pad_up_to_bitrate_kbps < min_transmit_bitrate_kbps_)
pad_up_to_bitrate_kbps = min_transmit_bitrate_kbps_;
- paced_sender_->UpdateBitrate(kPaceMultiplier * video_codec.startBitrate,
- pad_up_to_bitrate_kbps);
+ paced_sender_->UpdateBitrate(
+ PacedSender::kDefaultPaceMultiplier * video_codec.startBitrate,
+ pad_up_to_bitrate_kbps);
return 0;
}
@@ -487,10 +472,6 @@
}
encoder_paused_and_dropped_frame_ = false;
}
- if (video_frame->native_handle() != NULL) {
- // TODO(wuchengli): add texture support. http://crbug.com/362437
- return;
- }
// Convert render time, in ms, to RTP timestamp.
const int kMsToRtpTimestamp = 90;
@@ -501,22 +482,6 @@
TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame->render_time_ms(),
"Encode");
video_frame->set_timestamp(time_stamp);
- {
- CriticalSectionScoped cs(callback_cs_.get());
- if (effect_filter_) {
- unsigned int length = CalcBufferSize(kI420,
- video_frame->width(),
- video_frame->height());
- scoped_ptr<uint8_t[]> video_buffer(new uint8_t[length]);
- ExtractBuffer(*video_frame, length, video_buffer.get());
- effect_filter_->Transform(length,
- video_buffer.get(),
- video_frame->ntp_time_ms(),
- video_frame->timestamp(),
- video_frame->width(),
- video_frame->height());
- }
- }
// Make sure the CSRC list is correct.
if (num_csrcs > 0) {
@@ -530,17 +495,37 @@
}
default_rtp_rtcp_->SetCSRCs(tempCSRC, (uint8_t) num_csrcs);
}
- // Pass frame via preprocessor.
+
I420VideoFrame* decimated_frame = NULL;
- const int ret = vpm_.PreprocessFrame(*video_frame, &decimated_frame);
- if (ret == 1) {
- // Drop this frame.
- return;
+ // TODO(wuchengli): support texture frames.
+ if (video_frame->native_handle() == NULL) {
+ {
+ CriticalSectionScoped cs(callback_cs_.get());
+ if (effect_filter_) {
+ unsigned int length =
+ CalcBufferSize(kI420, video_frame->width(), video_frame->height());
+ scoped_ptr<uint8_t[]> video_buffer(new uint8_t[length]);
+ ExtractBuffer(*video_frame, length, video_buffer.get());
+ effect_filter_->Transform(length,
+ video_buffer.get(),
+ video_frame->ntp_time_ms(),
+ video_frame->timestamp(),
+ video_frame->width(),
+ video_frame->height());
+ }
+ }
+
+ // Pass frame via preprocessor.
+ const int ret = vpm_.PreprocessFrame(*video_frame, &decimated_frame);
+ if (ret == 1) {
+ // Drop this frame.
+ return;
+ }
+ if (ret != VPM_OK) {
+ return;
+ }
}
- if (ret != VPM_OK) {
- return;
- }
- // Frame was not sampled => use original.
+ // If the frame was not resampled or scaled => use original.
if (decimated_frame == NULL) {
decimated_frame = video_frame;
}
@@ -551,20 +536,28 @@
pre_encode_callback_->FrameCallback(decimated_frame);
}
+ if (video_frame->native_handle() != NULL) {
+ // TODO(wuchengli): add texture support. http://crbug.com/362437
+ return;
+ }
+
#ifdef VIDEOCODEC_VP8
if (vcm_.SendCodec() == webrtc::kVideoCodecVP8) {
webrtc::CodecSpecificInfo codec_specific_info;
codec_specific_info.codecType = webrtc::kVideoCodecVP8;
- codec_specific_info.codecSpecific.VP8.hasReceivedRPSI =
- has_received_rpsi_;
- codec_specific_info.codecSpecific.VP8.hasReceivedSLI =
- has_received_sli_;
- codec_specific_info.codecSpecific.VP8.pictureIdRPSI =
- picture_id_rpsi_;
- codec_specific_info.codecSpecific.VP8.pictureIdSLI =
- picture_id_sli_;
- has_received_sli_ = false;
- has_received_rpsi_ = false;
+ {
+ CriticalSectionScoped cs(data_cs_.get());
+ codec_specific_info.codecSpecific.VP8.hasReceivedRPSI =
+ has_received_rpsi_;
+ codec_specific_info.codecSpecific.VP8.hasReceivedSLI =
+ has_received_sli_;
+ codec_specific_info.codecSpecific.VP8.pictureIdRPSI =
+ picture_id_rpsi_;
+ codec_specific_info.codecSpecific.VP8.pictureIdSLI =
+ picture_id_sli_;
+ has_received_sli_ = false;
+ has_received_rpsi_ = false;
+ }
vcm_.AddVideoFrame(*decimated_frame, vpm_.ContentMetrics(),
&codec_specific_info);
@@ -746,12 +739,14 @@
void ViEEncoder::OnReceivedSLI(uint32_t /*ssrc*/,
uint8_t picture_id) {
+ CriticalSectionScoped cs(data_cs_.get());
picture_id_sli_ = picture_id;
has_received_sli_ = true;
}
void ViEEncoder::OnReceivedRPSI(uint32_t /*ssrc*/,
uint64_t picture_id) {
+ CriticalSectionScoped cs(data_cs_.get());
picture_id_rpsi_ = picture_id;
has_received_rpsi_ = true;
}
@@ -889,8 +884,9 @@
if (pad_up_to_bitrate_kbps > bitrate_kbps)
pad_up_to_bitrate_kbps = bitrate_kbps;
- paced_sender_->UpdateBitrate(kPaceMultiplier * bitrate_kbps,
- pad_up_to_bitrate_kbps);
+ paced_sender_->UpdateBitrate(
+ PacedSender::kDefaultPaceMultiplier * bitrate_kbps,
+ pad_up_to_bitrate_kbps);
default_rtp_rtcp_->SetTargetSendBitrate(stream_bitrates);
if (video_suspended_ == video_is_suspended)
return;
diff --git a/video_engine/vie_encoder.h b/video_engine/vie_encoder.h
index 3eb5f55..51c1d01 100644
--- a/video_engine/vie_encoder.h
+++ b/video_engine/vie_encoder.h
@@ -14,13 +14,13 @@
#include <list>
#include <map>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
#include "webrtc/modules/video_processing/main/interface/video_processing.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
#include "webrtc/frame_callback.h"
#include "webrtc/video_engine/vie_defines.h"
@@ -96,13 +96,13 @@
virtual void DeliverFrame(int id,
I420VideoFrame* video_frame,
int num_csrcs = 0,
- const uint32_t CSRC[kRtpCsrcSize] = NULL);
- virtual void DelayChanged(int id, int frame_delay);
+ const uint32_t CSRC[kRtpCsrcSize] = NULL) OVERRIDE;
+ virtual void DelayChanged(int id, int frame_delay) OVERRIDE;
virtual int GetPreferedFrameSettings(int* width,
int* height,
- int* frame_rate);
+ int* frame_rate) OVERRIDE;
- virtual void ProviderDestroyed(int id) {
+ virtual void ProviderDestroyed(int id) OVERRIDE {
return;
}
@@ -129,7 +129,7 @@
const uint8_t* payload_data,
uint32_t payload_size,
const RTPFragmentationHeader& fragmentation_header,
- const RTPVideoHeader* rtp_video_hdr);
+ const RTPVideoHeader* rtp_video_hdr) OVERRIDE;
// Implements VideoProtectionCallback.
virtual int ProtectionRequest(
@@ -137,18 +137,20 @@
const FecProtectionParams* key_fec_params,
uint32_t* sent_video_rate_bps,
uint32_t* sent_nack_rate_bps,
- uint32_t* sent_fec_rate_bps);
+ uint32_t* sent_fec_rate_bps) OVERRIDE;
// Implements VideoSendStatisticsCallback.
virtual int32_t SendStatistics(const uint32_t bit_rate,
- const uint32_t frame_rate);
+ const uint32_t frame_rate) OVERRIDE;
+
int32_t RegisterCodecObserver(ViEEncoderObserver* observer);
// Implements RtcpIntraFrameObserver.
- virtual void OnReceivedIntraFrameRequest(uint32_t ssrc);
- virtual void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id);
- virtual void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id);
- virtual void OnLocalSsrcChanged(uint32_t old_ssrc, uint32_t new_ssrc);
+ virtual void OnReceivedIntraFrameRequest(uint32_t ssrc) OVERRIDE;
+ virtual void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) OVERRIDE;
+ virtual void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) OVERRIDE;
+ virtual void OnLocalSsrcChanged(uint32_t old_ssrc,
+ uint32_t new_ssrc) OVERRIDE;
// Sets SSRCs for all streams.
bool SetSsrcs(const std::list<unsigned int>& ssrcs);
@@ -159,15 +161,15 @@
int32_t RegisterEffectFilter(ViEEffectFilter* effect_filter);
// Enables recording of debugging information.
- virtual int StartDebugRecording(const char* fileNameUTF8);
+ int StartDebugRecording(const char* fileNameUTF8);
// Disables recording of debugging information.
- virtual int StopDebugRecording();
+ int StopDebugRecording();
// Lets the sender suspend video when the rate drops below
// |threshold_bps|, and turns back on when the rate goes back up above
// |threshold_bps| + |window_bps|.
- virtual void SuspendBelowMinBitrate();
+ void SuspendBelowMinBitrate();
// New-style callbacks, used by VideoSendStream.
void RegisterPreEncodeCallback(I420FrameCallback* pre_encode_callback);
@@ -189,7 +191,7 @@
int64_t capture_time_ms, bool retransmission);
int TimeToSendPadding(int bytes);
private:
- bool EncoderPaused() const;
+ bool EncoderPaused() const EXCLUSIVE_LOCKS_REQUIRED(data_cs_);
int32_t engine_id_;
const int channel_id_;
@@ -206,32 +208,33 @@
BitrateController* bitrate_controller_;
- int64_t time_of_last_incoming_frame_ms_;
- bool send_padding_;
+ int64_t time_of_last_incoming_frame_ms_ GUARDED_BY(data_cs_);
+ bool send_padding_ GUARDED_BY(data_cs_);
int min_transmit_bitrate_kbps_ GUARDED_BY(data_cs_);
- int target_delay_ms_;
- bool network_is_transmitting_;
- bool encoder_paused_;
- bool encoder_paused_and_dropped_frame_;
- std::map<unsigned int, int64_t> time_last_intra_request_ms_;
+ int target_delay_ms_ GUARDED_BY(data_cs_);
+ bool network_is_transmitting_ GUARDED_BY(data_cs_);
+ bool encoder_paused_ GUARDED_BY(data_cs_);
+ bool encoder_paused_and_dropped_frame_ GUARDED_BY(data_cs_);
+ std::map<unsigned int, int64_t> time_last_intra_request_ms_
+ GUARDED_BY(data_cs_);
bool fec_enabled_;
bool nack_enabled_;
ViEEncoderObserver* codec_observer_ GUARDED_BY(callback_cs_);
- ViEEffectFilter* effect_filter_;
+ ViEEffectFilter* effect_filter_ GUARDED_BY(callback_cs_);
ProcessThread& module_process_thread_;
- bool has_received_sli_;
- uint8_t picture_id_sli_;
- bool has_received_rpsi_;
- uint64_t picture_id_rpsi_;
- std::map<unsigned int, int> ssrc_streams_;
+ bool has_received_sli_ GUARDED_BY(data_cs_);
+ uint8_t picture_id_sli_ GUARDED_BY(data_cs_);
+ bool has_received_rpsi_ GUARDED_BY(data_cs_);
+ uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_);
+ std::map<unsigned int, int> ssrc_streams_ GUARDED_BY(data_cs_);
// Quality modes callback
QMVideoSettingsCallback* qm_callback_;
- bool video_suspended_;
- I420FrameCallback* pre_encode_callback_;
+ bool video_suspended_ GUARDED_BY(data_cs_);
+ I420FrameCallback* pre_encode_callback_ GUARDED_BY(callback_cs_);
};
} // namespace webrtc
diff --git a/video_engine/vie_frame_provider_base.cc b/video_engine/vie_frame_provider_base.cc
index 3dceb17..a5cd838 100644
--- a/video_engine/vie_frame_provider_base.cc
+++ b/video_engine/vie_frame_provider_base.cc
@@ -55,18 +55,22 @@
// Deliver the frame to all registered callbacks.
if (frame_callbacks_.size() > 0) {
- if (frame_callbacks_.size() == 1 || video_frame->native_handle() != NULL) {
+ if (frame_callbacks_.size() == 1) {
// We don't have to copy the frame.
frame_callbacks_.front()->DeliverFrame(id_, video_frame, num_csrcs, CSRC);
} else {
- // Make a copy of the frame for all callbacks.callback
for (FrameCallbacks::iterator it = frame_callbacks_.begin();
it != frame_callbacks_.end(); ++it) {
- if (!extra_frame_.get()) {
- extra_frame_.reset(new I420VideoFrame());
+ if (video_frame->native_handle() != NULL) {
+ (*it)->DeliverFrame(id_, video_frame, num_csrcs, CSRC);
+ } else {
+ // Make a copy of the frame for all callbacks.
+ if (!extra_frame_.get()) {
+ extra_frame_.reset(new I420VideoFrame());
+ }
+ extra_frame_->CopyFrame(*video_frame);
+ (*it)->DeliverFrame(id_, extra_frame_.get(), num_csrcs, CSRC);
}
- extra_frame_->CopyFrame(*video_frame);
- (*it)->DeliverFrame(id_, extra_frame_.get(), num_csrcs, CSRC);
}
}
}
diff --git a/video_engine/vie_image_process_impl.cc b/video_engine/vie_image_process_impl.cc
index d089c04..13e520a 100644
--- a/video_engine/vie_image_process_impl.cc
+++ b/video_engine/vie_image_process_impl.cc
@@ -182,29 +182,6 @@
return 0;
}
-int ViEImageProcessImpl::EnableDenoising(const int capture_id,
- const bool enable) {
- LOG_F(LS_INFO) << "capture_id: " << capture_id
- << " enable: " << (enable ? "on" : "off");
-
- ViEInputManagerScoped is(*(shared_data_->input_manager()));
- ViECapturer* vie_capture = is.Capture(capture_id);
- if (!vie_capture) {
- shared_data_->SetLastError(kViEImageProcessInvalidCaptureId);
- return -1;
- }
-
- if (vie_capture->EnableDenoising(enable) != 0) {
- if (enable) {
- shared_data_->SetLastError(kViEImageProcessAlreadyEnabled);
- } else {
- shared_data_->SetLastError(kViEImageProcessAlreadyDisabled);
- }
- return -1;
- }
- return 0;
-}
-
int ViEImageProcessImpl::EnableColorEnhancement(const int video_channel,
const bool enable) {
LOG_F(LS_INFO) << "video_channel: " << video_channel
diff --git a/video_engine/vie_image_process_impl.h b/video_engine/vie_image_process_impl.h
index 74a7ff0..38a6a08 100644
--- a/video_engine/vie_image_process_impl.h
+++ b/video_engine/vie_image_process_impl.h
@@ -35,7 +35,6 @@
ViEEffectFilter& render_filter);
virtual int DeregisterRenderEffectFilter(const int video_channel);
virtual int EnableDeflickering(const int capture_id, const bool enable);
- virtual int EnableDenoising(const int capture_id, const bool enable);
virtual int EnableColorEnhancement(const int video_channel,
const bool enable);
virtual void RegisterPreEncodeCallback(
diff --git a/video_engine/vie_impl.cc b/video_engine/vie_impl.cc
index 3cdf5da..79f033b 100644
--- a/video_engine/vie_impl.cc
+++ b/video_engine/vie_impl.cc
@@ -14,11 +14,6 @@
#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/system_wrappers/interface/trace.h"
-#ifdef WEBRTC_ANDROID
-#include "webrtc/modules/video_capture/include/video_capture_factory.h"
-#include "webrtc/modules/video_render/include/video_render.h"
-#endif
-
namespace webrtc {
enum { kModuleId = 0 };
@@ -139,20 +134,4 @@
return Trace::SetTraceCallback(callback);
}
-#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
-int VideoEngine::SetAndroidObjects(JavaVM* javaVM, jobject context) {
- LOG_F(LS_INFO);
-
- if (SetCaptureAndroidVM(javaVM, context) != 0) {
- LOG(LS_ERROR) << "Could not set capture Android VM";
- return -1;
- }
- if (SetRenderAndroidVM(javaVM) != 0) {
- LOG(LS_ERROR) << "Could not set render Android VM";
- return -1;
- }
- return 0;
-}
-#endif
-
} // namespace webrtc
diff --git a/video_engine/vie_manager_base.h b/video_engine/vie_manager_base.h
index f9f008f..c5e9210 100644
--- a/video_engine/vie_manager_base.h
+++ b/video_engine/vie_manager_base.h
@@ -11,7 +11,7 @@
#ifndef WEBRTC_VIDEO_ENGINE_VIE_MANAGER_BASE_H_
#define WEBRTC_VIDEO_ENGINE_VIE_MANAGER_BASE_H_
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
+#include "webrtc/base/thread_annotations.h"
namespace webrtc {
diff --git a/video_engine/vie_receiver.cc b/video_engine/vie_receiver.cc
index 5d90ac6..a19c4b0 100644
--- a/video_engine/vie_receiver.cc
+++ b/video_engine/vie_receiver.cc
@@ -193,7 +193,8 @@
return false;
}
header.payload_type_frequency = kVideoPayloadTypeFrequency;
- return ReceivePacket(rtp_packet, rtp_packet_length, header, false);
+ bool in_order = IsPacketInOrder(header);
+ return ReceivePacket(rtp_packet, rtp_packet_length, header, in_order);
}
void ViEReceiver::ReceivedBWEPacket(
diff --git a/video_engine/vie_receiver.h b/video_engine/vie_receiver.h
index 817cadd..3451d52 100644
--- a/video_engine/vie_receiver.h
+++ b/video_engine/vie_receiver.h
@@ -72,14 +72,14 @@
int ReceivedRTPPacket(const void* rtp_packet, int rtp_packet_length,
const PacketTime& packet_time);
int ReceivedRTCPPacket(const void* rtcp_packet, int rtcp_packet_length);
- virtual bool OnRecoveredPacket(const uint8_t* packet,
- int packet_length) OVERRIDE;
// Implements RtpData.
virtual int32_t OnReceivedPayloadData(
const uint8_t* payload_data,
const uint16_t payload_size,
- const WebRtcRTPHeader* rtp_header);
+ const WebRtcRTPHeader* rtp_header) OVERRIDE;
+ virtual bool OnRecoveredPacket(const uint8_t* packet,
+ int packet_length) OVERRIDE;
void GetReceiveBandwidthEstimatorStats(
ReceiveBandwidthEstimatorStats* output) const;
diff --git a/video_engine/vie_rtp_rtcp_impl.cc b/video_engine/vie_rtp_rtcp_impl.cc
index 53610b4..36e6004 100644
--- a/video_engine/vie_rtp_rtcp_impl.cc
+++ b/video_engine/vie_rtp_rtcp_impl.cc
@@ -194,7 +194,7 @@
int ViERTP_RTCPImpl::SetRtxSendPayloadType(const int video_channel,
const uint8_t payload_type) {
LOG_F(LS_INFO) << "channel: " << video_channel
- << " payload_type: " << payload_type;
+ << " payload_type: " << static_cast<int>(payload_type);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
@@ -225,7 +225,7 @@
int ViERTP_RTCPImpl::SetRtxReceivePayloadType(const int video_channel,
const uint8_t payload_type) {
LOG_F(LS_INFO) << "channel: " << video_channel
- << " payload_type: " << payload_type;
+ << " payload_type: " << static_cast<int>(payload_type);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
@@ -256,6 +256,30 @@
return 0;
}
+void ViERTP_RTCPImpl::SetRtpStateForSsrc(int video_channel,
+ uint32_t ssrc,
+ const RtpState& rtp_state) {
+ ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
+ ViEChannel* vie_channel = cs.Channel(video_channel);
+ if (!vie_channel)
+ return;
+
+ if (vie_channel->Sending()) {
+ LOG_F(LS_ERROR) << "channel " << video_channel << " is already sending.";
+ return;
+ }
+ vie_channel->SetRtpStateForSsrc(ssrc, rtp_state);
+}
+
+RtpState ViERTP_RTCPImpl::GetRtpStateForSsrc(int video_channel, uint32_t ssrc) {
+ ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
+ ViEChannel* vie_channel = cs.Channel(video_channel);
+ if (!vie_channel)
+ return RtpState();
+
+ return vie_channel->GetRtpStateForSsrc(ssrc);
+}
+
int ViERTP_RTCPImpl::SetRTCPStatus(const int video_channel,
const ViERTCPMode rtcp_mode) {
LOG_F(LS_INFO) << "channel: " << video_channel
@@ -314,21 +338,6 @@
return 0;
}
-int ViERTP_RTCPImpl::GetRTCPCName(const int video_channel,
- char rtcp_cname[KMaxRTCPCNameLength]) const {
- ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
- ViEChannel* vie_channel = cs.Channel(video_channel);
- if (!vie_channel) {
- shared_data_->SetLastError(kViERtpRtcpInvalidChannelId);
- return -1;
- }
- if (vie_channel->GetRTCPCName(rtcp_cname) != 0) {
- shared_data_->SetLastError(kViERtpRtcpUnknownError);
- return -1;
- }
- return 0;
-}
-
int ViERTP_RTCPImpl::GetRemoteRTCPCName(
const int video_channel,
char rtcp_cname[KMaxRTCPCNameLength]) const {
@@ -404,8 +413,8 @@
const unsigned char payload_typeFEC) {
LOG_F(LS_INFO) << "channel: " << video_channel
<< " enable: " << (enable ? "on" : "off")
- << " payload_typeRED: " << payload_typeRED
- << " payload_typeFEC: " << payload_typeFEC;
+ << " payload_typeRED: " << static_cast<int>(payload_typeRED)
+ << " payload_typeFEC: " << static_cast<int>(payload_typeFEC);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
@@ -434,8 +443,8 @@
const unsigned char payload_typeFEC) {
LOG_F(LS_INFO) << "channel: " << video_channel
<< " enable: " << (enable ? "on" : "off")
- << " payload_typeRED: " << payload_typeRED
- << " payload_typeFEC: " << payload_typeFEC;
+ << " payload_typeRED: " << static_cast<int>(payload_typeRED)
+ << " payload_typeFEC: " << static_cast<int>(payload_typeFEC);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
diff --git a/video_engine/vie_rtp_rtcp_impl.h b/video_engine/vie_rtp_rtcp_impl.h
index 5eec0ef..5566069 100644
--- a/video_engine/vie_rtp_rtcp_impl.h
+++ b/video_engine/vie_rtp_rtcp_impl.h
@@ -46,14 +46,17 @@
const uint8_t payload_type);
virtual int SetStartSequenceNumber(const int video_channel,
uint16_t sequence_number);
+ virtual void SetRtpStateForSsrc(int video_channel,
+ uint32_t ssrc,
+ const RtpState& rtp_state) OVERRIDE;
+ virtual RtpState GetRtpStateForSsrc(int video_channel,
+ uint32_t ssrc) OVERRIDE;
virtual int SetRTCPStatus(const int video_channel,
const ViERTCPMode rtcp_mode);
virtual int GetRTCPStatus(const int video_channel,
ViERTCPMode& rtcp_mode) const;
virtual int SetRTCPCName(const int video_channel,
const char rtcp_cname[KMaxRTCPCNameLength]);
- virtual int GetRTCPCName(const int video_channel,
- char rtcp_cname[KMaxRTCPCNameLength]) const;
virtual int GetRemoteRTCPCName(const int video_channel,
char rtcp_cname[KMaxRTCPCNameLength]) const;
virtual int SendApplicationDefinedRTCPPacket(
diff --git a/video_engine/vie_sender.cc b/video_engine/vie_sender.cc
index 349bc72..28bf390 100644
--- a/video_engine/vie_sender.cc
+++ b/video_engine/vie_sender.cc
@@ -11,6 +11,7 @@
#include "webrtc/video_engine/vie_sender.h"
#include <assert.h>
+#include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
#include "webrtc/modules/utility/interface/rtp_dump.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
diff --git a/video_engine/vie_sync_module.h b/video_engine/vie_sync_module.h
index cc0d92b..e6ca5fd 100644
--- a/video_engine/vie_sync_module.h
+++ b/video_engine/vie_sync_module.h
@@ -45,8 +45,8 @@
int SetTargetBufferingDelay(int target_delay_ms);
// Implements Module.
- virtual int32_t TimeUntilNextProcess();
- virtual int32_t Process();
+ virtual int32_t TimeUntilNextProcess() OVERRIDE;
+ virtual int32_t Process() OVERRIDE;
private:
scoped_ptr<CriticalSectionWrapper> data_cs_;
diff --git a/video_frame.h b/video_frame.h
new file mode 100644
index 0000000..f76b9af
--- /dev/null
+++ b/video_frame.h
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_VIDEO_FRAME_H_
+#define WEBRTC_VIDEO_FRAME_H_
+
+#include <assert.h>
+
+#include "webrtc/common_video/plane.h"
+// TODO(pbos): Remove scoped_refptr include (and AddRef/Release if they're not
+// used).
+#include "webrtc/system_wrappers/interface/scoped_refptr.h"
+#include "webrtc/typedefs.h"
+
+namespace webrtc {
+
+enum PlaneType {
+ kYPlane = 0,
+ kUPlane = 1,
+ kVPlane = 2,
+ kNumOfPlanes = 3
+};
+
+class I420VideoFrame {
+ public:
+ I420VideoFrame();
+ virtual ~I420VideoFrame();
+ // Infrastructure for refCount implementation.
+ // Implements dummy functions for reference counting so that non reference
+ // counted instantiation can be done. These functions should not be called
+ // when creating the frame with new I420VideoFrame().
+ // Note: do not pass a I420VideoFrame created with new I420VideoFrame() or
+ // equivalent to a scoped_refptr or memory leak will occur.
+ virtual int32_t AddRef() {
+ assert(false);
+ return -1;
+ }
+ virtual int32_t Release() {
+ assert(false);
+ return -1;
+ }
+
+ // CreateEmptyFrame: Sets frame dimensions and allocates buffers based
+ // on set dimensions - height and plane stride.
+ // If required size is bigger than the allocated one, new buffers of adequate
+ // size will be allocated.
+ // Return value: 0 on success, -1 on error.
+ virtual int CreateEmptyFrame(int width,
+ int height,
+ int stride_y,
+ int stride_u,
+ int stride_v);
+
+ // CreateFrame: Sets the frame's members and buffers. If required size is
+ // bigger than allocated one, new buffers of adequate size will be allocated.
+ // Return value: 0 on success, -1 on error.
+ virtual int CreateFrame(int size_y,
+ const uint8_t* buffer_y,
+ int size_u,
+ const uint8_t* buffer_u,
+ int size_v,
+ const uint8_t* buffer_v,
+ int width,
+ int height,
+ int stride_y,
+ int stride_u,
+ int stride_v);
+
+ // Copy frame: If required size is bigger than allocated one, new buffers of
+ // adequate size will be allocated.
+ // Return value: 0 on success, -1 on error.
+ virtual int CopyFrame(const I420VideoFrame& videoFrame);
+
+ // Make a copy of |this|. The caller owns the returned frame.
+ // Return value: a new frame on success, NULL on error.
+ virtual I420VideoFrame* CloneFrame() const;
+
+ // Swap Frame.
+ virtual void SwapFrame(I420VideoFrame* videoFrame);
+
+ // Get pointer to buffer per plane.
+ virtual uint8_t* buffer(PlaneType type);
+ // Overloading with const.
+ virtual const uint8_t* buffer(PlaneType type) const;
+
+ // Get allocated size per plane.
+ virtual int allocated_size(PlaneType type) const;
+
+ // Get allocated stride per plane.
+ virtual int stride(PlaneType type) const;
+
+ // Set frame width.
+ virtual int set_width(int width);
+
+ // Set frame height.
+ virtual int set_height(int height);
+
+ // Get frame width.
+ virtual int width() const { return width_; }
+
+ // Get frame height.
+ virtual int height() const { return height_; }
+
+ // Set frame timestamp (90kHz).
+ virtual void set_timestamp(uint32_t timestamp) { timestamp_ = timestamp; }
+
+ // Get frame timestamp (90kHz).
+ virtual uint32_t timestamp() const { return timestamp_; }
+
+ // Set capture ntp time in miliseconds.
+ virtual void set_ntp_time_ms(int64_t ntp_time_ms) {
+ ntp_time_ms_ = ntp_time_ms;
+ }
+
+ // Get capture ntp time in miliseconds.
+ virtual int64_t ntp_time_ms() const { return ntp_time_ms_; }
+
+ // Set render time in miliseconds.
+ virtual void set_render_time_ms(int64_t render_time_ms) {
+ render_time_ms_ = render_time_ms;
+ }
+
+ // Get render time in miliseconds.
+ virtual int64_t render_time_ms() const { return render_time_ms_; }
+
+ // Return true if underlying plane buffers are of zero size, false if not.
+ virtual bool IsZeroSize() const;
+
+ // Reset underlying plane buffers sizes to 0. This function doesn't
+ // clear memory.
+ virtual void ResetSize();
+
+ // Return the handle of the underlying video frame. This is used when the
+ // frame is backed by a texture. The object should be destroyed when it is no
+ // longer in use, so the underlying resource can be freed.
+ virtual void* native_handle() const;
+
+ protected:
+ // Verifies legality of parameters.
+ // Return value: 0 on success, -1 on error.
+ virtual int CheckDimensions(int width,
+ int height,
+ int stride_y,
+ int stride_u,
+ int stride_v);
+
+ private:
+ // Get the pointer to a specific plane.
+ const Plane* GetPlane(PlaneType type) const;
+ // Overloading with non-const.
+ Plane* GetPlane(PlaneType type);
+
+ Plane y_plane_;
+ Plane u_plane_;
+ Plane v_plane_;
+ int width_;
+ int height_;
+ uint32_t timestamp_;
+ int64_t ntp_time_ms_;
+ int64_t render_time_ms_;
+};
+
+enum VideoFrameType {
+ kKeyFrame = 0,
+ kDeltaFrame = 1,
+ kGoldenFrame = 2,
+ kAltRefFrame = 3,
+ kSkipFrame = 4
+};
+
+// TODO(pbos): Rename EncodedFrame and reformat this class' members.
+class EncodedImage {
+ public:
+ EncodedImage()
+ : _encodedWidth(0),
+ _encodedHeight(0),
+ _timeStamp(0),
+ capture_time_ms_(0),
+ _frameType(kDeltaFrame),
+ _buffer(NULL),
+ _length(0),
+ _size(0),
+ _completeFrame(false) {}
+
+ EncodedImage(uint8_t* buffer, uint32_t length, uint32_t size)
+ : _encodedWidth(0),
+ _encodedHeight(0),
+ _timeStamp(0),
+ ntp_time_ms_(0),
+ capture_time_ms_(0),
+ _frameType(kDeltaFrame),
+ _buffer(buffer),
+ _length(length),
+ _size(size),
+ _completeFrame(false) {}
+
+ uint32_t _encodedWidth;
+ uint32_t _encodedHeight;
+ uint32_t _timeStamp;
+ // NTP time of the capture time in local timebase in milliseconds.
+ int64_t ntp_time_ms_;
+ int64_t capture_time_ms_;
+ VideoFrameType _frameType;
+ uint8_t* _buffer;
+ uint32_t _length;
+ uint32_t _size;
+ bool _completeFrame;
+};
+
+} // namespace webrtc
+#endif // WEBRTC_VIDEO_FRAME_H_
+
diff --git a/video_receive_stream.h b/video_receive_stream.h
index 2584e20..4eb5532 100644
--- a/video_receive_stream.h
+++ b/video_receive_stream.h
@@ -68,7 +68,7 @@
int decode_frame_rate;
int render_frame_rate;
int avg_delay_ms;
- uint32_t discarded_packets;
+ int discarded_packets;
uint32_t ssrc;
std::string c_name;
};
@@ -90,7 +90,7 @@
: remote_ssrc(0),
local_ssrc(0),
rtcp_mode(newapi::kRtcpReducedSize),
- remb(false) {}
+ remb(true) {}
// Synchronization source (stream identifier) to be received.
uint32_t remote_ssrc;
diff --git a/video_send_stream.h b/video_send_stream.h
index a1bc178..dd2bec1 100644
--- a/video_send_stream.h
+++ b/video_send_stream.h
@@ -41,16 +41,10 @@
Stats()
: input_frame_rate(0),
encode_frame_rate(0),
- avg_delay_ms(0),
- max_delay_ms(0),
suspended(false) {}
-
int input_frame_rate;
int encode_frame_rate;
- int avg_delay_ms;
- int max_delay_ms;
bool suspended;
- std::string c_name;
std::map<uint32_t, StreamStats> substreams;
};
@@ -159,8 +153,7 @@
// Set which streams to send. Must have at least as many SSRCs as configured
// in the config. Encoder settings are passed on to the encoder instance along
// with the VideoStream settings.
- virtual bool ReconfigureVideoEncoder(const std::vector<VideoStream>& streams,
- const void* encoder_settings) = 0;
+ virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0;
virtual Stats GetStats() const = 0;
diff --git a/voice_engine/Android.mk b/voice_engine/Android.mk
deleted file mode 100644
index 3dc3c36..0000000
--- a/voice_engine/Android.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../android-webrtc.mk
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc_voe_core
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := \
- audio_frame_operations.cc \
- channel.cc \
- channel_manager.cc \
- dtmf_inband.cc \
- dtmf_inband_queue.cc \
- level_indicator.cc \
- monitor_module.cc \
- output_mixer.cc \
- ref_count.cc \
- shared_data.cc \
- statistics.cc \
- transmit_mixer.cc \
- utility.cc \
- voe_audio_processing_impl.cc \
- voe_base_impl.cc \
- voe_call_report_impl.cc \
- voe_codec_impl.cc \
- voe_dtmf_impl.cc \
- voe_external_media_impl.cc \
- voe_file_impl.cc \
- voe_hardware_impl.cc \
- voe_neteq_stats_impl.cc \
- voe_network_impl.cc \
- voe_rtp_rtcp_impl.cc \
- voe_video_sync_impl.cc \
- voe_volume_control_impl.cc \
- voice_engine_impl.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS) \
- '-DWEBRTC_ANDROID_OPENSLES'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../.. \
- $(LOCAL_PATH)/../../../common_audio/resampler/include \
- $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
- $(LOCAL_PATH)/../../../modules/interface \
- $(LOCAL_PATH)/../../../modules/audio_coding/main/interface \
- $(LOCAL_PATH)/../../../modules/audio_conference_mixer/interface \
- $(LOCAL_PATH)/../../../modules/audio_device/main/interface \
- $(LOCAL_PATH)/../../../modules/audio_device/main/source \
- $(LOCAL_PATH)/../../../modules/audio_processing/include \
- $(LOCAL_PATH)/../../../modules/media_file/interface \
- $(LOCAL_PATH)/../../../modules/rtp_rtcp/interface \
- $(LOCAL_PATH)/../../../modules/udp_transport/interface \
- $(LOCAL_PATH)/../../../modules/utility/interface \
- $(LOCAL_PATH)/../../../system_wrappers/interface
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
-LOCAL_LDLIBS += -ldl -lpthread
-endif
-
-ifneq ($(TARGET_SIMULATOR),true)
-LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
-include $(BUILD_STATIC_LIBRARY)
diff --git a/voice_engine/BUILD.gn b/voice_engine/BUILD.gn
new file mode 100644
index 0000000..f9c5f91
--- /dev/null
+++ b/voice_engine/BUILD.gn
@@ -0,0 +1,105 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../build/webrtc.gni")
+
+source_set("voice_engine") {
+
+ sources = [
+ "../common_types.h",
+ "../engine_configurations.h",
+ "../typedefs.h",
+ "include/voe_audio_processing.h",
+ "include/voe_base.h",
+ "include/voe_codec.h",
+ "include/voe_dtmf.h",
+ "include/voe_errors.h",
+ "include/voe_external_media.h",
+ "include/voe_file.h",
+ "include/voe_hardware.h",
+ "include/voe_neteq_stats.h",
+ "include/voe_network.h",
+ "include/voe_rtp_rtcp.h",
+ "include/voe_video_sync.h",
+ "include/voe_volume_control.h",
+ "channel.cc",
+ "channel.h",
+ "channel_manager.cc",
+ "channel_manager.h",
+ "dtmf_inband.cc",
+ "dtmf_inband.h",
+ "dtmf_inband_queue.cc",
+ "dtmf_inband_queue.h",
+ "level_indicator.cc",
+ "level_indicator.h",
+ "monitor_module.cc",
+ "monitor_module.h",
+ "network_predictor.cc",
+ "network_predictor.h",
+ "output_mixer.cc",
+ "output_mixer.h",
+ "shared_data.cc",
+ "shared_data.h",
+ "statistics.cc",
+ "statistics.h",
+ "transmit_mixer.cc",
+ "transmit_mixer.h",
+ "utility.cc",
+ "utility.h",
+ "voe_audio_processing_impl.cc",
+ "voe_audio_processing_impl.h",
+ "voe_base_impl.cc",
+ "voe_base_impl.h",
+ "voe_codec_impl.cc",
+ "voe_codec_impl.h",
+ "voe_dtmf_impl.cc",
+ "voe_dtmf_impl.h",
+ "voe_external_media_impl.cc",
+ "voe_external_media_impl.h",
+ "voe_file_impl.cc",
+ "voe_file_impl.h",
+ "voe_hardware_impl.cc",
+ "voe_hardware_impl.h",
+ "voe_neteq_stats_impl.cc",
+ "voe_neteq_stats_impl.h",
+ "voe_network_impl.cc",
+ "voe_network_impl.h",
+ "voe_rtp_rtcp_impl.cc",
+ "voe_rtp_rtcp_impl.h",
+ "voe_video_sync_impl.cc",
+ "voe_video_sync_impl.h",
+ "voe_volume_control_impl.cc",
+ "voe_volume_control_impl.h",
+ "voice_engine_defines.h",
+ "voice_engine_impl.cc",
+ "voice_engine_impl.h",
+ ]
+
+ if (is_win) {
+ defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
+ }
+
+ if (is_clang) {
+ # Suppress warnings from Chrome's Clang plugins.
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ "../common_audio",
+ "../modules/audio_coding",
+ "../modules/audio_conference_mixer",
+ "../modules/audio_device",
+ "../modules/audio_processing",
+ "../modules/bitrate_controller",
+ "../modules/media_file",
+ "../modules/rtp_rtcp",
+ "../modules/utility",
+ "../system_wrappers",
+ ]
+}
diff --git a/voice_engine/OWNERS b/voice_engine/OWNERS
index 7bb3cd5..1fe4594 100644
--- a/voice_engine/OWNERS
+++ b/voice_engine/OWNERS
@@ -9,3 +9,5 @@
# structural changes, please get a review from a reviewer in this file.
per-file *.gyp=*
per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc
index f99e590..93a241b 100644
--- a/voice_engine/channel.cc
+++ b/voice_engine/channel.cc
@@ -16,7 +16,6 @@
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
-#include "webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
@@ -699,15 +698,18 @@
(unwrap_timestamp - capture_start_rtp_time_stamp_) /
(GetPlayoutFrequency() / 1000);
- // Compute ntp time.
- audioFrame.ntp_time_ms_ = ntp_estimator_->Estimate(audioFrame.timestamp_);
- // |ntp_time_ms_| won't be valid until at least 2 RTCP SRs are received.
- if (audioFrame.ntp_time_ms_ > 0) {
- // Compute |capture_start_ntp_time_ms_| so that
- // |capture_start_ntp_time_ms_| + |elapsed_time_ms_| == |ntp_time_ms_|
+ {
CriticalSectionScoped lock(ts_stats_lock_.get());
- capture_start_ntp_time_ms_ =
- audioFrame.ntp_time_ms_ - audioFrame.elapsed_time_ms_;
+ // Compute ntp time.
+ audioFrame.ntp_time_ms_ = ntp_estimator_.Estimate(
+ audioFrame.timestamp_);
+ // |ntp_time_ms_| won't be valid until at least 2 RTCP SRs are received.
+ if (audioFrame.ntp_time_ms_ > 0) {
+ // Compute |capture_start_ntp_time_ms_| so that
+ // |capture_start_ntp_time_ms_| + |elapsed_time_ms_| == |ntp_time_ms_|
+ capture_start_ntp_time_ms_ =
+ audioFrame.ntp_time_ms_ - audioFrame.elapsed_time_ms_;
+ }
}
}
@@ -877,7 +879,7 @@
_outputExternalMediaCallbackPtr(NULL),
_timeStamp(0), // This is just an offset, RTP module will add it's own random offset
_sendTelephoneEventPayloadType(106),
- ntp_estimator_(new RemoteNtpTimeEstimator(Clock::GetRealTimeClock())),
+ ntp_estimator_(Clock::GetRealTimeClock()),
jitter_buffer_playout_timestamp_(0),
playout_timestamp_rtp_(0),
playout_timestamp_rtcp_(0),
@@ -934,7 +936,8 @@
true)),
rtcp_bandwidth_observer_(
bitrate_controller_->CreateRtcpBandwidthObserver()),
- send_bitrate_observer_(new VoEBitrateObserver(this))
+ send_bitrate_observer_(new VoEBitrateObserver(this)),
+ network_predictor_(new NetworkPredictor(Clock::GetRealTimeClock()))
{
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::Channel() - ctor");
@@ -1389,61 +1392,6 @@
}
int32_t
-Channel::SetNetEQPlayoutMode(NetEqModes mode)
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::SetNetEQPlayoutMode()");
- AudioPlayoutMode playoutMode(voice);
- switch (mode)
- {
- case kNetEqDefault:
- playoutMode = voice;
- break;
- case kNetEqStreaming:
- playoutMode = streaming;
- break;
- case kNetEqFax:
- playoutMode = fax;
- break;
- case kNetEqOff:
- playoutMode = off;
- break;
- }
- if (audio_coding_->SetPlayoutMode(playoutMode) != 0)
- {
- _engineStatisticsPtr->SetLastError(
- VE_AUDIO_CODING_MODULE_ERROR, kTraceError,
- "SetNetEQPlayoutMode() failed to set playout mode");
- return -1;
- }
- return 0;
-}
-
-int32_t
-Channel::GetNetEQPlayoutMode(NetEqModes& mode)
-{
- const AudioPlayoutMode playoutMode = audio_coding_->PlayoutMode();
- switch (playoutMode)
- {
- case voice:
- mode = kNetEqDefault;
- break;
- case streaming:
- mode = kNetEqStreaming;
- break;
- case fax:
- mode = kNetEqFax;
- break;
- case off:
- mode = kNetEqOff;
- }
- WEBRTC_TRACE(kTraceStateInfo, kTraceVoice,
- VoEId(_instanceId,_channelId),
- "Channel::GetNetEQPlayoutMode() => mode=%u", mode);
- return 0;
-}
-
-int32_t
Channel::RegisterVoiceEngineObserver(VoiceEngineObserver& observer)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
@@ -1537,8 +1485,13 @@
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnNetworkChanged(bitrate_bps=%d, fration_lost=%d, rtt=%d)",
bitrate_bps, fraction_lost, rtt);
+ // |fraction_lost| from BitrateObserver is short time observation of packet
+ // loss rate from past. We use network predictor to make a more reasonable
+ // loss rate estimation.
+ network_predictor_->UpdatePacketLossRate(fraction_lost);
+ uint8_t loss_rate = network_predictor_->GetLossRate();
// Normalizes rate to 0 - 100.
- if (audio_coding_->SetPacketLossRate(100 * fraction_lost / 255) != 0) {
+ if (audio_coding_->SetPacketLossRate(100 * loss_rate / 255) != 0) {
_engineStatisticsPtr->SetLastError(VE_AUDIO_CODING_MODULE_ERROR,
kTraceError, "OnNetworkChanged() failed to set packet loss rate");
assert(false); // This should not happen.
@@ -1743,6 +1696,19 @@
return 0;
}
+int Channel::SetOpusMaxPlaybackRate(int frequency_hz) {
+ WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
+ "Channel::SetOpusMaxPlaybackRate()");
+
+ if (audio_coding_->SetOpusMaxPlaybackRate(frequency_hz) != 0) {
+ _engineStatisticsPtr->SetLastError(
+ VE_AUDIO_CODING_MODULE_ERROR, kTraceError,
+ "SetOpusMaxPlaybackRate() failed to set maximum playback rate");
+ return -1;
+ }
+ return 0;
+}
+
int32_t Channel::RegisterExternalTransport(Transport& transport)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
@@ -1930,8 +1896,11 @@
"Channel::IncomingRTPPacket() RTCP packet is invalid");
}
- ntp_estimator_->UpdateRtcpTimestamp(rtp_receiver_->SSRC(),
- _rtpRtcpModule.get());
+ {
+ CriticalSectionScoped lock(ts_stats_lock_.get());
+ ntp_estimator_.UpdateRtcpTimestamp(rtp_receiver_->SSRC(),
+ _rtpRtcpModule.get());
+ }
return 0;
}
@@ -3179,22 +3148,6 @@
}
int
-Channel::GetRTCP_CNAME(char cName[256])
-{
- if (_rtpRtcpModule->CNAME(cName) != 0)
- {
- _engineStatisticsPtr->SetLastError(
- VE_RTP_RTCP_MODULE_ERROR, kTraceError,
- "GetRTCP_CNAME() failed to retrieve RTCP CNAME");
- return -1;
- }
- WEBRTC_TRACE(kTraceStateInfo, kTraceVoice,
- VoEId(_instanceId, _channelId),
- "GetRTCP_CNAME() => cName=%s", cName);
- return 0;
-}
-
-int
Channel::GetRemoteRTCP_CNAME(char cName[256])
{
if (cName == NULL)
@@ -3473,43 +3426,7 @@
stats.jitterSamples);
// --- RTT
-
- uint16_t RTT(0);
- RTCPMethod method = _rtpRtcpModule->RTCP();
- if (method == kRtcpOff)
- {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice,
- VoEId(_instanceId, _channelId),
- "GetRTPStatistics() RTCP is disabled => valid RTT "
- "measurements cannot be retrieved");
- } else
- {
- // The remote SSRC will be zero if no RTP packet has been received.
- uint32_t remoteSSRC = rtp_receiver_->SSRC();
- if (remoteSSRC > 0)
- {
- uint16_t avgRTT(0);
- uint16_t maxRTT(0);
- uint16_t minRTT(0);
-
- if (_rtpRtcpModule->RTT(remoteSSRC, &RTT, &avgRTT, &minRTT, &maxRTT)
- != 0)
- {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice,
- VoEId(_instanceId, _channelId),
- "GetRTPStatistics() failed to retrieve RTT from "
- "the RTP/RTCP module");
- }
- } else
- {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice,
- VoEId(_instanceId, _channelId),
- "GetRTPStatistics() failed to measure RTT since no "
- "RTP packets have been received yet");
- }
- }
-
- stats.rttMs = static_cast<int> (RTT);
+ stats.rttMs = GetRTT();
WEBRTC_TRACE(kTraceStateInfo, kTraceVoice,
VoEId(_instanceId, _channelId),
@@ -3781,7 +3698,7 @@
{
WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::PrepareEncodeAndSend() invalid audio frame");
- return -1;
+ return 0xFFFFFFFF;
}
if (channel_state_.Get().input_file_playing)
@@ -3835,7 +3752,7 @@
{
WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::EncodeAndSend() invalid audio frame");
- return -1;
+ return 0xFFFFFFFF;
}
_audioFrame.id_ = _channelId;
@@ -3848,7 +3765,7 @@
{
WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::EncodeAndSend() ACM encoding failed");
- return -1;
+ return 0xFFFFFFFF;
}
_timeStamp += _audioFrame.samples_per_channel_;
@@ -4035,12 +3952,8 @@
uint32_t playout_timestamp = 0;
if (audio_coding_->PlayoutTimestamp(&playout_timestamp) == -1) {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::UpdatePlayoutTimestamp() failed to read playout"
- " timestamp from the ACM");
- _engineStatisticsPtr->SetLastError(
- VE_CANNOT_RETRIEVE_VALUE, kTraceError,
- "UpdatePlayoutTimestamp() failed to retrieve timestamp");
+ // This can happen if this channel has not been received any RTP packet. In
+ // this case, NetEq is not capable of computing playout timestamp.
return;
}
@@ -4198,7 +4111,7 @@
// Currently file stream is always mono.
// TODO(xians): Change the code when FilePlayer supports real stereo.
_audioFrame.UpdateFrame(_channelId,
- -1,
+ 0xFFFFFFFF,
fileBuffer.get(),
fileSamples,
mixingFrequency,
@@ -4214,9 +4127,9 @@
Channel::MixAudioWithFile(AudioFrame& audioFrame,
int mixingFrequency)
{
- assert(mixingFrequency <= 32000);
+ assert(mixingFrequency <= 48000);
- scoped_ptr<int16_t[]> fileBuffer(new int16_t[640]);
+ scoped_ptr<int16_t[]> fileBuffer(new int16_t[960]);
int fileSamples(0);
{
@@ -4562,5 +4475,52 @@
return playout_frequency;
}
+int Channel::GetRTT() const {
+ RTCPMethod method = _rtpRtcpModule->RTCP();
+ if (method == kRtcpOff) {
+ WEBRTC_TRACE(kTraceWarning, kTraceVoice,
+ VoEId(_instanceId, _channelId),
+ "GetRTPStatistics() RTCP is disabled => valid RTT "
+ "measurements cannot be retrieved");
+ return 0;
+ }
+ std::vector<RTCPReportBlock> report_blocks;
+ _rtpRtcpModule->RemoteRTCPStat(&report_blocks);
+ if (report_blocks.empty()) {
+ WEBRTC_TRACE(kTraceWarning, kTraceVoice,
+ VoEId(_instanceId, _channelId),
+ "GetRTPStatistics() failed to measure RTT since no "
+ "RTCP packets have been received yet");
+ return 0;
+ }
+
+ uint32_t remoteSSRC = rtp_receiver_->SSRC();
+ std::vector<RTCPReportBlock>::const_iterator it = report_blocks.begin();
+ for (; it != report_blocks.end(); ++it) {
+ if (it->remoteSSRC == remoteSSRC)
+ break;
+ }
+ if (it == report_blocks.end()) {
+ // We have not received packets with SSRC matching the report blocks.
+ // To calculate RTT we try with the SSRC of the first report block.
+ // This is very important for send-only channels where we don't know
+ // the SSRC of the other end.
+ remoteSSRC = report_blocks[0].remoteSSRC;
+ }
+ uint16_t rtt = 0;
+ uint16_t avg_rtt = 0;
+ uint16_t max_rtt= 0;
+ uint16_t min_rtt = 0;
+ if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt)
+ != 0) {
+ WEBRTC_TRACE(kTraceWarning, kTraceVoice,
+ VoEId(_instanceId, _channelId),
+ "GetRTPStatistics() failed to retrieve RTT from "
+ "the RTP/RTCP module");
+ return 0;
+ }
+ return static_cast<int>(rtt);
+}
+
} // namespace voe
} // namespace webrtc
diff --git a/voice_engine/channel.h b/voice_engine/channel.h
index 3c49d9b..535922f 100644
--- a/voice_engine/channel.h
+++ b/voice_engine/channel.h
@@ -17,6 +17,7 @@
#include "webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer_defines.h"
#include "webrtc/modules/audio_processing/rms_level.h"
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
+#include "webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
#include "webrtc/modules/utility/interface/file_player.h"
@@ -27,6 +28,7 @@
#include "webrtc/voice_engine/include/voe_audio_processing.h"
#include "webrtc/voice_engine/include/voe_network.h"
#include "webrtc/voice_engine/level_indicator.h"
+#include "webrtc/voice_engine/network_predictor.h"
#include "webrtc/voice_engine/shared_data.h"
#include "webrtc/voice_engine/voice_engine_defines.h"
@@ -192,8 +194,6 @@
int32_t StartReceiving();
int32_t StopReceiving();
- int32_t SetNetEQPlayoutMode(NetEqModes mode);
- int32_t GetNetEQPlayoutMode(NetEqModes& mode);
int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer);
int32_t DeRegisterVoiceEngineObserver();
@@ -206,6 +206,7 @@
int32_t SetRecPayloadType(const CodecInst& codec);
int32_t GetRecPayloadType(CodecInst& codec);
int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency);
+ int SetOpusMaxPlaybackRate(int frequency_hz);
// VoE dual-streaming.
int SetSecondarySendCodec(const CodecInst& codec, int red_payload_type);
@@ -327,7 +328,6 @@
int SetRTCPStatus(bool enable);
int GetRTCPStatus(bool& enabled);
int SetRTCP_CNAME(const char cName[256]);
- int GetRTCP_CNAME(char cName[256]);
int GetRemoteRTCP_CNAME(char cName[256]);
int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow,
unsigned int& timestamp,
@@ -506,6 +506,7 @@
unsigned char id);
int32_t GetPlayoutFrequency();
+ int GetRTT() const;
CriticalSectionWrapper& _fileCritSect;
CriticalSectionWrapper& _callbackCritSect;
@@ -547,7 +548,7 @@
uint32_t _timeStamp;
uint8_t _sendTelephoneEventPayloadType;
- scoped_ptr<RemoteNtpTimeEstimator> ntp_estimator_;
+ RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_);
// Timestamp of the audio pulled from NetEq.
uint32_t jitter_buffer_playout_timestamp_;
@@ -565,7 +566,7 @@
int64_t capture_start_rtp_time_stamp_;
// The capture ntp time (in local timebase) of the first played out audio
// frame.
- int64_t capture_start_ntp_time_ms_;
+ int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_);
// uses
Statistics* _engineStatisticsPtr;
@@ -622,6 +623,7 @@
scoped_ptr<BitrateController> bitrate_controller_;
scoped_ptr<RtcpBandwidthObserver> rtcp_bandwidth_observer_;
scoped_ptr<BitrateObserver> send_bitrate_observer_;
+ scoped_ptr<NetworkPredictor> network_predictor_;
};
} // namespace voe
diff --git a/voice_engine/include/voe_base.h b/voice_engine/include/voe_base.h
index 3a78f7b..65a7175 100644
--- a/voice_engine/include/voe_base.h
+++ b/voice_engine/include/voe_base.h
@@ -181,9 +181,6 @@
OnHoldModes mode = kHoldSendAndPlay) { return -1; }
virtual int GetOnHoldStatus(int channel, bool& enabled,
OnHoldModes& mode) { return -1; }
- virtual int SetNetEQPlayoutMode(int channel, NetEqModes mode) { return -1; }
- virtual int GetNetEQPlayoutMode(int channel,
- NetEqModes& mode) { return -1; }
protected:
VoEBase() {}
diff --git a/voice_engine/include/voe_codec.h b/voice_engine/include/voe_codec.h
index 34a2232..234596a 100644
--- a/voice_engine/include/voe_codec.h
+++ b/voice_engine/include/voe_codec.h
@@ -126,6 +126,14 @@
virtual int GetVADStatus(int channel, bool& enabled, VadModes& mode,
bool& disabledDTX) = 0;
+ // If send codec is Opus on a specified |channel|, sets the maximum playback
+ // rate the receiver will render: |frequency_hz| (in Hz).
+ // TODO(minyue): Make SetOpusMaxPlaybackRate() pure virtual when
+ // fakewebrtcvoiceengine in talk is ready.
+ virtual int SetOpusMaxPlaybackRate(int channel, int frequency_hz) {
+ return -1;
+ }
+
// Don't use. To be removed.
virtual int SetAMREncFormat(int channel, AmrMode mode) { return -1; }
virtual int SetAMRDecFormat(int channel, AmrMode mode) { return -1; }
diff --git a/voice_engine/include/voe_rtp_rtcp.h b/voice_engine/include/voe_rtp_rtcp.h
index ce6f849..6223bd6 100644
--- a/voice_engine/include/voe_rtp_rtcp.h
+++ b/voice_engine/include/voe_rtp_rtcp.h
@@ -171,9 +171,11 @@
// specific |channel|.
virtual int SetRTCP_CNAME(int channel, const char cName[256]) = 0;
- // Gets the canonical name (CNAME) parameter for RTCP reports on a
- // specific |channel|.
- virtual int GetRTCP_CNAME(int channel, char cName[256]) = 0;
+ // TODO(holmer): Remove this API once it has been removed from
+ // fakewebrtcvoiceengine.h.
+ virtual int GetRTCP_CNAME(int channel, char cName[256]) {
+ return -1;
+ }
// Gets the canonical name (CNAME) parameter for incoming RTCP reports
// on a specific channel.
diff --git a/voice_engine/monitor_module.cc b/voice_engine/monitor_module.cc
index 2389a51..88de5c8 100644
--- a/voice_engine/monitor_module.cc
+++ b/voice_engine/monitor_module.cc
@@ -53,14 +53,6 @@
}
int32_t
-MonitorModule::Version(char* version,
- uint32_t& remainingBufferInBytes,
- uint32_t& position) const
-{
- return 0;
-}
-
-int32_t
MonitorModule::ChangeUniqueId(int32_t id)
{
return 0;
diff --git a/voice_engine/monitor_module.h b/voice_engine/monitor_module.h
index ebe4aca..693b2e0 100644
--- a/voice_engine/monitor_module.h
+++ b/voice_engine/monitor_module.h
@@ -40,15 +40,11 @@
virtual ~MonitorModule();
public: // module
- int32_t Version(char* version,
- uint32_t& remainingBufferInBytes,
- uint32_t& position) const;
+ virtual int32_t ChangeUniqueId(int32_t id) OVERRIDE;
- int32_t ChangeUniqueId(int32_t id);
+ virtual int32_t TimeUntilNextProcess() OVERRIDE;
- int32_t TimeUntilNextProcess();
-
- int32_t Process();
+ virtual int32_t Process() OVERRIDE;
private:
enum { kAverageProcessUpdateTimeMs = 1000 };
MonitorObserver* _observerPtr;
diff --git a/voice_engine/network_predictor.cc b/voice_engine/network_predictor.cc
new file mode 100644
index 0000000..4093877
--- /dev/null
+++ b/voice_engine/network_predictor.cc
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/voice_engine/network_predictor.h"
+
+namespace webrtc {
+namespace voe {
+
+NetworkPredictor::NetworkPredictor(Clock* clock)
+ : clock_(clock),
+ last_loss_rate_update_time_ms_(clock_->TimeInMilliseconds()),
+ loss_rate_filter_(new rtc::ExpFilter(0.9999f)) {
+}
+
+void NetworkPredictor::UpdatePacketLossRate(uint8_t loss_rate) {
+ int64_t now_ms = clock_->TimeInMilliseconds();
+ // Update the recursive average filter.
+ loss_rate_filter_->Apply(
+ static_cast<float>(now_ms - last_loss_rate_update_time_ms_),
+ static_cast<float>(loss_rate));
+ last_loss_rate_update_time_ms_ = now_ms;
+}
+
+uint8_t NetworkPredictor::GetLossRate() {
+ float value = loss_rate_filter_->filtered();
+ return (value == rtc::ExpFilter::kValueUndefined) ? 0 :
+ static_cast<uint8_t>(value + 0.5);
+}
+} // namespace voe
+} // namespace webrtc
diff --git a/voice_engine/network_predictor.h b/voice_engine/network_predictor.h
new file mode 100644
index 0000000..d9f0b7b
--- /dev/null
+++ b/voice_engine/network_predictor.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_VOICE_ENGINE_NETWORK_PREDICTOR_H_
+#define WEBRTC_VOICE_ENGINE_NETWORK_PREDICTOR_H_
+
+#include "webrtc/base/exp_filter.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+
+namespace webrtc {
+
+namespace voe {
+
+// NetworkPredictor is to predict network conditions e.g., packet loss rate, for
+// sender and/or receiver to cope with changes in the network condition.
+class NetworkPredictor {
+ public:
+ explicit NetworkPredictor(Clock* clock);
+ ~NetworkPredictor() {}
+
+ // Gets the predicted packet loss rate.
+ uint8_t GetLossRate();
+
+ // Updates the packet loss rate predictor, on receiving a new observation of
+ // packet loss rate from past. Input packet loss rate should be in the
+ // interval [0, 255].
+ void UpdatePacketLossRate(uint8_t loss_rate);
+
+ private:
+ Clock* clock_;
+ int64_t last_loss_rate_update_time_ms_;
+
+ // An exponential filter is used to predict packet loss rate.
+ scoped_ptr<rtc::ExpFilter> loss_rate_filter_;
+};
+
+} // namespace voe
+} // namespace webrtc
+#endif // WEBRTC_VOICE_ENGINE_NETWORK_PREDICTOR_H_
diff --git a/voice_engine/network_predictor_unittest.cc b/voice_engine/network_predictor_unittest.cc
new file mode 100644
index 0000000..e399f68
--- /dev/null
+++ b/voice_engine/network_predictor_unittest.cc
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <math.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/voice_engine/network_predictor.h"
+#include "webrtc/system_wrappers/interface/clock.h"
+
+namespace webrtc {
+namespace voe {
+
+class TestNetworkPredictor : public ::testing::Test {
+ protected:
+ TestNetworkPredictor()
+ : clock_(0),
+ network_predictor_(new NetworkPredictor(&clock_)) {}
+ SimulatedClock clock_;
+ scoped_ptr<NetworkPredictor> network_predictor_;
+};
+
+TEST_F(TestNetworkPredictor, TestPacketLossRateFilter) {
+ // Test initial packet loss rate estimate is 0.
+ EXPECT_EQ(0, network_predictor_->GetLossRate());
+ network_predictor_->UpdatePacketLossRate(32);
+ // First time, no filtering.
+ EXPECT_EQ(32, network_predictor_->GetLossRate());
+ clock_.AdvanceTimeMilliseconds(1000);
+ network_predictor_->UpdatePacketLossRate(40);
+ float exp = pow(0.9999f, 1000);
+ float value = 32.0f * exp + (1 - exp) * 40.0f;
+ EXPECT_EQ(static_cast<uint8_t>(value + 0.5f),
+ network_predictor_->GetLossRate());
+}
+} // namespace voe
+} // namespace webrtc
diff --git a/voice_engine/test/android/OWNERS b/voice_engine/test/android/OWNERS
deleted file mode 100644
index 6ba5af0..0000000
--- a/voice_engine/test/android/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-leozwang@webrtc.org
diff --git a/voice_engine/test/android/android_test/Android.mk b/voice_engine/test/android/android_test/Android.mk
deleted file mode 100644
index a3f5ce6..0000000
--- a/voice_engine/test/android/android_test/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := \
- src/org/webrtc/voiceengine/test/AndroidTest.java
-
-LOCAL_PACKAGE_NAME := webrtc-voice-demo
-LOCAL_CERTIFICATE := platform
-
-LOCAL_JNI_SHARED_LIBRARIES := libwebrtc-voice-demo-jni
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/voice_engine/test/android/android_test/jni/Android.mk b/voice_engine/test/android/android_test/jni/Android.mk
deleted file mode 100644
index d7e04b5..0000000
--- a/voice_engine/test/android/android_test/jni/Android.mk
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-ifdef NDK_ROOT
-
-MY_WEBRTC_ROOT_PATH := $(call my-dir)
-
-MY_WEBRTC_SRC_PATH := ../../../../../../..
-
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/common_audio/resampler/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/common_audio/signal_processing/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/common_audio/vad/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/neteq/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/cng/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/g711/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/g722/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/pcm16b/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/ilbc/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/iSAC/main/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/main/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_conference_mixer/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_device/main/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_processing/aec/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_processing/aecm/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_processing/agc/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_processing/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_processing/ns/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_processing/utility/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/media_file/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/rtp_rtcp/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/udp_transport/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/utility/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/system_wrappers/source/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/voice_engine/Android.mk
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc_audio_preprocessing
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- libwebrtc_spl \
- libwebrtc_resampler \
- libwebrtc_apm \
- libwebrtc_apm_utility \
- libwebrtc_vad \
- libwebrtc_ns \
- libwebrtc_agc \
- libwebrtc_aec \
- libwebrtc_aecm \
- libwebrtc_system_wrappers \
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libstlport_shared
-
-LOCAL_LDLIBS := \
- -lgcc \
- -llog
-
-LOCAL_PRELINK_MODULE := false
-
-include $(BUILD_SHARED_LIBRARY)
-
-###
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc-voice-jni
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- libwebrtc_system_wrappers \
- libwebrtc_audio_device \
- libwebrtc_pcm16b \
- libwebrtc_cng \
- libwebrtc_audio_coding \
- libwebrtc_rtp_rtcp \
- libwebrtc_media_file \
- libwebrtc_udp_transport \
- libwebrtc_utility \
- libwebrtc_neteq \
- libwebrtc_audio_conference_mixer \
- libwebrtc_isac \
- libwebrtc_ilbc \
- libwebrtc_isacfix \
- libwebrtc_g722 \
- libwebrtc_g711 \
- libwebrtc_voe_core
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libstlport_shared \
- libwebrtc_audio_preprocessing
-
-LOCAL_LDLIBS := \
- -lgcc \
- -llog \
- -lOpenSLES
-
-LOCAL_PRELINK_MODULE := false
-
-include $(BUILD_SHARED_LIBRARY)
-
-###
-
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/voice_engine/test/cmd_test/Android.mk
-
-else
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := libwebrtc-voice-demo-jni
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES := android_test.cc
-LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../../../auto_test \
- $(LOCAL_PATH)/../../../../interface \
- $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../../../../../../system_wrappers/interface
-
-LOCAL_PRELINK_MODULE := false
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libstlport \
- libandroid \
- libwebrtc \
- libGLESv2
-
-include $(BUILD_SHARED_LIBRARY)
-
-endif
diff --git a/voice_engine/test/auto_test/Android.mk b/voice_engine/test/auto_test/Android.mk
deleted file mode 100644
index cfb9d67..0000000
--- a/voice_engine/test/auto_test/Android.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH:= $(call my-dir)
-
-# voice engine test app
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= \
- automated_mode.cc \
- voe_cpu_test.cc \
- voe_standard_test.cc \
- voe_stress_test.cc \
- voe_unit_test.cc \
- voe_extended_test.cc \
- voe_standard_integration_test.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../modules/audio_device/main/interface \
- $(LOCAL_PATH)/../../../../modules/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface \
- $(LOCAL_PATH)/../../../../../test \
- external/gtest/include \
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libstlport \
- libwebrtc
-
-LOCAL_MODULE:= webrtc_voe_autotest
-
-ifdef NDK_ROOT
-include $(BUILD_EXECUTABLE)
-else
-include external/stlport/libstlport.mk
-include $(BUILD_NATIVE_TEST)
-endif
-
diff --git a/voice_engine/test/auto_test/standard/codec_test.cc b/voice_engine/test/auto_test/standard/codec_test.cc
index 2970ab3..3b56bae 100644
--- a/voice_engine/test/auto_test/standard/codec_test.cc
+++ b/voice_engine/test/auto_test/standard/codec_test.cc
@@ -130,6 +130,33 @@
EXPECT_EQ(webrtc::kVadConventional, vad_mode);
}
+TEST_F(CodecTest, OpusMaxPlaybackRateCanBeSet) {
+ for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) {
+ voe_codec_->GetCodec(i, codec_instance_);
+ if (_stricmp("opus", codec_instance_.plname)) {
+ continue;
+ }
+ voe_codec_->SetSendCodec(channel_, codec_instance_);
+ // SetOpusMaxPlaybackRate can handle any integer as the bandwidth. Following
+ // tests some most commonly used numbers.
+ EXPECT_EQ(0, voe_codec_->SetOpusMaxPlaybackRate(channel_, 48000));
+ EXPECT_EQ(0, voe_codec_->SetOpusMaxPlaybackRate(channel_, 32000));
+ EXPECT_EQ(0, voe_codec_->SetOpusMaxPlaybackRate(channel_, 16000));
+ EXPECT_EQ(0, voe_codec_->SetOpusMaxPlaybackRate(channel_, 8000));
+ }
+}
+
+TEST_F(CodecTest, OpusMaxPlaybackRateCannotBeSetForNonOpus) {
+ for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) {
+ voe_codec_->GetCodec(i, codec_instance_);
+ if (!_stricmp("opus", codec_instance_.plname)) {
+ continue;
+ }
+ voe_codec_->SetSendCodec(channel_, codec_instance_);
+ EXPECT_EQ(-1, voe_codec_->SetOpusMaxPlaybackRate(channel_, 16000));
+ }
+}
+
// TODO(xians, phoglund): Re-enable when issue 372 is resolved.
TEST_F(CodecTest, DISABLED_ManualVerifySendCodecsForAllPacketSizes) {
for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) {
diff --git a/voice_engine/test/auto_test/standard/dtmf_test.cc b/voice_engine/test/auto_test/standard/dtmf_test.cc
index 4e805e4..a4feb2e 100644
--- a/voice_engine/test/auto_test/standard/dtmf_test.cc
+++ b/voice_engine/test/auto_test/standard/dtmf_test.cc
@@ -67,7 +67,7 @@
// This test modifies the DTMF payload type from the default 106 to 88
// and then runs through 16 DTMF out.of-band events.
TEST_F(DtmfTest, ManualCanChangeDtmfPayloadType) {
- webrtc::CodecInst codec_instance;
+ webrtc::CodecInst codec_instance = webrtc::CodecInst();
TEST_LOG("Changing DTMF payload type.\n");
diff --git a/voice_engine/test/auto_test/standard/file_test.cc b/voice_engine/test/auto_test/standard/file_test.cc
index 729270e..8b7ffb7 100644
--- a/voice_engine/test/auto_test/standard/file_test.cc
+++ b/voice_engine/test/auto_test/standard/file_test.cc
@@ -16,6 +16,9 @@
class FileTest : public AfterStreamingFixture {
protected:
// Creates the string åäö.pcm.
+// TODO(henrika): enable this test once CreateTrickyFilenameInUtf8 no longer
+// prevents compilation on Windows. Likely webrtc/base can be used here.
+#if 0
std::string CreateTrickyFilenameInUtf8() {
char filename[16] = { (char)0xc3, (char)0xa5,
(char)0xc3, (char)0xa4,
@@ -23,8 +26,12 @@
static_cast<char>(0) };
return std::string(filename) + ".pcm";
}
+#endif // 0
};
+// TODO(henrika): enable this test once CreateTrickyFilenameInUtf8 no longer
+// prevents compilation on Windows. Likely webrtc/base can be used here.
+#if 0
TEST_F(FileTest, ManualRecordToFileForThreeSecondsAndPlayback) {
if (!FLAGS_include_timing_dependent_tests) {
TEST_LOG("Skipping test - running in slow execution environment...\n");
@@ -51,6 +58,7 @@
EXPECT_EQ(1, voe_file_->IsPlayingFileLocally(channel_));
Sleep(1500);
}
+#endif // 0
TEST_F(FileTest, ManualRecordPlayoutToWavFileForThreeSecondsAndPlayback) {
webrtc::CodecInst send_codec;
diff --git a/voice_engine/test/auto_test/standard/mixing_test.cc b/voice_engine/test/auto_test/standard/mixing_test.cc
index eb520b8..2a5732b 100644
--- a/voice_engine/test/auto_test/standard/mixing_test.cc
+++ b/voice_engine/test/auto_test/standard/mixing_test.cc
@@ -20,8 +20,12 @@
const int16_t kLimiterHeadroom = 29204; // == -1 dbFS
const int16_t kInt16Max = 0x7fff;
-const int kSampleRateHz = 16000;
+const int kPayloadType = 105;
+const int kInSampleRateHz = 16000; // Input file taken as 16 kHz by default.
+const int kRecSampleRateHz = 16000; // Recorded with 16 kHz L16.
const int kTestDurationMs = 3000;
+const CodecInst kCodecL16 = {kPayloadType, "L16", 16000, 160, 1, 256000};
+const CodecInst kCodecOpus = {kPayloadType, "opus", 48000, 960, 1, 32000};
} // namespace
@@ -54,7 +58,8 @@
bool real_audio,
int16_t input_value,
int16_t max_output_value,
- int16_t min_output_value) {
+ int16_t min_output_value,
+ const CodecInst& codec_inst) {
ASSERT_LE(num_remote_streams_using_mono, num_remote_streams);
if (real_audio) {
@@ -77,7 +82,8 @@
remote_streams[i] = voe_base_->CreateChannel();
EXPECT_NE(-1, remote_streams[i]);
}
- StartRemoteStreams(remote_streams, num_remote_streams_using_mono);
+ StartRemoteStreams(remote_streams, num_remote_streams_using_mono,
+ codec_inst);
TEST_LOG("Playing %d remote streams.\n", num_remote_streams);
// Give it plenty of time to get started.
@@ -106,7 +112,7 @@
void GenerateInputFile(int16_t input_value) {
FILE* input_file = fopen(input_filename_.c_str(), "wb");
ASSERT_TRUE(input_file != NULL);
- for (int i = 0; i < kSampleRateHz / 1000 * (kTestDurationMs * 2); i++) {
+ for (int i = 0; i < kInSampleRateHz / 1000 * (kTestDurationMs * 2); i++) {
ASSERT_EQ(1u, fwrite(&input_value, sizeof(input_value), 1, input_file));
}
ASSERT_EQ(0, fclose(input_file));
@@ -129,7 +135,7 @@
// Ensure we've at least recorded half as much file as the duration of the
// test. We have to use a relaxed tolerance here due to filesystem flakiness
// on the bots.
- ASSERT_GE((samples_read * 1000.0) / kSampleRateHz, kTestDurationMs);
+ ASSERT_GE((samples_read * 1000.0) / kRecSampleRateHz, kTestDurationMs);
// Ensure we read the entire file.
ASSERT_NE(0, feof(output_file));
ASSERT_EQ(0, fclose(output_file));
@@ -153,17 +159,8 @@
// Start up remote streams ("normal" participants).
void StartRemoteStreams(const std::vector<int>& streams,
- int num_remote_streams_using_mono) {
- // Use L16 at 16kHz to minimize distortion (file recording is 16kHz and
- // resampling will cause distortion).
- CodecInst codec_inst;
- strcpy(codec_inst.plname, "L16");
- codec_inst.channels = 1;
- codec_inst.plfreq = kSampleRateHz;
- codec_inst.pltype = 105;
- codec_inst.pacsize = codec_inst.plfreq / 100;
- codec_inst.rate = codec_inst.plfreq * sizeof(int16_t) * 8; // 8 bits/byte.
-
+ int num_remote_streams_using_mono,
+ const CodecInst& codec_inst) {
for (int i = 0; i < num_remote_streams_using_mono; ++i) {
// Add some delay between starting up the channels in order to give them
// different energies in the "real audio" test and hopefully exercise
@@ -173,10 +170,11 @@
}
// The remainder of the streams will use stereo.
- codec_inst.channels = 2;
- codec_inst.pltype++;
+ CodecInst codec_inst_stereo = codec_inst;
+ codec_inst_stereo.channels = 2;
+ codec_inst_stereo.pltype++;
for (size_t i = num_remote_streams_using_mono; i < streams.size(); ++i) {
- StartRemoteStream(streams[i], codec_inst, 1234 + 2 * i);
+ StartRemoteStream(streams[i], codec_inst_stereo, 1234 + 2 * i);
}
}
@@ -210,7 +208,7 @@
EXPECT_NE(-1, size);
fclose(fid);
// Divided by 2 due to 2 bytes/sample.
- return size * 1000 / kSampleRateHz / 2;
+ return size * 1000 / kRecSampleRateHz / 2;
}
std::string input_filename_;
@@ -222,7 +220,11 @@
// somewhat more realistic scenario using real audio. It can at least hunt for
// asserts and crashes.
TEST_F(MixingTest, MixManyChannelsForStress) {
- RunMixingTest(10, 0, 10, true, 0, 0, 0);
+ RunMixingTest(10, 0, 10, true, 0, 0, 0, kCodecL16);
+}
+
+TEST_F(MixingTest, MixManyChannelsForStressOpus) {
+ RunMixingTest(10, 0, 10, true, 0, 0, 0, kCodecOpus);
}
// These tests assume a maximum of three mixed participants. We typically allow
@@ -232,7 +234,7 @@
const int16_t kInputValue = 1000;
const int16_t kExpectedOutput = kInputValue * 3;
RunMixingTest(4, 0, 4, false, kInputValue, 1.1 * kExpectedOutput,
- 0.9 * kExpectedOutput);
+ 0.9 * kExpectedOutput, kCodecL16);
}
// Ensure the mixing saturation protection is working. We can do this because
@@ -245,7 +247,7 @@
ASSERT_GT(kInputValue * 3, kInt16Max);
ASSERT_LT(1.1 * kExpectedOutput, kInt16Max);
RunMixingTest(3, 0, 3, false, kInputValue, 1.1 * kExpectedOutput,
- 0.9 * kExpectedOutput);
+ 0.9 * kExpectedOutput, kCodecL16);
}
TEST_F(MixingTest, SaturationProtectionHasNoEffectOnOneChannel) {
@@ -255,21 +257,21 @@
ASSERT_GT(0.95 * kExpectedOutput, kLimiterHeadroom);
// Tighter constraints are required here to properly test this.
RunMixingTest(1, 0, 1, false, kInputValue, kExpectedOutput,
- 0.95 * kExpectedOutput);
+ 0.95 * kExpectedOutput, kCodecL16);
}
TEST_F(MixingTest, VerifyAnonymousAndNormalParticipantMixing) {
const int16_t kInputValue = 1000;
const int16_t kExpectedOutput = kInputValue * 2;
RunMixingTest(1, 1, 1, false, kInputValue, 1.1 * kExpectedOutput,
- 0.9 * kExpectedOutput);
+ 0.9 * kExpectedOutput, kCodecL16);
}
TEST_F(MixingTest, AnonymousParticipantsAreAlwaysMixed) {
const int16_t kInputValue = 1000;
const int16_t kExpectedOutput = kInputValue * 4;
RunMixingTest(3, 1, 3, false, kInputValue, 1.1 * kExpectedOutput,
- 0.9 * kExpectedOutput);
+ 0.9 * kExpectedOutput, kCodecL16);
}
TEST_F(MixingTest, VerifyStereoAndMonoMixing) {
@@ -277,7 +279,7 @@
const int16_t kExpectedOutput = kInputValue * 2;
RunMixingTest(2, 0, 1, false, kInputValue, 1.1 * kExpectedOutput,
// Lower than 0.9 due to observed flakiness on bots.
- 0.8 * kExpectedOutput);
+ 0.8 * kExpectedOutput, kCodecL16);
}
} // namespace webrtc
diff --git a/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc b/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc
index cf33adf..a678b13 100644
--- a/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc
+++ b/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc
@@ -31,7 +31,9 @@
virtual int SendPacket(int channel, const void* data, int len) {
webrtc::RTPHeader header;
- if (parser_->Parse(static_cast<const uint8_t*>(data), len, &header)) {
+ if (parser_->Parse(reinterpret_cast<const uint8_t*>(data),
+ static_cast<size_t>(len),
+ &header)) {
bool ok = true;
if (audio_level_id_ >= 0 &&
!header.extension.hasAudioLevel) {
diff --git a/voice_engine/test/cmd_test/Android.mk b/voice_engine/test/cmd_test/Android.mk
deleted file mode 100644
index f1a4f1a..0000000
--- a/voice_engine/test/cmd_test/Android.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-LOCAL_PATH:= $(call my-dir)
-
-# voice engine test app
-
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/../../../../../android-webrtc.mk
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_SRC_FILES:= \
- voe_cmd_test.cc
-
-# Flags passed to both C and C++ files.
-LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DDEBUG'
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../.. \
- external/gtest/include \
- frameworks/base/include
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libmedia \
- libcamera_client \
- libgui \
- libhardware \
- libandroid_runtime \
- libbinder
-
-#libwilhelm.so libDunDef-Android.so libbinder.so libsystem_server.so
-
-LOCAL_MODULE:= webrtc_voe_cmd
-
-ifdef NDK_ROOT
-LOCAL_SHARED_LIBRARIES += \
- libstlport_shared \
- libwebrtc-voice-jni \
- libwebrtc_audio_preprocessing
-include $(BUILD_EXECUTABLE)
-else
-LOCAL_SHARED_LIBRARIES += \
- libstlport \
- libwebrtc
-include external/stlport/libstlport.mk
-include $(BUILD_NATIVE_TEST)
-endif
diff --git a/voice_engine/test/cmd_test/voe_cmd_test.cc b/voice_engine/test/cmd_test/voe_cmd_test.cc
index 4f6f132..09a70a9 100644
--- a/voice_engine/test/cmd_test/voe_cmd_test.cc
+++ b/voice_engine/test/cmd_test/voe_cmd_test.cc
@@ -433,7 +433,6 @@
printf("%i. Toggle receive-side NS \n", option_index++);
printf("%i. AGC status \n", option_index++);
printf("%i. Toggle microphone mute \n", option_index++);
- printf("%i. Toggle on hold status \n", option_index++);
printf("%i. Get last error code \n", option_index++);
printf("%i. Toggle typing detection \n",
option_index++);
@@ -446,6 +445,9 @@
printf("%i. Remove a file-playing channel \n", option_index++);
printf("%i. Toggle Opus stereo (Opus must be selected again to apply "
"the setting) \n", option_index++);
+ printf("%i. Set Opus maximum playback rate \n", option_index++);
+ printf("%i. Set bit rate (only take effect on codecs that allow the "
+ "change) \n", option_index++);
printf("Select action or %i to stop the call: ", option_index);
int option_selection;
@@ -485,9 +487,9 @@
printf("\n NS is now off! \n");
} else if (option_selection == option_index++) {
experimental_ns_enabled = !experimental_ns_enabled;
- res = base1->audio_processing()->EnableExperimentalNs(
- experimental_ns_enabled);
- VALIDATE;
+ Config config;
+ config.Set<ExperimentalNs>(new ExperimentalNs(experimental_ns_enabled));
+ base1->audio_processing()->SetExtraOptions(config);
if (experimental_ns_enabled) {
printf("\n Experimental NS is now on!\n");
} else {
@@ -758,6 +760,19 @@
else
printf("\n Opus mono enabled (select Opus again to apply the "
"setting). \n");
+ } else if (option_selection == option_index++) {
+ printf("\n Input maxium playback rate in Hz: ");
+ int max_playback_rate;
+ ASSERT_EQ(1, scanf("%i", &max_playback_rate));
+ res = codec->SetOpusMaxPlaybackRate(chan, max_playback_rate);
+ VALIDATE;
+ } else if (option_selection == option_index++) {
+ res = codec->GetSendCodec(chan, cinst);
+ VALIDATE;
+ printf("Current bit rate is %i bps, set to: ", cinst.rate);
+ ASSERT_EQ(1, scanf("%i", &cinst.rate));
+ res = codec->SetSendCodec(chan, cinst);
+ VALIDATE;
} else {
break;
}
diff --git a/voice_engine/transmit_mixer.cc b/voice_engine/transmit_mixer.cc
index 76b507f..2f1c9dc 100644
--- a/voice_engine/transmit_mixer.cc
+++ b/voice_engine/transmit_mixer.cc
@@ -1236,7 +1236,7 @@
// Currently file stream is always mono.
// TODO(xians): Change the code when FilePlayer supports real stereo.
_audioFrame.UpdateFrame(-1,
- -1,
+ 0xFFFFFFFF,
fileBuffer.get(),
fileSamples,
mixingFrequency,
diff --git a/voice_engine/voe_codec_impl.cc b/voice_engine/voe_codec_impl.cc
index 4aa0556..6f470be 100644
--- a/voice_engine/voe_codec_impl.cc
+++ b/voice_engine/voe_codec_impl.cc
@@ -418,6 +418,24 @@
return 0;
}
+int VoECodecImpl::SetOpusMaxPlaybackRate(int channel, int frequency_hz) {
+ WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
+ "SetOpusMaxPlaybackRate(channel=%d, frequency_hz=%d)", channel,
+ frequency_hz);
+ if (!_shared->statistics().Initialized()) {
+ _shared->SetLastError(VE_NOT_INITED, kTraceError);
+ return -1;
+ }
+ voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
+ voe::Channel* channelPtr = ch.channel();
+ if (channelPtr == NULL) {
+ _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
+ "SetOpusMaxPlaybackRate failed to locate channel");
+ return -1;
+ }
+ return channelPtr->SetOpusMaxPlaybackRate(frequency_hz);
+}
+
void VoECodecImpl::ACMToExternalCodecRepresentation(CodecInst& toInst,
const CodecInst& fromInst)
{
diff --git a/voice_engine/voe_codec_impl.h b/voice_engine/voe_codec_impl.h
index 1b9f00e..f001df8 100644
--- a/voice_engine/voe_codec_impl.h
+++ b/voice_engine/voe_codec_impl.h
@@ -54,6 +54,8 @@
VadModes& mode,
bool& disabledDTX);
+ virtual int SetOpusMaxPlaybackRate(int channel, int frequency_hz);
+
// Dual-streaming
virtual int SetSecondarySendCodec(int channel, const CodecInst& codec,
int red_payload_type);
diff --git a/voice_engine/voe_rtp_rtcp_impl.cc b/voice_engine/voe_rtp_rtcp_impl.cc
index 8f0e717..370e600 100644
--- a/voice_engine/voe_rtp_rtcp_impl.cc
+++ b/voice_engine/voe_rtp_rtcp_impl.cc
@@ -292,26 +292,6 @@
return channelPtr->SetRTCP_CNAME(cName);
}
-int VoERTP_RTCPImpl::GetRTCP_CNAME(int channel, char cName[256])
-{
- WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "GetRTCP_CNAME(channel=%d, cName=?)", channel);
- if (!_shared->statistics().Initialized())
- {
- _shared->SetLastError(VE_NOT_INITED, kTraceError);
- return -1;
- }
- voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
- voe::Channel* channelPtr = ch.channel();
- if (channelPtr == NULL)
- {
- _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
- "GetRTCP_CNAME() failed to locate channel");
- return -1;
- }
- return channelPtr->GetRTCP_CNAME(cName);
-}
-
int VoERTP_RTCPImpl::GetRemoteRTCP_CNAME(int channel, char cName[256])
{
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
diff --git a/voice_engine/voe_rtp_rtcp_impl.h b/voice_engine/voe_rtp_rtcp_impl.h
index c73fcdd..c2599a2 100644
--- a/voice_engine/voe_rtp_rtcp_impl.h
+++ b/voice_engine/voe_rtp_rtcp_impl.h
@@ -27,8 +27,6 @@
virtual int SetRTCP_CNAME(int channel, const char cName[256]);
- virtual int GetRTCP_CNAME(int channel, char cName[256]);
-
virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]);
virtual int GetRemoteRTCPData(int channel,
diff --git a/voice_engine/voice_engine.gyp b/voice_engine/voice_engine.gyp
index 19342c3..deed467 100644
--- a/voice_engine/voice_engine.gyp
+++ b/voice_engine/voice_engine.gyp
@@ -55,6 +55,8 @@
'level_indicator.h',
'monitor_module.cc',
'monitor_module.h',
+ 'network_predictor.cc',
+ 'network_predictor.h',
'output_mixer.cc',
'output_mixer.h',
'shared_data.cc',
@@ -122,6 +124,7 @@
],
'sources': [
'channel_unittest.cc',
+ 'network_predictor_unittest.cc',
'transmit_mixer_unittest.cc',
'utility_unittest.cc',
'voe_audio_processing_unittest.cc',
@@ -129,9 +132,7 @@
'voe_codec_unittest.cc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -271,9 +272,7 @@
},
], # targets
}],
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'voice_engine_unittests_apk_target',
diff --git a/voice_engine/voice_engine.target.darwin-arm.mk b/voice_engine/voice_engine.target.darwin-arm.mk
index 49a5702..d6fe0da 100644
--- a/voice_engine/voice_engine.target.darwin-arm.mk
+++ b/voice_engine/voice_engine.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -55,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,13 +68,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -90,6 +89,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -167,23 +169,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,13 +200,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -225,7 +228,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +244,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -296,68 +301,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.darwin-arm64.mk b/voice_engine/voice_engine.target.darwin-arm64.mk
index e4e8e13..58c0c9e 100644
--- a/voice_engine/voice_engine.target.darwin-arm64.mk
+++ b/voice_engine/voice_engine.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -54,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -80,13 +79,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -103,12 +102,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -153,21 +155,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -216,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -267,59 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.darwin-mips.mk b/voice_engine/voice_engine.target.darwin-mips.mk
index 46293e6..d9ebc4d 100644
--- a/voice_engine/voice_engine.target.darwin-mips.mk
+++ b/voice_engine/voice_engine.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -55,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,13 +63,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -85,6 +81,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,7 +89,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -109,17 +105,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -161,23 +158,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,13 +184,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -214,7 +209,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,17 +225,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -284,64 +279,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.darwin-mips64.mk b/voice_engine/voice_engine.target.darwin-mips64.mk
new file mode 100644
index 0000000..d9ebc4d
--- /dev/null
+++ b/voice_engine/voice_engine.target.darwin-mips64.mk
@@ -0,0 +1,313 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/voice_engine/channel.cc \
+ third_party/webrtc/voice_engine/channel_manager.cc \
+ third_party/webrtc/voice_engine/dtmf_inband.cc \
+ third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
+ third_party/webrtc/voice_engine/level_indicator.cc \
+ third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
+ third_party/webrtc/voice_engine/output_mixer.cc \
+ third_party/webrtc/voice_engine/shared_data.cc \
+ third_party/webrtc/voice_engine/statistics.cc \
+ third_party/webrtc/voice_engine/transmit_mixer.cc \
+ third_party/webrtc/voice_engine/utility.cc \
+ third_party/webrtc/voice_engine/voe_audio_processing_impl.cc \
+ third_party/webrtc/voice_engine/voe_base_impl.cc \
+ third_party/webrtc/voice_engine/voe_codec_impl.cc \
+ third_party/webrtc/voice_engine/voe_dtmf_impl.cc \
+ third_party/webrtc/voice_engine/voe_external_media_impl.cc \
+ third_party/webrtc/voice_engine/voe_file_impl.cc \
+ third_party/webrtc/voice_engine/voe_hardware_impl.cc \
+ third_party/webrtc/voice_engine/voe_neteq_stats_impl.cc \
+ third_party/webrtc/voice_engine/voe_network_impl.cc \
+ third_party/webrtc/voice_engine/voe_rtp_rtcp_impl.cc \
+ third_party/webrtc/voice_engine/voe_video_sync_impl.cc \
+ third_party/webrtc/voice_engine/voe_volume_control_impl.cc \
+ third_party/webrtc/voice_engine/voice_engine_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_voice_engine_voice_engine_gyp
+
+# Alias gyp target name.
+.PHONY: voice_engine
+voice_engine: third_party_webrtc_voice_engine_voice_engine_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/voice_engine/voice_engine.target.darwin-x86.mk b/voice_engine/voice_engine.target.darwin-x86.mk
index 365222d..a2232c2 100644
--- a/voice_engine/voice_engine.target.darwin-x86.mk
+++ b/voice_engine/voice_engine.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -54,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +84,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,7 +92,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -109,12 +108,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,21 +161,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,7 +214,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -228,12 +230,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -279,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.darwin-x86_64.mk b/voice_engine/voice_engine.target.darwin-x86_64.mk
index f5b2bcc..f248bd8 100644
--- a/voice_engine/voice_engine.target.darwin-x86_64.mk
+++ b/voice_engine/voice_engine.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -55,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -84,6 +83,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,7 +91,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +107,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -158,22 +160,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,7 +212,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -226,12 +228,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -277,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.linux-arm.mk b/voice_engine/voice_engine.target.linux-arm.mk
index 49a5702..d6fe0da 100644
--- a/voice_engine/voice_engine.target.linux-arm.mk
+++ b/voice_engine/voice_engine.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -55,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,13 +68,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -90,6 +89,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,7 +97,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -114,12 +113,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -167,23 +169,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,13 +200,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -225,7 +228,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -242,12 +244,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -296,68 +301,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.linux-arm64.mk b/voice_engine/voice_engine.target.linux-arm64.mk
index e4e8e13..58c0c9e 100644
--- a/voice_engine/voice_engine.target.linux-arm64.mk
+++ b/voice_engine/voice_engine.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -54,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -80,13 +79,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -103,12 +102,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -153,21 +155,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,7 +202,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -216,12 +218,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -267,59 +272,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.linux-mips.mk b/voice_engine/voice_engine.target.linux-mips.mk
index 46293e6..d9ebc4d 100644
--- a/voice_engine/voice_engine.target.linux-mips.mk
+++ b/voice_engine/voice_engine.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -55,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,13 +63,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -85,6 +81,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,7 +89,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -109,17 +105,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -161,23 +158,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,13 +184,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -214,7 +209,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -231,17 +225,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -284,64 +279,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.linux-mips64.mk b/voice_engine/voice_engine.target.linux-mips64.mk
new file mode 100644
index 0000000..d9ebc4d
--- /dev/null
+++ b/voice_engine/voice_engine.target.linux-mips64.mk
@@ -0,0 +1,313 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/voice_engine/channel.cc \
+ third_party/webrtc/voice_engine/channel_manager.cc \
+ third_party/webrtc/voice_engine/dtmf_inband.cc \
+ third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
+ third_party/webrtc/voice_engine/level_indicator.cc \
+ third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
+ third_party/webrtc/voice_engine/output_mixer.cc \
+ third_party/webrtc/voice_engine/shared_data.cc \
+ third_party/webrtc/voice_engine/statistics.cc \
+ third_party/webrtc/voice_engine/transmit_mixer.cc \
+ third_party/webrtc/voice_engine/utility.cc \
+ third_party/webrtc/voice_engine/voe_audio_processing_impl.cc \
+ third_party/webrtc/voice_engine/voe_base_impl.cc \
+ third_party/webrtc/voice_engine/voe_codec_impl.cc \
+ third_party/webrtc/voice_engine/voe_dtmf_impl.cc \
+ third_party/webrtc/voice_engine/voe_external_media_impl.cc \
+ third_party/webrtc/voice_engine/voe_file_impl.cc \
+ third_party/webrtc/voice_engine/voe_hardware_impl.cc \
+ third_party/webrtc/voice_engine/voe_neteq_stats_impl.cc \
+ third_party/webrtc/voice_engine/voe_network_impl.cc \
+ third_party/webrtc/voice_engine/voe_rtp_rtcp_impl.cc \
+ third_party/webrtc/voice_engine/voe_video_sync_impl.cc \
+ third_party/webrtc/voice_engine/voe_volume_control_impl.cc \
+ third_party/webrtc/voice_engine/voice_engine_impl.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/resampler/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/signal_processing/include \
+ $(LOCAL_PATH)/third_party/webrtc/common_audio/vad/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_coding/main/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/interface \
+ $(LOCAL_PATH)/third_party/webrtc \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_conference_mixer/interface \
+ $(LOCAL_PATH)/third_party/webrtc/modules/audio_device/include \
+ $(LOCAL_PATH)/third_party/webrtc/modules/media_file/interface \
+ $(LOCAL_PATH)/third_party/webrtc/system_wrappers/interface \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_voice_engine_voice_engine_gyp
+
+# Alias gyp target name.
+.PHONY: voice_engine
+voice_engine: third_party_webrtc_voice_engine_voice_engine_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/voice_engine/voice_engine.target.linux-x86.mk b/voice_engine/voice_engine.target.linux-x86.mk
index 365222d..a2232c2 100644
--- a/voice_engine/voice_engine.target.linux-x86.mk
+++ b/voice_engine/voice_engine.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -54,7 +54,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +84,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,7 +92,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -109,12 +108,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -159,21 +161,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,7 +214,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -228,12 +230,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -279,63 +284,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/voice_engine/voice_engine.target.linux-x86_64.mk b/voice_engine/voice_engine.target.linux-x86_64.mk
index f5b2bcc..f248bd8 100644
--- a/voice_engine/voice_engine.target.linux-x86_64.mk
+++ b/voice_engine/voice_engine.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_voice_engine_voice_engine_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -30,6 +29,7 @@
third_party/webrtc/voice_engine/dtmf_inband_queue.cc \
third_party/webrtc/voice_engine/level_indicator.cc \
third_party/webrtc/voice_engine/monitor_module.cc \
+ third_party/webrtc/voice_engine/network_predictor.cc \
third_party/webrtc/voice_engine/output_mixer.cc \
third_party/webrtc/voice_engine/shared_data.cc \
third_party/webrtc/voice_engine/statistics.cc \
@@ -55,7 +55,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -84,6 +83,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,7 +91,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -108,12 +107,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -158,22 +160,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,7 +212,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -226,12 +228,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -277,63 +282,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.gyp b/webrtc.gyp
index d50552d..dee366c 100644
--- a/webrtc.gyp
+++ b/webrtc.gyp
@@ -20,9 +20,11 @@
'variables': {
'webrtc_all_dependencies': [
'base/base.gyp:*',
+ 'sound/sound.gyp:*',
'common.gyp:*',
'common_audio/common_audio.gyp:*',
'common_video/common_video.gyp:*',
+ 'libjingle/xmllite/xmllite.gyp:*',
'modules/modules.gyp:*',
'system_wrappers/source/system_wrappers.gyp:*',
'video_engine/video_engine.gyp:*',
@@ -41,19 +43,16 @@
'conditions': [
['include_tests==1', {
'dependencies': [
- 'base/base_tests.gyp:*',
'common_video/common_video_unittests.gyp:*',
+ 'libjingle/xmllite/xmllite_tests.gyp:*',
+ 'sound/sound_tests.gyp:*',
'system_wrappers/source/system_wrappers_tests.gyp:*',
'test/metrics.gyp:*',
'test/test.gyp:*',
'test/webrtc_test_common.gyp:webrtc_test_common_unittests',
'tools/tools.gyp:*',
'webrtc_tests',
- ],
- }],
- ['build_with_chromium==0 and OS=="android"', {
- 'dependencies': [
- '../tools/android/android_tools_precompiled.gyp:*',
+ 'rtc_unittests',
],
}],
],
@@ -79,6 +78,16 @@
'common.gyp:*',
'<@(webrtc_video_dependencies)',
],
+ 'conditions': [
+ # TODO(andresp): Chromium libpeerconnection should link directly with
+ # this and no if conditions should be needed on webrtc build files.
+ ['build_with_chromium==1', {
+ 'dependencies': [
+ '<(webrtc_root)/modules/modules.gyp:video_capture_module_impl',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_impl',
+ ],
+ }],
+ ],
},
],
}
diff --git a/webrtc.target.darwin-arm.mk b/webrtc.target.darwin-arm.mk
index 4d49a04..1d7d52b 100644
--- a/webrtc.target.darwin-arm.mk
+++ b/webrtc.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -80,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -97,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,23 +141,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,13 +172,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -198,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -215,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -259,68 +263,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.darwin-arm64.mk b/webrtc.target.darwin-arm64.mk
index b7e052a..c77cc9a 100644
--- a/webrtc.target.darwin-arm64.mk
+++ b/webrtc.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -172,7 +174,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -189,12 +190,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -230,59 +234,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.darwin-mips.mk b/webrtc.target.darwin-mips.mk
index d004ebe..303eb1f 100644
--- a/webrtc.target.darwin-mips.mk
+++ b/webrtc.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -47,13 +45,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +130,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,13 +156,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -187,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,17 +197,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -247,64 +241,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.darwin-mips64.mk b/webrtc.target.darwin-mips64.mk
new file mode 100644
index 0000000..303eb1f
--- /dev/null
+++ b/webrtc.target.darwin-mips64.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_webrtc_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/video/call.cc \
+ third_party/webrtc/video/encoded_frame_callback_adapter.cc \
+ third_party/webrtc/video/send_statistics_proxy.cc \
+ third_party/webrtc/video/receive_statistics_proxy.cc \
+ third_party/webrtc/video/transport_adapter.cc \
+ third_party/webrtc/video/video_receive_stream.cc \
+ third_party/webrtc/video/video_send_stream.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_webrtc_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc
+webrtc: third_party_webrtc_webrtc_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/webrtc.target.darwin-x86.mk b/webrtc.target.darwin-x86.mk
index 5ab81f2..c16fa01 100644
--- a/webrtc.target.darwin-x86.mk
+++ b/webrtc.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,21 +133,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,7 +186,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -201,12 +202,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -242,63 +246,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.darwin-x86_64.mk b/webrtc.target.darwin-x86_64.mk
index d872ea5..ab30dcc 100644
--- a/webrtc.target.darwin-x86_64.mk
+++ b/webrtc.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,22 +132,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -182,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -199,12 +200,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -240,63 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.linux-arm.mk b/webrtc.target.linux-arm.mk
index 4d49a04..1d7d52b 100644
--- a/webrtc.target.linux-arm.mk
+++ b/webrtc.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +71,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -80,7 +79,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -97,12 +95,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -140,23 +141,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,13 +172,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -198,7 +200,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -215,12 +216,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -259,68 +263,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.linux-arm64.mk b/webrtc.target.linux-arm64.mk
index b7e052a..c77cc9a 100644
--- a/webrtc.target.linux-arm64.mk
+++ b/webrtc.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,13 +61,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -172,7 +174,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -189,12 +190,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -230,59 +234,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.linux-mips.mk b/webrtc.target.linux-mips.mk
index d004ebe..303eb1f 100644
--- a/webrtc.target.linux-mips.mk
+++ b/webrtc.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -47,13 +45,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +63,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +71,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,17 +87,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -134,23 +130,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,13 +156,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -187,7 +181,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -204,17 +197,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -247,64 +241,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.linux-mips64.mk b/webrtc.target.linux-mips64.mk
new file mode 100644
index 0000000..303eb1f
--- /dev/null
+++ b/webrtc.target.linux-mips64.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_webrtc_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/video/call.cc \
+ third_party/webrtc/video/encoded_frame_callback_adapter.cc \
+ third_party/webrtc/video/send_statistics_proxy.cc \
+ third_party/webrtc/video/receive_statistics_proxy.cc \
+ third_party/webrtc/video/transport_adapter.cc \
+ third_party/webrtc/video/video_receive_stream.cc \
+ third_party/webrtc/video/video_send_stream.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_webrtc_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc
+webrtc: third_party_webrtc_webrtc_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/webrtc.target.linux-x86.mk b/webrtc.target.linux-x86.mk
index 5ab81f2..c16fa01 100644
--- a/webrtc.target.linux-x86.mk
+++ b/webrtc.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -37,7 +36,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -75,7 +74,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -92,12 +90,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -132,21 +133,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,7 +186,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -201,12 +202,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -242,63 +246,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc.target.linux-x86_64.mk b/webrtc.target.linux-x86_64.mk
index d872ea5..ab30dcc 100644
--- a/webrtc.target.linux-x86_64.mk
+++ b/webrtc.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -38,7 +37,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -131,22 +132,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -182,7 +184,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -199,12 +200,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -240,63 +244,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.darwin-arm.mk b/webrtc_common.target.darwin-arm.mk
index 02c17f8..5346074 100644
--- a/webrtc_common.target.darwin-arm.mk
+++ b/webrtc_common.target.darwin-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,23 +135,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +194,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +210,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,68 +257,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.darwin-arm64.mk b/webrtc_common.target.darwin-arm64.mk
index d481455..41deb72 100644
--- a/webrtc_common.target.darwin-arm64.mk
+++ b/webrtc_common.target.darwin-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,13 +55,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -80,12 +78,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -120,21 +121,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,7 +168,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -183,12 +184,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -224,59 +228,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.darwin-mips.mk b/webrtc_common.target.darwin-mips.mk
index ba2f75c..cbb66c1 100644
--- a/webrtc_common.target.darwin-mips.mk
+++ b/webrtc_common.target.darwin-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,13 +39,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -62,6 +57,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -69,7 +65,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,17 +81,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -128,23 +124,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -153,13 +150,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -181,7 +175,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -198,17 +191,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -241,64 +235,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.darwin-mips64.mk b/webrtc_common.target.darwin-mips64.mk
new file mode 100644
index 0000000..cbb66c1
--- /dev/null
+++ b/webrtc_common.target.darwin-mips64.mk
@@ -0,0 +1,269 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/config.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_webrtc_common_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_common
+webrtc_common: third_party_webrtc_webrtc_common_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/webrtc_common.target.darwin-x86.mk b/webrtc_common.target.darwin-x86.mk
index 98e8779..3eacddd 100644
--- a/webrtc_common.target.darwin-x86.mk
+++ b/webrtc_common.target.darwin-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -69,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,7 +180,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -195,12 +196,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,63 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.darwin-x86_64.mk b/webrtc_common.target.darwin-x86_64.mk
index 3976dda..a32ce3d 100644
--- a/webrtc_common.target.darwin-x86_64.mk
+++ b/webrtc_common.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -68,7 +67,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,22 +126,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,63 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.linux-arm.mk b/webrtc_common.target.linux-arm.mk
index 02c17f8..5346074 100644
--- a/webrtc_common.target.linux-arm.mk
+++ b/webrtc_common.target.linux-arm.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +65,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -74,7 +73,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -91,12 +89,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -134,23 +135,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@
-fno-builtin-cosf \
-fno-builtin-sinf \
-fno-tree-sra \
+ -fno-caller-saves \
+ -Wno-psabi \
-fno-partial-inlining \
-fno-early-inlining \
-fno-tree-copy-prop \
-fno-tree-loop-optimize \
-fno-move-loop-invariants \
- -fno-caller-saves \
- -Wno-psabi \
-ffunction-sections \
-funwind-tables \
-g \
@@ -192,7 +194,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -209,12 +210,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -253,68 +257,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-abi \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -Wl,-z,relro \
- -Wl,-z,now \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--icf=safe \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.linux-arm64.mk b/webrtc_common.target.linux-arm64.mk
index d481455..41deb72 100644
--- a/webrtc_common.target.linux-arm64.mk
+++ b/webrtc_common.target.linux-arm64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,13 +55,13 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -80,12 +78,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -120,21 +121,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,7 +168,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -183,12 +184,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -224,59 +228,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.linux-mips.mk b/webrtc_common.target.linux-mips.mk
index ba2f75c..cbb66c1 100644
--- a/webrtc_common.target.linux-mips.mk
+++ b/webrtc_common.target.linux-mips.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -41,13 +39,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -62,6 +57,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -69,7 +65,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,17 +81,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -128,23 +124,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -153,13 +150,10 @@
-pipe \
-fPIC \
-Wno-unused-local-typedefs \
- -mhard-float \
-fno-builtin-cos \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -181,7 +175,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -198,17 +191,18 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
- '-DMIPS32_LE' \
- '-DMIPS_FPU_LE' \
'-DWEBRTC_POSIX' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_ANDROID' \
@@ -241,64 +235,25 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
-Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -EL \
- -Wl,--no-keep-memory \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.linux-mips64.mk b/webrtc_common.target.linux-mips64.mk
new file mode 100644
index 0000000..cbb66c1
--- /dev/null
+++ b/webrtc_common.target.linux-mips64.mk
@@ -0,0 +1,269 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
+gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ third_party/webrtc/config.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -gdwarf-4 \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -fno-builtin-cos \
+ -fno-builtin-sin \
+ -fno-builtin-cosf \
+ -fno-builtin-sinf \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DENABLE_WEBRTC=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
+ '-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
+ '-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
+ '-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO' \
+ '-DWEBRTC_CHROMIUM_BUILD' \
+ '-DLOGGING_INSIDE_WEBRTC' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/third_party/webrtc/overrides \
+ $(LOCAL_PATH)/third_party \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-uninitialized \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: third_party_webrtc_webrtc_common_gyp
+
+# Alias gyp target name.
+.PHONY: webrtc_common
+webrtc_common: third_party_webrtc_webrtc_common_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/webrtc_common.target.linux-x86.mk b/webrtc_common.target.linux-x86.mk
index 98e8779..3eacddd 100644
--- a/webrtc_common.target.linux-x86.mk
+++ b/webrtc_common.target.linux-x86.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -31,7 +30,6 @@
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -69,7 +68,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -86,12 +84,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -126,21 +127,22 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,7 +180,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -195,12 +196,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -236,63 +240,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m32 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_common.target.linux-x86_64.mk b/webrtc_common.target.linux-x86_64.mk
index 3976dda..a32ce3d 100644
--- a/webrtc_common.target.linux-x86_64.mk
+++ b/webrtc_common.target.linux-x86_64.mk
@@ -5,7 +5,6 @@
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := third_party_webrtc_webrtc_common_gyp
LOCAL_MODULE_SUFFIX := .a
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
@@ -32,7 +31,6 @@
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -68,7 +67,6 @@
MY_DEFS_Debug := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -85,12 +83,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -125,22 +126,23 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Debug := false
-
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -176,7 +178,6 @@
MY_DEFS_Release := \
'-DV8_DEPRECATION_WARNINGS' \
- '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
@@ -193,12 +194,15 @@
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -234,63 +238,24 @@
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
-Wsign-compare \
+ -std=gnu++11 \
+ -Wno-narrowing \
+ -Wno-literal-suffix \
-Wno-non-virtual-dtor \
-Wno-sign-promo
-LOCAL_FDO_SUPPORT_Release := false
-
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
-LOCAL_FDO_SUPPORT := $(LOCAL_FDO_SUPPORT_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
-LOCAL_LDFLAGS_Debug := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,--warn-shared-textrel \
- -Wl,-O1 \
- -Wl,--as-needed
-
-
-LOCAL_LDFLAGS_Release := \
- -Wl,-z,now \
- -Wl,-z,relro \
- -Wl,--fatal-warnings \
- -Wl,-z,noexecstack \
- -fPIC \
- -m64 \
- -fuse-ld=gold \
- -nostdlib \
- -Wl,--no-undefined \
- -Wl,--exclude-libs=ALL \
- -Wl,-O1 \
- -Wl,--as-needed \
- -Wl,--gc-sections \
- -Wl,--warn-shared-textrel
-
-
-LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
-
-LOCAL_STATIC_LIBRARIES :=
-
-# Enable grouping to fix circular references
-LOCAL_GROUP_STATIC_LIBRARIES := true
-
LOCAL_SHARED_LIBRARIES := \
libstlport \
libdl
diff --git a/webrtc_examples.gyp b/webrtc_examples.gyp
index 56a0e9e..1af259c 100644
--- a/webrtc_examples.gyp
+++ b/webrtc_examples.gyp
@@ -15,7 +15,8 @@
'type': 'loadable_module',
'dependencies': [
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
- '<(webrtc_root)/modules/modules.gyp:*',
+ '<(webrtc_root)/modules/modules.gyp:video_capture_module_internal_impl',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_internal_impl',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/video_engine/video_engine.gyp:video_engine_core',
@@ -131,7 +132,7 @@
'outputs': ['<(PRODUCT_DIR)/OpenSlDemo-debug.apk'],
'action': [
'bash', '-ec',
- 'rm -f <(_outputs) && '
+ 'rm -fr <(_outputs) <(android_opensl_demo_root)/{bin,libs} && '
'mkdir -p <(android_opensl_demo_root)/libs/<(android_app_abi) && '
'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below
'<(android_strip) -o <(android_opensl_demo_root)/libs/<(android_app_abi)/libopensl-demo-jni.so <(PRODUCT_DIR)/libopensl-demo-jni.so && '
diff --git a/webrtc_tests.gypi b/webrtc_tests.gypi
index 3c1dca6..1d862c6 100644
--- a/webrtc_tests.gypi
+++ b/webrtc_tests.gypi
@@ -8,11 +8,22 @@
{
'targets': [
{
+ 'target_name': 'rtc_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ 'base/base.gyp:rtc_base',
+ 'base/base_tests.gyp:rtc_base_tests_utils',
+ 'base/base_tests.gyp:rtc_base_tests',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ ],
+ },
+ {
'target_name': 'webrtc_tests',
'type': 'none',
'dependencies': [
'video_engine_tests',
'video_loopback',
+ 'video_replay',
'webrtc_perf_tests',
],
},
@@ -37,6 +48,33 @@
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
'test/webrtc_test_common.gyp:webrtc_test_common',
'test/webrtc_test_common.gyp:webrtc_test_renderer',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_impl',
+ '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
+ 'webrtc',
+ ],
+ },
+ {
+ 'target_name': 'video_replay',
+ 'type': 'executable',
+ 'sources': [
+ 'test/mac/run_test.mm',
+ 'test/run_test.cc',
+ 'test/run_test.h',
+ 'video/replay.cc',
+ ],
+ 'conditions': [
+ ['OS=="mac"', {
+ 'sources!': [
+ 'test/run_test.cc',
+ ],
+ }],
+ ],
+ 'dependencies': [
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
+ 'test/webrtc_test_common.gyp:webrtc_test_common',
+ 'test/webrtc_test_common.gyp:webrtc_test_renderer',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_impl',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
'webrtc',
],
@@ -46,7 +84,7 @@
'type': '<(gtest_target_type)',
'sources': [
'video/bitrate_estimator_tests.cc',
- 'video/call_tests.cc',
+ 'video/end_to_end_tests.cc',
'video/send_statistics_proxy_unittest.cc',
'video/video_send_stream_tests.cc',
'test/common_unittest.cc',
@@ -54,17 +92,15 @@
],
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
- 'modules/modules.gyp:rtp_rtcp',
+ '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
+ '<(webrtc_root)/modules/modules.gyp:video_render_module_impl',
'test/metrics.gyp:metrics',
'test/webrtc_test_common.gyp:webrtc_test_common',
'test/test.gyp:test_main',
- 'test/webrtc_test_common.gyp:webrtc_test_video_render_dependencies',
'webrtc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -79,6 +115,7 @@
'video/call_perf_tests.cc',
'video/full_stack.cc',
'video/rampup_tests.cc',
+ 'video/rampup_tests.h',
],
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
@@ -86,13 +123,10 @@
'modules/modules.gyp:rtp_rtcp',
'test/webrtc_test_common.gyp:webrtc_test_common',
'test/test.gyp:test_main',
- 'test/webrtc_test_common.gyp:webrtc_test_video_render_dependencies',
'webrtc',
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are
- # using Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
@@ -101,9 +135,7 @@
},
],
'conditions': [
- # TODO(henrike): remove build_with_chromium==1 when the bots are using
- # Chromium's buildbots.
- ['build_with_chromium==1 and OS=="android"', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'video_engine_tests_apk_target',